diff --git a/backends/pelioncloud_devicemanagement/docs/AccessKey.md b/backends/pelioncloud_devicemanagement/docs/AccessKey.md new file mode 100644 index 000000000..f30e9f8ad --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccessKey.md @@ -0,0 +1,38 @@ + +# AccessKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accountId** | **String** | The ID of the account. | [optional] +**applicationId** | **String** | The ID of the application. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] +**description** | **String** | The description of the access key. | [optional] +**etag** | **String** | API resource entity version. | [optional] +**expiration** | [**DateTime**](DateTime.md) | Expiration time of the access key, as UTC time RFC3339. Expiration makes the access key inoperative and the status will be EXPIRED. The client using the expired access key is no longer able to use the REST API. The access key expiration does not invalidate existing configurations meaning that subscribed events will continue to flow on existing channels. | [optional] +**id** | **String** | The ID of the access key. | [optional] +**key** | **String** | The access key. The full key including the secret part is visible in the response for create only | [optional] +**lastUsedAt** | [**DateTime**](DateTime.md) | The time of the latest access key usage. | [optional] +**name** | **String** | The display name for the access key. | +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always 'access-key' | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the access key. ACTIVE means that the access key is operational. INACTIVE means that the access key is not operational and it prevents the clients to use the REST API. Inactivating the access key does not invalidate existing configurations meaning that subscribed events will continue to flow on existing channels. The EXPIRED status is not allowed to be set directly, it is derived from the expiration attribute. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +KEY | "access-key" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +ACTIVE | "ACTIVE" +INACTIVE | "INACTIVE" +EXPIRED | "EXPIRED" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccessKeyList.md b/backends/pelioncloud_devicemanagement/docs/AccessKeyList.md new file mode 100644 index 000000000..819b83996 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccessKeyList.md @@ -0,0 +1,31 @@ + +# AccessKeyList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | The entity ID to retrieve after the given one. | [optional] +**data** | [**List<AccessKey>**](AccessKey.md) | A list of entities. | +**hasMore** | **Boolean** | Flag indicating whether there are more results. | +**limit** | **Integer** | The number of results to return, or equal to `total_count`. | +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always `list`. | +**order** | [**OrderEnum**](#OrderEnum) | The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. | [optional] +**totalCount** | **Integer** | The total number of records, if requested. | + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +LIST | "list" + + + +## Enum: OrderEnum +Name | Value +---- | ----- +ASC | "ASC" +DESC | "DESC" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountAccessKeysApi.md b/backends/pelioncloud_devicemanagement/docs/AccountAccessKeysApi.md new file mode 100644 index 000000000..fc69d357f --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountAccessKeysApi.md @@ -0,0 +1,130 @@ +# AccountAccessKeysApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccessKey**](AccountAccessKeysApi.md#getAccessKey) | **GET** v3/access-keys/{access_key_id} | Get access key. +[**getAllAccessKeys**](AccountAccessKeysApi.md#getAllAccessKeys) | **GET** v3/access-keys | Get all access keys. + + + +# **getAccessKey** +> AccessKey getAccessKey(accessKeyId) + +Get access key. + +Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountAccessKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountAccessKeysApi apiInstance = new AccountAccessKeysApi(); +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to retrieve. +try { + AccessKey result = apiInstance.getAccessKey(accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountAccessKeysApi#getAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accessKeyId** | **String**| The ID of the access key to retrieve. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllAccessKeys** +> AccessKeyList getAllAccessKeys(limit, after, order, include, statusEq, applicationIdEq) + +Get all access keys. + +Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountAccessKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountAccessKeysApi apiInstance = new AccountAccessKeysApi(); +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +String applicationIdEq = "applicationIdEq_example"; // String | Application filter. +try { + AccessKeyList result = apiInstance.getAllAccessKeys(limit, after, order, include, statusEq, applicationIdEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountAccessKeysApi#getAllAccessKeys"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + **applicationIdEq** | **String**| Application filter. | [optional] + +### Return type + +[**AccessKeyList**](AccessKeyList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountApiKeysApi.md b/backends/pelioncloud_devicemanagement/docs/AccountApiKeysApi.md index 554732e17..82a752685 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountApiKeysApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountApiKeysApi.md @@ -11,10 +11,10 @@ Method | HTTP request | Description [**createApiKey**](AccountApiKeysApi.md#createApiKey) | **POST** v3/api-keys | Create a new API key. [**deleteApiKey**](AccountApiKeysApi.md#deleteApiKey) | **DELETE** v3/api-keys/{apikey_id} | Delete API key. [**getAllApiKeys**](AccountApiKeysApi.md#getAllApiKeys) | **GET** v3/api-keys | Get all API keys. -[**getApiKey**](AccountApiKeysApi.md#getApiKey) | **GET** v3/api-keys/{apikey_id} | Get API key details. -[**getGroupsOfApikey**](AccountApiKeysApi.md#getGroupsOfApikey) | **GET** v3/api-keys/{apikey_id}/groups | Get groups of the API key. -[**getGroupsOfMyApiKey**](AccountApiKeysApi.md#getGroupsOfMyApiKey) | **GET** v3/api-keys/me/groups | Get groups of the API key. -[**getMyApiKey**](AccountApiKeysApi.md#getMyApiKey) | **GET** v3/api-keys/me | Get API key details. +[**getApiKey**](AccountApiKeysApi.md#getApiKey) | **GET** v3/api-keys/{apikey_id} | Get API key. +[**getGroupsOfApikey**](AccountApiKeysApi.md#getGroupsOfApikey) | **GET** v3/api-keys/{apikey_id}/groups | Get policy groups of an API key. +[**getGroupsOfMyApiKey**](AccountApiKeysApi.md#getGroupsOfMyApiKey) | **GET** v3/api-keys/me/groups | Get policy groups of the current API key. +[**getMyApiKey**](AccountApiKeysApi.md#getMyApiKey) | **GET** v3/api-keys/me | Get current API key. [**removeApiKeyFromGroups**](AccountApiKeysApi.md#removeApiKeyFromGroups) | **DELETE** v3/api-keys/{apikey_id}/groups | Remove API key from groups. [**removeApiKeyFromListedGroups**](AccountApiKeysApi.md#removeApiKeyFromListedGroups) | **POST** v3/api-keys/{apikey_id}/groups/remove | Remove API key from groups. [**removeMyApiKeyFromListedGroups**](AccountApiKeysApi.md#removeMyApiKeyFromListedGroups) | **POST** v3/api-keys/me/groups/remove | Remove API key from groups. @@ -30,7 +30,7 @@ Method | HTTP request | Description Add API key to a list of groups. -Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -87,7 +87,7 @@ Name | Type | Description | Notes Add API key to a list of groups. -Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -144,7 +144,7 @@ Name | Type | Description | Notes Add API key to a list of groups. -Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -199,7 +199,7 @@ Name | Type | Description | Notes Add API key to a list of groups. -Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -254,7 +254,7 @@ Name | Type | Description | Notes Create a new API key. -Create a new API key. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' ``` +Create a new API key. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' ``` ### Example ```java @@ -309,7 +309,7 @@ Name | Type | Description | Notes Delete API key. -Delete the API key. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete the API key. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -364,7 +364,7 @@ Name | Type | Description | Notes Get all API keys. -Retrieve API keys in an array, optionally filtered by the owner. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of API keys, optionally filtered by the owner. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -385,11 +385,11 @@ Bearer.setApiKey("YOUR API KEY"); AccountApiKeysApi apiInstance = new AccountApiKeysApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String keyEq = "keyEq_example"; // String | API key filter. Do not include the private portion of the API key (the last 32 characters). -String ownerEq = "ownerEq_example"; // String | Owner name filter. +String ownerEq = "ownerEq_example"; // String | Owner name filter. Note: This parameter is restricted to administrators. try { ApiKeyInfoRespList result = apiInstance.getAllApiKeys(limit, after, order, include, keyEq, ownerEq); System.out.println(result); @@ -404,11 +404,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **keyEq** | **String**| API key filter. Do not include the private portion of the API key (the last 32 characters). | [optional] - **ownerEq** | **String**| Owner name filter. | [optional] + **ownerEq** | **String**| Owner name filter. <b>Note:</b> This parameter is restricted to administrators. | [optional] ### Return type @@ -427,9 +427,9 @@ Name | Type | Description | Notes # **getApiKey** > ApiKeyInfoResp getApiKey(apikeyId) -Get API key details. +Get API key. -Retrieve API key details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve details of an API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -482,9 +482,9 @@ Name | Type | Description | Notes # **getGroupsOfApikey** > GroupSummaryList getGroupsOfApikey(apikeyId, limit, after, order, include) -Get groups of the API key. +Get policy groups of an API key. -Retrieve groups associated with the API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups associated with an API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -506,8 +506,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountApiKeysApi apiInstance = new AccountApiKeysApi(); String apikeyId = "apikeyId_example"; // String | The ID of the API key. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { GroupSummaryList result = apiInstance.getGroupsOfApikey(apikeyId, limit, after, order, include); @@ -524,8 +524,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apikeyId** | **String**| The ID of the API key. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -545,9 +545,9 @@ Name | Type | Description | Notes # **getGroupsOfMyApiKey** > GroupSummaryList getGroupsOfMyApiKey(limit, after, order, include) -Get groups of the API key. +Get policy groups of the current API key. -Retrieve groups associated with the API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups associated with the current API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -568,8 +568,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountApiKeysApi apiInstance = new AccountApiKeysApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { GroupSummaryList result = apiInstance.getGroupsOfMyApiKey(limit, after, order, include); @@ -585,8 +585,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -606,9 +606,9 @@ Name | Type | Description | Notes # **getMyApiKey** > ApiKeyInfoResp getMyApiKey() -Get API key details. +Get current API key. -Retrieve API key details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve details of current API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -659,7 +659,7 @@ This endpoint does not need any parameter. Remove API key from groups. -Remove API key from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -716,7 +716,7 @@ Name | Type | Description | Notes Remove API key from groups. -Remove API key from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -773,7 +773,7 @@ Name | Type | Description | Notes Remove API key from groups. -Remove API key from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API key from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -828,7 +828,7 @@ Name | Type | Description | Notes Remove API key from groups. -Remove API key from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API key from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -883,7 +883,7 @@ Name | Type | Description | Notes Reset the secret key. -Reset the secret key of the API key. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer <api_key>' ``` +Reset the secret key of the API key. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -940,7 +940,7 @@ Name | Type | Description | Notes Update API key details. -Update API key details. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` +Update API key details. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` ### Example ```java @@ -997,7 +997,7 @@ Name | Type | Description | Notes Update API key details. -Update API key details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` +Update API key details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AccountApplicationsApi.md b/backends/pelioncloud_devicemanagement/docs/AccountApplicationsApi.md new file mode 100644 index 000000000..b7d391d62 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountApplicationsApi.md @@ -0,0 +1,778 @@ +# AccountApplicationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addApplicationToGroups**](AccountApplicationsApi.md#addApplicationToGroups) | **POST** v3/applications/{application_id}/groups/add | Add application to a list of groups. +[**createApplication**](AccountApplicationsApi.md#createApplication) | **POST** v3/applications | Create a new application. +[**createApplicationAccessKey**](AccountApplicationsApi.md#createApplicationAccessKey) | **POST** v3/applications/{application_id}/access-keys | Create a new applicationaccess key. +[**deleteApplication**](AccountApplicationsApi.md#deleteApplication) | **DELETE** v3/applications/{application_id} | Delete application. +[**deleteApplicationAccessKey**](AccountApplicationsApi.md#deleteApplicationAccessKey) | **DELETE** v3/applications/{application_id}/access-keys/{access_key_id} | Delete access key associated with the application. +[**getAllApplicationAccessKeys**](AccountApplicationsApi.md#getAllApplicationAccessKeys) | **GET** v3/applications/{application_id}/access-keys | Get all access keys associated with the application. +[**getAllApplications**](AccountApplicationsApi.md#getAllApplications) | **GET** v3/applications | Get all applications. +[**getApplication**](AccountApplicationsApi.md#getApplication) | **GET** v3/applications/{application_id} | Get application. +[**getApplicationAccessKey**](AccountApplicationsApi.md#getApplicationAccessKey) | **GET** v3/applications/{application_id}/access-keys/{access_key_id} | Get access key. +[**getGroupsOfApplication**](AccountApplicationsApi.md#getGroupsOfApplication) | **GET** v3/applications/{application_id}/groups | Get policy groups of an application. +[**removeApplicationFromGroups**](AccountApplicationsApi.md#removeApplicationFromGroups) | **POST** v3/applications/{application_id}/groups/remove | Remove application from groups. +[**updateApplication**](AccountApplicationsApi.md#updateApplication) | **PUT** v3/applications/{application_id} | Update applicationdetails. +[**updateApplicationAccessKey**](AccountApplicationsApi.md#updateApplicationAccessKey) | **PUT** v3/applications/{application_id}/access-keys/{access_key_id} | Update access key details. + + + +# **addApplicationToGroups** +> Void addApplicationToGroups(applicationId, body) + +Add application to a list of groups. + +Add application to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application to add to the group. +GroupIdList body = new GroupIdList(); // GroupIdList | A list of IDs of the groups to update. +try { + Void result = apiInstance.addApplicationToGroups(applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#addApplicationToGroups"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application to add to the group. | + **body** | [**GroupIdList**](GroupIdList.md)| A list of IDs of the groups to update. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createApplication** +> Application createApplication(body) + +Create a new application. + +Create a new application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications -d '{\"name\": \"MyApplication1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +Application body = new Application(); // Application | The details of the application to create. +try { + Application result = apiInstance.createApplication(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#createApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Application**](Application.md)| The details of the application to create. | + +### Return type + +[**Application**](Application.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createApplicationAccessKey** +> AccessKey createApplicationAccessKey(applicationId, body) + +Create a new applicationaccess key. + +Create a new access key for the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys -d '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +AccessKey body = new AccessKey(); // AccessKey | The details of the access key to create. +try { + AccessKey result = apiInstance.createApplicationAccessKey(applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#createApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **body** | [**AccessKey**](AccessKey.md)| The details of the access key to create. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteApplication** +> Void deleteApplication(applicationId) + +Delete application. + +Delete the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application to delete. +try { + Void result = apiInstance.deleteApplication(applicationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#deleteApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteApplicationAccessKey** +> Void deleteApplicationAccessKey(applicationId, accessKeyId) + +Delete access key associated with the application. + +Delete the access key associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to delete. +try { + Void result = apiInstance.deleteApplicationAccessKey(applicationId, accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#deleteApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllApplicationAccessKeys** +> AccessKeyList getAllApplicationAccessKeys(applicationId, limit, after, order, include, statusEq) + +Get all access keys associated with the application. + +Retrieve an array of access keys associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +try { + AccessKeyList result = apiInstance.getAllApplicationAccessKeys(applicationId, limit, after, order, include, statusEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#getAllApplicationAccessKeys"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + +### Return type + +[**AccessKeyList**](AccessKeyList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllApplications** +> ApplicationList getAllApplications(limit, after, order, include, statusEq) + +Get all applications. + +Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +try { + ApplicationList result = apiInstance.getAllApplications(limit, after, order, include, statusEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#getAllApplications"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + +### Return type + +[**ApplicationList**](ApplicationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getApplication** +> Application getApplication(applicationId) + +Get application. + +Retrieve details of an application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application to retrieve. +try { + Application result = apiInstance.getApplication(applicationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#getApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application to retrieve. | + +### Return type + +[**Application**](Application.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getApplicationAccessKey** +> AccessKey getApplicationAccessKey(applicationId, accessKeyId) + +Get access key. + +Retrieve details of an access key associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to retrieve. +try { + AccessKey result = apiInstance.getApplicationAccessKey(applicationId, accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#getApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to retrieve. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getGroupsOfApplication** +> GroupSummaryList getGroupsOfApplication(applicationId, limit, after, order, include) + +Get policy groups of an application. + +Retrieve an array of policy groups associated with an application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + GroupSummaryList result = apiInstance.getGroupsOfApplication(applicationId, limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#getGroupsOfApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**GroupSummaryList**](GroupSummaryList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **removeApplicationFromGroups** +> Void removeApplicationFromGroups(applicationId, body) + +Remove application from groups. + +Remove application from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application to remove from the group. +GroupIdList body = new GroupIdList(); // GroupIdList | A list of IDs of the groups to update. +try { + Void result = apiInstance.removeApplicationFromGroups(applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#removeApplicationFromGroups"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application to remove from the group. | + **body** | [**GroupIdList**](GroupIdList.md)| A list of IDs of the groups to update. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateApplication** +> ApiKeyInfoResp updateApplication(applicationId, body) + +Update applicationdetails. + +Update application details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApplication25\"}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application to update. +Application body = new Application(); // Application | New applicationattributes to store. +try { + ApiKeyInfoResp result = apiInstance.updateApplication(applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#updateApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application to update. | + **body** | [**Application**](Application.md)| New applicationattributes to store. | + +### Return type + +[**ApiKeyInfoResp**](ApiKeyInfoResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateApplicationAccessKey** +> AccessKey updateApplicationAccessKey(applicationId, accessKeyId, body) + +Update access key details. + +Update access key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestAccessKey\"}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountApplicationsApi apiInstance = new AccountApplicationsApi(); +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to update. +AccessKey body = new AccessKey(); // AccessKey | New access key attributes to store. +try { + AccessKey result = apiInstance.updateApplicationAccessKey(applicationId, accessKeyId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountApplicationsApi#updateApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to update. | + **body** | [**AccessKey**](AccessKey.md)| New access key attributes to store. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountCreationReq.md b/backends/pelioncloud_devicemanagement/docs/AccountCreationReq.md index d3eb1ee6b..025b322eb 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountCreationReq.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountCreationReq.md @@ -10,15 +10,15 @@ Name | Type | Description | Notes **adminFullName** | **String** | The full name of the admin user to create. | [optional] **adminName** | **String** | The username of the admin user to create. | [optional] **adminPassword** | **String** | The password when creating a new user. Generated when not present in the request. | [optional] -**aliases** | **List<String>** | An array of aliases. | [optional] +**aliases** | **List<String>** | An array of aliases for the tenant account ID. The aliases must be globally unique. | [optional] **businessModel** | [**BusinessModel**](BusinessModel.md) | | [optional] **city** | **String** | The city part of the postal address. Required for commercial accounts only. | [optional] -**company** | **String** | The name of the company. Required for commercial accounts only. | [optional] +**company** | **String** | The name of the company used in billing. Required for commercial accounts only. | [optional] **contact** | **String** | The name of the contact person for this account. Required for commercial accounts only. | [optional] **contractNumber** | **String** | Contract number of the customer. | [optional] **country** | **String** | The country part of the postal address. Required for commercial accounts only. | [optional] **customerNumber** | **String** | Customer number of the customer. | [optional] -**displayName** | **String** | The display name for the account. | [optional] +**displayName** | **String** | The display name for the tenant account. | [optional] **email** | **String** | The company email address for this account. Required for commercial accounts only. | [optional] **endMarket** | **String** | The end market of the account to create. | **phoneNumber** | **String** | The phone number of a representative of the company. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/AccountCreationResp.md b/backends/pelioncloud_devicemanagement/docs/AccountCreationResp.md new file mode 100644 index 000000000..f516f80f3 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountCreationResp.md @@ -0,0 +1,84 @@ + +# AccountCreationResp + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addressLine1** | **String** | Postal address line 1. | [optional] +**addressLine2** | **String** | Postal address line 2. | [optional] +**adminEmail** | **String** | The email address of the admin user created for this account. Present only in the response for account creation. | [optional] +**adminFullName** | **String** | The full name of the admin user created for this account. Present only in the response for account creation. | [optional] +**adminId** | **String** | The ID of the admin user created for this account. Present only in the response for the account creation. | [optional] +**adminKey** | **String** | The admin API key created for this account. Present only in the response for account creation. | [optional] +**adminName** | **String** | The username of the admin user created for this account. Present only in the response for account creation. | [optional] +**adminPassword** | **String** | The password of the admin user created for this account. Present only in the response for account creation. | [optional] +**aliases** | **List<String>** | An array of aliases for the tenant account ID. The aliases must be globally unique. | [optional] +**businessModel** | [**BusinessModel**](BusinessModel.md) | | [optional] +**businessModelHistory** | [**List<BusinessModelHistory>**](BusinessModelHistory.md) | Business model history for this account. | [optional] +**city** | **String** | The city part of the postal address. | [optional] +**company** | **String** | The name of the company used in billing. | [optional] +**contact** | **String** | The name of the contact person for this account. | [optional] +**contractNumber** | **String** | Contract number of the customer. | [optional] +**country** | **String** | The country part of the postal address. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] +**customFields** | **Map<String, String>** | Account's custom properties as key-value pairs. | [optional] +**customerNumber** | **String** | Customer number of the customer. | [optional] +**displayName** | **String** | The display name for the tenant account. | [optional] +**email** | **String** | The company email address for this account. | [optional] +**endMarket** | **String** | Account end market. | [optional] +**etag** | **String** | API resource entity version. | [optional] +**expiration** | [**DateTime**](DateTime.md) | Expiration time of the account, as UTC time RFC3339. | [optional] +**expirationWarningThreshold** | **Integer** | Indicates how many days (1-180) before account expiration a notification email is sent. | [optional] +**id** | **String** | Account ID. | [optional] +**idleTimeout** | **Integer** | The reference token expiration time, in minutes, for this account. | [optional] +**limitations** | [**List<AccountLimitation>**](AccountLimitation.md) | List of account limitation objects. | [optional] +**limits** | **Map<String, String>** | DEPRECATED: Replaced by the limitations parameter. | [optional] +**mfaStatus** | [**MfaStatusEnum**](#MfaStatusEnum) | The enforcement status of multi-factor authentication, either `enforced` or `optional`. | [optional] +**notificationEmails** | **List<String>** | A list of notification email addresses. | [optional] +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always `account`. | [optional] +**parentAccount** | [**ParentAccountInfo**](ParentAccountInfo.md) | Contact details of the parent account. | [optional] +**parentId** | **String** | The ID of the parent account, if any. | [optional] +**passwordPolicy** | [**PasswordPolicy**](PasswordPolicy.md) | The password policy for this account. | [optional] +**passwordRecoveryExpiration** | **Integer** | Indicates for how many minutes a password recovery email is valid. | [optional] +**phoneNumber** | **String** | The phone number of a company representative. | [optional] +**policies** | [**List<FeaturePolicy>**](FeaturePolicy.md) | List of policies if requested. | [optional] +**postalCode** | **String** | The postal code part of the postal address. | [optional] +**reason** | **String** | A note with the reason for account status update. | [optional] +**referenceNote** | **String** | A reference note for updating the status of the account. | [optional] +**salesContact** | **String** | Email address of the sales contact. | [optional] +**state** | **String** | The state part of the postal address. | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the account. | [optional] +**subAccounts** | [**List<AccountInfo>**](AccountInfo.md) | List of sub accounts. Not available for developer users. | [optional] +**templateId** | **String** | Account template ID. | [optional] +**tier** | **String** | The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future. | [optional] +**tierHistory** | [**List<TierHistory>**](TierHistory.md) | Tier history for this account. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] +**upgradedAt** | [**DateTime**](DateTime.md) | Time when upgraded to commercial account in UTC format RFC3339. | [optional] + + + +## Enum: MfaStatusEnum +Name | Value +---- | ----- +ENFORCED | "enforced" +OPTIONAL | "optional" + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +ACCOUNT | "account" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +ENROLLING | "ENROLLING" +ACTIVE | "ACTIVE" +RESTRICTED | "RESTRICTED" +SUSPENDED | "SUSPENDED" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountEmailNotificationLogsApi.md b/backends/pelioncloud_devicemanagement/docs/AccountEmailNotificationLogsApi.md index ebdcca628..22d786f8d 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountEmailNotificationLogsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountEmailNotificationLogsApi.md @@ -4,16 +4,17 @@ All URIs are relative to *https://api.us-east-1.mbedcloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getNofificationEntries**](AccountEmailNotificationLogsApi.md#getNofificationEntries) | **GET** v3/accounts/me/notifications | Get notification events for an account. +[**getNofificationEntries**](AccountEmailNotificationLogsApi.md#getNofificationEntries) | **GET** v3/accounts/me/notifications | Get logs of email notifications. +[**getNofificationEntry**](AccountEmailNotificationLogsApi.md#getNofificationEntry) | **GET** v3/accounts/me/notifications/{notification_id} | Get an email notification. # **getNofificationEntries** > NotificationEntryList getNofificationEntries(limit, after, order) -Get notification events for an account. +Get logs of email notifications. -Retrieve notifications for an account. +Retrieve an array of email notification logs. ### Example ```java @@ -34,8 +35,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountEmailNotificationLogsApi apiInstance = new AccountEmailNotificationLogsApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. try { NotificationEntryList result = apiInstance.getNofificationEntries(limit, after, order); System.out.println(result); @@ -50,8 +51,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] ### Return type @@ -66,3 +67,58 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json + +# **getNofificationEntry** +> NotificationEntry getNofificationEntry(notificationId) + +Get an email notification. + +Retrieve an email notification log entry. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountEmailNotificationLogsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountEmailNotificationLogsApi apiInstance = new AccountEmailNotificationLogsApi(); +String notificationId = "notificationId_example"; // String | The ID of the log entry to be retrieved. +try { + NotificationEntry result = apiInstance.getNofificationEntry(notificationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountEmailNotificationLogsApi#getNofificationEntry"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notificationId** | **String**| The ID of the log entry to be retrieved. | + +### Return type + +[**NotificationEntry**](NotificationEntry.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountEntitlementLimitationsApi.md b/backends/pelioncloud_devicemanagement/docs/AccountEntitlementLimitationsApi.md new file mode 100644 index 000000000..fe4304a57 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountEntitlementLimitationsApi.md @@ -0,0 +1,120 @@ +# AccountEntitlementLimitationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccountLimitation**](AccountEntitlementLimitationsApi.md#getAccountLimitation) | **GET** v3/limitations/{limitation_id} | Get an entitlement limitation. +[**getAccountLimitations**](AccountEntitlementLimitationsApi.md#getAccountLimitations) | **GET** v3/limitations | Get entitlement limitations. + + + +# **getAccountLimitation** +> AccountLimitation getAccountLimitation(limitationId) + +Get an entitlement limitation. + +Retrieve an entitlement limitation. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountEntitlementLimitationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountEntitlementLimitationsApi apiInstance = new AccountEntitlementLimitationsApi(); +String limitationId = "limitationId_example"; // String | The ID of the limitation to be fetched. +try { + AccountLimitation result = apiInstance.getAccountLimitation(limitationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountEntitlementLimitationsApi#getAccountLimitation"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limitationId** | **String**| The ID of the limitation to be fetched. | + +### Return type + +[**AccountLimitation**](AccountLimitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAccountLimitations** +> AccountLimitationList getAccountLimitations(inheritedEq) + +Get entitlement limitations. + +Retrieve an array of entitlement limitations. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountEntitlementLimitationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountEntitlementLimitationsApi apiInstance = new AccountEntitlementLimitationsApi(); +String inheritedEq = "inheritedEq_example"; // String | Filter for finding account limitations by inheritance. True returns also inherited limitations. False returns only non-inherited ones. +try { + AccountLimitationList result = apiInstance.getAccountLimitations(inheritedEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountEntitlementLimitationsApi#getAccountLimitations"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inheritedEq** | **String**| Filter for finding account limitations by inheritance. True returns also inherited limitations. False returns only non-inherited ones. | [optional] + +### Return type + +[**AccountLimitationList**](AccountLimitationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountIdentityProvidersApi.md b/backends/pelioncloud_devicemanagement/docs/AccountIdentityProvidersApi.md index 0d2cf5934..04d022a40 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountIdentityProvidersApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountIdentityProvidersApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description [**deleteSpCertificate**](AccountIdentityProvidersApi.md#deleteSpCertificate) | **POST** v3/identity-providers/{identity_provider_id}/delete-sp-certificate | Delete the service provider certificate. [**generateSpCertificate**](AccountIdentityProvidersApi.md#generateSpCertificate) | **POST** v3/identity-providers/{identity_provider_id}/generate-sp-certificate | Generate a new service provider certificate. [**getAllIdentityProviders**](AccountIdentityProvidersApi.md#getAllIdentityProviders) | **GET** v3/identity-providers | Get all identity providers. -[**getIdentityProvider**](AccountIdentityProvidersApi.md#getIdentityProvider) | **GET** v3/identity-providers/{identity_provider_id} | Get identity provider by ID. +[**getIdentityProvider**](AccountIdentityProvidersApi.md#getIdentityProvider) | **GET** v3/identity-providers/{identity_provider_id} | Get identity provider. [**refreshJwks**](AccountIdentityProvidersApi.md#refreshJwks) | **POST** v3/identity-providers/{identity_provider_id}/refresh-jwks | Refreshes the OIDC signing keys. [**updateIdentityProvider**](AccountIdentityProvidersApi.md#updateIdentityProvider) | **PUT** v3/identity-providers/{identity_provider_id} | Update an existing identity provider. @@ -20,7 +20,7 @@ Method | HTTP request | Description Create a new identity provider. -Create a new identity provider. +Create a new identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -77,7 +77,7 @@ Name | Type | Description | Notes Delete an identity provider by ID. -Delete an identity provider by ID. +Delete an identity provider by ID. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -132,7 +132,7 @@ Name | Type | Description | Notes Delete the service provider certificate. -Delete a service provider certificate. +Delete a service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -187,7 +187,7 @@ Name | Type | Description | Notes Generate a new service provider certificate. -Generate a new service provider certificate. +Generate a new service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -244,7 +244,7 @@ Name | Type | Description | Notes Get all identity providers. -Retrieve identity providers in an array. +Retrieve an array of identity providers. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -265,8 +265,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountIdentityProvidersApi apiInstance = new AccountIdentityProvidersApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { IdentityProviderList result = apiInstance.getAllIdentityProviders(limit, after, order, include); @@ -282,8 +282,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -303,9 +303,9 @@ Name | Type | Description | Notes # **getIdentityProvider** > IdentityProviderInfo getIdentityProvider(identityProviderId) -Get identity provider by ID. +Get identity provider. -Retrieve by ID. +Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -360,7 +360,7 @@ Name | Type | Description | Notes Refreshes the OIDC signing keys. -Refreshes an OIDC IdP's signing keys. +Refreshes an OIDC IdP's signing keys. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -415,7 +415,7 @@ Name | Type | Description | Notes Update an existing identity provider. -Update an existing identity provider. +Update an existing identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AccountInfo.md b/backends/pelioncloud_devicemanagement/docs/AccountInfo.md index 4e728ec4d..733dda5ed 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountInfo.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountInfo.md @@ -6,24 +6,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **addressLine1** | **String** | Postal address line 1. | [optional] **addressLine2** | **String** | Postal address line 2. | [optional] -**adminEmail** | **String** | The email address of the admin user created for this account. Present only in the response for account creation. | [optional] -**adminFullName** | **String** | The full name of the admin user created for this account. Present only in the response for account creation. | [optional] -**adminId** | **String** | The ID of the admin user created for this account. Present only in the response for the account creation. | [optional] -**adminKey** | **String** | The admin API key created for this account. Present only in the response for account creation. | [optional] -**adminName** | **String** | The username of the admin user created for this account. Present only in the response for account creation. | [optional] -**adminPassword** | **String** | The password of the admin user created for this account. Present only in the response for account creation. | [optional] -**aliases** | **List<String>** | An array of aliases. | [optional] +**aliases** | **List<String>** | An array of aliases for the tenant account ID. The aliases must be globally unique. | [optional] **businessModel** | [**BusinessModel**](BusinessModel.md) | | [optional] **businessModelHistory** | [**List<BusinessModelHistory>**](BusinessModelHistory.md) | Business model history for this account. | [optional] **city** | **String** | The city part of the postal address. | [optional] -**company** | **String** | The name of the company. | [optional] +**company** | **String** | The name of the company used in billing. | [optional] **contact** | **String** | The name of the contact person for this account. | [optional] **contractNumber** | **String** | Contract number of the customer. | [optional] **country** | **String** | The country part of the postal address. | [optional] **createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] **customFields** | **Map<String, String>** | Account's custom properties as key-value pairs. | [optional] **customerNumber** | **String** | Customer number of the customer. | [optional] -**displayName** | **String** | The display name for the account. | [optional] +**displayName** | **String** | The display name for the tenant account. | [optional] **email** | **String** | The company email address for this account. | [optional] **endMarket** | **String** | Account end market. | **etag** | **String** | API resource entity version. | @@ -32,7 +26,7 @@ Name | Type | Description | Notes **id** | **String** | Account ID. | **idleTimeout** | **Integer** | The reference token expiration time, in minutes, for this account. | [optional] **limitations** | [**List<AccountLimitation>**](AccountLimitation.md) | List of account limitation objects. | [optional] -**limits** | **Map<String, String>** | List of limits as key-value pairs if requested. | [optional] +**limits** | **Map<String, String>** | DEPRECATED: Replaced by the limitations parameter. | [optional] **mfaStatus** | [**MfaStatusEnum**](#MfaStatusEnum) | The enforcement status of multi-factor authentication, either `enforced` or `optional`. | [optional] **notificationEmails** | **List<String>** | A list of notification email addresses. | [optional] **object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always `account`. | @@ -51,6 +45,7 @@ Name | Type | Description | Notes **subAccounts** | [**List<AccountInfo>**](AccountInfo.md) | List of sub accounts. Not available for developer users. | [optional] **templateId** | **String** | Account template ID. | [optional] **tier** | **String** | The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future. | +**tierHistory** | [**List<TierHistory>**](TierHistory.md) | Tier history for this account. | [optional] **updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] **upgradedAt** | [**DateTime**](DateTime.md) | Time when upgraded to commercial account in UTC format RFC3339. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/AccountInfoList.md b/backends/pelioncloud_devicemanagement/docs/AccountInfoList.md index 7ed3fa0eb..a447912f3 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountInfoList.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountInfoList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<AccountInfo>**](AccountInfo.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return (2-1000), or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/AccountLimitation.md b/backends/pelioncloud_devicemanagement/docs/AccountLimitation.md index 866fa89c4..13c27710f 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountLimitation.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountLimitation.md @@ -11,36 +11,29 @@ Name | Type | Description | Notes **id** | **String** | Entity ID. | [optional] **inherited** | **Boolean** | Flag indicating whether this limitation is inherited. | [optional] **inheritedFrom** | **String** | Indicates where this limit is inherited from. | [optional] -**inheritedType** | **String** | Indicates the type of the entity where the limitation is inherited from. | [optional] -**limit** | **Integer** | The value of the limit. | [optional] +**inheritedType** | [**InheritedTypeEnum**](#InheritedTypeEnum) | Indicates the type of the entity where the limitation is inherited from. | [optional] +**inheritedValue** | [**AccountLimitationInheritedValue**](AccountLimitationInheritedValue.md) | | [optional] +**limit** | **Long** | The value of the limit. | [optional] **name** | **String** | Name of the account limitation. | [optional] **object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always 'limitation' | [optional] -**quota** | **Integer** | Quota of the account limitation. | [optional] +**quota** | **Long** | Quota of the account limitation. | [optional] **updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] + +## Enum: InheritedTypeEnum +Name | Value +---- | ----- +ACCOUNT | "account" +TEMPLATE | "template" +TIER_TEMPLATE | "tier_template" + + ## Enum: ObjectEnum Name | Value ---- | ----- -USER | "user" -API_KEY | "api-key" -GROUP | "group" -ACCOUNT | "account" -ACCOUNT_TEMPLATE | "account_template" -TRUSTED_CERT | "trusted_cert" -LIST | "list" -ERROR | "error" -AGREEMENT | "agreement" -SIGNED_AGREEMENT | "signed_agreement" -POLICY | "policy" LIMITATION | "limitation" -IDENTITY_PROVIDER | "identity_provider" -USER_SESSION | "user_session" -USER_INVITATION | "user_invitation" -NOTIFICATION_ENTRY | "notification_entry" -BRANDING_COLOR | "branding_color" -BRANDING_IMAGE | "branding_image" diff --git a/backends/pelioncloud_devicemanagement/docs/AccountLimitationInheritedValue.md b/backends/pelioncloud_devicemanagement/docs/AccountLimitationInheritedValue.md new file mode 100644 index 000000000..2b043ac13 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountLimitationInheritedValue.md @@ -0,0 +1,12 @@ + +# AccountLimitationInheritedValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billingPeriod** | **Integer** | Default billing period of the account limitation as defined in the parent entity. | [optional] +**limit** | **Long** | Default value of the limit as defined in the parent entity. | [optional] +**quota** | **Long** | Default quota as defined in the parent entity. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountLimitationList.md b/backends/pelioncloud_devicemanagement/docs/AccountLimitationList.md index bedd99ae6..427888a37 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountLimitationList.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountLimitationList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<AccountLimitation>**](AccountLimitation.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there is more results. | **limit** | **Integer** | The number of results to return, (range: 2-1000), or equals to `total_count` | diff --git a/backends/pelioncloud_devicemanagement/docs/AccountPolicyGroupsApi.md b/backends/pelioncloud_devicemanagement/docs/AccountPolicyGroupsApi.md index 72ce2963c..c18f86e27 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountPolicyGroupsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountPolicyGroupsApi.md @@ -6,17 +6,20 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**addApiKeysToGroup**](AccountPolicyGroupsApi.md#addApiKeysToGroup) | **POST** v3/policy-groups/{group_id}/api-keys | Add API keys to the group. [**addListedApiKeysToGroup**](AccountPolicyGroupsApi.md#addListedApiKeysToGroup) | **POST** v3/policy-groups/{group_id}/api-keys/add | Add API Keys to the group. +[**addListedApplicationsToGroup**](AccountPolicyGroupsApi.md#addListedApplicationsToGroup) | **POST** v3/policy-groups/{group_id}/applications/add | Add applications to the group. [**addListedUsersToGroup_**](AccountPolicyGroupsApi.md#addListedUsersToGroup_) | **POST** v3/policy-groups/{group_id}/users/add | Add users to the group. [**addSubjectsToGroup**](AccountPolicyGroupsApi.md#addSubjectsToGroup) | **POST** v3/policy-groups/{group_id} | Add members to a group. [**addUsersToGroup_**](AccountPolicyGroupsApi.md#addUsersToGroup_) | **POST** v3/policy-groups/{group_id}/users | Add users to the group. [**createGroup**](AccountPolicyGroupsApi.md#createGroup) | **POST** v3/policy-groups | Create a new group. [**deleteGroup**](AccountPolicyGroupsApi.md#deleteGroup) | **DELETE** v3/policy-groups/{group_id} | Delete a group. -[**getAllGroups**](AccountPolicyGroupsApi.md#getAllGroups) | **GET** v3/policy-groups | Get all group information. -[**getApiKeysOfGroup**](AccountPolicyGroupsApi.md#getApiKeysOfGroup) | **GET** v3/policy-groups/{group_id}/api-keys | Get the API keys of a group. -[**getGroupSummary**](AccountPolicyGroupsApi.md#getGroupSummary) | **GET** v3/policy-groups/{group_id} | Get group information. -[**getUsersOfGroup**](AccountPolicyGroupsApi.md#getUsersOfGroup) | **GET** v3/policy-groups/{group_id}/users | Get users of a group. +[**getAllGroups**](AccountPolicyGroupsApi.md#getAllGroups) | **GET** v3/policy-groups | Get policy groups. +[**getApiKeysOfGroup**](AccountPolicyGroupsApi.md#getApiKeysOfGroup) | **GET** v3/policy-groups/{group_id}/api-keys | Get the API keys of a policy group. +[**getApplicationsOfGroup**](AccountPolicyGroupsApi.md#getApplicationsOfGroup) | **GET** v3/policy-groups/{group_id}/applications | Get the applications of a policy group. +[**getGroupSummary**](AccountPolicyGroupsApi.md#getGroupSummary) | **GET** v3/policy-groups/{group_id} | Get a policy group. +[**getUsersOfGroup**](AccountPolicyGroupsApi.md#getUsersOfGroup) | **GET** v3/policy-groups/{group_id}/users | Get users of a policy group. [**removeApiKeysFromGroup**](AccountPolicyGroupsApi.md#removeApiKeysFromGroup) | **DELETE** v3/policy-groups/{group_id}/api-keys | Remove API keys from a group. [**removeListedApiKeysFromGroup**](AccountPolicyGroupsApi.md#removeListedApiKeysFromGroup) | **POST** v3/policy-groups/{group_id}/api-keys/remove | Remove API keys from a group. +[**removeListedApplicationsFromGroup**](AccountPolicyGroupsApi.md#removeListedApplicationsFromGroup) | **POST** v3/policy-groups/{group_id}/applications/remove | Remove applications from a group. [**removeListedUsersFromGroup**](AccountPolicyGroupsApi.md#removeListedUsersFromGroup) | **POST** v3/policy-groups/{group_id}/users/remove | Remove users from a group. [**removeUsersFromGroup**](AccountPolicyGroupsApi.md#removeUsersFromGroup) | **DELETE** v3/policy-groups/{group_id}/users | Remove users from a group. [**updateGroupName**](AccountPolicyGroupsApi.md#updateGroupName) | **PUT** v3/policy-groups/{group_id} | Update the group name. @@ -28,7 +31,7 @@ Method | HTTP request | Description Add API keys to the group. -Add API keys to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Add API keys to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -85,7 +88,7 @@ Name | Type | Description | Notes Add API Keys to the group. -Add API keys to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Add API keys to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -131,6 +134,63 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **addListedApplicationsToGroup** +> GroupSummary addListedApplicationsToGroup(groupId, body) + +Add applications to the group. + +Add applications to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"applications\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); +String groupId = "groupId_example"; // String | The ID of the group. +SubjectList body = new SubjectList(); // SubjectList | A list of applications to add to the group. +try { + GroupSummary result = apiInstance.addListedApplicationsToGroup(groupId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountPolicyGroupsApi#addListedApplicationsToGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the group. | + **body** | [**SubjectList**](SubjectList.md)| A list of applications to add to the group. | + +### Return type + +[**GroupSummary**](GroupSummary.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: Not defined @@ -142,7 +202,7 @@ Name | Type | Description | Notes Add users to the group. -Add users to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer <api_key>' ``` +Add users to the group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -199,7 +259,7 @@ Name | Type | Description | Notes Add members to a group. -Add users and API keys to a group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Add users and API keys to a group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -256,7 +316,7 @@ Name | Type | Description | Notes Add users to the group. -Add users to the group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' ``` +Add users to the group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -313,7 +373,7 @@ Name | Type | Description | Notes Create a new group. -Create a new group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}' ``` +Create a new group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}' ``` ### Example ```java @@ -368,7 +428,7 @@ Name | Type | Description | Notes Delete a group. -Delete a group. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete a group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -421,9 +481,9 @@ Name | Type | Description | Notes # **getAllGroups** > GroupSummaryList getAllGroups(limit, after, order, include, nameEq) -Get all group information. +Get policy groups. -Retrieve all group information. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -444,8 +504,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String nameEq = "nameEq_example"; // String | Filter for group name. try { @@ -462,8 +522,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **nameEq** | **String**| Filter for group name. | [optional] @@ -484,9 +544,9 @@ Name | Type | Description | Notes # **getApiKeysOfGroup** > ApiKeyInfoRespList getApiKeysOfGroup(groupId, limit, after, order, include) -Get the API keys of a group. +Get the API keys of a policy group. -Manage policy groups. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of API keys associated with a policy group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -508,8 +568,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); String groupId = "groupId_example"; // String | The ID of the group. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { ApiKeyInfoRespList result = apiInstance.getApiKeysOfGroup(groupId, limit, after, order, include); @@ -526,8 +586,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **String**| The ID of the group. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -538,6 +598,69 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getApplicationsOfGroup** +> ApplicationList getApplicationsOfGroup(groupId, limit, after, order, include) + +Get the applications of a policy group. + +Retrieve an array of applications associated with a policy group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); +String groupId = "groupId_example"; // String | The ID of the group. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + ApplicationList result = apiInstance.getApplicationsOfGroup(groupId, limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountPolicyGroupsApi#getApplicationsOfGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the group. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**ApplicationList**](ApplicationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: Not defined @@ -547,9 +670,9 @@ Name | Type | Description | Notes # **getGroupSummary** > GroupSummary getGroupSummary(groupId) -Get group information. +Get a policy group. -Retrieve general information about a group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve a policy group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -569,7 +692,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); -String groupId = "groupId_example"; // String | The ID of the group to retrieve. +String groupId = "groupId_example"; // String | The ID of the policy group to retrieve. try { GroupSummary result = apiInstance.getGroupSummary(groupId); System.out.println(result); @@ -583,7 +706,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **groupId** | **String**| The ID of the group to retrieve. | + **groupId** | **String**| The ID of the policy group to retrieve. | ### Return type @@ -602,9 +725,9 @@ Name | Type | Description | Notes # **getUsersOfGroup** > UserInfoRespList getUsersOfGroup(groupId, limit, after, order, include, statusEq, statusIn, statusNin) -Get users of a group. +Get users of a policy group. -Retrieve users of a group with details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of users associated with a policy group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -626,8 +749,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); String groupId = "groupId_example"; // String | The ID of the group. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String statusEq = "statusEq_example"; // String | An optional filter to retrieve users by status. String statusIn = "statusIn_example"; // String | An optional filter to retrieve users with a specified set of statuses. @@ -647,8 +770,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **String**| The ID of the group. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **statusEq** | **String**| An optional filter to retrieve users by status. | [optional] **statusIn** | **String**| An optional filter to retrieve users with a specified set of statuses. | [optional] @@ -673,7 +796,7 @@ Name | Type | Description | Notes Remove API keys from a group. -Remove API keys from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API keys from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -730,7 +853,7 @@ Name | Type | Description | Notes Remove API keys from a group. -Remove API keys from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API keys from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -776,6 +899,63 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeListedApplicationsFromGroup** +> GroupSummary removeListedApplicationsFromGroup(groupId, body) + +Remove applications from a group. + +Remove applications from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"applications\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +AccountPolicyGroupsApi apiInstance = new AccountPolicyGroupsApi(); +String groupId = "groupId_example"; // String | The ID of the group. +SubjectList body = new SubjectList(); // SubjectList | A list of applications to remove from the group. +try { + GroupSummary result = apiInstance.removeListedApplicationsFromGroup(groupId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AccountPolicyGroupsApi#removeListedApplicationsFromGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **String**| The ID of the group. | + **body** | [**SubjectList**](SubjectList.md)| A list of applications to remove from the group. | + +### Return type + +[**GroupSummary**](GroupSummary.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: application/json @@ -787,7 +967,7 @@ Name | Type | Description | Notes Remove users from a group. -Manage policy groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove users from a policy group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -844,7 +1024,7 @@ Name | Type | Description | Notes Remove users from a group. -Manage policy groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Manage policy groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' ``` ### Example ```java @@ -901,7 +1081,7 @@ Name | Type | Description | Notes Update the group name. -Update a group name. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestGroup2\"}' ``` +Update a group name. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestGroup2\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AccountProfileApi.md b/backends/pelioncloud_devicemanagement/docs/AccountProfileApi.md index 050a5bbba..dde6b4b53 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountProfileApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountProfileApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.us-east-1.mbedcloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getMyAccountInfo**](AccountProfileApi.md#getMyAccountInfo) | **GET** v3/accounts/me | Get account info. +[**getMyAccountInfo**](AccountProfileApi.md#getMyAccountInfo) | **GET** v3/accounts/me | Get account information. [**updateMyAccount**](AccountProfileApi.md#updateMyAccount) | **PUT** v3/accounts/me | Updates attributes of the account. @@ -12,9 +12,9 @@ Method | HTTP request | Description # **getMyAccountInfo** > AccountInfo getMyAccountInfo(include, properties) -Get account info. +Get account information. -Retrieve detailed information about the account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve information about the account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -71,7 +71,7 @@ Name | Type | Description | Notes Updates attributes of the account. -Update the account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' ``` +Update the account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AccountResponse.md b/backends/pelioncloud_devicemanagement/docs/AccountResponse.md new file mode 100644 index 000000000..5460b3797 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountResponse.md @@ -0,0 +1,25 @@ + +# AccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**alias** | **String** | Alias of the account. | [optional] +**displayName** | **String** | The display name for the account. | [optional] +**id** | **String** | The UUID of the account. | [optional] +**loginProfiles** | [**List<LoginProfile>**](LoginProfile.md) | A list of login profiles for the user in the account. | [optional] +**parentId** | **String** | The UUID of the parent account, if it has any. | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the account. | [optional] + + + +## Enum: StatusEnum +Name | Value +---- | ----- +ENROLLING | "ENROLLING" +ACTIVE | "ACTIVE" +RESTRICTED | "RESTRICTED" +SUSPENDED | "SUSPENDED" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountResponseList.md b/backends/pelioncloud_devicemanagement/docs/AccountResponseList.md new file mode 100644 index 000000000..4e7bb71c3 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/AccountResponseList.md @@ -0,0 +1,31 @@ + +# AccountResponseList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | The entity ID to fetch after the given one. | [optional] +**data** | [**List<AccountResponse>**](AccountResponse.md) | A list of entities. | [optional] +**hasMore** | **Boolean** | Flag indicating whether there is more results. | [optional] +**limit** | **Integer** | The number of results to return, (range: 2-1000), or equals to `total_count` | [optional] +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always 'list' | [optional] +**order** | [**OrderEnum**](#OrderEnum) | The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. | [optional] +**totalCount** | **Integer** | The total number or records, if requested. It might be returned also for small lists. | [optional] + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +LIST | "list" + + + +## Enum: OrderEnum +Name | Value +---- | ----- +ASC | "ASC" +DESC | "DESC" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AccountUpdateReq.md b/backends/pelioncloud_devicemanagement/docs/AccountUpdateReq.md index ccb7fffbf..6d02f9c95 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountUpdateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountUpdateReq.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **addressLine1** | **String** | Postal address line 1. Required for commercial accounts only. | [optional] **addressLine2** | **String** | Postal address line 2. | [optional] -**aliases** | **List<String>** | An array of aliases. | [optional] +**aliases** | **List<String>** | An array of aliases for the tenant account ID. The aliases must be globally unique. | [optional] **city** | **String** | The city part of the postal address. Required for commercial accounts only. | [optional] -**company** | **String** | The name of the company. Required for commercial accounts only. | [optional] +**company** | **String** | The name of the company used in billing. Required for commercial accounts only. | [optional] **contact** | **String** | The name of the contact person for this account. Required for commercial accounts only. | [optional] **country** | **String** | The country part of the postal address. Required for commercial accounts only. | [optional] **customFields** | **Map<String, String>** | Account's custom properties as key-value pairs. | [optional] -**displayName** | **String** | The display name for the account. | [optional] +**displayName** | **String** | The display name for the tenant account. | [optional] **email** | **String** | The company email address for this account. Required for commercial accounts only. | [optional] **endMarket** | **String** | The end market for this account. | [optional] **expirationWarningThreshold** | **Integer** | Indicates how many days before account expiration a notification email is sent. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/AccountUpdateRootReq.md b/backends/pelioncloud_devicemanagement/docs/AccountUpdateRootReq.md index 9f441c5de..4cf859d93 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountUpdateRootReq.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountUpdateRootReq.md @@ -6,16 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **addressLine1** | **String** | Postal address line 1. Required for commercial accounts only. | [optional] **addressLine2** | **String** | Postal address line 2. | [optional] -**aliases** | **List<String>** | An array of aliases. | [optional] +**aliases** | **List<String>** | An array of aliases for the tenant account ID. The aliases must be globally unique. | [optional] **businessModel** | [**BusinessModel**](BusinessModel.md) | | [optional] **city** | **String** | The city part of the postal address. Required for commercial accounts only. | [optional] -**company** | **String** | The name of the company. Required for commercial accounts only. | [optional] +**company** | **String** | The name of the company used in billing. Required for commercial accounts only. | [optional] **contact** | **String** | The name of the contact person for this account. Required for commercial accounts only. | [optional] -**contractNumber** | **String** | Contract number of the customer. | [optional] +**contractNumber** | **String** | Contract number of the customer. An administrator can set this property on tenant accounts only. | [optional] **country** | **String** | The country part of the postal address. Required for commercial accounts only. | [optional] **customFields** | **Map<String, String>** | Account's custom properties as key-value pairs. | [optional] -**customerNumber** | **String** | Customer number of the customer. | [optional] -**displayName** | **String** | The display name for the account. | [optional] +**customerNumber** | **String** | Customer number of the customer. An administrator can set this property on tenant accounts only. | [optional] +**displayName** | **String** | The display name for the tenant account. | [optional] **email** | **String** | The company email address for this account. Required for commercial accounts only. | [optional] **endMarket** | **String** | The end market for this account. | [optional] **expirationWarningThreshold** | **Integer** | Indicates how many days before account expiration a notification email is sent. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/AccountUserInvitationsApi.md b/backends/pelioncloud_devicemanagement/docs/AccountUserInvitationsApi.md index f79c66102..8e79f908e 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountUserInvitationsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountUserInvitationsApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**createInvitation**](AccountUserInvitationsApi.md#createInvitation) | **POST** v3/user-invitations | Create a user invitation. [**deleteInvitation**](AccountUserInvitationsApi.md#deleteInvitation) | **DELETE** v3/user-invitations/{invitation_id} | Delete a user invitation. -[**getAllInvitations**](AccountUserInvitationsApi.md#getAllInvitations) | **GET** v3/user-invitations | Get the details of all user invitations. +[**getAllInvitations**](AccountUserInvitationsApi.md#getAllInvitations) | **GET** v3/user-invitations | Get user invitations. [**getInvitation**](AccountUserInvitationsApi.md#getInvitation) | **GET** v3/user-invitations/{invitation_id} | Details of a user invitation. @@ -16,7 +16,7 @@ Method | HTTP request | Description Create a user invitation. -Invite a new or existing user. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` +Invite a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` ### Example ```java @@ -71,7 +71,7 @@ Name | Type | Description | Notes Delete a user invitation. -Delete an active user invitation sent to a new or existing user. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete an active user invitation sent to a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -124,9 +124,9 @@ Name | Type | Description | Notes # **getAllInvitations** > UserInvitationRespList getAllInvitations(limit, after, order, loginProfilesEq) -Get the details of all user invitations. +Get user invitations. -Retrieve details for all the active user invitations. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of active user invitations sent by email. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -147,8 +147,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountUserInvitationsApi apiInstance = new AccountUserInvitationsApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String loginProfilesEq = "loginProfilesEq_example"; // String | Filter to retrieve user invitations by a specified login profile. try { UserInvitationRespList result = apiInstance.getAllInvitations(limit, after, order, loginProfilesEq); @@ -164,8 +164,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **loginProfilesEq** | **String**| Filter to retrieve user invitations by a specified login profile. | [optional] ### Return type @@ -187,7 +187,7 @@ Name | Type | Description | Notes Details of a user invitation. -Retrieve the details of an active user invitation. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the details of an active user invitation. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AccountUsersApi.md b/backends/pelioncloud_devicemanagement/docs/AccountUsersApi.md index 61fb080e2..13762ad4b 100644 --- a/backends/pelioncloud_devicemanagement/docs/AccountUsersApi.md +++ b/backends/pelioncloud_devicemanagement/docs/AccountUsersApi.md @@ -8,13 +8,12 @@ Method | HTTP request | Description [**addUserToListedGroups**](AccountUsersApi.md#addUserToListedGroups) | **POST** v3/users/{user_id}/groups/add | Add user to a list of groups. [**createUser**](AccountUsersApi.md#createUser) | **POST** v3/users | Create a new user. [**deleteUser**](AccountUsersApi.md#deleteUser) | **DELETE** v3/users/{user_id} | Delete a user. -[**getAllUsers**](AccountUsersApi.md#getAllUsers) | **GET** v3/users | Get the details of all users. -[**getGroupsOfUser**](AccountUsersApi.md#getGroupsOfUser) | **GET** v3/users/{user_id}/groups | Get groups of the user. -[**getMyUser**](AccountUsersApi.md#getMyUser) | **GET** v3/users/me | Details of the current user. +[**getAllUsers**](AccountUsersApi.md#getAllUsers) | **GET** v3/users | Get users. +[**getGroupsOfUser**](AccountUsersApi.md#getGroupsOfUser) | **GET** v3/users/{user_id}/groups | Get policy groups for a user. [**getUser**](AccountUsersApi.md#getUser) | **GET** v3/users/{user_id} | Details of a user. +[**removeUserFromAccount**](AccountUsersApi.md#removeUserFromAccount) | **POST** v3/users/{user_id}/remove | Remove user from the account. [**removeUserFromGroups**](AccountUsersApi.md#removeUserFromGroups) | **DELETE** v3/users/{user_id}/groups | Remove user from groups. [**removeUserFromListedGroups**](AccountUsersApi.md#removeUserFromListedGroups) | **POST** v3/users/{user_id}/groups/remove | Remove user from groups. -[**updateMyUser**](AccountUsersApi.md#updateMyUser) | **PUT** v3/users/me | Update user details. [**updateUser**](AccountUsersApi.md#updateUser) | **PUT** v3/users/{user_id} | Update user details. @@ -24,7 +23,7 @@ Method | HTTP request | Description Add user to a list of groups. -Add user to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -81,7 +80,7 @@ Name | Type | Description | Notes Add user to a list of groups. -Add user to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -138,7 +137,7 @@ Name | Type | Description | Notes Create a new user. -Create or invite a new user to the account. Only email address is used; other attributes are set in the second step. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` +Create or invite a new user to the account. The invited user has to accept the invitation by clicking the link in the invitation email. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` ### Example ```java @@ -195,7 +194,7 @@ Name | Type | Description | Notes Delete a user. -Delete a user. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -248,9 +247,9 @@ Name | Type | Description | Notes # **getAllUsers** > UserInfoRespList getAllUsers(limit, after, order, include, emailEq, statusEq, statusIn, statusNin, loginProfilesEq) -Get the details of all users. +Get users. -Retrieve the details of all users. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -271,8 +270,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountUsersApi apiInstance = new AccountUsersApi(); Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String emailEq = "emailEq_example"; // String | Filter for email address String statusEq = "statusEq_example"; // String | Filter for status, for example, active or reset. @@ -293,8 +292,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **emailEq** | **String**| Filter for email address | [optional] **statusEq** | **String**| Filter for status, for example, active or reset. | [optional] @@ -319,9 +318,9 @@ Name | Type | Description | Notes # **getGroupsOfUser** > GroupSummaryList getGroupsOfUser(userId, limit, after, order, include) -Get groups of the user. +Get policy groups for a user. -Retrieve groups of the user. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups associated with a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -343,8 +342,8 @@ Bearer.setApiKey("YOUR API KEY"); AccountUsersApi apiInstance = new AccountUsersApi(); String userId = "userId_example"; // String | The ID of the user. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { GroupSummaryList result = apiInstance.getGroupsOfUser(userId, limit, after, order, include); @@ -361,8 +360,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **String**| The ID of the user. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -378,13 +377,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - -# **getMyUser** -> UserInfoResp getMyUser(scratchCodes, properties, include) + +# **getUser** +> UserInfoResp getUser(userId) -Details of the current user. +Details of a user. -Retrieve the details of the logged-in user. +Retrieve the details of a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -404,14 +403,12 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); AccountUsersApi apiInstance = new AccountUsersApi(); -String scratchCodes = "scratchCodes_example"; // String | Request to regenerate new emergency scratch codes. -String properties = "properties_example"; // String | Request to return account-specific user property values according to the given property name. -String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: active_sessions. +String userId = "userId_example"; // String | The ID of the user. try { - UserInfoResp result = apiInstance.getMyUser(scratchCodes, properties, include); + UserInfoResp result = apiInstance.getUser(userId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountUsersApi#getMyUser"); + System.err.println("Exception when calling AccountUsersApi#getUser"); e.printStackTrace(); } ``` @@ -420,9 +417,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **scratchCodes** | **String**| Request to regenerate new emergency scratch codes. | [optional] - **properties** | **String**| Request to return account-specific user property values according to the given property name. | [optional] - **include** | **String**| Comma-separated additional data to return. Currently supported: active_sessions. | [optional] + **userId** | **String**| The ID of the user. | ### Return type @@ -437,13 +432,13 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - -# **getUser** -> UserInfoResp getUser(userId) + +# **removeUserFromAccount** +> Void removeUserFromAccount(userId) -Details of a user. +Remove user from the account. -Retrieve the details of a user. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Remove user from the account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/remove \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -463,12 +458,12 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); AccountUsersApi apiInstance = new AccountUsersApi(); -String userId = "userId_example"; // String | The ID of the user. +String userId = "userId_example"; // String | The ID of the user to remove from the account. try { - UserInfoResp result = apiInstance.getUser(userId); + Void result = apiInstance.removeUserFromAccount(userId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountUsersApi#getUser"); + System.err.println("Exception when calling AccountUsersApi#removeUserFromAccount"); e.printStackTrace(); } ``` @@ -477,11 +472,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **userId** | **String**| The ID of the user. | + **userId** | **String**| The ID of the user to remove from the account. | ### Return type -[**UserInfoResp**](UserInfoResp.md) +[**Void**](.md) ### Authorization @@ -498,7 +493,7 @@ Name | Type | Description | Notes Remove user from groups. -Remove user from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -555,7 +550,7 @@ Name | Type | Description | Notes Remove user from groups. -Remove user from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -601,61 +596,6 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -# **updateMyUser** -> UserInfoResp updateMyUser(body) - -Update user details. - -Update user details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/me \\ -H 'Authorization: Bearer <token>' \\ -H 'content-type: application/json' \\ -d '{\"full_name\": \"fullname\"}' ``` - -### Example -```java -// Import classes: -//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; -//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; -//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; -//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; -//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.AccountUsersApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure API key authorization: Bearer -ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); -Bearer.setApiKey("YOUR API KEY"); -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//Bearer.setApiKeyPrefix("Token"); - -AccountUsersApi apiInstance = new AccountUsersApi(); -UserUpdateReq body = new UserUpdateReq(); // UserUpdateReq | A user object with attributes. -try { - UserInfoResp result = apiInstance.updateMyUser(body); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling AccountUsersApi#updateMyUser"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**UserUpdateReq**](UserUpdateReq.md)| A user object with attributes. | - -### Return type - -[**UserInfoResp**](UserInfoResp.md) - -### Authorization - -[Bearer](../README.md#Bearer) - ### HTTP request headers - **Content-Type**: application/json @@ -667,7 +607,7 @@ Name | Type | Description | Notes Update user details. -Update user details **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' ``` +Update user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/AggregatedQuotaUsageReport.md b/backends/pelioncloud_devicemanagement/docs/AggregatedQuotaUsageReport.md index 16c6898d8..9ffd9d418 100644 --- a/backends/pelioncloud_devicemanagement/docs/AggregatedQuotaUsageReport.md +++ b/backends/pelioncloud_devicemanagement/docs/AggregatedQuotaUsageReport.md @@ -21,6 +21,7 @@ RESERVATION_TERMINATION | "reservation_termination" PACKAGE_RENEWAL | "package_renewal" PACKAGE_CREATION | "package_creation" PACKAGE_TERMINATION | "package_termination" +PACKAGE_TOKENS_EDIT | "package_tokens_edit" diff --git a/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoReq.md b/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoReq.md index 91ac080db..41909bc58 100644 --- a/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoReq.md +++ b/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoReq.md @@ -4,10 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**groups** | **List<String>** | A list of group IDs this API key belongs to. | [optional] +**groups** | **List<String>** | A list of group IDs this API key belongs to. Adding an API key to the 'Administrators' group is restricted to administrators. | [optional] **name** | **String** | The display name for the API key. | -**owner** | **String** | The owner of this API key. | [optional] -**status** | [**StatusEnum**](#StatusEnum) | The status of the API key. | [optional] +**owner** | **String** | The owner of this API key. Only an administrator can set the owner of an API key. | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the API key. Only an administrator can set the status of an API key. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoRespList.md b/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoRespList.md index d6ccb726d..29ba143b2 100644 --- a/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoRespList.md +++ b/backends/pelioncloud_devicemanagement/docs/ApiKeyInfoRespList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<ApiKeyInfoResp>**](ApiKeyInfoResp.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return, or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/ApiKeyUpdateReq.md b/backends/pelioncloud_devicemanagement/docs/ApiKeyUpdateReq.md index 995a07f3f..e256a8d34 100644 --- a/backends/pelioncloud_devicemanagement/docs/ApiKeyUpdateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/ApiKeyUpdateReq.md @@ -4,10 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**groups** | **List<String>** | A list of group IDs this API key belongs to. | [optional] -**name** | **String** | The display name for the API key. | -**owner** | **String** | The owner of this API key. | [optional] -**status** | [**StatusEnum**](#StatusEnum) | The status of the API key. | [optional] +**groups** | **List<String>** | A list of group IDs this API key belongs to. Only an administrator can update the group membership of an API key. | [optional] +**name** | **String** | The display name for the API key. | [optional] +**owner** | **String** | The owner of this API key. Only an administrator can update the owner of an API key. | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the API key. Only the owner of the API key or an administrator can update the status of an API key. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/Application.md b/backends/pelioncloud_devicemanagement/docs/Application.md new file mode 100644 index 000000000..91c2a5a44 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/Application.md @@ -0,0 +1,35 @@ + +# Application + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accountId** | **String** | The ID of the account. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] +**description** | **String** | The description of the application. | [optional] +**etag** | **String** | API resource entity version. | [optional] +**groups** | **List<String>** | A list of group IDs this application belongs to. | [optional] +**id** | **String** | The ID of the application. | [optional] +**lastUsedAt** | [**DateTime**](DateTime.md) | The time of the latest application usage. | [optional] +**name** | **String** | The display name for the application. | +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always 'application' | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the application. When admin sets the application as inactive all related data and configurations are cleared from the system. If application is activated again, client must open new channels and set new subscriptions to start receiving events again. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +APPLICATION | "application" + + + +## Enum: StatusEnum +Name | Value +---- | ----- +ACTIVE | "ACTIVE" +INACTIVE | "INACTIVE" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/ApplicationList.md b/backends/pelioncloud_devicemanagement/docs/ApplicationList.md new file mode 100644 index 000000000..a721b35d0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/ApplicationList.md @@ -0,0 +1,31 @@ + +# ApplicationList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | The entity ID to retrieve after the given one. | [optional] +**data** | [**List<Application>**](Application.md) | A list of entities. | +**hasMore** | **Boolean** | Flag indicating whether there are more results. | +**limit** | **Integer** | The number of results to return, or equal to `total_count`. | +**object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always `list`. | +**order** | [**OrderEnum**](#OrderEnum) | The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. | [optional] +**totalCount** | **Integer** | The total number of records, if requested. | + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +LIST | "list" + + + +## Enum: OrderEnum +Name | Value +---- | ----- +ASC | "ASC" +DESC | "DESC" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/ArchiveInfoResponse.md b/backends/pelioncloud_devicemanagement/docs/ArchiveInfoResponse.md new file mode 100644 index 000000000..5f04a6dec --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/ArchiveInfoResponse.md @@ -0,0 +1,15 @@ + +# ArchiveInfoResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**downloadSizeBytes** | **Integer** | The size of the archive file in bytes. | +**downloadUrl** | **String** | URL to download the Factory Configurator Utility archive. | +**licenseType** | **String** | The license agreement type required for downloading Factory Configurator Utility. | [optional] +**licenseVersion** | **String** | The license agreement version required for downloading Factory Configurator Utility. | [optional] +**releaseNotesUrl** | **String** | URL to the Factory Configurator Utility release notes. | +**version** | **String** | The Factory Configurator Utility version. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/AsyncIDResponse.md b/backends/pelioncloud_devicemanagement/docs/AsyncIDResponse.md index d531b6f72..a225e18a7 100644 --- a/backends/pelioncloud_devicemanagement/docs/AsyncIDResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/AsyncIDResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **id** | **String** | The unique ID of the asynchronous response. | [optional] **maxAge** | **String** | Determines how long this value stays valid in the cache, in seconds. 0 means that the value is not stored in the cache. | [optional] **payload** | **String** | Requested data, base64 encoded. | [optional] -**status** | **Integer** | States whether sending a command to the device succeeded or failed. <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><b>200</b></td> <td>Operation succeeded. The playload contains result of the operation from the device.</td> </tr> <tr> <td><b>404</b></td> <td>Endpoint does not have requested resource.</td> </tr> <tr> <td><b>412</b></td> <td>Precondition failed and operation was not executed. Device responded with 4.12 CoAP response code.</td> </tr> <tr> <td><b>413</b></td> <td>Request entity is too large and could not be delivered to the device.</td> </tr> <tr> <td><b>415</b></td> <td>Endpoint does not support media type.</td> </tr> <tr> <td><b>429</b></td> <td>Expired request was removed from queue (REQUEST_EXPIRED), device requested deregistration (DEVICE_REMOVED_REGISTRATION), or device was suspended (DEVICE_BLOCKED).</td> </tr> <tr> <td><b>502</b></td> <td>Request to the device failed and retry count exceeded. Last retry failed to establish TCP or TLS connection to endpoint.</td> </tr> <tr> <td><b>503</b></td> <td>Request to the device failed and retry count exceeded. Last retry failed because endpoint is currently unavailable (NOT_CONNECTED).</td> </tr> <tr> <td><b>504</b></td> <td>Request to the device failed and retry count exceeded. Last retry failed, as device did not respond in the time of protocol-specific retransmission logic (TIMEOUT).</td> </tr> </tbody> </table> | [optional] +**status** | **Integer** | States whether sending a command to the device succeeded or failed. <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><b>200</b></td> <td>Operation succeeded. The payload contains result of the operation from the device.</td> </tr> <tr> <td><b>400</b></td> <td>The device rejected the request, possibly because it does not support the request method. See how the supported methods are [configured for the device resources](https://developer.pelion.com/docs/device-management/current/resources/index.html).</td> </tr> <tr> <td><b>404</b></td> <td>The device replied that it does not have the requested resource.</td> </tr> <tr> <td><b>412</b></td> <td>Precondition failed and the operation was not executed. The device responded with 4.12 CoAP response code. The device may reject a subscription request with this response code.</td> </tr> <tr> <td><b>413</b></td> <td>Request entity is too large and could not be delivered to the device.</td> </tr> <tr> <td><b>415</b></td> <td>The device does not support the media type in the request.</td> </tr> <tr> <td><b>429</b></td> <td>An expired request was removed from queue (REQUEST_EXPIRED), the device requested deregistration (DEVICE_REMOVED_REGISTRATION), or the device was suspended (DEVICE_BLOCKED). The request was never delivered to the device.</td> </tr> <tr> <td><b>502</b></td> <td>The request to the device failed and the retry count was exceeded. The last retry failed to establish TCP or TLS connection to the device.</td> </tr> <tr> <td><b>503</b></td> <td>The request to the device failed and the retry count was exceeded. The last retry failed because the device is currently unavailable (NOT_CONNECTED).</td> </tr> <tr> <td><b>504</b></td> <td>The request to the device failed and the retry count was exceeded. The last retry failed because the device did not respond in time according to the protocol-specific retransmission logic (TIMEOUT).</td> </tr> </tbody> </table> | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/BrandingColor.md b/backends/pelioncloud_devicemanagement/docs/BrandingColor.md index ec4f1ccfa..b5aedcf92 100644 --- a/backends/pelioncloud_devicemanagement/docs/BrandingColor.md +++ b/backends/pelioncloud_devicemanagement/docs/BrandingColor.md @@ -37,6 +37,14 @@ SECONDARY_FONT_COLOR | "secondary_font_color" ERROR_FONT_COLOR | "error_font_color" SUCCESS_FONT_COLOR | "success_font_color" WARNING_FONT_COLOR | "warning_font_color" +MENU_BACKGROUND_COLOR | "menu_background_color" +MENU_TEXT_COLOR | "menu_text_color" +NAV_MENU_BACKGROUND | "nav_menu_background" +NAV_MENU_BACKGROUND_FONT_COLOR | "nav_menu_background_font_color" +NAV_MENU_ACTIVE_BACKGROUND | "nav_menu_active_background" +NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR | "nav_menu_active_background_font_color" +NAV_MENU_HIGHLIGHT | "nav_menu_highlight" +NAV_MENU_HIGHLIGHT_FONT_COLOR | "nav_menu_highlight_font_color" diff --git a/backends/pelioncloud_devicemanagement/docs/BrandingColorList.md b/backends/pelioncloud_devicemanagement/docs/BrandingColorList.md index 69ccab012..cb61ae406 100644 --- a/backends/pelioncloud_devicemanagement/docs/BrandingColorList.md +++ b/backends/pelioncloud_devicemanagement/docs/BrandingColorList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<BrandingColor>**](BrandingColor.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return, or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/BrandingColorUpdate.md b/backends/pelioncloud_devicemanagement/docs/BrandingColorUpdate.md new file mode 100644 index 000000000..ef8a3ccdb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/BrandingColorUpdate.md @@ -0,0 +1,41 @@ + +# BrandingColorUpdate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **String** | The color given as name (purple) or as a hex code. | [optional] +**reference** | [**ReferenceEnum**](#ReferenceEnum) | Color name. | + + + +## Enum: ReferenceEnum +Name | Value +---- | ----- +ERROR_COLOR | "error_color" +PRIMARY | "primary" +SECONDARY | "secondary" +SUCCESS_COLOR | "success_color" +WARNING_COLOR | "warning_color" +CANVAS_BACKGROUND | "canvas_background" +CANVAS_BACKGROUND_FONT_COLOR | "canvas_background_font_color" +WORKSPACE_BACKGROUND | "workspace_background" +WORKSPACE_BACKGROUND_FONT_COLOR | "workspace_background_font_color" +INFO_COLOR | "info_color" +INFO_FONT_COLOR | "info_font_color" +PRIMARY_FONT_COLOR | "primary_font_color" +SECONDARY_FONT_COLOR | "secondary_font_color" +ERROR_FONT_COLOR | "error_font_color" +SUCCESS_FONT_COLOR | "success_font_color" +WARNING_FONT_COLOR | "warning_font_color" +MENU_BACKGROUND_COLOR | "menu_background_color" +MENU_TEXT_COLOR | "menu_text_color" +NAV_MENU_BACKGROUND | "nav_menu_background" +NAV_MENU_BACKGROUND_FONT_COLOR | "nav_menu_background_font_color" +NAV_MENU_ACTIVE_BACKGROUND | "nav_menu_active_background" +NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR | "nav_menu_active_background_font_color" +NAV_MENU_HIGHLIGHT | "nav_menu_highlight" +NAV_MENU_HIGHLIGHT_FONT_COLOR | "nav_menu_highlight_font_color" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/BrandingImage.md b/backends/pelioncloud_devicemanagement/docs/BrandingImage.md index c67828069..943a41738 100644 --- a/backends/pelioncloud_devicemanagement/docs/BrandingImage.md +++ b/backends/pelioncloud_devicemanagement/docs/BrandingImage.md @@ -25,6 +25,9 @@ BRAND_LOGO_PORTRAIT | "brand_logo_portrait" BRAND_LOGO_SQUARE | "brand_logo_square" BRAND_LOGO_LANDSCAPE | "brand_logo_landscape" BRAND_LOGO_EMAIL | "brand_logo_email" +APP_LOGO_LANDSCAPE | "app_logo_landscape" +APP_LOGO_PORTRAIT | "app_logo_portrait" +APP_LOGO_SQUARE | "app_logo_square" DESKTOP_BACKGROUND_LANDSCAPE | "desktop_background_landscape" DESKTOP_BACKGROUND_SQUARE | "desktop_background_square" DESKTOP_BACKGROUND_PORTRAIT | "desktop_background_portrait" diff --git a/backends/pelioncloud_devicemanagement/docs/BrandingImageList.md b/backends/pelioncloud_devicemanagement/docs/BrandingImageList.md index 7dca9022c..722311eb7 100644 --- a/backends/pelioncloud_devicemanagement/docs/BrandingImageList.md +++ b/backends/pelioncloud_devicemanagement/docs/BrandingImageList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<BrandingImage>**](BrandingImage.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return, or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigListResponse.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigListResponse.md index 8eff0aebc..1f3db5f91 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigListResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigListResponse.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **after** | **String** | An offset token for current page. | [optional] **data** | [**List<CertificateIssuerConfigResponse>**](CertificateIssuerConfigResponse.md) | List of certificate issuers. | [optional] -**hasMore** | **Boolean** | Are there more results available. | [optional] -**limit** | **Integer** | How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit. | [optional] -**object** | **String** | The type of this API object is a `list`. | [optional] -**order** | **String** | The creation time based order of the entries. | [optional] +**hasMore** | **Boolean** | More results are available. | [optional] +**limit** | **Integer** | The number of results to return (2-1000). Values outside of this range are set to the closest limit. | [optional] +**object** | **String** | The type of this API object is `list`. | [optional] +**order** | **String** | Record order based on creation time. | [optional] **totalCount** | **Integer** | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigResponse.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigResponse.md index 8416b9f01..f5ad1d16b 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerConfigResponse.md @@ -4,10 +4,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificateIssuerId** | **String** | The ID of the certificate issuer. Null if Device Management internal HSM is used. | [optional] +**certificateIssuerId** | **String** | Certificate issuer ID. Null if Device Management internal HSM is used. | [optional] **createdAt** | [**DateTime**](DateTime.md) | Created UTC time RFC3339. | [optional] **etag** | **String** | Entity instance signature. | [optional] -**id** | **String** | The ID of the certificate issuer configuration. | [optional] +**id** | **String** | Certificate issuer ID. configuration. | [optional] **isCustom** | **Boolean** | | [optional] **object** | [**ObjectEnum**](#ObjectEnum) | | [optional] **reference** | **String** | The certificate name to which the certificate issuer configuration applies. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfo.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfo.md index aa2dbd194..f90cc9a8a 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfo.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfo.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] **description** | **String** | General description for the certificate issuer. | [optional] **etag** | **String** | Entity instance signature. | [optional] -**id** | **String** | The ID of the certificate issuer. | [optional] -**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] -**issuerType** | [**IssuerTypeEnum**](#IssuerTypeEnum) | The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. | +**id** | **String** | Certificate issuer ID. | [optional] +**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] +**issuerType** | [**IssuerTypeEnum**](#IssuerTypeEnum) | Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You must provide your own CFSSL host_url and credentials. | **name** | **String** | Certificate issuer name, unique per account. | [optional] **object** | [**ObjectEnum**](#ObjectEnum) | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfoListResponse.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfoListResponse.md index 382016606..03cc64230 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfoListResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerInfoListResponse.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **after** | **String** | An offset token for current page. | [optional] **data** | [**List<CertificateIssuerInfo>**](CertificateIssuerInfo.md) | List of certificate issuers. | [optional] -**hasMore** | **Boolean** | Are there more results available. | [optional] -**limit** | **Integer** | How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit. | [optional] -**object** | **String** | The type of this API object is a `list`. | [optional] -**order** | **String** | The creation time based order of the entries. | [optional] +**hasMore** | **Boolean** | More results are available. | [optional] +**limit** | **Integer** | The number of results to return (2-1000). Values outside of this range are set to the closest limit. | [optional] +**object** | **String** | The type of this API object is `list`. | [optional] +**order** | **String** | Record order based on creation time. | [optional] **totalCount** | **Integer** | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerRequest.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerRequest.md index c3fcec799..df2d6a9a8 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **String** | General description of the certificate issuer. | [optional] -**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] -**issuerCredentials** | **Map<String, String>** | The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. | -**issuerType** | [**IssuerTypeEnum**](#IssuerTypeEnum) | The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. | +**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] +**issuerCredentials** | **Map<String, String>** | The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. | +**issuerType** | [**IssuerTypeEnum**](#IssuerTypeEnum) | Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You must provide your own CFSSL host_url and credentials. | **name** | **String** | Certificate issuer name, unique per account. | diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerUpdateRequest.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerUpdateRequest.md index c9869cee6..f17cce34a 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerUpdateRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerUpdateRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **String** | General description of the certificate issuer. | [optional] -**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] -**issuerCredentials** | **Map<String, String>** | The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. | [optional] +**issuerAttributes** | **Map<String, String>** | General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. | [optional] +**issuerCredentials** | **Map<String, String>** | The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. | [optional] **name** | **String** | Certificate issuer name. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerVerifyResponse.md b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerVerifyResponse.md index 1928bbe90..68429e475 100644 --- a/backends/pelioncloud_devicemanagement/docs/CertificateIssuerVerifyResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/CertificateIssuerVerifyResponse.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **String** | Provides details in case of failure. | [optional] -**successful** | **Boolean** | Indicates whether the certificate issuer was verified successfully. | [optional] +**message** | **String** | Provides details in case of failure. | [optional] +**successful** | **Boolean** | Indicates whether the certificate issuer was verified successfully. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/CfsslAttributes.md b/backends/pelioncloud_devicemanagement/docs/CfsslAttributes.md index 60f1089aa..e3708d901 100644 --- a/backends/pelioncloud_devicemanagement/docs/CfsslAttributes.md +++ b/backends/pelioncloud_devicemanagement/docs/CfsslAttributes.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cfsslLabel** | **String** | The label that is used by CFSSL when creating the certificate. | [optional] -**cfsslProfile** | **String** | The profile that is configured on the CFSSL server and is used by CFSSL when creating the certificate. | [optional] -**hostUrl** | **String** | The URL to connect to the CFSSL server. | +**cfsslLabel** | **String** | The label that is used by CFSSL when creating the certificate. | [optional] +**cfsslProfile** | **String** | The profile that is configured on the CFSSL server and used by CFSSL when creating the certificate. | [optional] +**hostUrl** | **String** | The URL to connect to the CFSSL server. | diff --git a/backends/pelioncloud_devicemanagement/docs/CfsslAuthCredentials.md b/backends/pelioncloud_devicemanagement/docs/CfsslAuthCredentials.md index 1c0b0c94e..f30d5a823 100644 --- a/backends/pelioncloud_devicemanagement/docs/CfsslAuthCredentials.md +++ b/backends/pelioncloud_devicemanagement/docs/CfsslAuthCredentials.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hmacHexKey** | **String** | The key that is used to compute the HMAC of the request using the HMAC-SHA-256 algorithm. Must contain an even number of hexadecimal characters. | +**hmacHexKey** | **String** | The key that is used to compute the HMAC of the request using the HMAC-SHA-256 algorithm. Must contain an even number of hexadecimal characters. | diff --git a/backends/pelioncloud_devicemanagement/docs/CreateCertificateIssuerConfig.md b/backends/pelioncloud_devicemanagement/docs/CreateCertificateIssuerConfig.md index fb93a7ede..a8c1aa20e 100644 --- a/backends/pelioncloud_devicemanagement/docs/CreateCertificateIssuerConfig.md +++ b/backends/pelioncloud_devicemanagement/docs/CreateCertificateIssuerConfig.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificateIssuerId** | **String** | The ID of the certificate issuer. | -**reference** | **String** | The certificate name, as created in the factory, to which the certificate issuer configuration applies. The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP. | +**certificateIssuerId** | **String** | Certificate issuer ID. | +**reference** | **String** | The certificate name, as created in the factory, to which the certificate issuer configuration applies. The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP. | diff --git a/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorRequest.md b/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorRequest.md new file mode 100644 index 000000000..2442e5e4a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorRequest.md @@ -0,0 +1,10 @@ + +# CreateTrustAnchorRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the new trust anchor key pair. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorResponse.md b/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorResponse.md new file mode 100644 index 000000000..d800d94fb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/CreateTrustAnchorResponse.md @@ -0,0 +1,18 @@ + +# CreateTrustAnchorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time. | [optional] +**description** | **String** | Notes about the trust anchor. | [optional] +**etag** | **String** | Entity instance signature, 1 or Unix timestamp of last customer update. | [optional] +**fingerprint** | **byte[]** | The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format. | [optional] +**id** | **String** | The ID of the entity. | [optional] +**object** | **String** | The API resource entity | [optional] +**publicKey** | **byte[]** | The generated trust anchor public key in PEM format. | [optional] +**publicKeyDer** | **byte[]** | The generated trust anchor public key in Base64-encoded DER format. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Update UTC time. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/DeveloperCertificateRequestData.md b/backends/pelioncloud_devicemanagement/docs/DeveloperCertificateRequestData.md index 2fa70d983..c89f0c7f6 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeveloperCertificateRequestData.md +++ b/backends/pelioncloud_devicemanagement/docs/DeveloperCertificateRequestData.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **String** | Description for the developer certificate. Maximum 500 characters. Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). | [optional] -**name** | **String** | Name of the developer certificate. Must be unique. Maximum 100 characters. Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). | +**description** | **String** | Description for the developer certificate. Maximum 500 characters. Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). | [optional] +**name** | **String** | Name of the developer certificate. Must be unique. Maximum 100 characters. Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). | diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceData.md b/backends/pelioncloud_devicemanagement/docs/DeviceData.md index e909ef2ff..37275d705 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceData.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceData.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **bootstrapExpirationDate** | [**LocalDate**](LocalDate.md) | The expiration date of the certificate used to connect to bootstrap server. | [optional] **bootstrappedTimestamp** | [**DateTime**](DateTime.md) | The timestamp of the device's most recent bootstrap process. | [optional] **caId** | **String** | The certificate issuer's ID. | [optional] +**componentAttributes** | **Map<String, String>** | Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents. | [optional] **connectorExpirationDate** | [**LocalDate**](LocalDate.md) | The expiration date of the certificate used to connect to LwM2M server. | [optional] **createdAt** | [**DateTime**](DateTime.md) | The timestamp of when the device was created in the device directory. | [optional] **customAttributes** | **Map<String, String>** | Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents. | [optional] @@ -18,13 +19,13 @@ Name | Type | Description | Notes **deviceClass** | **String** | An ID representing the model and hardware revision of the device. | [optional] **deviceExecutionMode** | **Integer** | The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device. Permitted values: - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate. - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management. - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management. | [optional] **deviceKey** | **String** | The fingerprint of the device certificate. | [optional] -**endpointName** | **String** | The endpoint name given to the device. | [optional] +**endpointName** | **String** | The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool. | [optional] **endpointType** | **String** | The endpoint type of the device. For example, the device is a gateway. | [optional] **enrolmentListTimestamp** | [**DateTime**](DateTime.md) | The claim date/time. | [optional] **etag** | [**DateTime**](DateTime.md) | The entity instance signature. | [optional] **firmwareChecksum** | **String** | The SHA256 checksum of the current firmware image. | [optional] **groups** | **List<String>** | An array containing an ID of each group this device belongs to. | [optional] -**hostGateway** | **String** | The ID of the host gateway, if appropriate. | [optional] +**hostGateway** | **String** | The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set. | [optional] **id** | **String** | The ID of the device. The device ID is used across all Device Management APIs. | [optional] **issuerFingerprint** | **String** | SHA256 fingerprint of the certificate used to validate the signature of the device certificate. | [optional] **lastOperatorSuspendedCategory** | **String** | The reference of the block category. | [optional] @@ -33,18 +34,19 @@ Name | Type | Description | Notes **lastSystemSuspendedCategory** | **String** | The reference of the block category. | [optional] **lastSystemSuspendedDescription** | **String** | The most recent description of why the device was blocked or unblocked by the system. | [optional] **lastSystemSuspendedUpdatedAt** | [**DateTime**](DateTime.md) | The timestamp of the most recent system block activity. | [optional] -**lifecycleStatus** | [**LifecycleStatusEnum**](#LifecycleStatusEnum) | The lifecycle status of the device. | [optional] +**lifecycleStatus** | [**LifecycleStatusEnum**](#LifecycleStatusEnum) | The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device Management. * Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'. | [optional] **manifest** | **String** | DEPRECATED: The URL for the current device manifest. | [optional] **manifestTimestamp** | [**DateTime**](DateTime.md) | The timestamp of the current manifest version. | [optional] -**mechanism** | [**MechanismEnum**](#MechanismEnum) | The ID of the channel used to communicate with the device. | [optional] -**mechanismUrl** | **String** | The address of the connector to use. | [optional] -**name** | **String** | The name of the device. | [optional] +**mechanism** | [**MechanismEnum**](#MechanismEnum) | NOT USED: The ID of the channel used to communicate with the device. | [optional] +**mechanismUrl** | **String** | NOT USED: The address of the connector to use. | [optional] +**name** | **String** | The name given by the web application for the device. Device itself provides only the endpoint_name. | [optional] +**netId** | **String** | Private network identifier. Used to group nodes connected to a specific border router. | [optional] **object** | **String** | The API resource entity. | [optional] -**operatorSuspended** | **Boolean** | Is the device suspended by the operator? | [optional] -**serialNumber** | **String** | The serial number of the device. | [optional] -**state** | [**StateEnum**](#StateEnum) | The current state of the device. | [optional] +**operatorSuspended** | **Boolean** | Device has been suspended by operator. | [optional] +**serialNumber** | **String** | The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing. | [optional] +**state** | [**StateEnum**](#StateEnum) | The current state of the device. * Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds. * Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management. * Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources. * Deregistered: The device has requested deregistration, or its registration has expired. | [optional] **systemSuspended** | **Boolean** | Is the device suspended by the system? | [optional] -**updatedAt** | [**DateTime**](DateTime.md) | The time the object was updated. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time this data object was updated. | [optional] **vendorId** | **String** | The device vendor ID. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDataNotificationsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDataNotificationsApi.md new file mode 100644 index 000000000..f3f5bbf99 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDataNotificationsApi.md @@ -0,0 +1,546 @@ +# DeviceDataNotificationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**connectWebsocket**](DeviceDataNotificationsApi.md#connectWebsocket) | **GET** v2/notification/websocket-connect | Open the websocket. +[**deleteLongPollChannel**](DeviceDataNotificationsApi.md#deleteLongPollChannel) | **DELETE** v2/notification/pull | Delete notification Long Poll channel. +[**deleteWebsocket**](DeviceDataNotificationsApi.md#deleteWebsocket) | **DELETE** v2/notification/websocket | Delete websocket channel. +[**deregisterWebhook**](DeviceDataNotificationsApi.md#deregisterWebhook) | **DELETE** v2/notification/callback | Delete callback URL. +[**getChannelMetadata**](DeviceDataNotificationsApi.md#getChannelMetadata) | **GET** v2/notification/channel | Get channel metadata. +[**getWebhook**](DeviceDataNotificationsApi.md#getWebhook) | **GET** v2/notification/callback | Check callback URL. +[**getWebsocket**](DeviceDataNotificationsApi.md#getWebsocket) | **GET** v2/notification/websocket | Get websocket channel information. +[**longPollNotifications**](DeviceDataNotificationsApi.md#longPollNotifications) | **GET** v2/notification/pull | Get notifications using Long Poll +[**registerWebhook**](DeviceDataNotificationsApi.md#registerWebhook) | **PUT** v2/notification/callback | Register a callback URL. +[**registerWebsocket**](DeviceDataNotificationsApi.md#registerWebsocket) | **PUT** v2/notification/websocket | Register a websocket channel. + + + +# **connectWebsocket** +> Void connectWebsocket(connection, upgrade, origin, secWebSocketVersion, secWebSocketKey, secWebSocketProtocol) + +Open the websocket. + + A websocket channel can have only one active connection at a time. If a websocket connection for a channel exists and a new connection to the same channel is made, the connection is accepted and the older connection is closed. A websocket client library should be used when connecting to this endpoint. Once the socket has been opened, the server may close it with one of the following status codes. <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><b>1000</b></td> <td>Socket closed normally by the client, or by the server when the channel is deleted with a REST call.</td> </tr> <tr> <td><b>1001</b></td> <td>Going away. Set when another socket opens on the used channel.</td> </tr> <tr> <td><b>1006</b></td> <td>Abnormal closure. The client should reconnect after receiving this status code. A short reconnect delay is recommended.</td> </tr> <tr> <td><b>1008</b></td> <td>Policy violation. Set if the access key is lost or invalidated after a successful WebSocket handshake.</td> </tr> <tr> <td><b>1011</b></td> <td>Unexpected condition. The socket is closed with this status in an attempt to open a socket to a nonexistent channel (without a prior PUT request). This code is also used to indicate a closing socket for any other unexpected condition in the server.</td> </tr> <tr> <td><b>1012</b></td> <td>Service restart. Set when the server restarts for update, maintenance, and so on. The client should reconnect after receiving this status code. A short reconnect delay is recommended.</td> </tr> </tbody> </table> **Expected client behaviour:** If the connection is closed with code 1006 or 1012, the client should try to reconnect to maintain the notification flow. The client might disconnect several times in a relatively short period, for example, during service updates. This is normal. The desired client behavior is to reconnect after each disconnect. **Example:** The example is meant only for testing. For production devices, use a WebSocket client library. Websocat (https://github.com/vi/websocat) is a command-line client for WebSockets, like netcat or cURL. The example command opens a new WebSocket, waits for any data sent to the socket from the server, and prints it to `stdout`. ``` websocat wss://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect \\ -H \"Sec-WebSocket-Protocol:wss,pelion_ak_<access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +String connection = "Upgrade"; // String | +String upgrade = "websocket"; // String | +String origin = "origin_example"; // String | Originating host of the request. +Integer secWebSocketVersion = 13; // Integer | WebSocket version. Must be 13. +String secWebSocketKey = "secWebSocketKey_example"; // String | The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each connection. +String secWebSocketProtocol = "secWebSocketProtocol_example"; // String | Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:\"wss,pelion_ak_{access_key}\"`. Refer to the notification service documentation for examples. +try { + Void result = apiInstance.connectWebsocket(connection, upgrade, origin, secWebSocketVersion, secWebSocketKey, secWebSocketProtocol); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#connectWebsocket"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection** | **String**| | [default to Upgrade] + **upgrade** | **String**| | [default to websocket] + **origin** | **String**| Originating host of the request. | + **secWebSocketVersion** | **Integer**| WebSocket version. Must be 13. | [default to 13] + **secWebSocketKey** | **String**| The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each connection. | + **secWebSocketProtocol** | **String**| Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:\"wss,pelion_ak_{access_key}\"`. Refer to the notification service documentation for examples. | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteLongPollChannel** +> Void deleteLongPollChannel() + +Delete notification Long Poll channel. + +Delete a notification Long Poll channel. This is required to change the channel from Long Poll to another type. Do not make a GET `/v2/notification/pull` call for two minutes after deleting the channel, because it can implicitly recreate the pull channel. You can also have some random responses with payload or 410 GONE with \"CHANNEL_DELETED\" as a payload or 200/204 until the old channel is purged. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + Void result = apiInstance.deleteLongPollChannel(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#deleteLongPollChannel"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteWebsocket** +> Void deleteWebsocket() + +Delete websocket channel. + +Delete a notification websocket channel bound to the application. This is required to change the channel from websocket to another type. Deleting the websocket channel also removes the channel's notification queue. Any unsent notifications are lost when the channel is deleted. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + Void result = apiInstance.deleteWebsocket(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#deleteWebsocket"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deregisterWebhook** +> Void deregisterWebhook() + +Delete callback URL. + +Deletes the callback URL. Deleting the callback URL also removes the channel's notification queue. Any unsent notifications are lost when the channel is deleted. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + Void result = apiInstance.deregisterWebhook(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#deregisterWebhook"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getChannelMetadata** +> ChannelMetadata getChannelMetadata() + +Get channel metadata. + +Get channel delivery mechanism. **Example:** curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/channel \\ -H 'Authorization: Bearer <access_key>' + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + ChannelMetadata result = apiInstance.getChannelMetadata(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#getChannelMetadata"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ChannelMetadata**](ChannelMetadata.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getWebhook** +> Webhook getWebhook() + +Check callback URL. + +Shows the current callback URL if it exists. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + Webhook result = apiInstance.getWebhook(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#getWebhook"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getWebsocket** +> WebsocketChannel getWebsocket() + +Get websocket channel information. + +Returns 200 with websocket connection status, if websocket channel exists. **Note**: The current version does not yet have the capability to determine the channel status and will always return status 'unknown' and queue size '-1'. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + WebsocketChannel result = apiInstance.getWebsocket(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#getWebsocket"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebsocketChannel**](WebsocketChannel.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **longPollNotifications** +> NotificationMessage longPollNotifications() + +Get notifications using Long Poll + +In this case, notifications are delivered through HTTP long poll requests. The HTTP request is kept open until one or more event notifications are delivered to the client, or the request times out (response code 204). In both cases, the client should open a new polling connection after the previous one closes. Only a single long polling connection per application can be ongoing at any given time. We recommend using a persistent connection (Connection keep-alive header in the request) to avoid excess TLS handshakes. The pull channel is implicitly created by the first GET call to `/v2/notification/pull`. It refreshes on each GET call. If the channel is not polled for a long time (10 minutes), it expires and is deleted. This means that no notifications will stay in the queue between polls. A channel can be also be deleted explicitly with a DELETE call. **Note:** If you cannot have a public-facing callback URL, for example, when developing on your local machine, you can use long polling to check for new messages. However, **long polling is deprecated** and will likely be replaced in the future. It is meant only for experimentation, not commercial use. The proper method to receive notifications is a **notification callback**. There can only be one notification channel per application in Device Management Connect. If a notification channel of other type already exists for the application, delete it before creating a long poll notification channel. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + NotificationMessage result = apiInstance.longPollNotifications(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#longPollNotifications"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationMessage**](NotificationMessage.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **registerWebhook** +> Void registerWebhook(webhook) + +Register a callback URL. + +Register a URL to which the server delivers notifications of changes to the subscribed resource. To push notifications, you must first place subscriptions. The maximum length of the URL, header keys, and values, all combined, is 400 characters. Notifications are delivered as PUT requests to the HTTP server, which the client defines with a subscription server message. The given URL must be accessible, and respond to the PUT request with a response code of 200 or 204. Device Management Connect tests the callback URL with an empty JSON payload `{}` when the URL is registered. Callback implementation does not support URL redirection. For more information on notification messages, see [NotificationMessage](#NotificationMessage). **Optional headers in a callback message:** You can set optional headers to a callback in a **Webhook** object. Device Management Connect includes the header and key pairs in the notification messages send them to callback URL. The callback URLs and headers are application-specific. One possible use for additional headers is checking the origin of a PUT request, as well as distinguishing the application to which the notification belongs. **Note**: Only one callback URL for each application can be active. If you register a new URL while another one is active, it replaces the active one. There can be only one notification channel at a time for each application. If another type of channel is already present, you need to delete it before setting the callback URL. **Expiration of a callback URL:** A callback can expire when Device Management cannot deliver a notification due to a connection timeout or error response (4xx or 5xx). After each delivery failure, Device Management sets an exponential back-off time and makes a retry attempt after that. The first retry delay is 1 second, then 2s, 4s, 8s, up to a maximum delay of two minutes. The retry delay is applied when the response is received, or in case of timeout, after the timeout expires. The request timeout is 20 seconds; in the case of timeout, the first retry happens 20 + 1 seconds after the first delivery attempt, then 20 + 2 seconds, and so on. The callback URL is removed if all retries fail within 24 hours. More about [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) in the Device Management documentation. **Supported callback URL protocols:** Currently, only HTTP and HTTPS protocols are supported. **HTTPS callback URLs:** When delivering a notification to an HTTPS-based callback URL, Device Management Connect identifies itself with a valid client certificate. The certificate is signed by a trusted certificate authority (GlobalSign), with a Common Name (CN) set to `notifications.mbedcloud.com`. **Configuration options:** The event notification channel provides configurations options defined in [Serialization config](#SerializationConfigObjectV2). **Example:** This example command shows how to set your callback URL. It also sets an optional header authorization. When Device Management Connect calls your callback URL, the call contains the authorization header with the defined value. ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"url\": \"{callback-url}\", \"headers\": {\"authorization\": \"f4b93d6e-4652-4874-82e4-41a3ced0cd56\"}, \"serialization\": {\"type\": \"v2\", \"max_chunk_size\": \"100\", \"cfg\": {\"deregistrations_as_object\": \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"include_original_ep\": \"true\" } } }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +Webhook webhook = new Webhook(); // Webhook | A JSON object that contains the optional headers and URL where notifications are sent. +try { + Void result = apiInstance.registerWebhook(webhook); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#registerWebhook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook** | [**Webhook**](Webhook.md)| A JSON object that contains the optional headers and URL where notifications are sent. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **registerWebsocket** +> RegisterWebsocketChannel registerWebsocket() + +Register a websocket channel. + +Register (or update) a channel using websocket connection to deliver notifications. The websocket channel should be opened by client using `/v2/notification/websocket-connect` endpoint. To get notifications pushed, you must place subscriptions. For more information on notification messages, see [NotificationMessage](#NotificationMessage). A websocket channel can have only one active websocket connection at a time. If a websocket connection for a channel exists and a new connection to the same channel is made, the connection is accepted and the older connection is closed. **Note**: Only one websocket channel for each application can be active at a time. If you register a new websocket channel while another one is active, it replaces the previously active one. If another type of channel is already present, you need to delete it before registering a websocket channel. **Note**: The current version does not yet have the capability to determine the channel status and will always return status 'unknown' and queue size '-1'. **Expiration of a websocket:** A websocket channel is expired if the channel does not have an opened websocket connection for a 24-hour period. Channel expiration means the channel is deleted and any undelivered notifications stored in its internal queue is removed. As long as the channel has an opened websocket connection or time between successive websocket connections is less than 24 hours, the channel is considered active, notifications are stored in its internal queue and delivered when a websocket connection is active. A channel can be also deleted explicitly with a DELETE call. More about [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic). **Configuration options:** The event notification channel provides configurations options defined in [Serialization config](#SerializationConfigObjectV2) **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer <access_key>' \\ -d '{ \"serialization\": {\"type\": \"v2\", \"max_chunk_size\": \"100\", \"cfg\": {\"deregistrations_as_object\": \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"include_original_ep\": \"true\" } } } ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataNotificationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataNotificationsApi apiInstance = new DeviceDataNotificationsApi(); +try { + RegisterWebsocketChannel result = apiInstance.registerWebsocket(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataNotificationsApi#registerWebsocket"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**RegisterWebsocketChannel**](RegisterWebsocketChannel.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDataPutRequest.md b/backends/pelioncloud_devicemanagement/docs/DeviceDataPutRequest.md index 7b1796213..c56bbd6b8 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceDataPutRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDataPutRequest.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **autoUpdate** | **Boolean** | DEPRECATED: Mark this device for automatic firmware update. | [optional] -**caId** | **String** | The certificate issuer's ID. | [optional] +**caId** | **String** | The certificate issuer's ID. WARNING: This value comes from the device, and should not be changed via the API. | [optional] **customAttributes** | **Map<String, String>** | Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents. | [optional] **description** | **String** | The description of the device. | [optional] -**deviceKey** | **String** | The fingerprint of the device certificate. | [optional] -**endpointName** | **String** | The endpoint name given to the device. | [optional] +**deviceKey** | **String** | The fingerprint of the device certificate. WARNING: This value comes from the device, and should not be changed via the API. | [optional] +**endpointName** | **String** | The endpoint name given to the device. WARNING: This value comes from the device, and should not be changed via the API. | [optional] **endpointType** | **String** | The endpoint type of the device. For example, the device is a gateway. | [optional] **hostGateway** | **String** | The ID of the host gateway, if appropriate. | [optional] **name** | **String** | The name of the device. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDataRequestsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDataRequestsApi.md new file mode 100644 index 000000000..cd6f32683 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDataRequestsApi.md @@ -0,0 +1,72 @@ +# DeviceDataRequestsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAsyncRequest**](DeviceDataRequestsApi.md#createAsyncRequest) | **POST** v2/device-requests/{device-id} | Send an asynchronous request to read, write or post to a device resource. + + + +# **createAsyncRequest** +> Void createAsyncRequest(deviceId, asyncId, body, retry, expirySeconds) + +Send an asynchronous request to read, write or post to a device resource. + +This API provides an interface to call CoAP (Constrained Application Protocol) methods on a device and send commands to device resources. As part of the request body, you must specify the CoAP method you want to call on the device: - Use the GET method to read resource values. For example, to read the value of resource `/3200/0/5501`, use: ``` curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-requests/{device_id}?async-id={async-response-id} \\ -H 'Authorization: Bearer {access_key}' \\ -H 'content-type: application/json' \\ -d '{\"method\": \"GET\", \"uri\": \"/3200/0/5501\"}' ``` > For `GET` methods, the API may fetch values from an internal cache, instead of contacting the device. > If the value is not in the cache, the read command goes all the way to the device. - Use the PUT method to write [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) or resource values for a resource. Example payload to write a notification rule: ``` { \"method\": \"PUT\", \"uri\": \"/5/0/1?lt=10&gt=60&pmax=120\" } ``` - Example payload to write a value to resource `/5/0/1`: ``` { \"method\": \"PUT\", \"uri\": \"/5/0/1?k1=v1&k2=v2\", \"accept\": \"text/plain\", \"content-type\": \"text/plain\", \"payload-b64\": \"dmFsdWUxCg==\" } ``` - Use the POST method to execute or create a resource on a LWM2M supporting device. When you create a resource, `uri` must refer to an object, and `payload-b64` must be in LWM2M TLV format for example: ``` { \"method\": \"POST\", \"uri\": \"/123\", \"content-type\": \"application/vnd.oma.lwm2m+tlv\", \"payload-b64\": \"BwHFAnZhbHVl\" } ``` - Use the POST method to execute resource on a LWM2M supporting device. Example payload to execute LWM2M resource `/123/1/1`: ``` { \"method\": \"POST\", \"uri\": \"/123/1/1\" } ``` - Device Management sends responses through the currently configured notification channel as `AsyncIDResponse`. Example `AsyncIDResponse` delivered through the notification channel: ``` { \"async-responses\": [ { \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 200, \"payload\": \"dmFsdWUxCg==\", \"ct\": \"text/plain\", \"max-age\": 600 } ] } ``` ``` { \"async-responses\": [ { \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 504, \"error\": \"TIMEOUT\" } ] } ``` > If it cannot reach the device at the time of the request, Device Management puts the requests in a queue. **Queueing behavior** If Device Management does not reach the device, or the device fails to respond, the server queues the request and retries the delivery, for the period of time defined by `expiry-seconds`, the next time the device contacts the server. The queue is limited to 20 requests per device. If the queue is full, subsequent messages will be rejected until some of the existing messages are delivered or expired. Device Management delivers requests from the queue in the order of insertion, one at a time, and not concurrently. Delivery attempts follow protocol-specific retransmission logic. There can be multiple transmissions, depending on the protocol. For CoAP, the retransmissions have an exponential backoff of 2, 4, 8, 16, and up to 64 seconds, taking in total over two minutes. If the device does not respond within this two-minute period, the delivery fails, Device Management performs one retry and then puts the request back into the queue until the retry count reaches its limit. Device Management attempts to redeliver the request when the device next contacts the server. When Device Management reaches the `retry` or `expiry-seconds` limit, the server discards the request and sends an error in `AsyncIDResponse`. For example: - Retries could be exhausted if the device periodically contacts the server and receives the request from the queue, but then fails to respond to the server. - The device may lose its network connectivity, and the requests in the queue may expire and get discarded before the device regains connectivity. When Device Management delivers the request to the device, the status code in `AsyncIDResponse` is *2xx* or *4xx*, based on the device's response. If Device Management could not deliver the request, the server generates a status code of *429* or *5xx*. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataRequestsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataRequestsApi apiInstance = new DeviceDataRequestsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. +String asyncId = "asyncId_example"; // String | A client-generated ID that lets the REST client track the end-to-end flow and prevents race conditions with the notification channel. The `async-id` can be, for example, a UUID or the web application session ID along with the device ID and the resource. +DeviceRequest body = new DeviceRequest(); // DeviceRequest | Device request to send. The body element has `method`, `uri`, `accept`, `content-type` and `payload-b64` fields. - The `method` is one of `GET`, `PUT`, `POST`, `DELETE`. - The `uri` field is the path to the LwM2M object and can include query parameters. This can include key-value pairs, for example, `/5/0/1?key1=value1;key2=value2`. - The `accept` field defines the content type that the requesting client will accept. - The `content-type` describes the content type of the base-64 encoded `payload-b64` field. - The `payload-b64` is the payload to send to the device in base-64 encoded form. +Integer retry = 56; // Integer | The number of attempts to deliver the request to the device after the first delivery attempt. For example, two retries sums up to the total of three delivery attempts. When retries are exhausted, Device Management discards the request and delivers an error in the AsyncIDResponse. The default number of retries for a non-queue mode device is `0`. The default number of retries for a queue-mode device is `2`. +Integer expirySeconds = 56; // Integer | The time period during which the delivery is attempted, in seconds. If the device is not reachable within this period, Device Management discards the request and delivers an error in the AsyncIDResponse. The default time period during which the delivery is attempted is two hours for a non-queue mode device and three days for a queue-mode device. +try { + Void result = apiInstance.createAsyncRequest(deviceId, asyncId, body, retry, expirySeconds); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataRequestsApi#createAsyncRequest"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. | + **asyncId** | **String**| A client-generated ID that lets the REST client track the end-to-end flow and prevents race conditions with the notification channel. The `async-id` can be, for example, a UUID or the web application session ID along with the device ID and the resource. | + **body** | [**DeviceRequest**](DeviceRequest.md)| Device request to send. The body element has `method`, `uri`, `accept`, `content-type` and `payload-b64` fields. - The `method` is one of `GET`, `PUT`, `POST`, `DELETE`. - The `uri` field is the path to the LwM2M object and can include query parameters. This can include key-value pairs, for example, `/5/0/1?key1=value1;key2=value2`. - The `accept` field defines the content type that the requesting client will accept. - The `content-type` describes the content type of the base-64 encoded `payload-b64` field. - The `payload-b64` is the payload to send to the device in base-64 encoded form. | + **retry** | **Integer**| The number of attempts to deliver the request to the device after the first delivery attempt. For example, two retries sums up to the total of three delivery attempts. When retries are exhausted, Device Management discards the request and delivers an error in the AsyncIDResponse. The default number of retries for a non-queue mode device is `0`. The default number of retries for a queue-mode device is `2`. | [optional] + **expirySeconds** | **Integer**| The time period during which the delivery is attempted, in seconds. If the device is not reachable within this period, Device Management discards the request and delivers an error in the AsyncIDResponse. The default time period during which the delivery is attempted is two hours for a non-queue mode device and three days for a queue-mode device. | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDataResourcesApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDataResourcesApi.md new file mode 100644 index 000000000..5e018a6a2 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDataResourcesApi.md @@ -0,0 +1,310 @@ +# DeviceDataResourcesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteResourcePath**](DeviceDataResourcesApi.md#deleteResourcePath) | **DELETE** v2/endpoints/{device-id}/{resourcePath} | (DEPRECATED) Delete a resource path. +[**executeOrCreateResource**](DeviceDataResourcesApi.md#executeOrCreateResource) | **POST** v2/endpoints/{device-id}/{resourcePath} | (DEPRECATED) Execute a function on a Resource or create new Object instance. +[**getEndpointResources**](DeviceDataResourcesApi.md#getEndpointResources) | **GET** v2/endpoints/{device-id} | List the resources on a device. +[**getResourceValue**](DeviceDataResourcesApi.md#getResourceValue) | **GET** v2/endpoints/{device-id}/{resourcePath} | (DEPRECATED) Read from a resource. +[**updateResourceValue**](DeviceDataResourcesApi.md#updateResourceValue) | **PUT** v2/endpoints/{device-id}/{resourcePath} | (DEPRECATED) Write to a Resource or use write-attributes (notification rules) for a Resource. + + + +# **deleteResourcePath** +> AsyncID deleteResourcePath(deviceId, resourcePath, noResp) + +(DEPRECATED) Delete a resource path. + +(DEPRECATED) A request to delete a resource path must be handled by both Device Management Client and Device Management Connect. All resource APIs are asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there is an active notification channel. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataResourcesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataResourcesApi apiInstance = new DeviceDataResourcesApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. +Boolean noResp = true; // Boolean | If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive at the device, and do not return an async-response-id. When calls with this parameter enabled succeed, they return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. +try { + AsyncID result = apiInstance.deleteResourcePath(deviceId, resourcePath, noResp); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataResourcesApi#deleteResourcePath"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. | + **noResp** | **Boolean**| If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive at the device, and do not return an async-response-id. When calls with this parameter enabled succeed, they return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. | [optional] + +### Return type + +[**AsyncID**](AsyncID.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **executeOrCreateResource** +> AsyncID executeOrCreateResource(deviceId, resourcePath, resourceFunction, noResp) + +(DEPRECATED) Execute a function on a Resource or create new Object instance. + +(DEPRECATED) [Execute a function](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html#the-execute-operation) on an existing resource and create a new Object instance on the device. The resource path does not have to exist; you can set it with the call. The maximum length of the resource path is 255 characters. All resource APIs are asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there is an active notification channel. Supported content types depend on the device and its resource. Device Management translates HTTP to the equivalent CoAP content type. **Example:** This example resets the min and max values of the [temperature sensor](http://www.openmobilealliance.org/tech/profiles/lwm2m/3303.xml) instance 0 by executing Resource 5605 'Reset Min and Max Measured Values'. ``` curl -X POST https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3303/0/5605 \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataResourcesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataResourcesApi apiInstance = new DeviceDataResourcesApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. +String resourceFunction = "resourceFunction_example"; // String | This value is not needed. Most of the time, resources do not accept a function; they have their own functions predefined. You can use this to trigger them. If a function is included, the body of this request is passed as a char* to the function in Device Management Client. +Boolean noResp = true; // Boolean | If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive in the device, and you do not get back an async-response-id. When calls with this parameter enabled succeed, they return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. +try { + AsyncID result = apiInstance.executeOrCreateResource(deviceId, resourcePath, resourceFunction, noResp); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataResourcesApi#executeOrCreateResource"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. | + **resourceFunction** | **String**| This value is not needed. Most of the time, resources do not accept a function; they have their own functions predefined. You can use this to trigger them. If a function is included, the body of this request is passed as a char* to the function in Device Management Client. | [optional] + **noResp** | **Boolean**| If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive in the device, and you do not get back an async-response-id. When calls with this parameter enabled succeed, they return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. | [optional] + +### Return type + +[**AsyncID**](AsyncID.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: text/plain, application/xml, application/octet-stream, application/exi, application/json, application/link-format, application/senml+json, application/nanoservice-tlv, application/vnd.oma.lwm2m+text, application/vnd.oma.lwm2m+opaq, application/vnd.oma.lwm2m+tlvapplication/vnd.oma.lwm2m+json, + - **Accept**: application/json + + +# **getEndpointResources** +> ResourceArray getEndpointResources(deviceId) + +List the resources on a device. + +Retrieves information about the resource structure for a device from Device Management. This call does not reach the device. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataResourcesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataResourcesApi apiInstance = new DeviceDataResourcesApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +try { + ResourceArray result = apiInstance.getEndpointResources(deviceId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataResourcesApi#getEndpointResources"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + +### Return type + +[**ResourceArray**](ResourceArray.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getResourceValue** +> Void getResourceValue(deviceId, resourcePath, cacheOnly, noResp) + +(DEPRECATED) Read from a resource. + +(DEPRECATED) Requests the resource value either from the device or cache. If the value is not in the cache, the request goes all the way to the device. When the response is available, an `AsyncIDResponse` JSON object is received in the notification channel. The resource values can also be in cache based on `max_age` defined by the device. The value found from the cache is returned immediately in the response. The preferred way to get resource values is to use the **subscribe** and **callback** methods. All resource APIs are asynchronous. These APIs only respond if the device is on and connected to Device Management. See also how [resource caching](https://developer.pelion.com/docs/device-management/current/connecting/device-guidelines.html#resource-cache) works. Please see the [Lightweight Machine to Machine Technical specification](http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf) for more information. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataResourcesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataResourcesApi apiInstance = new DeviceDataResourcesApi(); +String deviceId = "deviceId_example"; // String | Unique Device Management device ID for the endpoint. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. +Boolean cacheOnly = true; // Boolean | If true, the response comes only from the cache. Default: false. Device Management Connect caches the received resource values for the time of [max_age](https://developer.pelion.com/docs/device-management/current/resources/working-with-the-resources.html) defined in the client. +Boolean noResp = true; // Boolean | If a request is made with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive on the device, and no `async-response-id` returns. Successful calls return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. +try { + Void result = apiInstance.getResourceValue(deviceId, resourcePath, cacheOnly, noResp); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataResourcesApi#getResourceValue"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| Unique Device Management device ID for the endpoint. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. | + **cacheOnly** | **Boolean**| If true, the response comes only from the cache. Default: false. Device Management Connect caches the received resource values for the time of [max_age](https://developer.pelion.com/docs/device-management/current/resources/working-with-the-resources.html) defined in the client. | [optional] + **noResp** | **Boolean**| If a request is made with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive on the device, and no `async-response-id` returns. Successful calls return with the status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateResourceValue** +> AsyncID updateResourceValue(deviceId, resourcePath, resourceValue, noResp) + +(DEPRECATED) Write to a Resource or use write-attributes (notification rules) for a Resource. + +(DEPRECATED) With this API, you can [write a new value to existing Resources](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) or use the **write** attribute to set [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) for the Resources. The notification rules only work on the device client side and may not be supported by all clients. This API can also be used to transfer files to the device. Device Management Connect LwM2M server implements Option 1 from RFC7959. The maximum block size is 1024 bytes. Note block size versus transferred file size in low-quality networks. The customer application needs to know what type of file is transferred (for example, TXT) and the customer can encrypt the payload. The maximum payload size is 1048576 bytes. All resource APIs are asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there is an active notification channel. Supported content types depend on the device and its resource. Device Management translates HTTP to equivalent CoAP content type. **Example:** This example sets the alarm on a buzzer. The command writes the [Buzzer](http://www.openmobilealliance.org/tech/profiles/lwm2m/3338.xml) instance 0, \"On/Off\" boolean resource to '1'. ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3338/0/5850 \\ -H \"content-type: text/plain\" \\ -H 'Authorization: Bearer <access_key>' \\ -d '1' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataResourcesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataResourcesApi apiInstance = new DeviceDataResourcesApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | Resource URL. +String resourceValue = "resourceValue_example"; // String | The value to set to the resource. +Boolean noResp = true; // Boolean | If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive to the device, and do not return an `async_response_id`. When a call with this parameter enabled succeeds, it return status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. +try { + AsyncID result = apiInstance.updateResourceValue(deviceId, resourcePath, resourceValue, noResp); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataResourcesApi#updateResourceValue"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| Resource URL. | + **resourceValue** | **String**| The value to set to the resource. | + **noResp** | **Boolean**| If you make a request with `noResp=true`, Device Management Connect makes a CoAP non-confirmable request to the device. Such requests are not guaranteed to arrive to the device, and do not return an `async_response_id`. When a call with this parameter enabled succeeds, it return status code `204 No Content`. If the underlying protocol does not support non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code `409 Conflict`. | [optional] + +### Return type + +[**AsyncID**](AsyncID.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: text/plain, application/xml, application/octet-stream, application/exi, application/json, application/link-format, application/senml+json, application/nanoservice-tlv, application/vnd.oma.lwm2m+text, application/vnd.oma.lwm2m+opaq, application/vnd.oma.lwm2m+tlvapplication/vnd.oma.lwm2m+json, + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDataSubscriptionsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDataSubscriptionsApi.md new file mode 100644 index 000000000..552093693 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDataSubscriptionsApi.md @@ -0,0 +1,454 @@ +# DeviceDataSubscriptionsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addResourceSubscription**](DeviceDataSubscriptionsApi.md#addResourceSubscription) | **PUT** v2/subscriptions/{device-id}/{resourcePath} | Subscribe to a resource to receive updates about resource changes. +[**checkResourceSubscription**](DeviceDataSubscriptionsApi.md#checkResourceSubscription) | **GET** v2/subscriptions/{device-id}/{resourcePath} | Read the subscription status for a specific resource. +[**deleteEndpointSubscriptions**](DeviceDataSubscriptionsApi.md#deleteEndpointSubscriptions) | **DELETE** v2/subscriptions/{device-id} | Delete all subscriptions on a device. +[**deletePreSubscriptions**](DeviceDataSubscriptionsApi.md#deletePreSubscriptions) | **DELETE** v2/subscriptions | Remove pre-subscriptions. +[**deleteResourceSubscription**](DeviceDataSubscriptionsApi.md#deleteResourceSubscription) | **DELETE** v2/subscriptions/{device-id}/{resourcePath} | Remove a subscription. +[**getEndpointSubscriptions**](DeviceDataSubscriptionsApi.md#getEndpointSubscriptions) | **GET** v2/subscriptions/{device-id} | View all subscriptions on a device. +[**getPreSubscriptions**](DeviceDataSubscriptionsApi.md#getPreSubscriptions) | **GET** v2/subscriptions | View pre-subscriptions. +[**updatePreSubscriptions**](DeviceDataSubscriptionsApi.md#updatePreSubscriptions) | **PUT** v2/subscriptions | Set pre-subscriptions. + + + +# **addResourceSubscription** +> Void addResourceSubscription(deviceId, resourcePath) + +Subscribe to a resource to receive updates about resource changes. + + Subscribe to a resource to receive updated resource content, periodically or based on a more sophisticated solution-dependent logic. To place dynamic observation rules for individual object instances and resources and define when the device sends observations, set [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). **Note:** Device Management removes all manual subscriptions during a full device registration, at which point applications must re-subscribe. To avoid this, use `/subscriptions` to set a pre-subscription. You can subscribe to resources, objects and object instances. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer <access_key>' ``` **Important:** You must also call a [`/notification/callback`](https://developer.pelion.com/docs/device-management-api/notifications/) method for Device Management Connect to push resource change notifications. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). +try { + Void result = apiInstance.addResourceSubscription(deviceId, resourcePath); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#addResourceSubscription"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **checkResourceSubscription** +> Void checkResourceSubscription(deviceId, resourcePath) + +Read the subscription status for a specific resource. + +Check whether you are subscribed to receive resource content updates for a specific resource. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). +try { + Void result = apiInstance.checkResourceSubscription(deviceId, resourcePath); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#checkResourceSubscription"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteEndpointSubscriptions** +> Void deleteEndpointSubscriptions(deviceId) + +Delete all subscriptions on a device. + +Delete all resource subscriptions in a single device. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +try { + Void result = apiInstance.deleteEndpointSubscriptions(deviceId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#deleteEndpointSubscriptions"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deletePreSubscriptions** +> Void deletePreSubscriptions() + +Remove pre-subscriptions. + +Remove pre-subscriptions. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +try { + Void result = apiInstance.deletePreSubscriptions(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#deletePreSubscriptions"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteResourceSubscription** +> Void deleteResourceSubscription(deviceId, resourcePath) + +Remove a subscription. + +Remove an existing subscription to a resource. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +String resourcePath = "resourcePath_example"; // String | The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). +try { + Void result = apiInstance.deleteResourceSubscription(deviceId, resourcePath); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#deleteResourceSubscription"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + **resourcePath** | **String**| The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getEndpointSubscriptions** +> String getEndpointSubscriptions(deviceId) + +View all subscriptions on a device. + +Retrieve a list of all subscribed resources on a single device. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. +try { + String result = apiInstance.getEndpointSubscriptions(deviceId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#getEndpointSubscriptions"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. | + +### Return type + +**String** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/uri-list + + +# **getPreSubscriptions** +> PresubscriptionArray getPreSubscriptions() + +View pre-subscriptions. + +Retrieve pre-subscription data. The server returns a JSON structure. If there are no pre-subscribed resources, the server returns an empty array. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +try { + PresubscriptionArray result = apiInstance.getPreSubscriptions(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#getPreSubscriptions"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PresubscriptionArray**](PresubscriptionArray.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updatePreSubscriptions** +> Void updatePreSubscriptions(presubscription) + +Set pre-subscriptions. + +A pre-subscription is a set of rules you define to subscribe to specific resources automatically when certain devices register or does a register update. You can set subscription rules based on the endpoint ID (optionally having an `*` character at the end), endpoint type, a list of resources, or expressions with an `*` character at the end. When a device that meets the subscription rules registered, Device Management Connect automatically sends subscription requests to the device for the resources you specify. To remove the pre-subscription data, put an empty array as a rule. To place dynamic observation rules for individual object instances and resources and define when the device sends observations, set [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). **Note:** The subscription is bound to the application you are using. To get notifications of the resource value changes, you need to create an [event notification channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html) with an access key of the same application. **Example request:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[ { \"endpoint-name\": \"node-001\", \"resource-path\": [\"/dev\"] }, { \"endpoint-type\": \"Light\", \"resource-path\": [\"/sen/_*\"] }, { \"endpoint-name\": \"node*\" }, { \"endpoint-type\": \"Sensor\" }, { \"resource-path\": [\"/dev/temp\",\"/dev/hum\"] } ]' ``` - Subscribe to `/dev` resource of endpoint named `node-001`. - Subscribe to `Light` type of endpoints and their resources prefixed with `/sen/`. - Subscribe to all observable resources of endpoint names prefixed with `node`. - Subscribe to all observable resources of `Sensor` type endpoints. - Subscribe to `/dev/temp` and `/dev/hum` resources of all endpoints. **Limits**: - The maximum length of the endpoint name and endpoint type is 64 characters. - The maximum length of the resource path is 128 characters. - You can subscribe to 256 separate resource paths. - The maximum number of pre-subscription entries is 1024. **Note**: To save bandwidth and avoid unnecessary traffic, use resource path patterns to limit the matching resources in the presubscription data. This prevents your web application from receiving unwanted resource notifications. See [Subscribe only to what you need](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDataSubscriptionsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDataSubscriptionsApi apiInstance = new DeviceDataSubscriptionsApi(); +PresubscriptionArray presubscription = new PresubscriptionArray(); // PresubscriptionArray | Array of pre-subscriptions. +try { + Void result = apiInstance.updatePreSubscriptions(presubscription); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDataSubscriptionsApi#updatePreSubscriptions"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **presubscription** | [**PresubscriptionArray**](PresubscriptionArray.md)| Array of pre-subscriptions. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/plain + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDeviceQueriesApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDeviceQueriesApi.md new file mode 100644 index 000000000..cf8a55ded --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDeviceQueriesApi.md @@ -0,0 +1,338 @@ +# DeviceDirectoryDeviceQueriesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deviceQueryCreate**](DeviceDirectoryDeviceQueriesApi.md#deviceQueryCreate) | **POST** v3/device-queries/ | Create a device query. +[**deviceQueryDestroy**](DeviceDirectoryDeviceQueriesApi.md#deviceQueryDestroy) | **DELETE** v3/device-queries/{query_id}/ | Delete a device query. +[**deviceQueryList**](DeviceDirectoryDeviceQueriesApi.md#deviceQueryList) | **GET** v3/device-queries/ | List device queries. +[**deviceQueryRetrieve**](DeviceDirectoryDeviceQueriesApi.md#deviceQueryRetrieve) | **GET** v3/device-queries/{query_id}/ | Retrieve a device query. +[**deviceQueryUpdate**](DeviceDirectoryDeviceQueriesApi.md#deviceQueryUpdate) | **PUT** v3/device-queries/{query_id}/ | Update a device query. + + + +# **deviceQueryCreate** +> DeviceQuery deviceQueryCreate(device) + +Create a device query. + +Create a new device query. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDeviceQueriesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDirectoryDeviceQueriesApi apiInstance = new DeviceDirectoryDeviceQueriesApi(); +DeviceQueryPostPutRequest device = new DeviceQueryPostPutRequest(); // DeviceQueryPostPutRequest | +try { + DeviceQuery result = apiInstance.deviceQueryCreate(device); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDirectoryDeviceQueriesApi#deviceQueryCreate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **device** | [**DeviceQueryPostPutRequest**](DeviceQueryPostPutRequest.md)| | + +### Return type + +[**DeviceQuery**](DeviceQuery.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deviceQueryDestroy** +> Void deviceQueryDestroy(queryId) + +Delete a device query. + +Delete a device query. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDeviceQueriesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDirectoryDeviceQueriesApi apiInstance = new DeviceDirectoryDeviceQueriesApi(); +String queryId = "queryId_example"; // String | +try { + Void result = apiInstance.deviceQueryDestroy(queryId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDirectoryDeviceQueriesApi#deviceQueryDestroy"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryId** | **String**| | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deviceQueryList** +> DeviceQueryPage deviceQueryList(limit, order, after, include, filter, createdAtIn, createdAtNin, createdAtLte, createdAtGte, idEq, idNeq, idIn, idNin, nameEq, nameNeq, nameIn, nameNin, queryEq, queryNeq, queryIn, queryNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte) + +List device queries. + +List all device queries. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDeviceQueriesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDirectoryDeviceQueriesApi apiInstance = new DeviceDirectoryDeviceQueriesApi(); +Integer limit = 56; // Integer | How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit. +String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The ID of the item after which to retrieve the next page. +String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. +String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as: `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields The below table lists all filterable fields:
Field = / __eq / __neq __in / __nin __lte / __gte
created_at ✓ ✓ ✓
etag ✓ ✓ ✓
id ✓ ✓  
name ✓ ✓  
query ✓ ✓  
updated_at ✓ ✓ ✓
  The examples below show the queries in *unencoded* form. ###### By device query properties (all properties are filterable): For example: `description={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to – field name suffixed with `__gte`. * Less than or equal to – field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}`. ##### Multi-field example `query_id=0158d38771f70000000000010010038c&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `filter=query_id%3D0158d38771f70000000000010010038c%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__nin=query1,query2` +String createdAtIn = "createdAtIn_example"; // String | in filter for the \"created_at\" field +String createdAtNin = "createdAtNin_example"; // String | nin filter for the \"created_at\" field +DateTime createdAtLte = new DateTime(); // DateTime | lte filter for the \"created_at\" field +DateTime createdAtGte = new DateTime(); // DateTime | gte filter for the \"created_at\" field +String idEq = "idEq_example"; // String | eq filter for the \"id\" field +String idNeq = "idNeq_example"; // String | neq filter for the \"id\" field +String idIn = "idIn_example"; // String | in filter for the \"id\" field +String idNin = "idNin_example"; // String | nin filter for the \"id\" field +String nameEq = "nameEq_example"; // String | eq filter for the \"name\" field +String nameNeq = "nameNeq_example"; // String | neq filter for the \"name\" field +String nameIn = "nameIn_example"; // String | in filter for the \"name\" field +String nameNin = "nameNin_example"; // String | nin filter for the \"name\" field +String queryEq = "queryEq_example"; // String | eq filter for the \"query\" field +String queryNeq = "queryNeq_example"; // String | neq filter for the \"query\" field +String queryIn = "queryIn_example"; // String | in filter for the \"query\" field +String queryNin = "queryNin_example"; // String | nin filter for the \"query\" field +String updatedAtIn = "updatedAtIn_example"; // String | in filter for the \"updated_at\" field +String updatedAtNin = "updatedAtNin_example"; // String | nin filter for the \"updated_at\" field +DateTime updatedAtLte = new DateTime(); // DateTime | lte filter for the \"updated_at\" field +DateTime updatedAtGte = new DateTime(); // DateTime | gte filter for the \"updated_at\" field +try { + DeviceQueryPage result = apiInstance.deviceQueryList(limit, order, after, include, filter, createdAtIn, createdAtNin, createdAtLte, createdAtGte, idEq, idNeq, idIn, idNin, nameEq, nameNeq, nameIn, nameNin, queryEq, queryNeq, queryIn, queryNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDirectoryDeviceQueriesApi#deviceQueryList"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] + **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] + **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] + **filter** | **String**| URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as: `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields The below table lists all filterable fields: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>created_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>name</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>query</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> </tbody> </table> &nbsp; The examples below show the queries in *unencoded* form. ###### By device query properties (all properties are filterable): For example: `description={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to &ndash; field name suffixed with `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}`. ##### Multi-field example `query_id=0158d38771f70000000000010010038c&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `filter=query_id%3D0158d38771f70000000000010010038c%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__nin=query1,query2` | [optional] + **createdAtIn** | **String**| in filter for the \"created_at\" field | [optional] + **createdAtNin** | **String**| nin filter for the \"created_at\" field | [optional] + **createdAtLte** | **DateTime**| lte filter for the \"created_at\" field | [optional] + **createdAtGte** | **DateTime**| gte filter for the \"created_at\" field | [optional] + **idEq** | **String**| eq filter for the \"id\" field | [optional] + **idNeq** | **String**| neq filter for the \"id\" field | [optional] + **idIn** | **String**| in filter for the \"id\" field | [optional] + **idNin** | **String**| nin filter for the \"id\" field | [optional] + **nameEq** | **String**| eq filter for the \"name\" field | [optional] + **nameNeq** | **String**| neq filter for the \"name\" field | [optional] + **nameIn** | **String**| in filter for the \"name\" field | [optional] + **nameNin** | **String**| nin filter for the \"name\" field | [optional] + **queryEq** | **String**| eq filter for the \"query\" field | [optional] + **queryNeq** | **String**| neq filter for the \"query\" field | [optional] + **queryIn** | **String**| in filter for the \"query\" field | [optional] + **queryNin** | **String**| nin filter for the \"query\" field | [optional] + **updatedAtIn** | **String**| in filter for the \"updated_at\" field | [optional] + **updatedAtNin** | **String**| nin filter for the \"updated_at\" field | [optional] + **updatedAtLte** | **DateTime**| lte filter for the \"updated_at\" field | [optional] + **updatedAtGte** | **DateTime**| gte filter for the \"updated_at\" field | [optional] + +### Return type + +[**DeviceQueryPage**](DeviceQueryPage.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deviceQueryRetrieve** +> DeviceQuery deviceQueryRetrieve(queryId) + +Retrieve a device query. + +Retrieve a specific device query. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDeviceQueriesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDirectoryDeviceQueriesApi apiInstance = new DeviceDirectoryDeviceQueriesApi(); +String queryId = "queryId_example"; // String | +try { + DeviceQuery result = apiInstance.deviceQueryRetrieve(queryId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDirectoryDeviceQueriesApi#deviceQueryRetrieve"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryId** | **String**| | + +### Return type + +[**DeviceQuery**](DeviceQuery.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deviceQueryUpdate** +> DeviceQuery deviceQueryUpdate(queryId, body) + +Update a device query. + +Update a specifc device query. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDeviceQueriesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceDirectoryDeviceQueriesApi apiInstance = new DeviceDirectoryDeviceQueriesApi(); +String queryId = "queryId_example"; // String | +DeviceQueryPostPutRequest body = new DeviceQueryPostPutRequest(); // DeviceQueryPostPutRequest | Device query update object. +try { + DeviceQuery result = apiInstance.deviceQueryUpdate(queryId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceDirectoryDeviceQueriesApi#deviceQueryUpdate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **queryId** | **String**| | + **body** | [**DeviceQueryPostPutRequest**](DeviceQueryPostPutRequest.md)| Device query update object. | + +### Return type + +[**DeviceQuery**](DeviceQuery.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDevicesApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDevicesApi.md index 5f6267acc..e6735508d 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDevicesApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryDevicesApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description Create a device. -Create a new device. +Create a new device in Device Management. Usually you do not need to create a device this way, as it is automatically created when it bootstraps or connects to Device Management. ### Example ```java @@ -72,7 +72,7 @@ Name | Type | Description | Notes Delete a device. -Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a production certicate returns a 400 response. +Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a production certificate returns a 400 response. ### Example ```java @@ -92,7 +92,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceDirectoryDevicesApi apiInstance = new DeviceDirectoryDevicesApi(); -String id = "id_example"; // String | The ID of the device. +String id = "id_example"; // String | The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. try { Void result = apiInstance.deviceDestroy(id); System.out.println(result); @@ -106,7 +106,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the device. | + **id** | **String**| The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. | ### Return type @@ -123,11 +123,11 @@ Name | Type | Description | Notes # **deviceList** -> DevicePage deviceList(limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin) +> DevicePage deviceList(limit, order, after, filter, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin) List all devices. -List all devices. **Example:** Following example filters devices according to state field and returns only devices in 'registered' state: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\ -H 'Authorization: Bearer <API key>' ``` +List all devices enrolled to Device Management for the account. The URL length must be fewer than 4096 characters. Requests that exceed this limit, such as those including too many query parameters in a filter, fail with a bad request response. devices with too long list of query parameters, the request is deemed as bad request. **Example:** Following example filters devices according to state field and returns only devices in 'registered' state: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\ -H 'Authorization: Bearer <API key>' ``` ### Example ```java @@ -150,6 +150,7 @@ DeviceDirectoryDevicesApi apiInstance = new DeviceDirectoryDevicesApi(); Integer limit = 56; // Integer | How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit. String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. String after = "after_example"; // String | The ID of the item after which to retrieve the next page. +String filter = "filter_example"; // String | URL encoded query string parameter to filter returned data. ##### Filtering ```?filter={URL encoded query string}``` The query string is made up of key/value pairs separated by ampersands. So for a query of ```key1=value1&key2=value2&key3=value3``` this would be encoded as follows: ```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3``` The examples below show the queries in *unencoded* form. ###### By device properties (all properties are filterable): ```state=[unenrolled|cloud_enrolling|bootstrapped|registered]``` ```device_class={value}``` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format ```YYYY-MM-DDThh:mm:ss.msZ```. There are three permitted variations: * UTC RFC3339 with milliseconds e.g. 2016-11-30T16:25:12.1234Z * UTC RFC3339 without milliseconds e.g. 2016-11-30T16:25:12Z * UTC RFC3339 shortened - without milliseconds and punctuation e.g. 20161130T162512Z Date-time filtering supports three operators: * equality * greater than or equal to – field name suffixed with ```__gte``` * less than or equal to – field name suffixed with ```__lte``` Lower and upper limits to a date-time range may be specified by including both the ```__gte``` and ```__lte``` forms in the filter. ```{field name}[|__lte|__gte]={UTC RFC3339 date-time}``` ###### On device custom attributes: ```custom_attributes__{param}={value}``` ```custom_attributes__tag=TAG1``` ###### On device component attributes: ```component_attributes__{name}={version}``` ```component_attributes__ble=1.2.3``` ##### Multi-field example ```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z``` Encoded: ```?filter=state%3Dbootstrapped%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z``` ##### Filtering with filter operators String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `state__nin=unenrolled,dergistered` String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. String lifecycleStatusEq = "lifecycleStatusEq_example"; // String | eq filter for the \"lifecycle_status\" field String lifecycleStatusNeq = "lifecycleStatusNeq_example"; // String | neq filter for the \"lifecycle_status\" field @@ -269,6 +270,10 @@ String nameEq = "nameEq_example"; // String | eq filter for the \"name\" field String nameNeq = "nameNeq_example"; // String | neq filter for the \"name\" field String nameIn = "nameIn_example"; // String | in filter for the \"name\" field String nameNin = "nameNin_example"; // String | nin filter for the \"name\" field +String netIdEq = "netIdEq_example"; // String | eq filter for the \"net_id\" field +String netIdNeq = "netIdNeq_example"; // String | neq filter for the \"net_id\" field +String netIdIn = "netIdIn_example"; // String | in filter for the \"net_id\" field +String netIdNin = "netIdNin_example"; // String | nin filter for the \"net_id\" field String serialNumberEq = "serialNumberEq_example"; // String | eq filter for the \"serial_number\" field String serialNumberNeq = "serialNumberNeq_example"; // String | neq filter for the \"serial_number\" field String serialNumberIn = "serialNumberIn_example"; // String | in filter for the \"serial_number\" field @@ -286,7 +291,7 @@ String vendorIdNeq = "vendorIdNeq_example"; // String | neq filter for the \"ven String vendorIdIn = "vendorIdIn_example"; // String | in filter for the \"vendor_id\" field String vendorIdNin = "vendorIdNin_example"; // String | nin filter for the \"vendor_id\" field try { - DevicePage result = apiInstance.deviceList(limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); + DevicePage result = apiInstance.deviceList(limit, order, after, filter, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DeviceDirectoryDevicesApi#deviceList"); @@ -301,6 +306,7 @@ Name | Type | Description | Notes **limit** | **Integer**| How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit. | [optional] **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] + **filter** | **String**| URL encoded query string parameter to filter returned data. ##### Filtering ```?filter={URL encoded query string}``` The query string is made up of key/value pairs separated by ampersands. So for a query of ```key1=value1&key2=value2&key3=value3``` this would be encoded as follows: ```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3``` The examples below show the queries in *unencoded* form. ###### By device properties (all properties are filterable): ```state=[unenrolled|cloud_enrolling|bootstrapped|registered]``` ```device_class={value}``` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format ```YYYY-MM-DDThh:mm:ss.msZ```. There are three permitted variations: * UTC RFC3339 with milliseconds e.g. 2016-11-30T16:25:12.1234Z * UTC RFC3339 without milliseconds e.g. 2016-11-30T16:25:12Z * UTC RFC3339 shortened - without milliseconds and punctuation e.g. 20161130T162512Z Date-time filtering supports three operators: * equality * greater than or equal to &ndash; field name suffixed with ```__gte``` * less than or equal to &ndash; field name suffixed with ```__lte``` Lower and upper limits to a date-time range may be specified by including both the ```__gte``` and ```__lte``` forms in the filter. ```{field name}[|__lte|__gte]={UTC RFC3339 date-time}``` ###### On device custom attributes: ```custom_attributes__{param}={value}``` ```custom_attributes__tag=TAG1``` ###### On device component attributes: ```component_attributes__{name}={version}``` ```component_attributes__ble=1.2.3``` ##### Multi-field example ```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z``` Encoded: ```?filter=state%3Dbootstrapped%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z``` ##### Filtering with filter operators String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `state__nin=unenrolled,dergistered` | [optional] **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] **lifecycleStatusEq** | **String**| eq filter for the \"lifecycle_status\" field | [optional] **lifecycleStatusNeq** | **String**| neq filter for the \"lifecycle_status\" field | [optional] @@ -420,6 +426,10 @@ Name | Type | Description | Notes **nameNeq** | **String**| neq filter for the \"name\" field | [optional] **nameIn** | **String**| in filter for the \"name\" field | [optional] **nameNin** | **String**| nin filter for the \"name\" field | [optional] + **netIdEq** | **String**| eq filter for the \"net_id\" field | [optional] + **netIdNeq** | **String**| neq filter for the \"net_id\" field | [optional] + **netIdIn** | **String**| in filter for the \"net_id\" field | [optional] + **netIdNin** | **String**| nin filter for the \"net_id\" field | [optional] **serialNumberEq** | **String**| eq filter for the \"serial_number\" field | [optional] **serialNumberNeq** | **String**| neq filter for the \"serial_number\" field | [optional] **serialNumberIn** | **String**| in filter for the \"serial_number\" field | [optional] @@ -456,7 +466,7 @@ Name | Type | Description | Notes Get a device. -Retrieve information about a specific device. **Example:** Following example must be updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/<device_ID> \\ -H 'Authorization: Bearer <API key>' ``` +Retrieve information about a specific device. This API returns [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). If you want to see the structure of resources in the device or the actual resource values, use the [Connect API](https://developer.pelion.com/docs/device-management-api/connect/). **Example:** Following example must be updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/<device_ID> \\ -H 'Authorization: Bearer <API key>' ``` ### Example ```java @@ -476,7 +486,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceDirectoryDevicesApi apiInstance = new DeviceDirectoryDevicesApi(); -String id = "id_example"; // String | The ID of the device. +String id = "id_example"; // String | The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. try { DeviceData result = apiInstance.deviceRetrieve(id); System.out.println(result); @@ -490,7 +500,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the device. | + **id** | **String**| The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. | ### Return type @@ -531,7 +541,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceDirectoryDevicesApi apiInstance = new DeviceDirectoryDevicesApi(); -String id = "id_example"; // String | The ID of the device. +String id = "id_example"; // String | The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. DeviceDataPutRequest device = new DeviceDataPutRequest(); // DeviceDataPutRequest | try { DeviceData result = apiInstance.deviceUpdate(id, device); @@ -546,7 +556,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the device. | + **id** | **String**| The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. | **device** | [**DeviceDataPutRequest**](DeviceDataPutRequest.md)| | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryEventsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryEventsApi.md index 7058c7b8d..b9fd232f4 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryEventsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryEventsApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description List all device events. -List all device events for an account. **Example:** Following example gets device-events limiting returned results to max 5 events ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\ -H 'Authorization: Bearer <API key>' ``` or to get events for certain device filter based on device_id: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=<device_id> \\ -H 'Authorization: Bearer <API key>' ``` +List all or a filtered list of device events for the account. Device events are events significant to operation or lifetime, such as creation, firmware update, and suspension. To see statistics for device connectivity and usage, use the [Statistics API](https://developer.pelion.com/docs/device-management-api/connect-statistics/). **Example:** Following example gets device-events limiting returned results to max 5 events ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\ -H 'Authorization: Bearer <API key>' ``` or to get events for certain device filter based on device_id: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=<device_id> \\ -H 'Authorization: Bearer <API key>' ``` ### Example ```java @@ -40,7 +40,7 @@ Integer limit = 56; // Integer | How many objects to retrieve in the page (2-100 String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. String after = "after_example"; // String | The ID of the item after which to retrieve the next page. String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. -String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The below table lists all filterable fields:
Field = / __eq / __neq __in / __nin __lte / __gte
date_time ✓ ✓ ✓
description ✓ ✓  
id ✓ ✓  
device_id ✓ ✓  
event_type ✓ ✓  
state_change ✓ ✓  
  The examples below show the queries in *unencoded* form. ###### By id: `id={id}` ###### By state change: `state_change=[True|False]` ###### By event type: `event_type={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format: `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to – field name suffixed with `__gte`. * Less than or equal to – field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ##### Multi-field example `id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z` Encoded: `?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `event_type__in=update.device.device-created,update.device.device-updated` +String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this is encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The below table lists all filterable fields:
Field = / __eq / __neq __in / __nin __lte / __gte
date_time ✓ ✓ ✓
description ✓ ✓  
id ✓ ✓  
device_id ✓ ✓  
event_type ✓ ✓  
state_change ✓ ✓  
  The examples below show the queries in *unencoded* form. ###### By id: `id={id}` ###### By state change: `state_change=[True|False]` ###### By event type: `event_type={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format: `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to – field name suffixed with `__gte`. * Less than or equal to – field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ##### Multi-field example `id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z` Encoded: `?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `event_type__in=update.device.device-created,update.device.device-updated` String dateTimeIn = "dateTimeIn_example"; // String | in filter for the \"date_time\" field String dateTimeNin = "dateTimeNin_example"; // String | nin filter for the \"date_time\" field DateTime dateTimeLte = new DateTime(); // DateTime | lte filter for the \"date_time\" field @@ -80,7 +80,7 @@ Name | Type | Description | Notes **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] - **filter** | **String**| URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The below table lists all filterable fields: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>date_time</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>description</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>device_id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>event_type</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>state_change</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> </tbody> </table> &nbsp; The examples below show the queries in *unencoded* form. ###### By id: `id={id}` ###### By state change: `state_change=[True|False]` ###### By event type: `event_type={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format: `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to &ndash; field name suffixed with `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ##### Multi-field example `id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z` Encoded: `?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `event_type__in=update.device.device-created,update.device.device-updated` | [optional] + **filter** | **String**| URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this is encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The below table lists all filterable fields: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>date_time</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>description</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>device_id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>event_type</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>state_change</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> </tbody> </table> &nbsp; The examples below show the queries in *unencoded* form. ###### By id: `id={id}` ###### By state change: `state_change=[True|False]` ###### By event type: `event_type={value}` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format: `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to &ndash; field name suffixed with `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ##### Multi-field example `id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z` Encoded: `?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `event_type__in=update.device.device-created,update.device.device-updated` | [optional] **dateTimeIn** | **String**| in filter for the \"date_time\" field | [optional] **dateTimeNin** | **String**| nin filter for the \"date_time\" field | [optional] **dateTimeLte** | **DateTime**| lte filter for the \"date_time\" field | [optional] @@ -123,7 +123,7 @@ Name | Type | Description | Notes Retrieve a device event. -Retrieve a specific device event. **Example:** To fetch a specific event you can use the 'id' field form the '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4' ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/<device_event_id> \\ -H 'Authorization: Bearer <API key>' ``` +\"Retrieve a specific device event. See '/v3/device-events/' for information on device events, and how to get the device_event_id.\" **Example:** To fetch a specific event you can use the 'id' field from '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4' ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/<device_event_id> \\ -H 'Authorization: Bearer <API key>' ``` ### Example ```java @@ -178,7 +178,7 @@ Name | Type | Description | Notes DEPRECATED: List all device events. -DEPRECATED: List all device events. Use `/v3/device-events/` instead. +DEPRECATED: This API is replaced with `/v3/device-events/`. ### Example ```java @@ -289,7 +289,7 @@ Name | Type | Description | Notes DEPRECATED: Retrieve a device event. -Retrieve device event (deprecated, use /v3/device-events/{device_event_id}/ instead). +DEPRECATED: This API is replaced by `/v3/device-events/` and `/v3/device-events/{device_event_id}/`. ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryGroupsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryGroupsApi.md index 2b601c0b1..5df5ebb7d 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryGroupsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryGroupsApi.md @@ -75,7 +75,7 @@ Name | Type | Description | Notes Delete a group. -Delete a group. +Delete a group. This deletes the group, but not the devices in the group. ### Example ```java @@ -154,7 +154,7 @@ Integer limit = 56; // Integer | How many objects to retrieve in the page (2-100 String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. String after = "after_example"; // String | The ID of the item after which to retrieve the next page. String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. -String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The table lists all filterable fields:
Field = / __eq / __neq __in / __nin __lte / __gte
id ✓ ✓  
devices_count ✓ ✓ ✓
name ✓ ✓  
custom_attributes ✓    
created_at ✓ ✓ ✓
updated_at ✓ ✓ ✓
etag ✓ ✓ ✓
  The examples below show the queries in *unencoded* form. ###### By device group properties: `name__eq=mygroup` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to – field name suffixed with `__gte`. * Less than or equal to – field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ###### By device group custom attributes: `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` ##### Multi-field example `name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=group1,group2` +String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The table lists all filterable fields:
Field = / __eq / __neq __in / __nin __lte / __gte
id ✓ ✓  
devices_count ✓ ✓ ✓
name ✓ ✓  
custom_attributes ✓    
component_attributes ✓    
created_at ✓ ✓ ✓
updated_at ✓ ✓ ✓
etag ✓ ✓ ✓
  The examples below show the queries in *unencoded* form. ###### By device group properties: `name__eq=mygroup` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to – field name suffixed with `__gte`. * Less than or equal to – field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ###### By device group custom attributes: `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` ###### By device group component attributes: `component_attributes__{name}={version}` `component_attributes__{name}__{operator}={version}` `component_attributes__ble=1.2.3` `component_attributes__main__gt=1.2.3` ##### Multi-field example `name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=group1,group2` String idEq = "idEq_example"; // String | eq filter for the \"id\" field String idNeq = "idNeq_example"; // String | neq filter for the \"id\" field String idIn = "idIn_example"; // String | in filter for the \"id\" field @@ -194,7 +194,7 @@ Name | Type | Description | Notes **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] - **filter** | **String**| URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The table lists all filterable fields: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>devices_count</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>name</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>custom_attributes</td> <td>✓</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>created_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> </tbody> </table> &nbsp; The examples below show the queries in *unencoded* form. ###### By device group properties: `name__eq=mygroup` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to &ndash; field name suffixed with `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ###### By device group custom attributes: `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` ##### Multi-field example `name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=group1,group2` | [optional] + **filter** | **String**| URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL encoded query string}` The query string is made up of key/value pairs separated by ampersands. So for a query of `key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: The table lists all filterable fields: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>devices_count</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>name</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>custom_attributes</td> <td>✓</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>component_attributes</td> <td>✓</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>created_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> </tbody> </table> &nbsp; The examples below show the queries in *unencoded* form. ###### By device group properties: `name__eq=mygroup` ###### On date-time fields: Date-time fields should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three operators: * Equality. * Greater than or equal to &ndash; field name suffixed with `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by including both the `__gte` and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 date-time}` ###### By device group custom attributes: `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` ###### By device group component attributes: `component_attributes__{name}={version}` `component_attributes__{name}__{operator}={version}` `component_attributes__ble=1.2.3` `component_attributes__main__gt=1.2.3` ##### Multi-field example `name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` Encoded: `?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z` ##### Filtering with filter operators String field filtering supports the following operators: * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: `__nin`. For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=group1,group2` | [optional] **idEq** | **String**| eq filter for the \"id\" field | [optional] **idNeq** | **String**| neq filter for the \"id\" field | [optional] **idIn** | **String**| in filter for the \"id\" field | [optional] @@ -237,7 +237,7 @@ Name | Type | Description | Notes Add a device to a group. -Add one device to a group. +Add one device to a group. A device can be in multiple groups. ### Example ```java @@ -347,11 +347,11 @@ Name | Type | Description | Notes # **groupMembersRetrieve** -> DevicePage groupMembersRetrieve(deviceGroupId, limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin) +> DevicePage groupMembersRetrieve(deviceGroupId, limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin) Get a page of devices. -Get a page of devices. +Get a page of devices in a specified group. ### Example ```java @@ -494,6 +494,10 @@ String nameEq = "nameEq_example"; // String | eq filter for the \"name\" field String nameNeq = "nameNeq_example"; // String | neq filter for the \"name\" field String nameIn = "nameIn_example"; // String | in filter for the \"name\" field String nameNin = "nameNin_example"; // String | nin filter for the \"name\" field +String netIdEq = "netIdEq_example"; // String | eq filter for the \"net_id\" field +String netIdNeq = "netIdNeq_example"; // String | neq filter for the \"net_id\" field +String netIdIn = "netIdIn_example"; // String | in filter for the \"net_id\" field +String netIdNin = "netIdNin_example"; // String | nin filter for the \"net_id\" field String serialNumberEq = "serialNumberEq_example"; // String | eq filter for the \"serial_number\" field String serialNumberNeq = "serialNumberNeq_example"; // String | neq filter for the \"serial_number\" field String serialNumberIn = "serialNumberIn_example"; // String | in filter for the \"serial_number\" field @@ -511,7 +515,7 @@ String vendorIdNeq = "vendorIdNeq_example"; // String | neq filter for the \"ven String vendorIdIn = "vendorIdIn_example"; // String | in filter for the \"vendor_id\" field String vendorIdNin = "vendorIdNin_example"; // String | nin filter for the \"vendor_id\" field try { - DevicePage result = apiInstance.groupMembersRetrieve(deviceGroupId, limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); + DevicePage result = apiInstance.groupMembersRetrieve(deviceGroupId, limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, lastSystemSuspendedCategoryEq, lastSystemSuspendedCategoryNeq, lastSystemSuspendedCategoryIn, lastSystemSuspendedCategoryNin, lastSystemSuspendedUpdatedAtIn, lastSystemSuspendedUpdatedAtNin, lastSystemSuspendedUpdatedAtLte, lastSystemSuspendedUpdatedAtGte, accountIdEq, accountIdNeq, accountIdIn, accountIdNin, autoUpdateEq, autoUpdateNeq, bootstrapExpirationDateIn, bootstrapExpirationDateNin, bootstrapExpirationDateLte, bootstrapExpirationDateGte, bootstrappedTimestampIn, bootstrappedTimestampNin, bootstrappedTimestampLte, bootstrappedTimestampGte, caIdEq, caIdNeq, caIdIn, caIdNin, connectorExpirationDateIn, connectorExpirationDateNin, connectorExpirationDateLte, connectorExpirationDateGte, createdAtIn, createdAtNin, createdAtLte, createdAtGte, deployedStateEq, deployedStateNeq, deployedStateIn, deployedStateNin, deploymentEq, deploymentNeq, deploymentIn, deploymentNin, descriptionEq, descriptionNeq, descriptionIn, descriptionNin, deviceClassEq, deviceClassNeq, deviceClassIn, deviceClassNin, deviceExecutionModeEq, deviceExecutionModeNeq, deviceExecutionModeIn, deviceExecutionModeNin, deviceKeyEq, deviceKeyNeq, deviceKeyIn, deviceKeyNin, endpointNameEq, endpointNameNeq, endpointNameIn, endpointNameNin, endpointTypeEq, endpointTypeNeq, endpointTypeIn, endpointTypeNin, enrolmentListTimestampIn, enrolmentListTimestampNin, enrolmentListTimestampLte, enrolmentListTimestampGte, firmwareChecksumEq, firmwareChecksumNeq, firmwareChecksumIn, firmwareChecksumNin, hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DeviceDirectoryGroupsApi#groupMembersRetrieve"); @@ -646,6 +650,10 @@ Name | Type | Description | Notes **nameNeq** | **String**| neq filter for the \"name\" field | [optional] **nameIn** | **String**| in filter for the \"name\" field | [optional] **nameNin** | **String**| nin filter for the \"name\" field | [optional] + **netIdEq** | **String**| eq filter for the \"net_id\" field | [optional] + **netIdNeq** | **String**| neq filter for the \"net_id\" field | [optional] + **netIdIn** | **String**| in filter for the \"net_id\" field | [optional] + **netIdNin** | **String**| nin filter for the \"net_id\" field | [optional] **serialNumberEq** | **String**| eq filter for the \"serial_number\" field | [optional] **serialNumberNeq** | **String**| neq filter for the \"serial_number\" field | [optional] **serialNumberIn** | **String**| in filter for the \"serial_number\" field | [optional] @@ -682,7 +690,7 @@ Name | Type | Description | Notes Get a group. -Get a group. +Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) info what contains info of the group, for example, name and updated date. To list the devices in the group, use '/v3/device-groups/{device-group-id}/devices/'. ### Example ```java @@ -737,7 +745,7 @@ Name | Type | Description | Notes Modify the attributes of a group. -Modify the attributes of a group. +Modify the attributes of a group, such as the description. ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryLifecycleApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryLifecycleApi.md index 39b2706ad..3028aff4d 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryLifecycleApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceDirectoryLifecycleApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description List all device block categories -List all device block categories. A block category is a short description of why a device was suspended or returned to service. **Example:** Get all defined categories of why device is blocked from the device management ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H 'Authorization: Bearer <API key>' ``` +List all device block categories. A block category is a short description of why a device was suspended or returned to service. **Example:** Get all defined device suspension categories: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H 'Authorization: Bearer <API key>' ``` ### Example ```java @@ -36,9 +36,9 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceDirectoryLifecycleApi apiInstance = new DeviceDirectoryLifecycleApi(); -Integer limit = 56; // Integer | This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored +Integer limit = 56; // Integer | This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored. String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. -String after = "after_example"; // String | This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored +String after = "after_example"; // String | This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored. String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. String referenceEq = "referenceEq_example"; // String | eq filter for the \"reference\" field String referenceNeq = "referenceNeq_example"; // String | neq filter for the \"reference\" field @@ -61,9 +61,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **limit** | **Integer**| This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored | [optional] + **limit** | **Integer**| This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored. | [optional] **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] - **after** | **String**| This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored | [optional] + **after** | **String**| This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is ignored. | [optional] **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] **referenceEq** | **String**| eq filter for the \"reference\" field | [optional] **referenceNeq** | **String**| neq filter for the \"reference\" field | [optional] @@ -148,7 +148,7 @@ Name | Type | Description | Notes Return a device to service. -Returning a device to service restores connectivity to the device. All API functionality is restored. **Example:** Following example enables device to connect again to Pelion Device Management. Note that the category must match the reason why device was suspended. This device was reported stolen but was now found. ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": \"lost_or_stolen\", \"description\": \"Was found, was not stolen but miss placed\"}' ``` +[Returning a device to service](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#using-the-api-suspending-and-resuming-devices) allows the device to connect to Device Management again. The connection is established according to the device's reconnection logic. The device reports a [registration event](https://developer.pelion.com/docs/device-management-api/connect/) through a [notification channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). The default reconnection logic is a progressive back-off for 2, 4, 8, or 16 seconds, up to one week. All API functionality is restored. **Example:** The following example enables a device to reconnect to Pelion Device Management. The category must match the reason device was suspended. This device was reported stolen, but was found: ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": \"lost_or_stolen\", \"description\": \"Was found, was not stolen but miss placed\"}' ``` ### Example ```java @@ -205,7 +205,7 @@ Name | Type | Description | Notes Suspend a device. -Suspending a device prevents it from connecting to Device Management. If a device is currently connected, it will be disconnected. Some API operations will fail while a device is suspended. ***Example:* Following example suspends a device with category \"Lost or stolen\". You can see available categories with '/v3/device-block-categories/'. ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer contacted via phone and reported device being stolen. Specific time of the theft was not know. Device last used in May/2019\"}' ``` +[Suspending a device](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#suspending-and-resuming-devices) prevents it from connecting to Device Management. If a device is currently connected, it disconnects and shows as deregistered. You can also receive [deregistration events](https://developer.pelion.com/docs/device-management-api/connect/) in [notification channels](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). API operations needing device transactions fail while a device is suspended. Example use case to use suspending is that device is reported lost or stolen. You can block the device to connect and this way prevent device to cause unreliable data to your system. ***Example:* The following example suspends a device with category \"Lost or stolen\". You can see available categories with '/v3/device-block-categories/'. ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer contacted via phone and reported device being stolen. Specific time of the theft was not know. Device last used in May/2019\"}' ``` ### Example ```java @@ -225,7 +225,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceDirectoryLifecycleApi apiInstance = new DeviceDirectoryLifecycleApi(); -String id = "id_example"; // String | The ID of the device. +String id = "id_example"; // String | The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. Block1 block = new Block1(); // Block1 | The device block. try { Void result = apiInstance.deviceSuspend(id, block); @@ -240,7 +240,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| The ID of the device. | + **id** | **String**| The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management. | **block** | [**Block1**](Block1.md)| The device block. | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceEchoApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceEchoApi.md new file mode 100644 index 000000000..d6afef2bc --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceEchoApi.md @@ -0,0 +1,120 @@ +# DeviceEchoApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteDeviceEchoObject**](DeviceEchoApi.md#deleteDeviceEchoObject) | **DELETE** v3/devices/{device-id}/echo | Delete the Device Echo object. +[**getDeviceEchoObject**](DeviceEchoApi.md#getDeviceEchoObject) | **GET** v3/devices/{device-id}/echo | Get the Device Echo object. + + + +# **deleteDeviceEchoObject** +> Void deleteDeviceEchoObject(deviceId) + +Delete the Device Echo object. + +Calling this API removes your application data and device from the Device Echo service. You can still find the device using 'GET /v3/devices/{id}' from the Device Directory API. For privacy reasons, you might need to delete device data that contains personal information about the device owner or user. Private information is stored by the application; Pelion Device Management Client does not provide or store any private data. **Note:** If the device is able to connect, its data will reappear in Echo the next time the device sends that information to the service. To ensure data is permanently removed, suspend the device first by calling 'POST /v3/devices/{id}/suspend'. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceEchoApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceEchoApi apiInstance = new DeviceEchoApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. +try { + Void result = apiInstance.deleteDeviceEchoObject(deviceId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceEchoApi#deleteDeviceEchoObject"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getDeviceEchoObject** +> EchoDevice getDeviceEchoObject(deviceId) + +Get the Device Echo object. + +Retrieve the Device Echo object, which represents the last known state of the device. The state includes the resources and their reported values with the desired state of the device. Auto-observable and subscribed resources are stored as the reported state of the device. To change the desired state, issue write commands with `/v2/device-requests/{device-id}`. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceEchoApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceEchoApi apiInstance = new DeviceEchoApi(); +String deviceId = "deviceId_example"; // String | The device ID generated by Device Management. +try { + EchoDevice result = apiInstance.getDeviceEchoObject(deviceId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceEchoApi#getDeviceEchoObject"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The device ID generated by Device Management. | + +### Return type + +[**EchoDevice**](EchoDevice.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceEqNeqFilter.md b/backends/pelioncloud_devicemanagement/docs/DeviceEqNeqFilter.md index 503bde9fe..a7f08a725 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceEqNeqFilter.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceEqNeqFilter.md @@ -6,10 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accountId** | **String** | | [optional] **autoUpdate** | **Boolean** | | [optional] -**bootstrapExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**bootstrapExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **bootstrappedTimestamp** | [**DateTime**](DateTime.md) | | [optional] **caId** | **String** | | [optional] -**connectorExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**componentAttributes** | **Map<String, String>** | | [optional] +**connectorExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **createdAt** | [**DateTime**](DateTime.md) | | [optional] **customAttributes** | **Map<String, String>** | | [optional] **deployedState** | **String** | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceEventData.md b/backends/pelioncloud_devicemanagement/docs/DeviceEventData.md index 986435079..ccd32c855 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceEventData.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceEventData.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **deviceId** | **String** | | [optional] **etag** | [**DateTime**](DateTime.md) | | [optional] **eventType** | **String** | Event code | [optional] -**eventTypeCategory** | **String** | Category code which groups the event type by a summary category. | [optional] +**eventTypeCategory** | **String** | Category code that groups the event type by a summary category. | [optional] **eventTypeDescription** | **String** | Generic description of the event. | [optional] **id** | **String** | | **object** | **String** | The API resource entity. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceGroup.md b/backends/pelioncloud_devicemanagement/docs/DeviceGroup.md index a7dedeb19..e11543e0a 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceGroup.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceGroup.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**createdAt** | [**DateTime**](DateTime.md) | The time the campaign was created. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | The time the group was created. | [optional] **customAttributes** | **Map<String, String>** | Up to ten custom key-value attributes. Keys cannot begin with a number. Both key and value are limited to 128 characters. Updating this field replaces existing contents. | [optional] **description** | **String** | The description of the group. | [optional] **devicesCount** | **Integer** | The number of devices in this group. | [optional] @@ -12,7 +12,7 @@ Name | Type | Description | Notes **id** | **String** | The group ID. | [optional] **name** | **String** | Name of the group. | [optional] **object** | **String** | Entity name: always `device-group`. | [optional] -**updatedAt** | [**DateTime**](DateTime.md) | The time the object was updated. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time this object was updated. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceGteLteFilter.md b/backends/pelioncloud_devicemanagement/docs/DeviceGteLteFilter.md index c0a587791..5cc5dbcc0 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceGteLteFilter.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceGteLteFilter.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bootstrapExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**bootstrapExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **bootstrappedTimestamp** | [**DateTime**](DateTime.md) | | [optional] -**connectorExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**connectorExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **createdAt** | [**DateTime**](DateTime.md) | | [optional] **enrolmentListTimestamp** | [**DateTime**](DateTime.md) | | [optional] **etag** | [**DateTime**](DateTime.md) | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceInNinFilter.md b/backends/pelioncloud_devicemanagement/docs/DeviceInNinFilter.md index 26d78237b..7afc533a6 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceInNinFilter.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceInNinFilter.md @@ -6,10 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accountId** | **String** | | [optional] **autoUpdate** | **Boolean** | | [optional] -**bootstrapExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**bootstrapExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **bootstrappedTimestamp** | [**DateTime**](DateTime.md) | | [optional] **caId** | **String** | | [optional] -**connectorExpirationDate** | [**DateTime**](DateTime.md) | | [optional] +**componentAttributes** | **Map<String, String>** | | [optional] +**connectorExpirationDate** | [**LocalDate**](LocalDate.md) | | [optional] **createdAt** | [**DateTime**](DateTime.md) | | [optional] **customAttributes** | **Map<String, String>** | | [optional] **deployedState** | **String** | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceOwnershipEnrollmentsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceOwnershipEnrollmentsApi.md new file mode 100644 index 000000000..a14c82227 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceOwnershipEnrollmentsApi.md @@ -0,0 +1,462 @@ +# DeviceOwnershipEnrollmentsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createBulkDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#createBulkDeviceEnrollment) | **POST** v3/device-enrollments-bulk-uploads | Bulk upload. +[**createDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#createDeviceEnrollment) | **POST** v3/device-enrollments | Create a single enrollment. +[**deleteBulkDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#deleteBulkDeviceEnrollment) | **POST** v3/device-enrollments-bulk-deletes | Bulk delete. +[**deleteDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#deleteDeviceEnrollment) | **DELETE** v3/device-enrollments/{id} | Delete an enrollment by ID. +[**getBulkDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#getBulkDeviceEnrollment) | **GET** v3/device-enrollments-bulk-uploads/{id} | Get bulk upload entity. +[**getBulkDeviceEnrollmentDelete**](DeviceOwnershipEnrollmentsApi.md#getBulkDeviceEnrollmentDelete) | **GET** v3/device-enrollments-bulk-deletes/{id} | Get bulk delete entity. +[**getDeviceEnrollment**](DeviceOwnershipEnrollmentsApi.md#getDeviceEnrollment) | **GET** v3/device-enrollments/{id} | Get details of an single enrollment by ID. +[**getDeviceEnrollments**](DeviceOwnershipEnrollmentsApi.md#getDeviceEnrollments) | **GET** v3/device-enrollments | Get a list of enrollments per account. + + + +# **createBulkDeviceEnrollment** +> BulkResponse createBulkDeviceEnrollment(enrollmentIdentities) + +Bulk upload. + +With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs. **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads ``` **To ensure your CSV file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid enrollment file:** ``` \"Examples of valid identites, notes\" \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored. A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation. \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** ``` \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored. A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier. A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short identity. \"\", Empty quotation marks are an invalid identity \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** ``` \"Examples of blank lines that are ignored\" ,, , This is also considered a blank line. ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +File enrollmentIdentities = new File("/path/to/file.txt"); // File | The `CSV` file containing the enrollment IDs. The maximum file size is 10 MB. +try { + BulkResponse result = apiInstance.createBulkDeviceEnrollment(enrollmentIdentities); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#createBulkDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enrollmentIdentities** | **File**| The `CSV` file containing the enrollment IDs. The maximum file size is 10 MB. | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **createDeviceEnrollment** +> EnrollmentIdentity createDeviceEnrollment(enrollmentIdentity) + +Create a single enrollment. + +When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account. <br> **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments \\ -d '{\"enrollment_identity\": \"A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5\"}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +EnrollmentId enrollmentIdentity = new EnrollmentId(); // EnrollmentId | +try { + EnrollmentIdentity result = apiInstance.createDeviceEnrollment(enrollmentIdentity); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#createDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enrollmentIdentity** | [**EnrollmentId**](EnrollmentId.md)| | + +### Return type + +[**EnrollmentIdentity**](EnrollmentIdentity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteBulkDeviceEnrollment** +> BulkResponse deleteBulkDeviceEnrollment(enrollmentIdentities) + +Bulk delete. + +With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to delete. **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes ``` **To ensure your CSV file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid enrollment file:** ``` \"Examples of valid identites, notes\" \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored, A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation. \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** ``` \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored. A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier. A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23, Too-short identity. \"\", Empty quotation marks are an invalid identity. \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** ``` \"Examples of blank lines that are ignored.\" ,, , This is also considered to a blank line. ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +File enrollmentIdentities = new File("/path/to/file.txt"); // File | The `CSV` file containing the enrollment IDs. The maximum file size is 10MB. +try { + BulkResponse result = apiInstance.deleteBulkDeviceEnrollment(enrollmentIdentities); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#deleteBulkDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enrollmentIdentities** | **File**| The `CSV` file containing the enrollment IDs. The maximum file size is 10MB. | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **deleteDeviceEnrollment** +> Void deleteDeviceEnrollment(id) + +Delete an enrollment by ID. + +To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to delete the enrollment and factory reset the device. For more information, see [Transferring ownership using First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). <br> **Example:** ``` curl -X DELETE \\ -H 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +String id = "id_example"; // String | Enrollment identity. +try { + Void result = apiInstance.deleteDeviceEnrollment(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#deleteDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Enrollment identity. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getBulkDeviceEnrollment** +> BulkResponse getBulkDeviceEnrollment(id) + +Get bulk upload entity. + +Provides information on bulk upload for the given ID, for example, bulk status and number of processed enrollment identities. Provides links to bulk upload reports as well. **Report file format:** The report files have a header line, and the values are separated by commas. Delimit lines with a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). An example of a full report file: ``` \"entity__id\",\"entity__created_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" ``` An example of an error report file: ``` \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\" \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +String id = "id_example"; // String | Bulk create task entity ID. +try { + BulkResponse result = apiInstance.getBulkDeviceEnrollment(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#getBulkDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Bulk create task entity ID. | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/csv, application/json + + +# **getBulkDeviceEnrollmentDelete** +> BulkResponse getBulkDeviceEnrollmentDelete(id) + +Get bulk delete entity. + +Provides information on bulk delete for the given ID, for example, bulk status and the number of processed enrollment identities. Provides links to bulk delete reports as well. **Report file format:** The report files have a header line and the value are separated by commas. The lines are delimited by a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). An example of a full report file: ``` \"entity__id\",\"entity__deleted_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" ``` An example of an error report file: ``` \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\" \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +String id = "id_example"; // String | Bulk delete task entity ID. +try { + BulkResponse result = apiInstance.getBulkDeviceEnrollmentDelete(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#getBulkDeviceEnrollmentDelete"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Bulk delete task entity ID. | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/csv, application/json + + +# **getDeviceEnrollment** +> EnrollmentIdentity getDeviceEnrollment(id) + +Get details of an single enrollment by ID. + +Check detailed enrollment info, for example, date of claim or expiration date. **Example:** ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +String id = "id_example"; // String | Enrollment identity. +try { + EnrollmentIdentity result = apiInstance.getDeviceEnrollment(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#getDeviceEnrollment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Enrollment identity. | + +### Return type + +[**EnrollmentIdentity**](EnrollmentIdentity.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getDeviceEnrollments** +> EnrollmentIdentities getDeviceEnrollments(limit, after, order, include) + +Get a list of enrollments per account. + +Provides a list of pending and claimed enrollments. **Example:** ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments ``` With query parameters: ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ 'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +DeviceOwnershipEnrollmentsApi apiInstance = new DeviceOwnershipEnrollmentsApi(); +Integer limit = 56; // Integer | Number of results to return (2-1000). +String after = "after_example"; // String | Entity ID to fetch after. +String order = "ASC"; // String | ASC or DESC +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + EnrollmentIdentities result = apiInstance.getDeviceEnrollments(limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling DeviceOwnershipEnrollmentsApi#getDeviceEnrollments"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| Number of results to return (2-1000). | [optional] + **after** | **String**| Entity ID to fetch after. | [optional] + **order** | **String**| ASC or DESC | [optional] [default to ASC] [enum: ASC, DESC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**EnrollmentIdentities**](EnrollmentIdentities.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceQuery.md b/backends/pelioncloud_devicemanagement/docs/DeviceQuery.md index da97b75a8..5fbe37e4e 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceQuery.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceQuery.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**createdAt** | [**DateTime**](DateTime.md) | The timestamp of when the device was created in Device Directory. | +**createdAt** | [**DateTime**](DateTime.md) | The timestamp of when the query was created. | **etag** | [**DateTime**](DateTime.md) | The entity instance signature. | **id** | **String** | The ID of the query. | **name** | **String** | The name of the query. | diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceQueryPostPutRequest.md b/backends/pelioncloud_devicemanagement/docs/DeviceQueryPostPutRequest.md index 81eebb78b..38f6d6f18 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceQueryPostPutRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceQueryPostPutRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | The name of the query. | -**query** | **String** | The device query. | +**query** | **String** | The device query to store. A query is made of key/value pairs separated by ampersands (`&`). The key defines the field name to filter by when applying the query. Refer to the endpoint documentation before applying a filter, as supported fields vary between endpoints. | diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceSecurityDeviceCertificateRenewalsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceSecurityDeviceCertificateRenewalsApi.md index 4739ba091..2117d26f3 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceSecurityDeviceCertificateRenewalsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceSecurityDeviceCertificateRenewalsApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description Get a certificate enrollment by ID. -Get a certificate enrollment by ID. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\ -H 'Authorization: Bearer <api_key>' ``` +Get a certificate enrollment by ID. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -70,7 +70,7 @@ Name | Type | Description | Notes Get certificate enrollments list. -Get certificate enrollments list, optionally filtered. **Examples:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\ -H 'Authorization: Bearer <api_key>' ``` ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \\ -H 'Authorization: Bearer <api_key>' ``` +Get certificate enrollments list, optionally filtered. **Examples:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\ -H 'Authorization: Bearer <access_key>' ``` ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -151,7 +151,7 @@ Name | Type | Description | Notes Request certificate renewal. -Request a certificate renewal. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-length: 0' ``` +Request a certificate renewal. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-length: 0' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceToPelionMessagesCounter.md b/backends/pelioncloud_devicemanagement/docs/DeviceToPelionMessagesCounter.md new file mode 100644 index 000000000..db1557740 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/DeviceToPelionMessagesCounter.md @@ -0,0 +1,17 @@ + +# DeviceToPelionMessagesCounter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bootstrapRequests** | **Integer** | | +**estRequests** | **Integer** | | +**observations** | **Integer** | | +**proxyResponses** | **Integer** | | +**registrationDeletes** | **Integer** | | +**registrationUpdates** | **Integer** | | +**registrations** | **Integer** | | +**totalCount** | **Long** | The number of all inbound requests from devices to Device Management. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateCampaignsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateCampaignsApi.md index ecd83be86..0cd1e522b 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateCampaignsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateCampaignsApi.md @@ -27,7 +27,7 @@ Method | HTTP request | Description Archive a campaign. -Archive a campaign. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive \\ -H 'Authorization: <valid access token>' ``` +Archive a campaign. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -82,7 +82,7 @@ Name | Type | Description | Notes Create a campaign -Create an update campaign. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: <valid access token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": \"one-shot\", \"description\": \"Campaign is for ...\", \"device_filter\": \"id__eq=123400000000000000000000000ae45\", \"name\": \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' ``` +Create an update campaign. To include a filter for targeted devices, refer to the filter using `<filter_id>` in the message body. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": \"one-shot\", \"description\": \"Campaign is for ...\", \"device_filter\": \"<filter_id>\", \"name\": \"campaign\", \"root_manifest_id\": \"56780000000000a5b70000000000bd98\" }' ``` ### Example ```java @@ -137,7 +137,7 @@ Name | Type | Description | Notes Delete a campaign -Delete an update campaign. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Delete an update campaign. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -192,7 +192,7 @@ Name | Type | Description | Notes Get a list of events grouped by summary -Get a list of events grouped by summary. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types \\ -H 'Authorization: <valid access token>' ``` +Get a list of events grouped by summary. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -228,7 +228,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **String**| The campaign ID. | - **summaryStatusId** | **String**| The summary status. For example, fail. | + **summaryStatusId** | **String**| The summary status. For example, fail. | [enum: fail, success, info, skipped] ### Return type @@ -249,7 +249,7 @@ Name | Type | Description | Notes Get an event type for a campaign -Get the count for a specific event type; for example, succeeded, failed, or skipped. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get the count for a specific event type, for example, succeeded, failed or skipped. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -271,7 +271,7 @@ Bearer.setApiKey("YOUR API KEY"); DeviceUpdateCampaignsApi apiInstance = new DeviceUpdateCampaignsApi(); String campaignId = "campaignId_example"; // String | The campaign ID. String summaryStatusId = "summaryStatusId_example"; // String | The summary status. For example, fail. -String eventTypeId = "eventTypeId_example"; // String | The event type parameter. For example, UPD4_FAIL_101. +String eventTypeId = "eventTypeId_example"; // String | The event type parameter. Event types are grouped into the four values of the summary_status, i.e. fail, success, info and skipped. success: SYS_112, UPD4_OK_M1, UPD1_OK_1, UPD4_OK_100, UPD2_OK_19, UPD2_OK_1, UPD2_OK_18 fail: UPD4_FAIL_508, UPD4_FAIL_217, UPD4_FAIL_305, UPD4_FAIL_405, UPD4_FAIL_511, UPD4_FAIL_220, UPD1_FAIL_6, UPD4_FAIL_302, UPD2_FAIL_11, UPD4_FAIL_219, SYS_103, UPD4_FAIL_407, UPD4_FAIL_224, SYS_111, UPD4_FAIL_210, UPD4_FAIL_306, UPD2_FAIL_14, UPD4_FAIL_221, UPD4_FAIL_315, UPD4_FAIL_403, UPD2_FAIL_12, UPD4_FAIL_207, UPD4_FAIL_215, UPD4_FAIL_504, UPD2_FAIL_3, UPD4_FAIL_103, UPD2_FAIL_16, UPD2_FAIL_6, UPD4_FAIL_101, UPD4_FAIL_202, UPD4_FAIL_313, UPD4_FAIL_209, UPD4_FAIL_301, UPD2_FAIL_4, SYS_123, UPD4_FAIL_314, UPD4_FAIL_205, UPD4_FAIL_212, UPD4_FAIL_311, UPD4_FAIL_304, UPD4_FAIL_223, UPD4_FAIL_226, UPD1_FAIL_2, UPD4_FAIL_203, UPD4_FAIL_507, UPD4_FAIL_402, UPD4_FAIL_204, UPD4_FAIL_510, UPD1_FAIL_7, UPD4_FAIL_218, UPD1_FAIL_8, UPD2_FAIL_5, UPD4_FAIL_201, UPD4_FAIL_213, UPD4_FAIL_400, UPD2_FAIL_17, UPD4_FAIL_310, UPD4_FAIL_206, UPD4_FAIL_102, UPD2_FAIL_7, UPD1_FAIL_9, UPD4_FAIL_22, UPD4_FAIL_502, UPD4_FAIL_211, UPD1_FAIL_4, UPD1_FAIL_3, UPD4_FAIL_409, UPD4_FAIL_408, UPD4_FAIL_200, SYS_104, UPD2_FAIL_10, UPD2_FAIL_15, UPD4_FAIL_216, UPD4_FAIL_214, UPD4_FAIL_308, UPD4_FAIL_401, UPD1_FAIL_5, UPD2_FAIL_13, UPD4_FAIL_208, UPD2_FAIL_2, UPD4_FAIL_312, UPD4_FAIL_509, UPD4_FAIL_303, UPD4_FAIL_512, UPD2_FAIL_9, UPD4_FAIL_316, UPD4_FAIL_506, SYS_101, UPD4_FAIL_309, UPD4_FAIL_307, UPD4_FAIL_404, UPD4_FAIL_503, UPD4_FAIL_225, UPD4_FAIL_300, UPD4_FAIL_500, UPD4_FAIL_505, UPD4_FAIL_406, UPD4_FAIL_222, UPD4_FAIL_501, UPD2_FAIL_8, SYS_124 info: UPD1_STATE_0, UPD2_REPORT_HASH, UPD1_REPORT_HASH, UPD2_STATE_5, UPD2_STATE_0, UPD2_STATE_4, UPD2_STATE_3, SYS_107, SYS_105, SYS_106, UPD1_REPORT_VERSION, UPD1_STATE_2, SYS_116, SYS_108, SYS_100, UPD2_STATE_8, UPD2_STATE_7, SYS_120, UPD2_STATE_1, SYS_113, UPD2_STATE_6, UPD2_REPORT_VERSION, SYS_115, UPD2_STATE_2, SYS_114, UPD1_STATE_3, UPD1_STATE_1, SYS_125 skipped: SYS_121, SYS_118, SYS_122, SYS_110, SYS_117 try { EventType result = apiInstance.updateCampaignEventTypesRetrieve(campaignId, summaryStatusId, eventTypeId); System.out.println(result); @@ -286,8 +286,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **String**| The campaign ID. | - **summaryStatusId** | **String**| The summary status. For example, fail. | - **eventTypeId** | **String**| The event type parameter. For example, UPD4_FAIL_101. | + **summaryStatusId** | **String**| The summary status. For example, fail. | [enum: fail, success, info, skipped] + **eventTypeId** | **String**| The event type parameter. Event types are grouped into the four values of the summary_status, i.e. fail, success, info and skipped. success: SYS_112, UPD4_OK_M1, UPD1_OK_1, UPD4_OK_100, UPD2_OK_19, UPD2_OK_1, UPD2_OK_18 fail: UPD4_FAIL_508, UPD4_FAIL_217, UPD4_FAIL_305, UPD4_FAIL_405, UPD4_FAIL_511, UPD4_FAIL_220, UPD1_FAIL_6, UPD4_FAIL_302, UPD2_FAIL_11, UPD4_FAIL_219, SYS_103, UPD4_FAIL_407, UPD4_FAIL_224, SYS_111, UPD4_FAIL_210, UPD4_FAIL_306, UPD2_FAIL_14, UPD4_FAIL_221, UPD4_FAIL_315, UPD4_FAIL_403, UPD2_FAIL_12, UPD4_FAIL_207, UPD4_FAIL_215, UPD4_FAIL_504, UPD2_FAIL_3, UPD4_FAIL_103, UPD2_FAIL_16, UPD2_FAIL_6, UPD4_FAIL_101, UPD4_FAIL_202, UPD4_FAIL_313, UPD4_FAIL_209, UPD4_FAIL_301, UPD2_FAIL_4, SYS_123, UPD4_FAIL_314, UPD4_FAIL_205, UPD4_FAIL_212, UPD4_FAIL_311, UPD4_FAIL_304, UPD4_FAIL_223, UPD4_FAIL_226, UPD1_FAIL_2, UPD4_FAIL_203, UPD4_FAIL_507, UPD4_FAIL_402, UPD4_FAIL_204, UPD4_FAIL_510, UPD1_FAIL_7, UPD4_FAIL_218, UPD1_FAIL_8, UPD2_FAIL_5, UPD4_FAIL_201, UPD4_FAIL_213, UPD4_FAIL_400, UPD2_FAIL_17, UPD4_FAIL_310, UPD4_FAIL_206, UPD4_FAIL_102, UPD2_FAIL_7, UPD1_FAIL_9, UPD4_FAIL_22, UPD4_FAIL_502, UPD4_FAIL_211, UPD1_FAIL_4, UPD1_FAIL_3, UPD4_FAIL_409, UPD4_FAIL_408, UPD4_FAIL_200, SYS_104, UPD2_FAIL_10, UPD2_FAIL_15, UPD4_FAIL_216, UPD4_FAIL_214, UPD4_FAIL_308, UPD4_FAIL_401, UPD1_FAIL_5, UPD2_FAIL_13, UPD4_FAIL_208, UPD2_FAIL_2, UPD4_FAIL_312, UPD4_FAIL_509, UPD4_FAIL_303, UPD4_FAIL_512, UPD2_FAIL_9, UPD4_FAIL_316, UPD4_FAIL_506, SYS_101, UPD4_FAIL_309, UPD4_FAIL_307, UPD4_FAIL_404, UPD4_FAIL_503, UPD4_FAIL_225, UPD4_FAIL_300, UPD4_FAIL_500, UPD4_FAIL_505, UPD4_FAIL_406, UPD4_FAIL_222, UPD4_FAIL_501, UPD2_FAIL_8, SYS_124 info: UPD1_STATE_0, UPD2_REPORT_HASH, UPD1_REPORT_HASH, UPD2_STATE_5, UPD2_STATE_0, UPD2_STATE_4, UPD2_STATE_3, SYS_107, SYS_105, SYS_106, UPD1_REPORT_VERSION, UPD1_STATE_2, SYS_116, SYS_108, SYS_100, UPD2_STATE_8, UPD2_STATE_7, SYS_120, UPD2_STATE_1, SYS_113, UPD2_STATE_6, UPD2_REPORT_VERSION, SYS_115, UPD2_STATE_2, SYS_114, UPD1_STATE_3, UPD1_STATE_1, SYS_125 skipped: SYS_121, SYS_118, SYS_122, SYS_110, SYS_117 | ### Return type @@ -308,7 +308,7 @@ Name | Type | Description | Notes List all campaigns -Get update campaigns for devices specified by a filter. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: <valid access token>' ``` +Get update campaigns for devices specified by a filter. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -459,7 +459,7 @@ Name | Type | Description | Notes List all campaign device metadata -Get metadata for all devices in a campaign. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata \\ -H 'Authorization: <valid access token>' ``` +Get metadata for all devices in a campaign. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -522,7 +522,7 @@ Name | Type | Description | Notes Get a campaign device metadata -Get update campaign metadata for a specific device. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get update campaign metadata for a specific device. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -579,7 +579,7 @@ Name | Type | Description | Notes Get campaign metrics -Get [information](https://www.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) for a campaign based on **SUCCESS**, **FAIL**, or **SKIPPED** criteria for each device. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/metrics \\ -H 'Authorization: <valid access token>' ``` +Get [information](https://developer.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) for a campaign based on **SUCCESS**, **FAIL**, or **SKIPPED** criteria for each device. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123467f9012ab567890120000789012/metrics \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -634,7 +634,7 @@ Name | Type | Description | Notes Get a campaign. -Get an update campaign. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get an update campaign. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -689,7 +689,7 @@ Name | Type | Description | Notes Start a campaign. -Start a campaign. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start \\ -H 'Authorization: <valid access token>' ``` +Start a campaign. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -744,7 +744,7 @@ Name | Type | Description | Notes Get statistics for a campaign -Get a list of statistics for a campaign, including the number of devices reporting specific event codes. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics \\ -H 'Authorization: <valid access token>' ``` +Get a list of statistics for a campaign, including the number of devices reporting specific event codes. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -799,7 +799,7 @@ Name | Type | Description | Notes Get a status summary -Get the count of successfully updated, skipped, and failed devices. <br> **Usage example:** ``` curl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get the count of successfully updated, skipped, and failed devices. <br> **Usage example:** ``` curl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -835,7 +835,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **String**| The campaign ID. | - **summaryStatusId** | **String**| The summary status. For example, fail. | + **summaryStatusId** | **String**| The summary status. For example, fail. | [enum: fail, success, info, skipped] ### Return type @@ -856,7 +856,7 @@ Name | Type | Description | Notes Stop a campaign. -Stop a campaign. Stopping is a process that requires the campaign go through several [phases](../updating-firmware/running-update-campaigns.html#stopping). <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop \\ -H 'Authorization: <valid access token>' ``` +Stop a campaign. Stopping is a process that requires the campaign go through several [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html). <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -911,7 +911,7 @@ Name | Type | Description | Notes Modify a campaign -Modify an update campaign. <br> **Usage example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' \\ d '{ \"description\": \"Campaign is for ...\", \"device_filter\": \"id__eq=123400000000000000000000000ae45\", \"name\": \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' ``` +Modify an update campaign. <br> **Usage example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012 \\ -H 'Authorization: Bearer <api_key>' \\ d '{ \"description\": \"Campaign is for ...\", \"device_filter\": \"123400000000000000000000000ae45\", \"name\": \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareImagesApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareImagesApi.md index 4f78f1740..c54f22e70 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareImagesApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareImagesApi.md @@ -24,7 +24,7 @@ Method | HTTP request | Description Create an image -Create a firmware image. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' \\ -H 'Content-Type: multipart/form-data' \\ -F 'datafile=@myimage.bin;type=application/octet-stream' -F 'description=bla bla' \\ -F 'name=My Linux Image' ``` +Create a firmware image. <BR/> **Note:** Only use this API for images smaller than 100 MB. For larger images, [upload in chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' \\ -H 'Content-Type: multipart/form-data' \\ -F 'datafile=@myimage.bin;type=application/octet-stream' -F 'description=bla bla' \\ -F 'name=My Linux Image' ``` ### Example ```java @@ -44,7 +44,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceUpdateFirmwareImagesApi apiInstance = new DeviceUpdateFirmwareImagesApi(); -File datafile = new File("/path/to/file.txt"); // File | The firmware image file to upload. +File datafile = new File("/path/to/file.txt"); // File | The firmware image file to upload. File name must not exceed 166 characters. String description = "description_example"; // String | The description of the firmware image. String name = "name_example"; // String | The name of the firmware image. try { @@ -60,7 +60,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **datafile** | **File**| The firmware image file to upload. | + **datafile** | **File**| The firmware image file to upload. File name must not exceed 166 characters. | **description** | **String**| The description of the firmware image. | [optional] **name** | **String**| The name of the firmware image. | [optional] @@ -83,7 +83,7 @@ Name | Type | Description | Notes Delete an image -Delete a firmware image. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Delete a firmware image. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -138,7 +138,7 @@ Name | Type | Description | Notes List all images -List all firmware images. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' ``` +List all firmware images. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -162,7 +162,7 @@ Integer limit = 56; // Integer | How many objects to retrieve in the page. The m String order = "order_example"; // String | ASC or DESC. String after = "after_example"; // String | The ID of the item after which to retrieve the next page. String include = "include_example"; // String | A comma-separated list of data fields to return. Currently supported: total_count. -String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data `?filter={URL-encoded query string}` ###### Filterable fields: The table lists all the fields that can be filtered on with certain filters:
Field = / __eq / __neq __in / __nin __lte / __gte
created_at ✓ ✓ ✓
datafile ✓ ✓  
datafile_checksum ✓ ✓  
datafile_size ✓ ✓  
description ✓ ✓  
etag ✓ ✓ ✓
id ✓ ✓  
name ✓ ✓  
updated_at ✓ ✓ ✓
  The query string is made up of key-value pairs separated by ampersands. For example, this query: `key1=value1&key2=value2&key3=value3` would be URL-encoded as: `?filter=key1__eq%3Dvalue1%26key2__eq%3Dvalue2%26key3__eq%3Dvalue3` **Filtering by properties** `name__eq=myimage` **Filtering on date-time fields** Date-time fields should be specified in UTC RFC3339 format, `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds. Example: `2016-11-30T16:25:12.1234Z` * UTC RFC3339 without milliseconds. Example: `2016-11-30T16:25:12Z` * UTC RFC3339 shortened without milliseconds and punctuation. Example: `20161130T162512Z` Date-time filtering supports three operators: * equality by appending `__eq` to the field name * greater than or equal to by appending `__gte` to the field name * less than or equal to by appending `__lte` to the field name `{field name}[|__eq|__lte|__gte]={UTC RFC3339 date-time}` Time ranges may be specified by including both the `__gte` and `__lte` forms in the filter. For example: `created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering on multiple fields** `name__eq=myimage&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering with filter operators** String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=fw-image1,fw-image2` +String filter = "filter_example"; // String | URL-encoded query string parameter to filter returned data. `?filter={URL-encoded query string}` ###### Filterable fields: The table lists all the fields that can be filtered on with certain filters:
Field = / __eq / __neq __in / __nin __lte / __gte
created_at ✓ ✓ ✓
datafile ✓ ✓  
datafile_checksum ✓ ✓  
datafile_size ✓ ✓  
description ✓ ✓  
etag ✓ ✓ ✓
id ✓ ✓  
name ✓ ✓  
updated_at ✓ ✓ ✓
  The query string is made up of key-value pairs separated by ampersands. For example, this query: `key1=value1&key2=value2&key3=value3` would be URL-encoded as: `?filter=key1__eq%3Dvalue1%26key2__eq%3Dvalue2%26key3__eq%3Dvalue3` **Filtering by properties** `name__eq=myimage` **Filtering on date-time fields** Date-time fields should be specified in UTC RFC3339 format, `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds. Example: `2016-11-30T16:25:12.1234Z` * UTC RFC3339 without milliseconds. Example: `2016-11-30T16:25:12Z` * UTC RFC3339 shortened without milliseconds and punctuation. Example: `20161130T162512Z` Date-time filtering supports three operators: * equality by appending `__eq` to the field name * greater than or equal to by appending `__gte` to the field name * less than or equal to by appending `__lte` to the field name `{field name}[|__eq|__lte|__gte]={UTC RFC3339 date-time}` Time ranges may be specified by including both the `__gte` and `__lte` forms in the filter. For example: `created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering on multiple fields** `name__eq=myimage&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering with filter operators** String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=fw-image1,fw-image2` String createdAtIn = "createdAtIn_example"; // String | in filter for the \"created_at\" field String createdAtNin = "createdAtNin_example"; // String | nin filter for the \"created_at\" field DateTime createdAtLte = new DateTime(); // DateTime | lte filter for the \"created_at\" field @@ -212,7 +212,7 @@ Name | Type | Description | Notes **order** | **String**| ASC or DESC. | [optional] **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] **include** | **String**| A comma-separated list of data fields to return. Currently supported: total_count. | [optional] - **filter** | **String**| URL-encoded query string parameter to filter returned data `?filter={URL-encoded query string}` ###### Filterable fields: The table lists all the fields that can be filtered on with certain filters: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>created_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>datafile</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>datafile_checksum</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>datafile_size</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>description</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>name</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> </tbody> </table> &nbsp; The query string is made up of key-value pairs separated by ampersands. For example, this query: `key1=value1&key2=value2&key3=value3` would be URL-encoded as: `?filter=key1__eq%3Dvalue1%26key2__eq%3Dvalue2%26key3__eq%3Dvalue3` **Filtering by properties** `name__eq=myimage` **Filtering on date-time fields** Date-time fields should be specified in UTC RFC3339 format, `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds. Example: `2016-11-30T16:25:12.1234Z` * UTC RFC3339 without milliseconds. Example: `2016-11-30T16:25:12Z` * UTC RFC3339 shortened without milliseconds and punctuation. Example: `20161130T162512Z` Date-time filtering supports three operators: * equality by appending `__eq` to the field name * greater than or equal to by appending `__gte` to the field name * less than or equal to by appending `__lte` to the field name `{field name}[|__eq|__lte|__gte]={UTC RFC3339 date-time}` Time ranges may be specified by including both the `__gte` and `__lte` forms in the filter. For example: `created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering on multiple fields** `name__eq=myimage&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering with filter operators** String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=fw-image1,fw-image2` | [optional] + **filter** | **String**| URL-encoded query string parameter to filter returned data. `?filter={URL-encoded query string}` ###### Filterable fields: The table lists all the fields that can be filtered on with certain filters: <table> <thead> <tr> <th>Field</th> <th>= / __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> <td>created_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>datafile</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>datafile_checksum</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>datafile_size</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>description</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> <td>id</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>name</td> <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> <td>✓</td> </tr> </tbody> </table> &nbsp; The query string is made up of key-value pairs separated by ampersands. For example, this query: `key1=value1&key2=value2&key3=value3` would be URL-encoded as: `?filter=key1__eq%3Dvalue1%26key2__eq%3Dvalue2%26key3__eq%3Dvalue3` **Filtering by properties** `name__eq=myimage` **Filtering on date-time fields** Date-time fields should be specified in UTC RFC3339 format, `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted variations: * UTC RFC3339 with milliseconds. Example: `2016-11-30T16:25:12.1234Z` * UTC RFC3339 without milliseconds. Example: `2016-11-30T16:25:12Z` * UTC RFC3339 shortened without milliseconds and punctuation. Example: `20161130T162512Z` Date-time filtering supports three operators: * equality by appending `__eq` to the field name * greater than or equal to by appending `__gte` to the field name * less than or equal to by appending `__lte` to the field name `{field name}[|__eq|__lte|__gte]={UTC RFC3339 date-time}` Time ranges may be specified by including both the `__gte` and `__lte` forms in the filter. For example: `created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering on multiple fields** `name__eq=myimage&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` **Filtering with filter operators** String field filtering supports the following operators: * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: `__nin` For `__in` and `__nin` filters list of parameters must be comma-separated: `name__in=fw-image1,fw-image2` | [optional] **createdAtIn** | **String**| in filter for the \"created_at\" field | [optional] **createdAtNin** | **String**| nin filter for the \"created_at\" field | [optional] **createdAtLte** | **DateTime**| lte filter for the \"created_at\" field | [optional] @@ -265,7 +265,7 @@ Name | Type | Description | Notes Get an image. -Retrieve a firmware image. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Retrieve a firmware image. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -320,7 +320,7 @@ Name | Type | Description | Notes Append a chunk to an upload job -Append a chunk to an upload job. To finish a job, upload a zero-length chunk. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H 'Authorization: <valid access token>' \\ -H 'Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ==' \\ -H 'Content-Type: binary/octet-stream' \\ -H 'Content-Length: 999' \\ -d '{ \"IGh0dHBzOi8vYXBpLnVzLWVhc3QtMS5tYmVkY2xvdWQuY29tLy92My9maXJtd2FyZS1pbWFnZXMvdXBsb2FkLWpvYnMve3VwbG9hZF9qb2JfaWR9W5rcw==\" }' ``` +Append a chunk to an upload job. To finish a job, upload a zero-length chunk. <BR/> **Note:** Chunk size must be between 5MB and 100MB, the last chunk can be less than 5MB; the maximum number of chunks is limited to 10,000. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H 'Authorization: Bearer <api_key>' \\ -H 'Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ==' \\ -H 'Content-Type: binary/octet-stream' \\ --data-binary '@chunkfile.bin' ``` ### Example ```java @@ -381,7 +381,7 @@ Name | Type | Description | Notes List all metadata for uploaded chunks -List all metadata for uploaded chunks. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H 'Authorization: <valid access token>' ``` +List all metadata for uploaded chunks. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -490,7 +490,7 @@ Name | Type | Description | Notes Get metadata about a chunk -Get metadata about a chunk. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get metadata about a chunk. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -547,7 +547,7 @@ Name | Type | Description | Notes Create a new upload job. -Create a new upload job <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"name\": \"New Linux update\", \"description\": \"New Linux update for my devices\" }' ``` +Create a new upload job <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"name\": \"New Linux update\", \"description\": \"New Linux update for my devices\" }' ``` ### Example ```java @@ -602,7 +602,7 @@ Name | Type | Description | Notes Delete an upload job -Delete an upload job. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Delete an upload job. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -657,7 +657,7 @@ Name | Type | Description | Notes Get all upload jobs -Get all upload jobs. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access token>' ``` +Get all upload jobs. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -772,7 +772,7 @@ Name | Type | Description | Notes Retrieve information for an upload job -Get an upload job. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Get an upload job. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -827,7 +827,7 @@ Name | Type | Description | Notes Update an upload job -Update an upload job. <br> **Usage example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' \\ -d '{ \"name\": \"New Linux update\", \"description\": \"New Linux update for my class XX devices\" }' ``` +Update an upload job. <br> **Usage example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H 'Authorization: Bearer <api_key>' \\ -d '{ \"name\": \"New Linux update\", \"description\": \"New Linux update for my class XX devices\" }' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareManifestsApi.md b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareManifestsApi.md index d005972c1..fb07b71f4 100644 --- a/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareManifestsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/DeviceUpdateFirmwareManifestsApi.md @@ -12,11 +12,11 @@ Method | HTTP request | Description # **firmwareManifestCreate** -> FirmwareManifest firmwareManifestCreate(datafile, description, keyTable, name) +> FirmwareManifest firmwareManifestCreate(datafile, name, description, keyTable) Upload a manifest -Upload a firmware manifest. The API enforces a maximum manifest size of 2KB. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: <valid access token>' \\ -H 'Content-Type: multipart/form-data' \\ -F 'datafile=@myimage.bin;type=application/octet-stream' \\ -F 'description=bla bla' \\ -F 'key_table=@myKeyTable.proto;type=' \\ -F 'name=My Manifest' ``` +Upload a firmware manifest. The API enforces a maximum manifest size of 2KB. <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: Bearer <api_key>' \\ -H 'Content-Type: multipart/form-data' \\ -F 'datafile=@myimage.bin;type=application/octet-stream' \\ -F 'description=bla bla' \\ -F 'key_table=@myKeyTable.proto;type=' \\ -F 'name=My Manifest' ``` ### Example ```java @@ -36,12 +36,12 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); DeviceUpdateFirmwareManifestsApi apiInstance = new DeviceUpdateFirmwareManifestsApi(); -File datafile = new File("/path/to/file.txt"); // File | The manifest file to create. The API gateway enforces the account-specific file size. -String description = "description_example"; // String | The description of the firmware manifest. -File keyTable = new File("/path/to/file.txt"); // File | The key table of pre-shared keys for devices. The table is generated by the manifest tool. +File datafile = new File("/path/to/file.txt"); // File | The manifest file to create. The API gateway enforces the account-specific file size. File name must not exceed 100 characters. String name = "name_example"; // String | The name of the firmware manifest. +String description = "description_example"; // String | The description of the firmware manifest. +File keyTable = new File("/path/to/file.txt"); // File | The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name must not exceed 100 characters. try { - FirmwareManifest result = apiInstance.firmwareManifestCreate(datafile, description, keyTable, name); + FirmwareManifest result = apiInstance.firmwareManifestCreate(datafile, name, description, keyTable); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DeviceUpdateFirmwareManifestsApi#firmwareManifestCreate"); @@ -53,10 +53,10 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **datafile** | **File**| The manifest file to create. The API gateway enforces the account-specific file size. | + **datafile** | **File**| The manifest file to create. The API gateway enforces the account-specific file size. File name must not exceed 100 characters. | + **name** | **String**| The name of the firmware manifest. | **description** | **String**| The description of the firmware manifest. | [optional] - **keyTable** | **File**| The key table of pre-shared keys for devices. The table is generated by the manifest tool. | [optional] - **name** | **String**| The name of the firmware manifest. | [optional] + **keyTable** | **File**| The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name must not exceed 100 characters. | [optional] ### Return type @@ -77,7 +77,7 @@ Name | Type | Description | Notes Delete a manifest -Delete a firmware manifest. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Delete a firmware manifest. <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -132,7 +132,7 @@ Name | Type | Description | Notes List all firmware manifests. -List all firmware manifests. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: <valid access token>' ``` +List all firmware manifests. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java @@ -267,7 +267,7 @@ Name | Type | Description | Notes Get a manifest -Retrieve a firmware manifest. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H 'Authorization: <valid access token>' ``` +Retrieve a firmware manifest. <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \\ -H 'Authorization: Bearer <api_key>' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/EchoDevice.md b/backends/pelioncloud_devicemanagement/docs/EchoDevice.md new file mode 100644 index 000000000..696d4aa1d --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/EchoDevice.md @@ -0,0 +1,17 @@ + +# EchoDevice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdAt** | [**DateTime**](DateTime.md) | Response creation UTC time. | [optional] +**deviceId** | **String** | The device ID. | [optional] +**endpointName** | **String** | The endpoint name. | [optional] +**lastDesiredAt** | [**DateTime**](DateTime.md) | The last time a write command was initiated on a resource. | [optional] +**lastReportedAt** | [**DateTime**](DateTime.md) | The last time any resource's reported value was updated. | [optional] +**object** | **String** | API Resource name | [optional] +**resources** | [**List<EchoResource>**](EchoResource.md) | The list of device resources stored in Device Echo. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | The time of last registration event of a Device Echo object. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/EchoResource.md b/backends/pelioncloud_devicemanagement/docs/EchoResource.md new file mode 100644 index 000000000..5fa6b541b --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/EchoResource.md @@ -0,0 +1,13 @@ + +# EchoResource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desired** | [**EchoResourceDesired**](EchoResourceDesired.md) | | [optional] +**reported** | [**EchoResourceReported**](EchoResourceReported.md) | | [optional] +**resourcePath** | **String** | The path of the resource. | [optional] +**subscribed** | **Boolean** | System-level subscription status of the resource. If any of the applications has placed a subscription, the status is true. Overlapping subscriptions from multiple applications do not increase the load on the device as the server handles the multiplexing. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/EchoResourceDesired.md b/backends/pelioncloud_devicemanagement/docs/EchoResourceDesired.md new file mode 100644 index 000000000..9c1b5b702 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/EchoResourceDesired.md @@ -0,0 +1,13 @@ + +# EchoResourceDesired + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**desiredAt** | [**DateTime**](DateTime.md) | The time of the latest value write was initiated. | [optional] +**status** | [**BigDecimal**](BigDecimal.md) | The status of the desired value. 0 = 'pending write', 1 = 'success', 2 = 'failed'. | [optional] +**statusUpdatedAt** | [**DateTime**](DateTime.md) | The time of the last status update. | [optional] +**value** | **byte[]** | The desired value in base64 encoded format. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/EchoResourceReported.md b/backends/pelioncloud_devicemanagement/docs/EchoResourceReported.md new file mode 100644 index 000000000..4f32322e8 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/EchoResourceReported.md @@ -0,0 +1,13 @@ + +# EchoResourceReported + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contentType** | **String** | Content type of the reported resource value. | [optional] +**expiresAt** | [**DateTime**](DateTime.md) | The time after which the reported value is not valid, calculated based on the max-age of the resource value the device reported. | [optional] +**reportedAt** | [**DateTime**](DateTime.md) | The time the last value was reported. | [optional] +**value** | **byte[]** | The reported value in base64 encoded format. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/EdgeProxyApi.md b/backends/pelioncloud_devicemanagement/docs/EdgeProxyApi.md new file mode 100644 index 000000000..c4fde3655 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/EdgeProxyApi.md @@ -0,0 +1,76 @@ +# EdgeProxyApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**communicateWithGatewayBasedServices**](EdgeProxyApi.md#communicateWithGatewayBasedServices) | **GET** v3preview1/devices/{id}/services/{address}/connection | Establish a tunnel connection to connected devices. + + + +# **communicateWithGatewayBasedServices** +> Void communicateWithGatewayBasedServices(connection, upgrade, secWebSocketVersion, secWebSocketKey, id, address, origin) + +Establish a tunnel connection to connected devices. + +This WebSocket-based API for clients establishes connections to services on connected gateways. <br> Establish WebSocket connections to the edge-proxy service. After you establish a Websocket connection, the Edge proxy sends data between cloud- and gateway-based services. <br> All communication is byte-based. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.EdgeProxyApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +EdgeProxyApi apiInstance = new EdgeProxyApi(); +String connection = "Upgrade"; // String | The websocket connection header. Must be 'Upgrade'. +String upgrade = "websocket"; // String | The protocol upgrade header. Must be 'websocket'. +Integer secWebSocketVersion = 13; // Integer | WebSocket version of the protocol. Must be 13. +byte[] secWebSocketKey = B; // byte[] | The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see this section from RFC6455 - https://tools.ietf.org/html/rfc6455#section-11.3.1). The nonce must be selected randomly for each connection. An example is \"dGhlIHNhbXBsZSBub25jZQ==\". +String id = "id_example"; // String | The Device ID. +String address = "address_example"; // String | The address of the TCP service listening on a specific port on the gateway. If a TCP service is listening on localhost with port 5000 and is ready to accept incoming traffic, the value of this parameter should be `localhost:5000`. +String origin = "origin_example"; // String | Originating host of the request. +try { + Void result = apiInstance.communicateWithGatewayBasedServices(connection, upgrade, secWebSocketVersion, secWebSocketKey, id, address, origin); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling EdgeProxyApi#communicateWithGatewayBasedServices"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection** | **String**| The websocket connection header. Must be 'Upgrade'. | [default to Upgrade] + **upgrade** | **String**| The protocol upgrade header. Must be 'websocket'. | [default to websocket] + **secWebSocketVersion** | **Integer**| WebSocket version of the protocol. Must be 13. | [default to 13] + **secWebSocketKey** | **byte[]**| The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see this section from RFC6455 - https://tools.ietf.org/html/rfc6455#section-11.3.1). The nonce must be selected randomly for each connection. An example is \"dGhlIHNhbXBsZSBub25jZQ==\". | + **id** | **String**| The Device ID. | + **address** | **String**| The address of the TCP service listening on a specific port on the gateway. If a TCP service is listening on localhost with port 5000 and is ready to accept incoming traffic, the value of this parameter should be `localhost:5000`. | + **origin** | **String**| Originating host of the request. | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/ErrorResponse.md b/backends/pelioncloud_devicemanagement/docs/ErrorResponse.md index 4f0e77e0f..ce185cca6 100644 --- a/backends/pelioncloud_devicemanagement/docs/ErrorResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/ErrorResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **code** | **Integer** | HTTP response code. | [optional] **fields** | [**List<Fields>**](Fields.md) | Details of the error fields. | [optional] **message** | **String** | Description of the error. | [optional] -**object** | **String** | Response type, always \"error\". | [optional] +**object** | **String** | Response type: always `error`. | [optional] **requestId** | **String** | Request ID. | [optional] **type** | **String** | Type of error. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/FactoryManufacturingStatisticsApi.md b/backends/pelioncloud_devicemanagement/docs/FactoryManufacturingStatisticsApi.md new file mode 100644 index 000000000..973812f08 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/FactoryManufacturingStatisticsApi.md @@ -0,0 +1,66 @@ +# FactoryManufacturingStatisticsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**manufacturingStatisticsReport**](FactoryManufacturingStatisticsApi.md#manufacturingStatisticsReport) | **GET** v3/manufacturing/statistics | Retrieve provisioning statistics for devices in your factories. + + + +# **manufacturingStatisticsReport** +> StatisticsReportListResponse manufacturingStatisticsReport(start, end) + +Retrieve provisioning statistics for devices in your factories. + +Get manufacturing statistics report. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/manufacturing/statistics?start=2020-06-23T21:00:00.000Z&end=2020-07-01T20:59:59.999Z --header 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.FactoryManufacturingStatisticsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +FactoryManufacturingStatisticsApi apiInstance = new FactoryManufacturingStatisticsApi(); +DateTime start = new DateTime(); // DateTime | The start date and time for the report. +DateTime end = new DateTime(); // DateTime | The end date and time for the report. The default value is the current date-time. +try { + StatisticsReportListResponse result = apiInstance.manufacturingStatisticsReport(start, end); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FactoryManufacturingStatisticsApi#manufacturingStatisticsReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **start** | **DateTime**| The start date and time for the report. | + **end** | **DateTime**| The end date and time for the report. The default value is the current date-time. | [optional] + +### Return type + +[**StatisticsReportListResponse**](StatisticsReportListResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/Fields.md b/backends/pelioncloud_devicemanagement/docs/Fields.md index 598cfab3d..b4b4753a7 100644 --- a/backends/pelioncloud_devicemanagement/docs/Fields.md +++ b/backends/pelioncloud_devicemanagement/docs/Fields.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **String** | Error description. | [optional] -**name** | **String** | The field name in the request for which the validation has failed. | [optional] +**name** | **String** | The field name in the failed validation request. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/FirmwareImage.md b/backends/pelioncloud_devicemanagement/docs/FirmwareImage.md index cbc31ef6e..f3a168b0e 100644 --- a/backends/pelioncloud_devicemanagement/docs/FirmwareImage.md +++ b/backends/pelioncloud_devicemanagement/docs/FirmwareImage.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **createdAt** | [**DateTime**](DateTime.md) | The time the entity was created. | [optional] -**datafile** | **String** | The firmware image file URL | [optional] +**datafile** | **String** | The firmware image file URL. | [optional] **datafileChecksum** | **String** | The checksum (sha256) generated for the datafile. | [optional] **datafileSize** | **Long** | The size of the datafile in bytes. | [optional] **description** | **String** | The description of the object. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/FirmwareManifest.md b/backends/pelioncloud_devicemanagement/docs/FirmwareManifest.md index 4455c4028..1e0405264 100644 --- a/backends/pelioncloud_devicemanagement/docs/FirmwareManifest.md +++ b/backends/pelioncloud_devicemanagement/docs/FirmwareManifest.md @@ -5,17 +5,42 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **createdAt** | [**DateTime**](DateTime.md) | The time the entity was created. | [optional] -**datafile** | **String** | The URL of the firmware manifest binary | [optional] -**datafileSize** | **Long** | The size of the datafile in bytes | [optional] +**datafile** | **String** | The URL of the ASN.1 DER-encoded firmware manifest binary. | [optional] +**datafileSize** | **Long** | The size of the firmware manifest in bytes. | [optional] +**deliveredPayloadDigest** | **String** | Digest (SHA256, hex-encoded) of the payload to deliver to the device. | [optional] +**deliveredPayloadSize** | **Long** | The size in bytes of the payload to deliver to the device. | [optional] +**deliveredPayloadType** | [**DeliveredPayloadTypeEnum**](#DeliveredPayloadTypeEnum) | Type of the payload to deliver to the device (full or delta image). | [optional] +**deliveredPayloadUrl** | **String** | The URL of the payload to deliver to the device. | [optional] **description** | **String** | The description of the firmware manifest. | [optional] -**deviceClass** | **String** | The class of the device. | [optional] +**deviceClass** | [**UUID**](UUID.md) | The device class ID. | [optional] +**deviceVendor** | [**UUID**](UUID.md) | The device vendor ID. | [optional] **etag** | **String** | API resource entity version. | [optional] **id** | **String** | The firmware manifest ID. | [optional] **keyTable** | **String** | The key table of pre-shared keys for devices. | [optional] -**name** | **String** | The name of the object. | [optional] +**manifestSchemaVersion** | [**ManifestSchemaVersionEnum**](#ManifestSchemaVersionEnum) | Version of the manifest schema (1 or 3). | [optional] +**name** | **String** | The name of the manifest. | [optional] **object** | **String** | Entity name: always 'firmware-manifest'. | [optional] +**parsedRawManifest** | **Object** | Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards compatibility is not guaranteed. Recommended for debugging only. | [optional] +**precursorPayloadDigest** | **String** | Digest (SHA256, hex-encoded) of the currently installed payload. | [optional] **timestamp** | [**DateTime**](DateTime.md) | The firmware manifest version as a timestamp. | [optional] +**updatePriority** | **Long** | Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions. | [optional] **updatedAt** | [**DateTime**](DateTime.md) | The time the entity was updated. | [optional] + +## Enum: DeliveredPayloadTypeEnum +Name | Value +---- | ----- +FULL | "full" +DELTA | "delta" + + + +## Enum: ManifestSchemaVersionEnum +Name | Value +---- | ----- +_1 | "1" +_3 | "3" + + diff --git a/backends/pelioncloud_devicemanagement/docs/GatewayLogsPublicApiApi.md b/backends/pelioncloud_devicemanagement/docs/GatewayLogsPublicApiApi.md new file mode 100644 index 000000000..9488eee33 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/GatewayLogsPublicApiApi.md @@ -0,0 +1,216 @@ +# GatewayLogsPublicApiApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getDeviceLogBasedOnLogID**](GatewayLogsPublicApiApi.md#getDeviceLogBasedOnLogID) | **GET** v3/device-logs/{device_log_id} | Retrieve a device log by ID. +[**listGatewayDeviceLogs**](GatewayLogsPublicApiApi.md#listGatewayDeviceLogs) | **GET** v3/device-logs | List all device logs based on filters +[**listSingleGatewayDeviceLogs**](GatewayLogsPublicApiApi.md#listSingleGatewayDeviceLogs) | **GET** v3/devices/{device_id}/logs | Return the logs for a specific device. + + + +# **getDeviceLogBasedOnLogID** +> Log getDeviceLogBasedOnLogID(deviceLogId) + +Retrieve a device log by ID. + +Retrieve a device log from a device by log ID. **Example usage:** ``` curl -X GET \\ -H 'Authorization: Bearer <valid access token>' \\ https://api.us-east-1.mbedcloud.com/v3/device-logs/(device_log_id) ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.GatewayLogsPublicApiApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +GatewayLogsPublicApiApi apiInstance = new GatewayLogsPublicApiApi(); +String deviceLogId = "deviceLogId_example"; // String | The ID of the device log. +try { + Log result = apiInstance.getDeviceLogBasedOnLogID(deviceLogId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling GatewayLogsPublicApiApi#getDeviceLogBasedOnLogID"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceLogId** | **String**| The ID of the device log. | + +### Return type + +[**Log**](Log.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listGatewayDeviceLogs** +> LogsPage listGatewayDeviceLogs(deviceIdIn, limit, after, order, include, timestampLte, timestampGte, appNameEq, typeEq, messageEq, levelGte) + +List all device logs based on filters + +List logs for all devices based on a combination of filters. **Example usage:** ``` curl -X GET \\ -H 'Authorization: Bearer <valid access token>' \\ https://api.us-east-1.mbedcloud.com/v3/device-logs ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.GatewayLogsPublicApiApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +GatewayLogsPublicApiApi apiInstance = new GatewayLogsPublicApiApi(); +String deviceIdIn = "deviceIdIn_example"; // String | The device ID for which to retrieve logs. +Integer limit = 100; // Integer | Limit the number of returned results. The default value is 100. +String after = "after_example"; // String | The entity ID to fetch after the given one. +String order = "DESC"; // String | Record order. Acceptable values: ASC, DESC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count +DateTime timestampLte = new DateTime(); // DateTime | RFC 3339 UTC timestamp range upper limit. +DateTime timestampGte = new DateTime(); // DateTime | RFC 3339 UTC timestamp range lower limit. +String appNameEq = "appNameEq_example"; // String | Name of the application on a device that generated logs. +String typeEq = "typeEq_example"; // String | Device log type filter. +String messageEq = "messageEq_example"; // String | Device log message filter. +String levelGte = "levelGte_example"; // String | Minimum severity level of logs to retrieve. +try { + LogsPage result = apiInstance.listGatewayDeviceLogs(deviceIdIn, limit, after, order, include, timestampLte, timestampGte, appNameEq, typeEq, messageEq, levelGte); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling GatewayLogsPublicApiApi#listGatewayDeviceLogs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceIdIn** | **String**| The device ID for which to retrieve logs. | [optional] + **limit** | **Integer**| Limit the number of returned results. The default value is 100. | [optional] [default to 100] + **after** | **String**| The entity ID to fetch after the given one. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. | [optional] [default to DESC] [enum: ASC, DESC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count | [optional] + **timestampLte** | **DateTime**| RFC 3339 UTC timestamp range upper limit. | [optional] + **timestampGte** | **DateTime**| RFC 3339 UTC timestamp range lower limit. | [optional] + **appNameEq** | **String**| Name of the application on a device that generated logs. | [optional] + **typeEq** | **String**| Device log type filter. | [optional] + **messageEq** | **String**| Device log message filter. | [optional] + **levelGte** | **String**| Minimum severity level of logs to retrieve. | [optional] [enum: DEBUG, TRACE, INFO, WARNING, ERROR, CRITICAL] + +### Return type + +[**LogsPage**](LogsPage.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listSingleGatewayDeviceLogs** +> LogsPage listSingleGatewayDeviceLogs(deviceId, limit, after, order, include, timestampLte, timestampGte, appNameEq, typeEq, messageEq, levelGte) + +Return the logs for a specific device. + +Retrieve logs for a given device based on a combination of filters. **Example usage:** ``` curl -X GET \\ -H 'Authorization: Bearer <valid access token>' \\ https://api.us-east-1.mbedcloud.com/v3/devices/{device_id}/logs ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.GatewayLogsPublicApiApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +GatewayLogsPublicApiApi apiInstance = new GatewayLogsPublicApiApi(); +String deviceId = "deviceId_example"; // String | The id of the device +Integer limit = 100; // Integer | Limit the number of returned results. The default value is 100. +String after = "after_example"; // String | The entity ID to fetch after the given one. +String order = "DESC"; // String | Record order. Acceptable values: ASC, DESC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count +DateTime timestampLte = new DateTime(); // DateTime | RFC 3339 UTC timestamp range upper limit. +DateTime timestampGte = new DateTime(); // DateTime | RFC 3339 UTC timestamp range lower limit. +String appNameEq = "appNameEq_example"; // String | Name of the application on a device that generated logs. +String typeEq = "typeEq_example"; // String | Device log type filter. +String messageEq = "messageEq_example"; // String | Device log message filter. +String levelGte = "levelGte_example"; // String | Minimum severity level of logs to retrieve. +try { + LogsPage result = apiInstance.listSingleGatewayDeviceLogs(deviceId, limit, after, order, include, timestampLte, timestampGte, appNameEq, typeEq, messageEq, levelGte); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling GatewayLogsPublicApiApi#listSingleGatewayDeviceLogs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The id of the device | + **limit** | **Integer**| Limit the number of returned results. The default value is 100. | [optional] [default to 100] + **after** | **String**| The entity ID to fetch after the given one. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. | [optional] [default to DESC] [enum: ASC, DESC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count | [optional] + **timestampLte** | **DateTime**| RFC 3339 UTC timestamp range upper limit. | [optional] + **timestampGte** | **DateTime**| RFC 3339 UTC timestamp range lower limit. | [optional] + **appNameEq** | **String**| Name of the application on a device that generated logs. | [optional] + **typeEq** | **String**| Device log type filter. | [optional] + **messageEq** | **String**| Device log message filter. | [optional] + **levelGte** | **String**| Minimum severity level of logs to retrieve. | [optional] [enum: DEBUG, TRACE, INFO, WARNING, ERROR, CRITICAL] + +### Return type + +[**LogsPage**](LogsPage.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/GatewayTerminalPublicApiApi.md b/backends/pelioncloud_devicemanagement/docs/GatewayTerminalPublicApiApi.md new file mode 100644 index 000000000..3e0344ff1 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/GatewayTerminalPublicApiApi.md @@ -0,0 +1,76 @@ +# GatewayTerminalPublicApiApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**establishGatewayDeviceConsoleSession**](GatewayTerminalPublicApiApi.md#establishGatewayDeviceConsoleSession) | **GET** v3/devices/{id}/console | Establish a console session + + + +# **establishGatewayDeviceConsoleSession** +> Void establishGatewayDeviceConsoleSession(id, connection, upgrade, secWebSocketVersion, secWebSocketKey, secWebSocketProtocol, origin) + +Establish a console session + +This WebSocket-based API establishes a console session with a gateway device. <br> Use this endpoint to establish a WebSocket connection to the device console. Once the connection is in place, you can use the protocol below to exchange messages related to the console session. You must provide the api key as bearer token to authenticate the request. All messages sent between the server and the client are contained inside a message envelope. The envelope contains a type field describing what format the payload is in and how to interpret the message: ```json { \"type\": [string], \"payload\": [any], \"sessionID\": [string] } ``` <br> ## Message types and payload formats | Message Type | Payload Format | Description | |:------------- |:------------- |:------------- | | **resize** | `ResizePayload` | Can be sent by the client to the server to notify the device that the console window size has changed. | | **input** | `string` | Sent from the client to the server when keyboard input is provided to the console. stdin | | **output** | `string` | Sent from the server to the client when console output is produced. stdout + stderr | ### `ResizePayload` ```json { \"width\": [integer], // number of columns \"height\": [integer] // number of rows } ``` | Field Name | Format | Description | |:------------- |:------------- |:------------- | | width | integer | The width of the console window in columns. | | height | integer | The height of the console window in rows. | <br> ## Protocol Sequence Diagram The diagram shows how messages are passed between the client and the server after initiating a console session: ``` Client Pelion Cloud (/v3/devices/{id}/console) Device | | | | | | |-----------------[Input]------------------>| | | |-----------------[Input]------------------>| | |<----------------[Output]------------------| |<----------------[Output]------------------| | |-----------------[Input]------------------>| | | |-----------------[Input]------------------>| | |<----------------[Output]------------------| |<----------------[Output]------------------| | | | | |-----------------[Resize]----------------->| | | |-----------------[Resize]----------------->| | | | | |<----------------[Output]------------------| |<----------------[Output]------------------| | | | | | | | | | | Input is always forwarded from the client to the console session on the relevant device to be passed to the stdin stream. The client does not need to provide a session ID for input messages. Ouptut is forwarded from the device console session's stdout and stderr streams to the client. Resize messages are forwarded from the client to the console session on the device. ``` <br> If the console session is terminated by the device disconnecting, the WebSocket connection is closed. <br> All communication is text-based. <br> ## Errors and Close Codes - If you send binary data instead of text data over the websocket connection, the socket closes with code 1003. - If you send text data that is not valid JSON, the socket closes with code 1002 and error message 'Data could not be parsed as JSON'. - If you send text data that is valid JSON but does not follow a valid message schema, the socket closes with code 1002 and error message 'Object format invalid'. - If you try to establish a console session with a device that is not prepared for console, the socket closes with code 1011 and error message 'The device console is not working'. - If your client fails to respond to ping messages from the server with a matching pong message, the server disconnects the client, assuming the connection has timed out. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.GatewayTerminalPublicApiApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +GatewayTerminalPublicApiApi apiInstance = new GatewayTerminalPublicApiApi(); +String id = "id_example"; // String | The id of the device +String connection = "Upgrade"; // String | The websocket connection header. Must be 'Upgrade'. +String upgrade = "websocket"; // String | The protocol upgrade header. Must be 'websocket'. +Integer secWebSocketVersion = 13; // Integer | WebSocket version. Must be 13. +byte[] secWebSocketKey = B; // byte[] | The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each connection. +String secWebSocketProtocol = "secWebSocketProtocol_example"; // String | Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:wss,pelion_ak_{access_key}`. +String origin = "origin_example"; // String | Originating host of the request. +try { + Void result = apiInstance.establishGatewayDeviceConsoleSession(id, connection, upgrade, secWebSocketVersion, secWebSocketKey, secWebSocketProtocol, origin); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling GatewayTerminalPublicApiApi#establishGatewayDeviceConsoleSession"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the device | + **connection** | **String**| The websocket connection header. Must be 'Upgrade'. | [default to Upgrade] + **upgrade** | **String**| The protocol upgrade header. Must be 'websocket'. | [default to websocket] + **secWebSocketVersion** | **Integer**| WebSocket version. Must be 13. | [default to 13] + **secWebSocketKey** | **byte[]**| The value of this header field must be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each connection. | + **secWebSocketProtocol** | **String**| Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:wss,pelion_ak_{access_key}`. | [optional] + **origin** | **String**| Originating host of the request. | [optional] + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/GetTrustAnchorsResponse.md b/backends/pelioncloud_devicemanagement/docs/GetTrustAnchorsResponse.md new file mode 100644 index 000000000..b07003c8f --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/GetTrustAnchorsResponse.md @@ -0,0 +1,24 @@ + +# GetTrustAnchorsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | An offset token for the current page. | [optional] +**data** | [**List<TrustAnchorResponse>**](TrustAnchorResponse.md) | The list of trust anchors of the account. | [optional] +**hasMore** | **Boolean** | Indicates whether additional results are available. | [optional] +**limit** | **Integer** | Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit. | [optional] +**object** | **String** | The type of this API object is a `list`. | [optional] +**order** | [**OrderEnum**](#OrderEnum) | Indicates how to order the entries based on when they were created. | [optional] +**totalCount** | **Integer** | | [optional] + + + +## Enum: OrderEnum +Name | Value +---- | ----- +ASC | "ASC" +DESC | "DESC" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/GlobalSignCredentials.md b/backends/pelioncloud_devicemanagement/docs/GlobalSignCredentials.md index 78e114c74..b4d77cdb2 100644 --- a/backends/pelioncloud_devicemanagement/docs/GlobalSignCredentials.md +++ b/backends/pelioncloud_devicemanagement/docs/GlobalSignCredentials.md @@ -4,11 +4,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**apiKey** | **String** | Unique ID for API client (provided by GlobalSign). | -**apiSecret** | **String** | API Secret matching the API key (provided by GlobalSign). | -**clientCertificate** | **String** | The client certificate provided by GlobalSign to allow HTTPS connection over TLS/SSL. The certificate wraps a public key that matches a private key provided by the customer. The certificate must be in PEM format. | -**passphrase** | **String** | The passphrase to decrypt the private key in case it is encrypted. Empty if the private key is not encrypted. | [optional] -**privateKey** | **String** | The private key that matches the client certificate to allow HTTPS connection over TLS/SSL. The private key may be encrypted using a symmetric encryption key derived from a passphrase. The private key must be in PEM format. | +**apiKey** | **String** | Unique ID for API client (provided by GlobalSign). | +**apiSecret** | **String** | API secret matching the API key (provided by GlobalSign). | +**clientCertificate** | **String** | The client certificate provided by GlobalSign to allow HTTPS connection over TLS/SSL. The certificate wraps a public key that matches a private key provided by the customer. The certificate must be in PEM format. | +**passphrase** | **String** | The passphrase to decrypt the private key in case it is encrypted. Empty if the private key is not encrypted. | [optional] +**privateKey** | **String** | The private key that matches the client certificate to allow HTTPS connection over TLS/SSL. The private key may be encrypted using a symmetric encryption key derived from a passphrase. The private key must be in PEM format. | diff --git a/backends/pelioncloud_devicemanagement/docs/GroupSummary.md b/backends/pelioncloud_devicemanagement/docs/GroupSummary.md index e3967ebf4..4452b1846 100644 --- a/backends/pelioncloud_devicemanagement/docs/GroupSummary.md +++ b/backends/pelioncloud_devicemanagement/docs/GroupSummary.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accountId** | **String** | The ID of the account this group belongs to. | **apikeyCount** | **Integer** | The number of API keys in this group. | +**applicationCount** | **Integer** | The number of applications in this group. | [optional] **createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] **etag** | **String** | API resource entity version. | **id** | **String** | The ID of the group. | diff --git a/backends/pelioncloud_devicemanagement/docs/GroupSummaryList.md b/backends/pelioncloud_devicemanagement/docs/GroupSummaryList.md index dfbdbb395..56cbd9902 100644 --- a/backends/pelioncloud_devicemanagement/docs/GroupSummaryList.md +++ b/backends/pelioncloud_devicemanagement/docs/GroupSummaryList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<GroupSummary>**](GroupSummary.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return (2-1000), or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/IdentityProviderCreationReq.md b/backends/pelioncloud_devicemanagement/docs/IdentityProviderCreationReq.md index 3f744786d..71bafa9b5 100644 --- a/backends/pelioncloud_devicemanagement/docs/IdentityProviderCreationReq.md +++ b/backends/pelioncloud_devicemanagement/docs/IdentityProviderCreationReq.md @@ -25,6 +25,7 @@ SUSPENDED | "SUSPENDED" Name | Value ---- | ----- SAML2 | "SAML2" +OIDC | "OIDC" diff --git a/backends/pelioncloud_devicemanagement/docs/IdentityProviderInfo.md b/backends/pelioncloud_devicemanagement/docs/IdentityProviderInfo.md index b98e96732..ea6131475 100644 --- a/backends/pelioncloud_devicemanagement/docs/IdentityProviderInfo.md +++ b/backends/pelioncloud_devicemanagement/docs/IdentityProviderInfo.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **isDefault** | **Boolean** | Flag indicating whether this is the global default identity provider. | [optional] **name** | **String** | Name of the identity provider. | **object** | [**ObjectEnum**](#ObjectEnum) | Entity name: always 'identity-provider' | +**oidcAttributes** | [**OIDCInfo**](OIDCInfo.md) | OIDC specific attributes. | [optional] **saml2Attributes** | [**SAML2Info**](SAML2Info.md) | SAML2 specific attributes. | [optional] **status** | [**StatusEnum**](#StatusEnum) | Status of the identity provider. | [optional] **type** | [**TypeEnum**](#TypeEnum) | Identity provider type. | diff --git a/backends/pelioncloud_devicemanagement/docs/IdentityProviderList.md b/backends/pelioncloud_devicemanagement/docs/IdentityProviderList.md index 47acb5d60..00ff8a13a 100644 --- a/backends/pelioncloud_devicemanagement/docs/IdentityProviderList.md +++ b/backends/pelioncloud_devicemanagement/docs/IdentityProviderList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<IdentityProviderInfo>**](IdentityProviderInfo.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return , or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/IdentityProviderUpdateReq.md b/backends/pelioncloud_devicemanagement/docs/IdentityProviderUpdateReq.md index 7176060ea..8f9029b98 100644 --- a/backends/pelioncloud_devicemanagement/docs/IdentityProviderUpdateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/IdentityProviderUpdateReq.md @@ -25,6 +25,7 @@ SUSPENDED | "SUSPENDED" Name | Value ---- | ----- SAML2 | "SAML2" +OIDC | "OIDC" diff --git a/backends/pelioncloud_devicemanagement/docs/KeyValue.md b/backends/pelioncloud_devicemanagement/docs/KeyValue.md new file mode 100644 index 000000000..61a1c3371 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/KeyValue.md @@ -0,0 +1,11 @@ + +# KeyValue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | | +**value** | **String** | | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/Log.md b/backends/pelioncloud_devicemanagement/docs/Log.md new file mode 100644 index 000000000..cdbe5e9ce --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/Log.md @@ -0,0 +1,32 @@ + +# Log + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accountId** | **String** | The ID of the account associated with the device. | [optional] +**appName** | **String** | A tag indicating which application or software module produced the log message. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | RFC 3339 UTC timestamp indicating when the resource entity was created. | [optional] +**deviceId** | **String** | Device ID. | [optional] +**etag** | **String** | Entity instance signature, or Unix timestamp of last customer update. | [optional] +**id** | **String** | mUUID Entity ID. Each device log has a unique ID. | [optional] +**level** | [**LevelEnum**](#LevelEnum) | Log entry severity level. | [optional] +**message** | **String** | Log message body. | [optional] +**object** | **String** | Device log resource name. | [optional] +**timestamp** | [**DateTime**](DateTime.md) | RFC 3339 UTC timestamp indicating indicating the device time the message was printed. | [optional] +**type** | **String** | Device log type. | [optional] + + + +## Enum: LevelEnum +Name | Value +---- | ----- +DEBUG | "DEBUG" +TRACE | "TRACE" +INFO | "INFO" +WARNING | "WARNING" +ERROR | "ERROR" +CRITICAL | "CRITICAL" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/LoginProfile.md b/backends/pelioncloud_devicemanagement/docs/LoginProfile.md index 243dea010..dca031ee1 100644 --- a/backends/pelioncloud_devicemanagement/docs/LoginProfile.md +++ b/backends/pelioncloud_devicemanagement/docs/LoginProfile.md @@ -4,6 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**foreignId** | **String** | The ID of the user in the identity provider's service. | [optional] **id** | **String** | ID of the identity provider. | **name** | **String** | Name of the identity provider. | [optional] **type** | [**TypeEnum**](#TypeEnum) | Identity provider type. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/LogsPage.md b/backends/pelioncloud_devicemanagement/docs/LogsPage.md new file mode 100644 index 000000000..aa9a43be3 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/LogsPage.md @@ -0,0 +1,16 @@ + +# LogsPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | An offset token for current page. | [optional] +**data** | [**List<Log>**](Log.md) | | [optional] +**hasMore** | **Boolean** | Indicates whether more results are available. | [optional] +**limit** | **Integer** | Limit applied on number of device log resource objects retrieved in the page (2-1000). | [optional] +**object** | **String** | Always `list`. | [optional] +**order** | **String** | Entry order based on creation time. | [optional] +**totalCount** | **Integer** | | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/ManufacturingFactoryConfiguratorUtilityFcuApi.md b/backends/pelioncloud_devicemanagement/docs/ManufacturingFactoryConfiguratorUtilityFcuApi.md new file mode 100644 index 000000000..e6bb14b89 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/ManufacturingFactoryConfiguratorUtilityFcuApi.md @@ -0,0 +1,164 @@ +# ManufacturingFactoryConfiguratorUtilityFcuApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**downloadFactoryTool**](ManufacturingFactoryConfiguratorUtilityFcuApi.md#downloadFactoryTool) | **GET** downloads/fcu/factory_configurator_utility.zip | Download the Factory Configurator Utility archive. +[**getFactoryToolInfo**](ManufacturingFactoryConfiguratorUtilityFcuApi.md#getFactoryToolInfo) | **GET** downloads/fcu/info | Download information about the Factory Configurator Utility archive. +[**getFactoryToolReleaseNotes**](ManufacturingFactoryConfiguratorUtilityFcuApi.md#getFactoryToolReleaseNotes) | **GET** downloads/fcu/release_notes | Download Factory Configurator Utility release notes. + + + +# **downloadFactoryTool** +> Void downloadFactoryTool() + +Download the Factory Configurator Utility archive. + +Downloads the Factory Configurator Utility (FCU) archive .zip file for the account ID associated with the access token. <br> **Example:** <br> ``` curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.ManufacturingFactoryConfiguratorUtilityFcuApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +ManufacturingFactoryConfiguratorUtilityFcuApi apiInstance = new ManufacturingFactoryConfiguratorUtilityFcuApi(); +try { + Void result = apiInstance.downloadFactoryTool(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ManufacturingFactoryConfiguratorUtilityFcuApi#downloadFactoryTool"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/zip + + +# **getFactoryToolInfo** +> ArchiveInfoResponse getFactoryToolInfo() + +Download information about the Factory Configurator Utility archive. + +Returns information about the Factory Configurator Utility (FCU) archive. <br> **Example:** <br> ``` curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/inf \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.ManufacturingFactoryConfiguratorUtilityFcuApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +ManufacturingFactoryConfiguratorUtilityFcuApi apiInstance = new ManufacturingFactoryConfiguratorUtilityFcuApi(); +try { + ArchiveInfoResponse result = apiInstance.getFactoryToolInfo(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ManufacturingFactoryConfiguratorUtilityFcuApi#getFactoryToolInfo"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ArchiveInfoResponse**](ArchiveInfoResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getFactoryToolReleaseNotes** +> Void getFactoryToolReleaseNotes() + +Download Factory Configurator Utility release notes. + +Downloads the Factory Configurator Utility (FCU) release notes. <br> **Example:** <br> ``` curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.ManufacturingFactoryConfiguratorUtilityFcuApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +ManufacturingFactoryConfiguratorUtilityFcuApi apiInstance = new ManufacturingFactoryConfiguratorUtilityFcuApi(); +try { + Void result = apiInstance.getFactoryToolReleaseNotes(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling ManufacturingFactoryConfiguratorUtilityFcuApi#getFactoryToolReleaseNotes"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/markdown ; charset=UTF-8, application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/Metric.md b/backends/pelioncloud_devicemanagement/docs/Metric.md index 66f55204b..ac0be7aab 100644 --- a/backends/pelioncloud_devicemanagement/docs/Metric.md +++ b/backends/pelioncloud_devicemanagement/docs/Metric.md @@ -4,24 +4,24 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bootstrapsFailed** | **Long** | The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server. | [optional] -**bootstrapsPending** | **Long** | The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server. | [optional] -**bootstrapsSuccessful** | **Long** | The number of successful bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server. | [optional] -**connectRestApiError** | **Long** | The number of failed [Connect API](/docs/current/service-api-references/device-management-connect.html) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device. This metric includes only messages handled by the Connect service, it does not include any HTTP errors returned by firewall as result of malformed messages. | [optional] -**connectRestApiSuccess** | **Long** | The number of successful [Connect API](/docs/current/service-api-references/device-management-connect.html) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device. | [optional] -**deletedRegistrations** | **Long** | The number of deleted registrations (deregistrations) linked to the account. Deregistration is the process of removing the device registration from the Device Management Connect registry. The deregistration is usually initiated by the device. Device Management Connect no longer handles requests for a deregistered device. | [optional] -**deviceObservations** | **Long** | **(Beta)** The number of notifications received by the Device Management Connect service from the devices linked to the account. The device pushes notifications to Device Management Connect when you have successfully subscribed to the device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. | [optional] -**deviceProxyRequestError** | **Long** | **(Beta)** The number of failed proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. | [optional] -**deviceProxyRequestSuccess** | **Long** | **(Beta)** The number of successful proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. | [optional] -**deviceSubscriptionRequestError** | **Long** | **(Beta)** The number of failed subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. | [optional] -**deviceSubscriptionRequestSuccess** | **Long** | **(Beta)** The number of successful subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. | [optional] -**expiredRegistrations** | **Long** | The number of expired registrations linked to the account. Device Management Connect removes the device registrations when the devices cannot update their registration before the expiry of the lifetime. Device Management Connect no longer handles requests for a device whose registration has expired already. | [optional] -**fullRegistrations** | **Long** | The number of full registrations linked to the account. Full registration is the process of registering a device with Device Management Connect by providing its lifetime and capabilities such as the resource structure.The registered status of the device does not guarantee that the device is active and accessible from Device Management Connect at any point of time. | [optional] -**handshakesSuccessful** | **Long** | The number of successful TLS handshakes the account has performed. The SSL or TLS handshake enables the SSL or TLS client and server to establish the secret keys with which they communicate. A successful TLS handshake is required for establishing a connection with Device Management Connect for any operaton such as registration, registration update and deregistration. | [optional] +**bootstrapsFailed** | **Long** | The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M client to a state where it can initiate a management session to a new LwM2M server. | [optional] +**bootstrapsPending** | **Long** | The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M client to a state where it can initiate a management session to a new LwM2M server. | [optional] +**bootstrapsSuccessful** | **Long** | The number of successful bootstraps the account has performed. Bootstrap is the process of provisioning a lightweight machine-to-machine (LwM2M) client to a state where it can initiate a management session to a new LwM2M Server. | [optional] +**connectRestApiError** | **Long** | The number of failed [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device. This metric includes only messages handled by the Connect service, not any HTTP errors returned by the firewall as a result of incorrect messages. | [optional] +**connectRestApiSuccess** | **Long** | The number of successful [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests that have been performed using the account. This metric does not consider the response from the device, only the responses to the HTTP requests used to manage the device. | [optional] +**deletedRegistrations** | **Long** | The number of deleted registrations (deregistrations) linked to the account. Deregistration is the process of removing the device registration from the Device Management Connect registry. The deregistration is usually initiated by the device. Device Management Connect no longer handles requests for deregistered devices. | [optional] +**deviceObservations** | **Long** | **(Beta)** The number of notifications received by the Device Management Connect service from the devices linked to the account. The device pushes notifications to Device Management Connect when you have successfully subscribed to the device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. | [optional] +**deviceProxyRequestError** | **Long** | **(Beta)** The number of failed proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. | [optional] +**deviceProxyRequestSuccess** | **Long** | **(Beta)** The number of successful proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. | [optional] +**deviceSubscriptionRequestError** | **Long** | **(Beta)** The number of failed subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. | [optional] +**deviceSubscriptionRequestSuccess** | **Long** | **(Beta)** The number of successful subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. | [optional] +**expiredRegistrations** | **Long** | The number of expired registrations linked to the account. Device Management Connect removes a registration when the device cannot update its registration before lifetime expiry. Device Management Connect no longer handles requests for devices with already expired registrations. | [optional] +**fullRegistrations** | **Long** | The number of full registrations linked to the account. Full registration is the process of registering a device with Device Management Connect by providing its lifetime and capabilities, such as resource structure. Device registered status does not guarantee that the device is active and accessible from Device Management Connect at any point of time. | [optional] +**handshakesSuccessful** | **Long** | The number of successful TLS handshakes the account has performed. The SSL or TLS handshake enables the SSL or TLS client and server to establish secret keys. A successful TLS handshake is required for establishing a connection with Device Management Connect for any operation such as registration, registration update, and deregistration. | [optional] **id** | **String** | A unique metric ID. | [optional] **registrationUpdates** | **Long** | The number of registration updates linked to the account. Registration update is the process of updating the registration status with Device Management Connect to update or extend the lifetime of the device. | [optional] **timestamp** | [**DateTime**](DateTime.md) | UTC time in RFC3339 format. The timestamp is the starting point of the interval for which the data is aggregated. Each interval includes data for the time greater than or equal to the timestamp and less than the next interval's starting point. | [optional] -**transactions** | **Long** | The number of transaction events from or to devices linked to the account. A transaction is a 512-byte block of data processed by Device Management. It can be either sent by the device (device --> Device Management) or received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, TLS or DTLS packet overhead. It only contains the packet payload (full CoAP packet including CoAP headers). | [optional] +**transactions** | **Long** | The number of transaction events from or to devices linked to the account. A transaction is a 512-byte block of data processed by Device Management. It can be either sent by the device (device --> Device Management) or received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, or TLS or DTLS packet overhead. It contains only the packet payload (full CoAP packet including CoAP headers). | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/NotificationEntryList.md b/backends/pelioncloud_devicemanagement/docs/NotificationEntryList.md index e1b7ac0d6..ccd45aae9 100644 --- a/backends/pelioncloud_devicemanagement/docs/NotificationEntryList.md +++ b/backends/pelioncloud_devicemanagement/docs/NotificationEntryList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<NotificationEntry>**](NotificationEntry.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return, or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/PelionToDeviceMessagesCounter.md b/backends/pelioncloud_devicemanagement/docs/PelionToDeviceMessagesCounter.md new file mode 100644 index 000000000..f72e8f6bc --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/PelionToDeviceMessagesCounter.md @@ -0,0 +1,12 @@ + +# PelionToDeviceMessagesCounter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**proxyRequests** | **Integer** | | +**subscriptions** | **Integer** | | +**totalCount** | **Long** | The number of all outbound requests sent to devices. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/Presubscription.md b/backends/pelioncloud_devicemanagement/docs/Presubscription.md index 56572d135..aa20d46c2 100644 --- a/backends/pelioncloud_devicemanagement/docs/Presubscription.md +++ b/backends/pelioncloud_devicemanagement/docs/Presubscription.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**endpointName** | **String** | The device ID. | [optional] +**endpointName** | **String** | Device Management device ID. | [optional] **endpointType** | **String** | | [optional] **resourcePath** | **List<String>** | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/QuotaUsageReport.md b/backends/pelioncloud_devicemanagement/docs/QuotaUsageReport.md index ebc0504d6..3b23aaa5d 100644 --- a/backends/pelioncloud_devicemanagement/docs/QuotaUsageReport.md +++ b/backends/pelioncloud_devicemanagement/docs/QuotaUsageReport.md @@ -20,6 +20,7 @@ RESERVATION_TERMINATION | "reservation_termination" PACKAGE_RENEWAL | "package_renewal" PACKAGE_CREATION | "package_creation" PACKAGE_TERMINATION | "package_termination" +PACKAGE_TOKENS_EDIT | "package_tokens_edit" diff --git a/backends/pelioncloud_devicemanagement/docs/RegisterWebsocketChannel.md b/backends/pelioncloud_devicemanagement/docs/RegisterWebsocketChannel.md index e70e22c48..08492a0fb 100644 --- a/backends/pelioncloud_devicemanagement/docs/RegisterWebsocketChannel.md +++ b/backends/pelioncloud_devicemanagement/docs/RegisterWebsocketChannel.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**serialization** | **Object** | Serialization configuration for a channel | [optional] +**serialization** | [**SerializationConfigData**](SerializationConfigData.md) | | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/ReportAccountContactInfo.md b/backends/pelioncloud_devicemanagement/docs/ReportAccountContactInfo.md index dc97a55a9..2edeea301 100644 --- a/backends/pelioncloud_devicemanagement/docs/ReportAccountContactInfo.md +++ b/backends/pelioncloud_devicemanagement/docs/ReportAccountContactInfo.md @@ -6,10 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **addressLine1** | **String** | | [optional] **addressLine2** | **String** | | [optional] +**alias** | **String** | | [optional] +**businessModel** | [**BusinessModelEnum**](#BusinessModelEnum) | The business model selected for the account to generate the billing reports. | [optional] **city** | **String** | | [optional] **company** | **String** | | **contact** | **String** | | [optional] **country** | **String** | | [optional] +**customerSubtenantId** | **String** | Account tenant ID, valid only for tenants. | [optional] **email** | **String** | | [optional] **id** | **String** | Account ID. | **phoneNumber** | **String** | | [optional] @@ -17,4 +20,12 @@ Name | Type | Description | Notes **state** | **String** | | [optional] + +## Enum: BusinessModelEnum +Name | Value +---- | ----- +ACTIVE_DEVICE_BUSINESS_MODEL | "active_device_business_model" +API_CALLS_1_BUSINESS_MODEL | "api_calls_1_business_model" + + diff --git a/backends/pelioncloud_devicemanagement/docs/ReportBillingData.md b/backends/pelioncloud_devicemanagement/docs/ReportBillingData.md index 6b6244490..397cf9807 100644 --- a/backends/pelioncloud_devicemanagement/docs/ReportBillingData.md +++ b/backends/pelioncloud_devicemanagement/docs/ReportBillingData.md @@ -4,12 +4,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**activeDevices** | **Long** | | -**firmwareUpdates** | **Long** | | +**activeDevices** | **Integer** | | +**deviceToPelionMessages** | [**DeviceToPelionMessagesCounter**](DeviceToPelionMessagesCounter.md) | | [optional] +**firmwareUpdates** | **Integer** | | **generated** | [**DateTime**](DateTime.md) | Billing report generated time in RFC3339 date-time with millisecond accuracy and UTC time zone. | +**pelionToDeviceMessages** | [**PelionToDeviceMessagesCounter**](PelionToDeviceMessagesCounter.md) | | [optional] +**pelionToWebappNotifications** | **Integer** | | [optional] **periodEnd** | [**DateTime**](DateTime.md) | Billing report end time in RFC3339 date-time with millisecond accuracy and UTC time zone. | **periodStart** | [**DateTime**](DateTime.md) | Billing report start time in RFC3339 date-time with millisecond accuracy and UTC time zone. | -**sdaTokens** | **Long** | | +**restApiRequestsWithApiKeyToken** | **Integer** | | [optional] +**restApiRequestsWithUserToken** | **Integer** | | [optional] +**sdaTokens** | **Integer** | | diff --git a/backends/pelioncloud_devicemanagement/docs/ReportResponse.md b/backends/pelioncloud_devicemanagement/docs/ReportResponse.md index 76d0ce93f..8c9931726 100644 --- a/backends/pelioncloud_devicemanagement/docs/ReportResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/ReportResponse.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account** | [**ReportAccountContactInfo**](ReportAccountContactInfo.md) | Account contact information. | -**aggregated** | [**ReportBillingData**](ReportBillingData.md) | Aggregated report billing data including all subtenant accounts, if any. | +**aggregated** | [**ReportBillingData**](ReportBillingData.md) | Aggregated report billing data including all tenant accounts, if any. | [optional] **billingData** | [**ReportBillingData**](ReportBillingData.md) | Report billing data. | **id** | **String** | Billing report ID. | **month** | **String** | Month of requested billing report. | **object** | [**ObjectEnum**](#ObjectEnum) | Billing report response object. Always set to `billing-report`. | -**servicePackage** | [**ServicePackageReport**](ServicePackageReport.md) | Report service package. | [optional] -**subtenants** | [**List<SubtenantAccountReport>**](SubtenantAccountReport.md) | List of billing reports for subtenant accounts. Empty list if account does not have any subtenant account. | +**servicePackage** | [**ServicePackageReport**](ServicePackageReport.md) | Service package report. | [optional] +**subtenants** | [**List<SubtenantAccountReport>**](SubtenantAccountReport.md) | List of billing reports for tenant accounts. Empty list if account does not have any tenant account. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/Resource.md b/backends/pelioncloud_devicemanagement/docs/Resource.md index 1520d2d80..e88b5888c 100644 --- a/backends/pelioncloud_devicemanagement/docs/Resource.md +++ b/backends/pelioncloud_devicemanagement/docs/Resource.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **obs** | **Boolean** | 'Determines whether you can subscribe to changes for this resource. It can have values `true` or `false`.' | [optional] -**rt** | **String** | Application-specific resource type that describes this resource. It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space. | [optional] -**type** | **String** | The content type of the resource. We recommend you use the **resource types** listed in the [LwM2M specification](http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry). | [optional] -**uri** | **String** | The resource URL. | +**rt** | **String** | Application-specific resource type that describes this resource, created by the [client application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space. | [optional] +**type** | **String** | The content type of the resource. We recommend you use the content types listed in the [LwM2M specification](http://www.openmobilealliance.org/wp/omna/lwm2m/lwm2mregistry.html). | [optional] +**uri** | **String** | The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). | diff --git a/backends/pelioncloud_devicemanagement/docs/ResourceArray.md b/backends/pelioncloud_devicemanagement/docs/ResourceArray.md new file mode 100644 index 000000000..fc7ee4491 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/ResourceArray.md @@ -0,0 +1,9 @@ + +# ResourceArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + + diff --git a/backends/pelioncloud_devicemanagement/docs/ResourcesData.md b/backends/pelioncloud_devicemanagement/docs/ResourcesData.md index 652799361..04f85ed9e 100644 --- a/backends/pelioncloud_devicemanagement/docs/ResourcesData.md +++ b/backends/pelioncloud_devicemanagement/docs/ResourcesData.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **_if** | **String** | Interface description that defines a name or URI that indicates how to interact with the target resource. It describes a generic interface type, such as a 'sensor'. | [optional] **obs** | **Boolean** | Whether the resource is observable (true/false). | [optional] **path** | **String** | Resource's URI path. | [optional] -**rt** | **String** | Application-specific resource type that describes this resource. It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space. | [optional] +**rt** | **String** | Application-specific resource type that describes this resource. It is created by the [client side application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuerConfigurationsApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuerConfigurationsApi.md new file mode 100644 index 000000000..8b98f4608 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuerConfigurationsApi.md @@ -0,0 +1,406 @@ +# SecurityAndIdentityCertificateIssuerConfigurationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCertificateIssuerConfig**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#createCertificateIssuerConfig) | **POST** v3/certificate-issuer-configurations | Create certificate issuer configuration. +[**deleteCertificateIssuerConfigByID**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#deleteCertificateIssuerConfigByID) | **DELETE** v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} | Delete certificate issuer configuration. +[**getCertificateIssuerConfig**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#getCertificateIssuerConfig) | **GET** v3/certificate-issuer-configurations/lwm2m | Get certificate issuer configuration. +[**getCertificateIssuerConfigByID**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#getCertificateIssuerConfigByID) | **GET** v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} | Get certificate issuer configuration. +[**getCertificateIssuerConfigs**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#getCertificateIssuerConfigs) | **GET** v3/certificate-issuer-configurations | Get certificate issuer configurations. +[**updateCertificateIssuerConfig**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#updateCertificateIssuerConfig) | **PUT** v3/certificate-issuer-configurations/lwm2m | Update certificate issuer configuration. +[**updateCertificateIssuerConfigByID**](SecurityAndIdentityCertificateIssuerConfigurationsApi.md#updateCertificateIssuerConfigByID) | **PUT** v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} | Update certificate issuer configuration. + + + +# **createCertificateIssuerConfig** +> CertificateIssuerConfigResponse createCertificateIssuerConfig(createCertificateIssuerConfig) + +Create certificate issuer configuration. + +Configure the certificate issuer to use when creating device custom certificates. <br> **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"reference\": \"customer.dlms\", \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +CreateCertificateIssuerConfig createCertificateIssuerConfig = new CreateCertificateIssuerConfig(); // CreateCertificateIssuerConfig | Certificate issuer configuration request. +try { + CertificateIssuerConfigResponse result = apiInstance.createCertificateIssuerConfig(createCertificateIssuerConfig); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#createCertificateIssuerConfig"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCertificateIssuerConfig** | [**CreateCertificateIssuerConfig**](CreateCertificateIssuerConfig.md)| Certificate issuer configuration request. | + +### Return type + +[**CertificateIssuerConfigResponse**](CertificateIssuerConfigResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteCertificateIssuerConfigByID** +> Void deleteCertificateIssuerConfigByID(certificateIssuerConfigurationId) + +Delete certificate issuer configuration. + +Delete certificate issuer configuration. You can only delete custom certificate configurations. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +String certificateIssuerConfigurationId = "certificateIssuerConfigurationId_example"; // String | Certificate issuer ID configuration. +try { + Void result = apiInstance.deleteCertificateIssuerConfigByID(certificateIssuerConfigurationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#deleteCertificateIssuerConfigByID"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerConfigurationId** | **String**| Certificate issuer ID configuration. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificateIssuerConfig** +> CertificateIssuerConfigResponse getCertificateIssuerConfig() + +Get certificate issuer configuration. + +Provides the configured certificate issuer used when creating device certificates for LwM2M. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +try { + CertificateIssuerConfigResponse result = apiInstance.getCertificateIssuerConfig(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#getCertificateIssuerConfig"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CertificateIssuerConfigResponse**](CertificateIssuerConfigResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificateIssuerConfigByID** +> CertificateIssuerConfigResponse getCertificateIssuerConfigByID(certificateIssuerConfigurationId) + +Get certificate issuer configuration. + +Provides the configured certificate issuer. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +String certificateIssuerConfigurationId = "certificateIssuerConfigurationId_example"; // String | Certificate issuer ID configuration. +try { + CertificateIssuerConfigResponse result = apiInstance.getCertificateIssuerConfigByID(certificateIssuerConfigurationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#getCertificateIssuerConfigByID"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerConfigurationId** | **String**| Certificate issuer ID configuration. | + +### Return type + +[**CertificateIssuerConfigResponse**](CertificateIssuerConfigResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificateIssuerConfigs** +> CertificateIssuerConfigListResponse getCertificateIssuerConfigs(limit, order, after, include, referenceEq) + +Get certificate issuer configurations. + +Get certificate issuer configurations, optionally filtered by reference. <br> **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ ``` <br> ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ ``` **Note:** This endpoint does not implement pagination, and therefore ignores list control parameters such as `limit` or `after`. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +Integer limit = 56; // Integer | The number of results to return (2-1000). Values outside of this range are set to the closest limit. +String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The ID of the item after which to retrieve the next page. +String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. +String referenceEq = "referenceEq_example"; // String | The certificate name to which the certificate issuer configuration applies. +try { + CertificateIssuerConfigListResponse result = apiInstance.getCertificateIssuerConfigs(limit, order, after, include, referenceEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#getCertificateIssuerConfigs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of results to return (2-1000). Values outside of this range are set to the closest limit. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] + **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] + **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] + **referenceEq** | **String**| The certificate name to which the certificate issuer configuration applies. | [optional] + +### Return type + +[**CertificateIssuerConfigListResponse**](CertificateIssuerConfigListResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateCertificateIssuerConfig** +> CertificateIssuerConfigResponse updateCertificateIssuerConfig(certificateIssuerConfigRequest) + +Update certificate issuer configuration. + +Configure the certificate issuer used when creating device certificates for LwM2M. <br> **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations/lwm2m \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +CertificateIssuerConfigRequest certificateIssuerConfigRequest = new CertificateIssuerConfigRequest(); // CertificateIssuerConfigRequest | Certificate Issuer Configuration Request +try { + CertificateIssuerConfigResponse result = apiInstance.updateCertificateIssuerConfig(certificateIssuerConfigRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#updateCertificateIssuerConfig"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerConfigRequest** | [**CertificateIssuerConfigRequest**](CertificateIssuerConfigRequest.md)| Certificate Issuer Configuration Request | + +### Return type + +[**CertificateIssuerConfigResponse**](CertificateIssuerConfigResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateCertificateIssuerConfigByID** +> CertificateIssuerConfigResponse updateCertificateIssuerConfigByID(certificateIssuerConfigRequest, certificateIssuerConfigurationId) + +Update certificate issuer configuration. + +Update certificate issuer configuration. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuerConfigurationsApi apiInstance = new SecurityAndIdentityCertificateIssuerConfigurationsApi(); +CertificateIssuerConfigRequest certificateIssuerConfigRequest = new CertificateIssuerConfigRequest(); // CertificateIssuerConfigRequest | Certificate issuer configuration request. +String certificateIssuerConfigurationId = "certificateIssuerConfigurationId_example"; // String | Certificate issuer ID configuration. +try { + CertificateIssuerConfigResponse result = apiInstance.updateCertificateIssuerConfigByID(certificateIssuerConfigRequest, certificateIssuerConfigurationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuerConfigurationsApi#updateCertificateIssuerConfigByID"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerConfigRequest** | [**CertificateIssuerConfigRequest**](CertificateIssuerConfigRequest.md)| Certificate issuer configuration request. | + **certificateIssuerConfigurationId** | **String**| Certificate issuer ID configuration. | + +### Return type + +[**CertificateIssuerConfigResponse**](CertificateIssuerConfigResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuersApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuersApi.md new file mode 100644 index 000000000..5f7ba9f89 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificateIssuersApi.md @@ -0,0 +1,350 @@ +# SecurityAndIdentityCertificateIssuersApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCertificateIssuer**](SecurityAndIdentityCertificateIssuersApi.md#createCertificateIssuer) | **POST** v3/certificate-issuers | Create certificate issuer. +[**deleteCertificateIssuer**](SecurityAndIdentityCertificateIssuersApi.md#deleteCertificateIssuer) | **DELETE** v3/certificate-issuers/{certificate-issuer-id} | Delete certificate issuer. +[**getCertificateIssuer**](SecurityAndIdentityCertificateIssuersApi.md#getCertificateIssuer) | **GET** v3/certificate-issuers/{certificate-issuer-id} | Get certificate issuer by ID. +[**getCertificateIssuers**](SecurityAndIdentityCertificateIssuersApi.md#getCertificateIssuers) | **GET** v3/certificate-issuers | Get certificate issuers list. +[**updateCertificateIssuer**](SecurityAndIdentityCertificateIssuersApi.md#updateCertificateIssuer) | **PUT** v3/certificate-issuers/{certificate-issuer-id} | Update certificate issuer. +[**verifyCertificateIssuer**](SecurityAndIdentityCertificateIssuersApi.md#verifyCertificateIssuer) | **POST** v3/certificate-issuers/{certificate-issuer-id}/verify | Verify certificate issuer. + + + +# **createCertificateIssuer** +> CertificateIssuerInfo createCertificateIssuer(certificateIssuerRequest) + +Create certificate issuer. + +Create a certificate issuer. <br> The maximum number of issuers is limited to 20 per account. <br> You can create multiple certificate issuers of the same type, provided they have different names. This allows verification of the certificate issuer configuration before activation. <br> **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"issuer_type\": \"GLOBAL_SIGN\", \"name\": \"GS Issuer\", \"description\": \"Sample GlobalSign certificate issuer\", \"issuer_attributes\": null, \"issuer_credentials\": { \"api_key\": \"e510e289e6cd8947\", \"api_secret\": \"a477a8393d17a55ecb2ba6a61f58feb84770b621\", \"client_certificate\": \"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END CERTIFICATE-----\", \"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: 4,ENCRYPTED\\nDEK-Info: DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END RSA PRIVATE KEY-----\", \"passphrase\": \"helloworld\" } }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +CertificateIssuerRequest certificateIssuerRequest = new CertificateIssuerRequest(); // CertificateIssuerRequest | Certificate issuer request. +try { + CertificateIssuerInfo result = apiInstance.createCertificateIssuer(certificateIssuerRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#createCertificateIssuer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerRequest** | [**CertificateIssuerRequest**](CertificateIssuerRequest.md)| Certificate issuer request. | + +### Return type + +[**CertificateIssuerInfo**](CertificateIssuerInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteCertificateIssuer** +> Void deleteCertificateIssuer(certificateIssuerId) + +Delete certificate issuer. + +Delete a certificate issuer by ID. <br> **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 \\ -H 'Authorization: Bearer <access_key>' \\ ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +String certificateIssuerId = "certificateIssuerId_example"; // String | Certificate issuer ID. An active certificate issuer cannot be deleted. +try { + Void result = apiInstance.deleteCertificateIssuer(certificateIssuerId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#deleteCertificateIssuer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerId** | **String**| Certificate issuer ID. An active certificate issuer cannot be deleted. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificateIssuer** +> CertificateIssuerInfo getCertificateIssuer(certificateIssuerId) + +Get certificate issuer by ID. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +String certificateIssuerId = "certificateIssuerId_example"; // String | Certificate issuer ID. +try { + CertificateIssuerInfo result = apiInstance.getCertificateIssuer(certificateIssuerId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#getCertificateIssuer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerId** | **String**| Certificate issuer ID. | + +### Return type + +[**CertificateIssuerInfo**](CertificateIssuerInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificateIssuers** +> CertificateIssuerInfoListResponse getCertificateIssuers(limit, order, after, include) + +Get certificate issuers list. + +**Note:** This endpoint does not use pagination, and therefore ignores list control parameters such as `limit` or `after`. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +Integer limit = 56; // Integer | The number of results to return (2-1000). Values outside of this range are set to the closest limit. +String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The ID of the item after which to retrieve the next page. +String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. +try { + CertificateIssuerInfoListResponse result = apiInstance.getCertificateIssuers(limit, order, after, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#getCertificateIssuers"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of results to return (2-1000). Values outside of this range are set to the closest limit. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] + **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] + **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] + +### Return type + +[**CertificateIssuerInfoListResponse**](CertificateIssuerInfoListResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateCertificateIssuer** +> CertificateIssuerInfo updateCertificateIssuer(certificateIssuerId, certificateIssuerUpdateRequest) + +Update certificate issuer. + +Update a certificate issuer. <br> **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"description\": \"Sample GlobalSign certificate issuer - updated.\", \"name\": \"GlobalSign Issuer\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +String certificateIssuerId = "certificateIssuerId_example"; // String | Certificate issuer ID. +CertificateIssuerUpdateRequest certificateIssuerUpdateRequest = new CertificateIssuerUpdateRequest(); // CertificateIssuerUpdateRequest | Certificate issuer update request. +try { + CertificateIssuerInfo result = apiInstance.updateCertificateIssuer(certificateIssuerId, certificateIssuerUpdateRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#updateCertificateIssuer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerId** | **String**| Certificate issuer ID. | + **certificateIssuerUpdateRequest** | [**CertificateIssuerUpdateRequest**](CertificateIssuerUpdateRequest.md)| Certificate issuer update request. | + +### Return type + +[**CertificateIssuerInfo**](CertificateIssuerInfo.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **verifyCertificateIssuer** +> CertificateIssuerVerifyResponse verifyCertificateIssuer(certificateIssuerId) + +Verify certificate issuer. + +Validates the certificate issuer by sending a signing request for a test certificate. This should be done before the configuration is made active. <br> **Note:** The API requests the 3rd party CA to sign a test certificate. For some 3rd party CAs, this operation may use the account quota. <br> **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificateIssuersApi apiInstance = new SecurityAndIdentityCertificateIssuersApi(); +String certificateIssuerId = "certificateIssuerId_example"; // String | Certificate issuer ID. +try { + CertificateIssuerVerifyResponse result = apiInstance.verifyCertificateIssuer(certificateIssuerId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificateIssuersApi#verifyCertificateIssuer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateIssuerId** | **String**| Certificate issuer ID. | + +### Return type + +[**CertificateIssuerVerifyResponse**](CertificateIssuerVerifyResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificatesApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificatesApi.md new file mode 100644 index 000000000..183db028c --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityCertificatesApi.md @@ -0,0 +1,320 @@ +# SecurityAndIdentityCertificatesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addCertificate**](SecurityAndIdentityCertificatesApi.md#addCertificate) | **POST** v3/trusted-certificates | Upload a new trusted certificate. +[**deleteCertificate**](SecurityAndIdentityCertificatesApi.md#deleteCertificate) | **DELETE** v3/trusted-certificates/{cert_id} | Delete a trusted certificate by ID. +[**getAllCertificates**](SecurityAndIdentityCertificatesApi.md#getAllCertificates) | **GET** v3/trusted-certificates | Get all trusted certificates. +[**getCertificate**](SecurityAndIdentityCertificatesApi.md#getCertificate) | **GET** v3/trusted-certificates/{cert_id} | Get a trusted certificate. +[**updateCertificate**](SecurityAndIdentityCertificatesApi.md#updateCertificate) | **PUT** v3/trusted-certificates/{cert_id} | Update trusted certificate. + + + +# **addCertificate** +> TrustedCertificateResp addCertificate(body) + +Upload a new trusted certificate. + +Upload new trusted certificates. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificatesApi apiInstance = new SecurityAndIdentityCertificatesApi(); +TrustedCertificateReq body = new TrustedCertificateReq(); // TrustedCertificateReq | A trusted certificate object with attributes. +try { + TrustedCertificateResp result = apiInstance.addCertificate(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificatesApi#addCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**TrustedCertificateReq**](TrustedCertificateReq.md)| A trusted certificate object with attributes. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteCertificate** +> Void deleteCertificate(certId) + +Delete a trusted certificate by ID. + +Delete a trusted certificate. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificatesApi apiInstance = new SecurityAndIdentityCertificatesApi(); +String certId = "certId_example"; // String | The ID of the trusted certificate to delete. +try { + Void result = apiInstance.deleteCertificate(certId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificatesApi#deleteCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certId** | **String**| The ID of the trusted certificate to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllCertificates** +> TrustedCertificateRespList getAllCertificates(limit, after, order, include, nameEq, serviceEq, expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, statusEq, issuerLike, subjectLike, certificateFingerprintEq, validEq) + +Get all trusted certificates. + +Retrieve an array of trusted certificates. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificatesApi apiInstance = new SecurityAndIdentityCertificatesApi(); +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String nameEq = "nameEq_example"; // String | Filter for certificate name. +String serviceEq = "serviceEq_example"; // String | Service filter, either LwM2M or bootstrap. +Integer expireEq = 56; // Integer | Expire filter in days. +Integer deviceExecutionModeEq = 56; // Integer | Device execution mode: 1 for developer certificates or another natural integer value. +Integer deviceExecutionModeNeq = 56; // Integer | Device execution mode `not_equals` filter. +String ownerEq = "ownerEq_example"; // String | Owner name filter. +Boolean enrollmentModeEq = true; // Boolean | Enrollment mode filter. +String statusEq = "statusEq_example"; // String | Filter for certificate status. +String issuerLike = "issuerLike_example"; // String | Issuer filter. Finds all matches where the filter value is a case-insensitive substring of the result. Example: issuer__like=cn=iss matches CN=issuer. +String subjectLike = "subjectLike_example"; // String | Subject filter. Finds all matches where the filter value is a case-insensitive substring of the result. Example: subject__like=cn=su matches CN=subject. +String certificateFingerprintEq = "certificateFingerprintEq_example"; // String | Filter for certificate fingerprint. +Boolean validEq = true; // Boolean | Filter for finding certificates by validity. True returns certificates which are not yet expired. False returns certificates which have expired. +try { + TrustedCertificateRespList result = apiInstance.getAllCertificates(limit, after, order, include, nameEq, serviceEq, expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, statusEq, issuerLike, subjectLike, certificateFingerprintEq, validEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificatesApi#getAllCertificates"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **nameEq** | **String**| Filter for certificate name. | [optional] + **serviceEq** | **String**| Service filter, either LwM2M or bootstrap. | [optional] + **expireEq** | **Integer**| Expire filter in days. | [optional] + **deviceExecutionModeEq** | **Integer**| Device execution mode: 1 for developer certificates or another natural integer value. | [optional] + **deviceExecutionModeNeq** | **Integer**| Device execution mode `not_equals` filter. | [optional] + **ownerEq** | **String**| Owner name filter. | [optional] + **enrollmentModeEq** | **Boolean**| Enrollment mode filter. | [optional] + **statusEq** | **String**| Filter for certificate status. | [optional] + **issuerLike** | **String**| Issuer filter. Finds all matches where the filter value is a case-insensitive substring of the result. Example: issuer__like=cn=iss matches CN=issuer. | [optional] + **subjectLike** | **String**| Subject filter. Finds all matches where the filter value is a case-insensitive substring of the result. Example: subject__like=cn=su matches CN=subject. | [optional] + **certificateFingerprintEq** | **String**| Filter for certificate fingerprint. | [optional] + **validEq** | **Boolean**| Filter for finding certificates by validity. True returns certificates which are not yet expired. False returns certificates which have expired. | [optional] + +### Return type + +[**TrustedCertificateRespList**](TrustedCertificateRespList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getCertificate** +> TrustedCertificateResp getCertificate(certId) + +Get a trusted certificate. + +Retrieve a trusted certificate. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificatesApi apiInstance = new SecurityAndIdentityCertificatesApi(); +String certId = "certId_example"; // String | The ID of the trusted certificate to retrieve. +try { + TrustedCertificateResp result = apiInstance.getCertificate(certId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificatesApi#getCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certId** | **String**| The ID of the trusted certificate to retrieve. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateCertificate** +> TrustedCertificateResp updateCertificate(certId, body) + +Update trusted certificate. + +Update existing trusted certificates. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"description\": \"very important cert\"} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityCertificatesApi apiInstance = new SecurityAndIdentityCertificatesApi(); +String certId = "certId_example"; // String | The ID of the trusted certificate to update. +TrustedCertificateUpdateReq body = new TrustedCertificateUpdateReq(); // TrustedCertificateUpdateReq | A trusted certificate object with attributes. +try { + TrustedCertificateResp result = apiInstance.updateCertificate(certId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityCertificatesApi#updateCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certId** | **String**| The ID of the trusted certificate to update. | + **body** | [**TrustedCertificateUpdateReq**](TrustedCertificateUpdateReq.md)| A trusted certificate object with attributes. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityDeveloperClassCertificatesApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityDeveloperClassCertificatesApi.md new file mode 100644 index 000000000..14cc81039 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityDeveloperClassCertificatesApi.md @@ -0,0 +1,120 @@ +# SecurityAndIdentityDeveloperClassCertificatesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDeveloperCertificate**](SecurityAndIdentityDeveloperClassCertificatesApi.md#createDeveloperCertificate) | **POST** v3/developer-certificates | Create a new developer certificate to connect to the bootstrap server. +[**getDeveloperCertificate**](SecurityAndIdentityDeveloperClassCertificatesApi.md#getDeveloperCertificate) | **GET** v3/developer-certificates/{developerCertificateId} | Fetch an existing developer certificate to connect to the bootstrap server. + + + +# **createDeveloperCertificate** +> DeveloperCertificateResponseData createDeveloperCertificate(body) + +Create a new developer certificate to connect to the bootstrap server. + +Create a developer certificate (a certificate that can be flashed to multiple devices to connect to the bootstrap server). **Note:** The number of developer certificates allowed per account is limited. Please see [Setting up a Certificate Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). **Example:** ``` curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \\ -H \"Authorization: Bearer <access_key>\" \\ -H \"content-type: application/json\" \\ -d { \"name\": \"<certificate_name>\", \"description\": \"<certificate_description>\" } ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityDeveloperClassCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityDeveloperClassCertificatesApi apiInstance = new SecurityAndIdentityDeveloperClassCertificatesApi(); +DeveloperCertificateRequestData body = new DeveloperCertificateRequestData(); // DeveloperCertificateRequestData | +try { + DeveloperCertificateResponseData result = apiInstance.createDeveloperCertificate(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityDeveloperClassCertificatesApi#createDeveloperCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeveloperCertificateRequestData**](DeveloperCertificateRequestData.md)| | + +### Return type + +[**DeveloperCertificateResponseData**](DeveloperCertificateResponseData.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getDeveloperCertificate** +> DeveloperCertificateResponseData getDeveloperCertificate(developerCertificateId) + +Fetch an existing developer certificate to connect to the bootstrap server. + +Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server). **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityDeveloperClassCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityDeveloperClassCertificatesApi apiInstance = new SecurityAndIdentityDeveloperClassCertificatesApi(); +String developerCertificateId = "developerCertificateId_example"; // String | A unique identifier for the developer certificate. +try { + DeveloperCertificateResponseData result = apiInstance.getDeveloperCertificate(developerCertificateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityDeveloperClassCertificatesApi#getDeveloperCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **developerCertificateId** | **String**| A unique identifier for the developer certificate. | + +### Return type + +[**DeveloperCertificateResponseData**](DeveloperCertificateResponseData.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityPreSharedKeysApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityPreSharedKeysApi.md new file mode 100644 index 000000000..6c8308bb5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityPreSharedKeysApi.md @@ -0,0 +1,234 @@ +# SecurityAndIdentityPreSharedKeysApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deletePreSharedKey**](SecurityAndIdentityPreSharedKeysApi.md#deletePreSharedKey) | **DELETE** v2/device-shared-keys/{endpoint_name} | Remove a PSK. +[**getPreSharedKey**](SecurityAndIdentityPreSharedKeysApi.md#getPreSharedKey) | **GET** v2/device-shared-keys/{endpoint_name} | Get a PSK. +[**listPreSharedKeys**](SecurityAndIdentityPreSharedKeysApi.md#listPreSharedKeys) | **GET** v2/device-shared-keys | List PSKs. +[**uploadPreSharedKey**](SecurityAndIdentityPreSharedKeysApi.md#uploadPreSharedKey) | **POST** v2/device-shared-keys | Upload a PSK to Pelion Device Management. + + + +# **deletePreSharedKey** +> Void deletePreSharedKey(endpointName) + +Remove a PSK. + +Remove a PSK. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityPreSharedKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityPreSharedKeysApi apiInstance = new SecurityAndIdentityPreSharedKeysApi(); +String endpointName = "endpointName_example"; // String | The unique endpoint identifier that this PSK applies to. [Reserved characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must be percent-encoded. +try { + Void result = apiInstance.deletePreSharedKey(endpointName); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityPreSharedKeysApi#deletePreSharedKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **endpointName** | **String**| The unique endpoint identifier that this PSK applies to. [Reserved characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must be percent-encoded. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getPreSharedKey** +> PreSharedKeyWithoutSecret getPreSharedKey(endpointName) + +Get a PSK. + +Check if a PSK for an endpoint exists or not. The response does not contain the secret itself. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityPreSharedKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityPreSharedKeysApi apiInstance = new SecurityAndIdentityPreSharedKeysApi(); +String endpointName = "endpointName_example"; // String | The unique endpoint identifier that this PSK applies to. [Reserved characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must be percent-encoded. +try { + PreSharedKeyWithoutSecret result = apiInstance.getPreSharedKey(endpointName); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityPreSharedKeysApi#getPreSharedKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **endpointName** | **String**| The unique endpoint identifier that this PSK applies to. [Reserved characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must be percent-encoded. | + +### Return type + +[**PreSharedKeyWithoutSecret**](PreSharedKeyWithoutSecret.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listPreSharedKeys** +> ListOfPreSharedKeysWithoutSecret listPreSharedKeys(limit, after) + +List PSKs. + +Retrieve pre-shared keys (PSKs) with pagination. Default page size of 50 entries. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityPreSharedKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityPreSharedKeysApi apiInstance = new SecurityAndIdentityPreSharedKeysApi(); +Integer limit = 50; // Integer | The number of objects to retrieve on a page (2-1000). Values outside the range are set to the closest limit. +String after = "after_example"; // String | An offset token for fetching a specific page. Provided by the server. +try { + ListOfPreSharedKeysWithoutSecret result = apiInstance.listPreSharedKeys(limit, after); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityPreSharedKeysApi#listPreSharedKeys"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| The number of objects to retrieve on a page (2-1000). Values outside the range are set to the closest limit. | [optional] [default to 50] + **after** | **String**| An offset token for fetching a specific page. Provided by the server. | [optional] + +### Return type + +[**ListOfPreSharedKeysWithoutSecret**](ListOfPreSharedKeysWithoutSecret.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **uploadPreSharedKey** +> Void uploadPreSharedKey(body) + +Upload a PSK to Pelion Device Management. + +Upload a PSK for an endpoint to allow it to bootstrap. The existing key cannot be overwritten, but needs to be deleted first in the case of re-setting a PSK for an endpoint. **Note**: The PSK APIs are available only to accounts that have this feature enabled. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H \"Authorization: Bearer <access_key>\" \\ -H \"content-type: application/json\" \\ -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityPreSharedKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityPreSharedKeysApi apiInstance = new SecurityAndIdentityPreSharedKeysApi(); +PreSharedKey body = new PreSharedKey(); // PreSharedKey | PSK to upload. +try { + Void result = apiInstance.uploadPreSharedKey(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityPreSharedKeysApi#uploadPreSharedKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**PreSharedKey**](PreSharedKey.md)| PSK to upload. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentitySecureDeviceAccessApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentitySecureDeviceAccessApi.md new file mode 100644 index 000000000..ac9547b92 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentitySecureDeviceAccessApi.md @@ -0,0 +1,296 @@ +# SecurityAndIdentitySecureDeviceAccessApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAceAuthToken**](SecurityAndIdentitySecureDeviceAccessApi.md#createAceAuthToken) | **POST** /ace-auth/token | Get an access token to use with a device. +[**createTrustAnchor**](SecurityAndIdentitySecureDeviceAccessApi.md#createTrustAnchor) | **POST** /v3/trust-anchors | Create a new trust anchor for the account. +[**deleteTrustAnchor**](SecurityAndIdentitySecureDeviceAccessApi.md#deleteTrustAnchor) | **DELETE** /v3/trust-anchors/{trust_anchor_id} | Delete a trust anchor. +[**getTrustAnchors**](SecurityAndIdentitySecureDeviceAccessApi.md#getTrustAnchors) | **GET** /v3/trust-anchors | Get the account's trust anchor used to sign the access token. +[**updateTrustAnchor**](SecurityAndIdentitySecureDeviceAccessApi.md#updateTrustAnchor) | **PUT** /v3/trust-anchors/{trust_anchor_id} | Update trust anchor attributes (description). + + + +# **createAceAuthToken** +> TokenResponse createAceAuthToken(body) + +Get an access token to use with a device. + +Generate a signed CWT (CBOR Web Token). The SDA Android SDK uses this API to gain access to perform actions on the devices specified in the audience (aud). <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/ace-auth/token \\ -H 'Authorization: <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"grant_type\":\"client_credentials\", \"aud\":[\"id:f90b1017e52f4c70ad92684e802c9249\",\"ep:dev1\"], \"scope\":\"turn-led-on\", \"cnf\":\"-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ...XwIDAQAB-----END PUBLIC KEY-----\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentitySecureDeviceAccessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentitySecureDeviceAccessApi apiInstance = new SecurityAndIdentitySecureDeviceAccessApi(); +TokenRequest body = new TokenRequest(); // TokenRequest | Create access token request. +try { + TokenResponse result = apiInstance.createAceAuthToken(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentitySecureDeviceAccessApi#createAceAuthToken"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**TokenRequest**](TokenRequest.md)| Create access token request. | + +### Return type + +[**TokenResponse**](TokenResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **createTrustAnchor** +> CreateTrustAnchorResponse createTrustAnchor(body) + +Create a new trust anchor for the account. + +Create a trust anchor key pair and return the public key and creation time. Each account can have one trust anchor only. This API fails if a trust anchor already exists for the account. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H 'Authorization: <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"description\": \"Trust anchor for room lighting controller.\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentitySecureDeviceAccessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentitySecureDeviceAccessApi apiInstance = new SecurityAndIdentitySecureDeviceAccessApi(); +CreateTrustAnchorRequest body = new CreateTrustAnchorRequest(); // CreateTrustAnchorRequest | Request a new trust anchor. +try { + CreateTrustAnchorResponse result = apiInstance.createTrustAnchor(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentitySecureDeviceAccessApi#createTrustAnchor"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateTrustAnchorRequest**](CreateTrustAnchorRequest.md)| Request a new trust anchor. | + +### Return type + +[**CreateTrustAnchorResponse**](CreateTrustAnchorResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteTrustAnchor** +> Void deleteTrustAnchor(trustAnchorId) + +Delete a trust anchor. + +Delete the specified trust anchor. Unrecoverable. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: <valid JWT>' \\ ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentitySecureDeviceAccessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentitySecureDeviceAccessApi apiInstance = new SecurityAndIdentitySecureDeviceAccessApi(); +String trustAnchorId = "trustAnchorId_example"; // String | The id of the trust anchor to be deleted +try { + Void result = apiInstance.deleteTrustAnchor(trustAnchorId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentitySecureDeviceAccessApi#deleteTrustAnchor"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trustAnchorId** | **String**| The id of the trust anchor to be deleted | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getTrustAnchors** +> GetTrustAnchorsResponse getTrustAnchors(limit, order, after, include) + +Get the account's trust anchor used to sign the access token. + +Get all trust anchors that match the account ID specified in the JWT. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H 'Authorization: <valid JWT>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentitySecureDeviceAccessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentitySecureDeviceAccessApi apiInstance = new SecurityAndIdentitySecureDeviceAccessApi(); +Integer limit = 56; // Integer | Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit. +String order = "order_example"; // String | Indicates how to order the entries based on when they were created. `ASC` by default. +String after = "after_example"; // String | The ID of the item after which to retrieve the next page. +String include = "include_example"; // String | Comma-separated list of data fields to return. Currently supported: `total_count`. +try { + GetTrustAnchorsResponse result = apiInstance.getTrustAnchors(limit, order, after, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentitySecureDeviceAccessApi#getTrustAnchors"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit. | [optional] + **order** | **String**| Indicates how to order the entries based on when they were created. `ASC` by default. | [optional] [enum: ASC, DESC] + **after** | **String**| The ID of the item after which to retrieve the next page. | [optional] + **include** | **String**| Comma-separated list of data fields to return. Currently supported: `total_count`. | [optional] + +### Return type + +[**GetTrustAnchorsResponse**](GetTrustAnchorsResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateTrustAnchor** +> UpdateTrustAnchorResponse updateTrustAnchor(trustAnchorId, body) + +Update trust anchor attributes (description). + +Updates a trust anchor description attribute. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"description\": \"Trust anchor for ambient light module\" }' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentitySecureDeviceAccessApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentitySecureDeviceAccessApi apiInstance = new SecurityAndIdentitySecureDeviceAccessApi(); +String trustAnchorId = "trustAnchorId_example"; // String | The id of the trust anchor to be updated +UpdateTrustAnchorRequest body = new UpdateTrustAnchorRequest(); // UpdateTrustAnchorRequest | Update trust anchor request. +try { + UpdateTrustAnchorResponse result = apiInstance.updateTrustAnchor(trustAnchorId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentitySecureDeviceAccessApi#updateTrustAnchor"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trustAnchorId** | **String**| The id of the trust anchor to be updated | + **body** | [**UpdateTrustAnchorRequest**](UpdateTrustAnchorRequest.md)| Update trust anchor request. | + +### Return type + +[**UpdateTrustAnchorResponse**](UpdateTrustAnchorResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityServerCredentialsApi.md b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityServerCredentialsApi.md new file mode 100644 index 000000000..a0100e543 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/SecurityAndIdentityServerCredentialsApi.md @@ -0,0 +1,164 @@ +# SecurityAndIdentityServerCredentialsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAllServerCredentials**](SecurityAndIdentityServerCredentialsApi.md#getAllServerCredentials) | **GET** v3/server-credentials | Fetch all (Bootstrap and LwM2M) server credentials. +[**getBootstrapServerCredentials**](SecurityAndIdentityServerCredentialsApi.md#getBootstrapServerCredentials) | **GET** v3/server-credentials/bootstrap | Fetch bootstrap server credentials. +[**getL2M2MServerCredentials**](SecurityAndIdentityServerCredentialsApi.md#getL2M2MServerCredentials) | **GET** v3/server-credentials/lwm2m | Fetch LwM2M server credentials. + + + +# **getAllServerCredentials** +> AllServerCredentialsResponseData getAllServerCredentials() + +Fetch all (Bootstrap and LwM2M) server credentials. + +Return all (bootstrap and LwM2M) server credentials for client to connect to bootstrap or LwM2M server. **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityServerCredentialsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityServerCredentialsApi apiInstance = new SecurityAndIdentityServerCredentialsApi(); +try { + AllServerCredentialsResponseData result = apiInstance.getAllServerCredentials(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityServerCredentialsApi#getAllServerCredentials"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AllServerCredentialsResponseData**](AllServerCredentialsResponseData.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getBootstrapServerCredentials** +> ServerCredentialsResponseData getBootstrapServerCredentials() + +Fetch bootstrap server credentials. + +Return bootstrap server credentials for client to connect to bootstrap server. **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityServerCredentialsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityServerCredentialsApi apiInstance = new SecurityAndIdentityServerCredentialsApi(); +try { + ServerCredentialsResponseData result = apiInstance.getBootstrapServerCredentials(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityServerCredentialsApi#getBootstrapServerCredentials"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServerCredentialsResponseData**](ServerCredentialsResponseData.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getL2M2MServerCredentials** +> ServerCredentialsResponseData getL2M2MServerCredentials() + +Fetch LwM2M server credentials. + +Return LwM2M server credentials for client to connect to LwM2M server. **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \\ -H \"Authorization: Bearer <access_key>\" ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityServerCredentialsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +SecurityAndIdentityServerCredentialsApi apiInstance = new SecurityAndIdentityServerCredentialsApi(); +try { + ServerCredentialsResponseData result = apiInstance.getL2M2MServerCredentials(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling SecurityAndIdentityServerCredentialsApi#getL2M2MServerCredentials"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServerCredentialsResponseData**](ServerCredentialsResponseData.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/SerializationConfigData.md b/backends/pelioncloud_devicemanagement/docs/SerializationConfigData.md index 0c2ce2235..ace4baa01 100644 --- a/backends/pelioncloud_devicemanagement/docs/SerializationConfigData.md +++ b/backends/pelioncloud_devicemanagement/docs/SerializationConfigData.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cfg** | **Object** | Serialization configuration object according to configuration type. | [optional] -**maxChunkSize** | **Integer** | Maximum number of messages in NotificationMessage container delivered in one request. Default is 10000. Using a very low value for high troughput applications may cause lag in notification delivery, as a new chunk is sent only after the previous one has been acknowledged. Using a high value is recommended and safe, as chunks are sent quickly after notifications are received from devices. See [notification sending logic](../integrate-web-app/event-notification.html#notification-sending-logic) for more details. | [optional] +**cfg** | [**SerializationConfigObjectV2**](SerializationConfigObjectV2.md) | | [optional] +**maxChunkSize** | **Integer** | Maximum number of messages in NotificationMessage container delivered in one request. Default is 10000. Using a very low value for high troughput applications may cause lag in notification delivery, as a new chunk is sent only after the previous one has been acknowledged. Using a high value is recommended and safe, as chunks are sent quickly after notifications are received from devices. See [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) for more details. | [optional] **type** | [**TypeEnum**](#TypeEnum) | Serialization type: v2 - specified in NotificationMessage. | diff --git a/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryItem.md b/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryItem.md index 8914481eb..3d2a72e06 100644 --- a/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryItem.md +++ b/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryItem.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **amount** | **Long** | Negative or positive quota usage. | **id** | **String** | Service package quota history ID. | **reason** | [**ReasonEnum**](#ReasonEnum) | Type of quota usage entry. | -**reservation** | [**ServicePackageQuotaHistoryReservation**](ServicePackageQuotaHistoryReservation.md) | Reservation details if reason is `reservation`, `reservation_releasem` or `reservation_termination`. | [optional] -**servicePackage** | [**ServicePackageQuotaHistoryServicePackage**](ServicePackageQuotaHistoryServicePackage.md) | Service package details if reason is `package_creation`, `package_renewal` or `package_termination`. | [optional] +**reservation** | [**ServicePackageQuotaHistoryReservation**](ServicePackageQuotaHistoryReservation.md) | Reservation details if reason is `reservation`, `reservation_release` or `reservation_termination`. | [optional] +**servicePackage** | [**ServicePackageQuotaHistoryServicePackage**](ServicePackageQuotaHistoryServicePackage.md) | Service package details if reason is `package_creation`, `package_renewal`, `package_termination`, or `package_tokens_edit`. | [optional] @@ -22,6 +22,7 @@ RESERVATION_TERMINATION | "reservation_termination" PACKAGE_CREATION | "package_creation" PACKAGE_RENEWAL | "package_renewal" PACKAGE_TERMINATION | "package_termination" +PACKAGE_TOKENS_EDIT | "package_tokens_edit" diff --git a/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryResponse.md b/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryResponse.md index fd66ae248..a12680df5 100644 --- a/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/ServicePackageQuotaHistoryResponse.md @@ -7,8 +7,9 @@ Name | Type | Description | Notes **after** | **String** | ID after which to fetch quota history. | [optional] **data** | [**List<ServicePackageQuotaHistoryItem>**](ServicePackageQuotaHistoryItem.md) | List of history items. Empty list if no entries are available. | **hasMore** | **Boolean** | If there is next available quota history paged response to fetch. | -**limit** | **Integer** | Maximum number of quota history entries contained in one paged response. | +**limit** | **Integer** | Maximum number of quota history entries in one paged response. | **object** | [**ObjectEnum**](#ObjectEnum) | Always set to `service-package-quota-history`. | +**order** | **String** | History item record order based on creation time. | **totalCount** | **Integer** | Sum of all quota history entries that should be returned. | diff --git a/backends/pelioncloud_devicemanagement/docs/ServicePackageReport.md b/backends/pelioncloud_devicemanagement/docs/ServicePackageReport.md index 562d05efe..3779e3ec4 100644 --- a/backends/pelioncloud_devicemanagement/docs/ServicePackageReport.md +++ b/backends/pelioncloud_devicemanagement/docs/ServicePackageReport.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**aggregatedQuotaUsage** | [**List<AggregatedQuotaUsageReport>**](AggregatedQuotaUsageReport.md) | | -**metadata** | [**ServicePackageMetadata**](ServicePackageMetadata.md) | `Null` if service package has expired. | +**aggregatedQuotaUsage** | [**List<AggregatedQuotaUsageReport>**](AggregatedQuotaUsageReport.md) | | [optional] +**metadata** | [**ServicePackageMetadata**](ServicePackageMetadata.md) | `Null` if service package has expired. | [optional] **quotaUsage** | [**List<QuotaUsageReport>**](QuotaUsageReport.md) | | diff --git a/backends/pelioncloud_devicemanagement/docs/StatisticsReportListResponse.md b/backends/pelioncloud_devicemanagement/docs/StatisticsReportListResponse.md new file mode 100644 index 000000000..80bf30761 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/StatisticsReportListResponse.md @@ -0,0 +1,18 @@ + +# StatisticsReportListResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | An offset token for the current page. | [optional] +**data** | [**List<StatisticsReportResponse>**](StatisticsReportResponse.md) | List of manufacturing statistics. | [optional] +**end** | [**DateTime**](DateTime.md) | | [optional] +**hasMore** | **Boolean** | Indicates whether additional results are available. | [optional] +**limit** | **Integer** | The number of results to return (2-1000). Values outside of this range are set to the closest limit. | [optional] +**object** | **String** | The API object type. The object type of this API is \"list\". | [optional] +**order** | **String** | Record order based on record identifier. | [optional] +**start** | [**DateTime**](DateTime.md) | | [optional] +**totalCount** | **Integer** | | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/StatisticsReportResponse.md b/backends/pelioncloud_devicemanagement/docs/StatisticsReportResponse.md new file mode 100644 index 000000000..d3cc7a2f5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/StatisticsReportResponse.md @@ -0,0 +1,17 @@ + +# StatisticsReportResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avgProvisioningTimeSec** | [**BigDecimal**](BigDecimal.md) | Average provisioning time in seconds. | [optional] +**deviceCount** | **Integer** | Number of manufactured devices. | [optional] +**factoryId** | **Integer** | Factory ID. | [optional] +**factoryName** | **String** | Factory name. | [optional] +**id** | [**UUID**](UUID.md) | Unique row identifier. | [optional] +**maxProvisioningTimeSec** | [**BigDecimal**](BigDecimal.md) | Maximum provisioning time in seconds. | [optional] +**minProvisioningTimeSec** | [**BigDecimal**](BigDecimal.md) | Minimum provisioning time in seconds. | [optional] +**workstation** | **String** | Workstation. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/StatisticsSeriesRecord.md b/backends/pelioncloud_devicemanagement/docs/StatisticsSeriesRecord.md new file mode 100644 index 000000000..ac77eb29a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/StatisticsSeriesRecord.md @@ -0,0 +1,27 @@ + +# StatisticsSeriesRecord + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**activeDevices** | **Integer** | | +**deviceToPelionMessages** | [**DeviceToPelionMessagesCounter**](DeviceToPelionMessagesCounter.md) | | [optional] +**firmwareUpdates** | **Integer** | | +**id** | **String** | Metric ID. | +**object** | [**ObjectEnum**](#ObjectEnum) | Always `billing-statistics`. | +**pelionToDeviceMessages** | [**PelionToDeviceMessagesCounter**](PelionToDeviceMessagesCounter.md) | | [optional] +**pelionToWebappNotifications** | **Integer** | | [optional] +**restApiRequestsWithApiKeyToken** | **Integer** | | [optional] +**restApiRequestsWithUserToken** | **Integer** | | [optional] +**sdaTokens** | **Integer** | | +**timestamp** | [**DateTime**](DateTime.md) | The start of the interval for which the data is aggregated, in RFC3339 date-time format with millisecond accuracy and UTC time zone. Each interval includes data for the time greater than or equal to the timestamp and less than the next interval's starting. | + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +STATISTICS | "billing-statistics" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/StatisticsViewResponse.md b/backends/pelioncloud_devicemanagement/docs/StatisticsViewResponse.md new file mode 100644 index 000000000..4851d7969 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/StatisticsViewResponse.md @@ -0,0 +1,23 @@ + +# StatisticsViewResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after** | **String** | The ID after which to fetch the statistics view. | [optional] +**data** | [**List<StatisticsSeriesRecord>**](StatisticsSeriesRecord.md) | List of statistics view records. Empty list if no records are available. | +**hasMore** | **Boolean** | Indicates whether a new statistics view response is available. | +**limit** | **Integer** | Maximum number of statistics view records on a page. | +**object** | [**ObjectEnum**](#ObjectEnum) | Always `list`. | +**order** | **String** | Record order. Acceptable values: ASC, DESC. Default: ASC. | +**totalCount** | **Long** | Sum of all statistics view records to return. Included in the response when you use the query parameter include=total_count. | [optional] + + + +## Enum: ObjectEnum +Name | Value +---- | ----- +LIST | "list" + + + diff --git a/backends/pelioncloud_devicemanagement/docs/SubjectList.md b/backends/pelioncloud_devicemanagement/docs/SubjectList.md index 1e4c9f5f7..f21dc8391 100644 --- a/backends/pelioncloud_devicemanagement/docs/SubjectList.md +++ b/backends/pelioncloud_devicemanagement/docs/SubjectList.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **apikeys** | **List<String>** | An array of API key IDs. | [optional] +**applications** | **List<String>** | An array of applicationIDs. | [optional] **users** | **List<String>** | An array of user IDs. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/SubtenantAccountReport.md b/backends/pelioncloud_devicemanagement/docs/SubtenantAccountReport.md index 51fde27e3..df730b03f 100644 --- a/backends/pelioncloud_devicemanagement/docs/SubtenantAccountReport.md +++ b/backends/pelioncloud_devicemanagement/docs/SubtenantAccountReport.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account** | [**SubtenantReportAccountContactInfo**](SubtenantReportAccountContactInfo.md) | Subtenant account contact information. | +**account** | [**SubtenantReportAccountContactInfo**](SubtenantReportAccountContactInfo.md) | Tenant account contact information. | **billingData** | [**ReportBillingData**](ReportBillingData.md) | Report billing data. | -**servicePackage** | [**SubtenantServicePackageReport**](SubtenantServicePackageReport.md) | Report service package for subtenant account. | [optional] +**servicePackage** | [**SubtenantServicePackageReport**](SubtenantServicePackageReport.md) | service package report for the tenant. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/SubtenantReportAccountContactInfo.md b/backends/pelioncloud_devicemanagement/docs/SubtenantReportAccountContactInfo.md index 0271ce2cf..e1f568ed0 100644 --- a/backends/pelioncloud_devicemanagement/docs/SubtenantReportAccountContactInfo.md +++ b/backends/pelioncloud_devicemanagement/docs/SubtenantReportAccountContactInfo.md @@ -6,11 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **addressLine1** | **String** | | [optional] **addressLine2** | **String** | | [optional] +**alias** | **String** | | [optional] +**businessModel** | [**BusinessModelEnum**](#BusinessModelEnum) | The business model selected for the account to generate the billing reports. | [optional] **city** | **String** | | [optional] **company** | **String** | | **contact** | **String** | | [optional] **country** | **String** | | [optional] -**customerSubtenantId** | **String** | Account subtenant ID, if a subtenant. | +**customerSubtenantId** | **String** | Account tenant ID, valid only for tenants. | **email** | **String** | | [optional] **id** | **String** | Account ID. | **phoneNumber** | **String** | | [optional] @@ -18,4 +20,12 @@ Name | Type | Description | Notes **state** | **String** | | [optional] + +## Enum: BusinessModelEnum +Name | Value +---- | ----- +ACTIVE_DEVICE_BUSINESS_MODEL | "active_device_business_model" +API_CALLS_1_BUSINESS_MODEL | "api_calls_1_business_model" + + diff --git a/backends/pelioncloud_devicemanagement/docs/SuccessfulResponse.md b/backends/pelioncloud_devicemanagement/docs/SuccessfulResponse.md index aa00af72d..e42857d5c 100644 --- a/backends/pelioncloud_devicemanagement/docs/SuccessfulResponse.md +++ b/backends/pelioncloud_devicemanagement/docs/SuccessfulResponse.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The metric ID included in the request or null. | [optional] +**after** | **String** | The metric ID included in the request, or null. | [optional] **data** | [**List<Metric>**](Metric.md) | | [optional] **hasMore** | **Boolean** | Indicates whether there are more results for you to fetch in the next page. | [optional] **limit** | **Integer** | The limit used in the request to retrieve the results. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccessKeysApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccessKeysApi.md new file mode 100644 index 000000000..dfcdd5756 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccessKeysApi.md @@ -0,0 +1,134 @@ +# TenantAccountsAccessKeysApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccountAccessKey**](TenantAccountsAccessKeysApi.md#getAccountAccessKey) | **GET** v3/accounts/{account_id}/access-keys/{access_key_id} | Get access key. +[**getAllAccountAccessKeys**](TenantAccountsAccessKeysApi.md#getAllAccountAccessKeys) | **GET** v3/accounts/{account_id}/access-keys | Get all access keys. + + + +# **getAccountAccessKey** +> AccessKey getAccountAccessKey(accountId, accessKeyId) + +Get access key. + +Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsAccessKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsAccessKeysApi apiInstance = new TenantAccountsAccessKeysApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to retrieve. +try { + AccessKey result = apiInstance.getAccountAccessKey(accountId, accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsAccessKeysApi#getAccountAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **accessKeyId** | **String**| The ID of the access key to retrieve. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllAccountAccessKeys** +> AccessKeyList getAllAccountAccessKeys(accountId, limit, after, order, include, statusEq, applicationIdEq) + +Get all access keys. + +Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsAccessKeysApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsAccessKeysApi apiInstance = new TenantAccountsAccessKeysApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +String applicationIdEq = "applicationIdEq_example"; // String | Application filter. +try { + AccessKeyList result = apiInstance.getAllAccountAccessKeys(accountId, limit, after, order, include, statusEq, applicationIdEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsAccessKeysApi#getAllAccountAccessKeys"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + **applicationIdEq** | **String**| Application filter. | [optional] + +### Return type + +[**AccessKeyList**](AccessKeyList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccountsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccountsApi.md index e989374c1..ad8c55ecf 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccountsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsAccountsApi.md @@ -5,18 +5,18 @@ All URIs are relative to *https://api.us-east-1.mbedcloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**createAccount**](TenantAccountsAccountsApi.md#createAccount) | **POST** v3/accounts | Create a new account. -[**getAccountInfo**](TenantAccountsAccountsApi.md#getAccountInfo) | **GET** v3/accounts/{account_id} | Get account info. +[**getAccountInfo**](TenantAccountsAccountsApi.md#getAccountInfo) | **GET** v3/accounts/{account_id} | Get account information. [**getAllAccounts**](TenantAccountsAccountsApi.md#getAllAccounts) | **GET** v3/accounts | Get all accounts. [**updateAccount**](TenantAccountsAccountsApi.md#updateAccount) | **PUT** v3/accounts/{account_id} | Update attributes of an existing account. # **createAccount** -> AccountInfo createAccount(body, action) +> AccountCreationResp createAccount(body, action) Create a new account. -Create a new account. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"display_name\": \"MyAccount1\", \"admin_name\": \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", \"city\": \"Cambridge\", \"contact\": \"J. Doe\", \"company\": \"Arm\"}' ``` +Create a new account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"display_name\": \"MyAccount1\", \"aliases\": [ \"my-account\" ], \"admin_name\": \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", \"city\": \"Cambridge\", \"contact\": \"J. Doe\", \"company\": \"Arm\"}' ``` ### Example ```java @@ -39,7 +39,7 @@ TenantAccountsAccountsApi apiInstance = new TenantAccountsAccountsApi(); AccountCreationReq body = new AccountCreationReq(); // AccountCreationReq | Details of the account to create. String action = "create"; // String | Action, either `create` or `enroll`. try { - AccountInfo result = apiInstance.createAccount(body, action); + AccountCreationResp result = apiInstance.createAccount(body, action); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TenantAccountsAccountsApi#createAccount"); @@ -56,7 +56,7 @@ Name | Type | Description | Notes ### Return type -[**AccountInfo**](AccountInfo.md) +[**AccountCreationResp**](AccountCreationResp.md) ### Authorization @@ -71,9 +71,9 @@ Name | Type | Description | Notes # **getAccountInfo** > AccountInfo getAccountInfo(accountId, include, properties) -Get account info. +Get account information. -Retrieve detailed information about an account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve detailed information about an account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -93,7 +93,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); TenantAccountsAccountsApi apiInstance = new TenantAccountsAccountsApi(); -String accountId = "accountId_example"; // String | The ID of the account to fetch. +String accountId = "accountId_example"; // String | The ID of the account to retrieve. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history. String properties = "properties_example"; // String | Property name to return from account-specific properties. try { @@ -109,7 +109,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **accountId** | **String**| The ID of the account to fetch. | + **accountId** | **String**| The ID of the account to retrieve. | **include** | **String**| Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history. | [optional] **properties** | **String**| Property name to return from account-specific properties. | [optional] @@ -132,7 +132,7 @@ Name | Type | Description | Notes Get all accounts. -Returns an array of account objects, optionally filtered by status and tier level. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of tenant accounts, optionally filtered by status and tier level. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -160,7 +160,7 @@ String parentEq = "parentEq_example"; // String | An optional filter for parent String endMarketEq = "endMarketEq_example"; // String | An optional filter for account end market. String countryLike = "countryLike_example"; // String | An optional filter for account country. Finds all matches where the filter value is a case-insensitive substring of the result. Example: country__like=LAND matches Ireland. Integer limit = 1000; // Integer | The number of results to return (2-1000). Default 1000. -String after = "after_example"; // String | The entity ID to fetch after the given one. +String after = "after_example"; // String | The entity ID to retrieve after the given one. String order = "ASC"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history. String format = "format_example"; // String | Format information for the query response. Supported: format=breakdown. @@ -186,7 +186,7 @@ Name | Type | Description | Notes **endMarketEq** | **String**| An optional filter for account end market. | [optional] **countryLike** | **String**| An optional filter for account country. Finds all matches where the filter value is a case-insensitive substring of the result. Example: country__like=LAND matches Ireland. | [optional] **limit** | **Integer**| The number of results to return (2-1000). Default 1000. | [optional] [default to 1000] - **after** | **String**| The entity ID to fetch after the given one. | [optional] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history. | [optional] **format** | **String**| Format information for the query response. Supported: format=breakdown. | [optional] @@ -211,7 +211,7 @@ Name | Type | Description | Notes Update attributes of an existing account. -Update an account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' ``` +Update an account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsApiKeysApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsApiKeysApi.md index 4471e0967..178f6b199 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsApiKeysApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsApiKeysApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description [**deleteAccountApiKey**](TenantAccountsApiKeysApi.md#deleteAccountApiKey) | **DELETE** v3/accounts/{account_id}/api-keys/{apikey_id} | Delete the API key. [**getAccountApiKey**](TenantAccountsApiKeysApi.md#getAccountApiKey) | **GET** v3/accounts/{account_id}/api-keys/{apikey_id} | Get API key details. [**getAllAccountApiKeys**](TenantAccountsApiKeysApi.md#getAllAccountApiKeys) | **GET** v3/accounts/{account_id}/api-keys | Get all API keys. -[**getGroupsOfAccountApikey**](TenantAccountsApiKeysApi.md#getGroupsOfAccountApikey) | **GET** v3/accounts/{account_id}/api-keys/{apikey_id}/groups | Get groups associated with the API key. +[**getGroupsOfAccountApikey**](TenantAccountsApiKeysApi.md#getGroupsOfAccountApikey) | **GET** v3/accounts/{account_id}/api-keys/{apikey_id}/groups | Get policy groups of an API key. [**removeAccountApiKeyFromGroups**](TenantAccountsApiKeysApi.md#removeAccountApiKeyFromGroups) | **DELETE** v3/accounts/{account_id}/api-keys/{apikey_id}/groups | Remove API key from groups. [**removeAccountApiKeyFromListedGroups**](TenantAccountsApiKeysApi.md#removeAccountApiKeyFromListedGroups) | **POST** v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove | Remove API key from groups. [**resetAccountApiKeySecret**](TenantAccountsApiKeysApi.md#resetAccountApiKeySecret) | **POST** v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret | Reset the secret key. @@ -23,7 +23,7 @@ Method | HTTP request | Description Add API key to a list of groups. -Add API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -82,7 +82,7 @@ Name | Type | Description | Notes Add API key to a list of groups. -Add an API key to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add an API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -141,7 +141,7 @@ Name | Type | Description | Notes Create a new API key. -Create a new API key. There is no default value for the owner ID, and it must be from the same account where the new API key is created. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"MyKey1\"}' ``` +Create a new API key. There is no default value for the owner ID, and it must be from the same account where the new API key is created. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"MyKey1\"}' ``` ### Example ```java @@ -198,7 +198,7 @@ Name | Type | Description | Notes Delete the API key. -Delete an API key. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete an API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -255,7 +255,7 @@ Name | Type | Description | Notes Get API key details. -Retrieve API key details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve details of an API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -312,7 +312,7 @@ Name | Type | Description | Notes Get all API keys. -Retrieve API keys in an array, optionally filtered by the owner. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of API keys, optionally filtered by the owner. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -334,8 +334,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsApiKeysApi apiInstance = new TenantAccountsApiKeysApi(); String accountId = "accountId_example"; // String | Account ID. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String keyEq = "keyEq_example"; // String | API key filter. Do not include the private portion of the API key (the last 32 characters). String ownerEq = "ownerEq_example"; // String | Owner name filter. @@ -354,8 +354,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| Account ID. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **keyEq** | **String**| API key filter. Do not include the private portion of the API key (the last 32 characters). | [optional] **ownerEq** | **String**| Owner name filter. | [optional] @@ -377,9 +377,9 @@ Name | Type | Description | Notes # **getGroupsOfAccountApikey** > GroupSummaryList getGroupsOfAccountApikey(accountId, apikeyId, limit, after, order, include) -Get groups associated with the API key. +Get policy groups of an API key. -Retrieve groups associated with the API key. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups associated with an API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -402,8 +402,8 @@ TenantAccountsApiKeysApi apiInstance = new TenantAccountsApiKeysApi(); String accountId = "accountId_example"; // String | Account ID. String apikeyId = "apikeyId_example"; // String | The ID of the API key. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { GroupSummaryList result = apiInstance.getGroupsOfAccountApikey(accountId, apikeyId, limit, after, order, include); @@ -421,8 +421,8 @@ Name | Type | Description | Notes **accountId** | **String**| Account ID. | **apikeyId** | **String**| The ID of the API key. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -444,7 +444,7 @@ Name | Type | Description | Notes Remove API key from groups. -Remove API key from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -503,7 +503,7 @@ Name | Type | Description | Notes Remove API key from groups. -Remove an API key from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove an API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -562,7 +562,7 @@ Name | Type | Description | Notes Reset the secret key. -Reset the secret key of the API key. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer <api_key>' ``` +Reset the secret key of the API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -621,7 +621,7 @@ Name | Type | Description | Notes Update API key details. -Update API key details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` +Update API key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsApplicationsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsApplicationsApi.md new file mode 100644 index 000000000..955ec333b --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsApplicationsApi.md @@ -0,0 +1,804 @@ +# TenantAccountsApplicationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addAccountApplicationToGroups**](TenantAccountsApplicationsApi.md#addAccountApplicationToGroups) | **POST** v3/accounts/{account_id}/applications/{application_id}/groups/add | Add application to a list of groups. +[**createAccountApplication**](TenantAccountsApplicationsApi.md#createAccountApplication) | **POST** v3/accounts/{account_id}/applications | Create a new application. +[**createAccountApplicationAccessKey**](TenantAccountsApplicationsApi.md#createAccountApplicationAccessKey) | **POST** v3/accounts/{account_id}/applications/{application_id}/access-keys | Create a new application access key. +[**deleteAccountApplication**](TenantAccountsApplicationsApi.md#deleteAccountApplication) | **DELETE** v3/accounts/{account_id}/applications/{application_id} | Delete application. +[**deleteAccountApplicationAccessKey**](TenantAccountsApplicationsApi.md#deleteAccountApplicationAccessKey) | **DELETE** v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} | Delete access key associated with the application. +[**getAccountApplication**](TenantAccountsApplicationsApi.md#getAccountApplication) | **GET** v3/accounts/{account_id}/applications/{application_id} | Get application. +[**getAccountApplicationAccessKey**](TenantAccountsApplicationsApi.md#getAccountApplicationAccessKey) | **GET** v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} | Get access key. +[**getAllAccountApplicationAccessKeys**](TenantAccountsApplicationsApi.md#getAllAccountApplicationAccessKeys) | **GET** v3/accounts/{account_id}/applications/{application_id}/access-keys | Get all access keys associated with the application. +[**getAllAccountApplications**](TenantAccountsApplicationsApi.md#getAllAccountApplications) | **GET** v3/accounts/{account_id}/applications | Get all applications. +[**getGroupsOfAccountApplication**](TenantAccountsApplicationsApi.md#getGroupsOfAccountApplication) | **GET** v3/accounts/{account_id}/applications/{application_id}/groups | Get policy groups of an application. +[**removeAccountApplicationFromGroups**](TenantAccountsApplicationsApi.md#removeAccountApplicationFromGroups) | **POST** v3/accounts/{account_id}/applications/{application_id}/groups/remove | Remove application from groups. +[**updateAccountApplication**](TenantAccountsApplicationsApi.md#updateAccountApplication) | **PUT** v3/accounts/{account_id}/applications/{application_id} | Update application details. +[**updateAccountApplicationAccessKey**](TenantAccountsApplicationsApi.md#updateAccountApplicationAccessKey) | **PUT** v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} | Update access key details. + + + +# **addAccountApplicationToGroups** +> Void addAccountApplicationToGroups(accountId, applicationId, body) + +Add application to a list of groups. + +Add application to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application to add to the group. +GroupIdList body = new GroupIdList(); // GroupIdList | A list of IDs of the groups to update. +try { + Void result = apiInstance.addAccountApplicationToGroups(accountId, applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#addAccountApplicationToGroups"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application to add to the group. | + **body** | [**GroupIdList**](GroupIdList.md)| A list of IDs of the groups to update. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createAccountApplication** +> Application createAccountApplication(accountId, body) + +Create a new application. + +Create a new application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications -d '{\"name\": \"MyApplication1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +Application body = new Application(); // Application | The details of the application to create. +try { + Application result = apiInstance.createAccountApplication(accountId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#createAccountApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **body** | [**Application**](Application.md)| The details of the application to create. | + +### Return type + +[**Application**](Application.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **createAccountApplicationAccessKey** +> AccessKey createAccountApplicationAccessKey(accountId, applicationId, body) + +Create a new application access key. + +Create a new access key for the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys -d '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +AccessKey body = new AccessKey(); // AccessKey | The details of the access key to create. +try { + AccessKey result = apiInstance.createAccountApplicationAccessKey(accountId, applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#createAccountApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **body** | [**AccessKey**](AccessKey.md)| The details of the access key to create. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteAccountApplication** +> Void deleteAccountApplication(accountId, applicationId) + +Delete application. + +Delete the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application to delete. +try { + Void result = apiInstance.deleteAccountApplication(accountId, applicationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#deleteAccountApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **deleteAccountApplicationAccessKey** +> Void deleteAccountApplicationAccessKey(accountId, applicationId, accessKeyId) + +Delete access key associated with the application. + +Delete the access key associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to delete. +try { + Void result = apiInstance.deleteAccountApplicationAccessKey(accountId, applicationId, accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#deleteAccountApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAccountApplication** +> Application getAccountApplication(accountId, applicationId) + +Get application. + +Retrieve details of an application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application to retrieve. +try { + Application result = apiInstance.getAccountApplication(accountId, applicationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#getAccountApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application to retrieve. | + +### Return type + +[**Application**](Application.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAccountApplicationAccessKey** +> AccessKey getAccountApplicationAccessKey(accountId, applicationId, accessKeyId) + +Get access key. + +Retrieve details of an access key associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to retrieve. +try { + AccessKey result = apiInstance.getAccountApplicationAccessKey(accountId, applicationId, accessKeyId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#getAccountApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to retrieve. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllAccountApplicationAccessKeys** +> AccessKeyList getAllAccountApplicationAccessKeys(accountId, applicationId, limit, after, order, include, statusEq) + +Get all access keys associated with the application. + +Retrieve an array of access keys associated with the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +try { + AccessKeyList result = apiInstance.getAllAccountApplicationAccessKeys(accountId, applicationId, limit, after, order, include, statusEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#getAllAccountApplicationAccessKeys"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + +### Return type + +[**AccessKeyList**](AccessKeyList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllAccountApplications** +> ApplicationList getAllAccountApplications(accountId, limit, after, order, include, statusEq) + +Get all applications. + +Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String statusEq = "statusEq_example"; // String | Status filter. +try { + ApplicationList result = apiInstance.getAllAccountApplications(accountId, limit, after, order, include, statusEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#getAllAccountApplications"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **statusEq** | **String**| Status filter. | [optional] + +### Return type + +[**ApplicationList**](ApplicationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getGroupsOfAccountApplication** +> GroupSummaryList getGroupsOfAccountApplication(accountId, applicationId, limit, after, order, include) + +Get policy groups of an application. + +Retrieve an array of policy groups associated with an application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + GroupSummaryList result = apiInstance.getGroupsOfAccountApplication(accountId, applicationId, limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#getGroupsOfAccountApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**GroupSummaryList**](GroupSummaryList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **removeAccountApplicationFromGroups** +> Void removeAccountApplicationFromGroups(accountId, applicationId, body) + +Remove application from groups. + +Remove application from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application to remove from the group. +GroupIdList body = new GroupIdList(); // GroupIdList | A list of IDs of the groups to update. +try { + Void result = apiInstance.removeAccountApplicationFromGroups(accountId, applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#removeAccountApplicationFromGroups"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application to remove from the group. | + **body** | [**GroupIdList**](GroupIdList.md)| A list of IDs of the groups to update. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **updateAccountApplication** +> ApiKeyInfoResp updateAccountApplication(accountId, applicationId, body) + +Update application details. + +Update application details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApplication25\"}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application to update. +Application body = new Application(); // Application | New applicationattributes to store. +try { + ApiKeyInfoResp result = apiInstance.updateAccountApplication(accountId, applicationId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#updateAccountApplication"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application to update. | + **body** | [**Application**](Application.md)| New applicationattributes to store. | + +### Return type + +[**ApiKeyInfoResp**](ApiKeyInfoResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateAccountApplicationAccessKey** +> AccessKey updateAccountApplicationAccessKey(accountId, applicationId, accessKeyId, body) + +Update access key details. + +Update access key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestAccessKey\"}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsApplicationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsApplicationsApi apiInstance = new TenantAccountsApplicationsApi(); +String accountId = "accountId_example"; // String | The ID of the account to retrieve. +String applicationId = "applicationId_example"; // String | The ID of the application. +String accessKeyId = "accessKeyId_example"; // String | The ID of the access key to update. +AccessKey body = new AccessKey(); // AccessKey | New access key attributes to store. +try { + AccessKey result = apiInstance.updateAccountApplicationAccessKey(accountId, applicationId, accessKeyId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsApplicationsApi#updateAccountApplicationAccessKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account to retrieve. | + **applicationId** | **String**| The ID of the application. | + **accessKeyId** | **String**| The ID of the access key to update. | + **body** | [**AccessKey**](AccessKey.md)| New access key attributes to store. | + +### Return type + +[**AccessKey**](AccessKey.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsEmailNotificationLogsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsEmailNotificationLogsApi.md index 21515ede6..8950cfdaf 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsEmailNotificationLogsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsEmailNotificationLogsApi.md @@ -4,16 +4,17 @@ All URIs are relative to *https://api.us-east-1.mbedcloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getAccountNofificationEntries**](TenantAccountsEmailNotificationLogsApi.md#getAccountNofificationEntries) | **GET** v3/accounts/{account_id}/notifications | Get the notification events of an account. +[**getAccountNofificationEntries**](TenantAccountsEmailNotificationLogsApi.md#getAccountNofificationEntries) | **GET** v3/accounts/{account_id}/notifications | Get email notifications. +[**getAccountNofificationEntry**](TenantAccountsEmailNotificationLogsApi.md#getAccountNofificationEntry) | **GET** v3/accounts/{account_id}/notifications/{notification_id} | Get an email notification. # **getAccountNofificationEntries** > NotificationEntryList getAccountNofificationEntries(accountId, limit, after, order) -Get the notification events of an account. +Get email notifications. -Retrieve notifications. +Retrieve an array of email notification logs. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -35,8 +36,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsEmailNotificationLogsApi apiInstance = new TenantAccountsEmailNotificationLogsApi(); String accountId = "accountId_example"; // String | Account ID. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. try { NotificationEntryList result = apiInstance.getAccountNofificationEntries(accountId, limit, after, order); System.out.println(result); @@ -52,8 +53,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| Account ID. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] ### Return type @@ -68,3 +69,60 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json + +# **getAccountNofificationEntry** +> NotificationEntry getAccountNofificationEntry(accountId, notificationId) + +Get an email notification. + +Retrieve an email notifications log entry. <b>Note:</b> This endpoint is restricted to administrators. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsEmailNotificationLogsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsEmailNotificationLogsApi apiInstance = new TenantAccountsEmailNotificationLogsApi(); +String accountId = "accountId_example"; // String | The ID of the account for which this notification should be retrieved. +String notificationId = "notificationId_example"; // String | The ID of the notification entry to be retrieved. +try { + NotificationEntry result = apiInstance.getAccountNofificationEntry(accountId, notificationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsEmailNotificationLogsApi#getAccountNofificationEntry"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account for which this notification should be retrieved. | + **notificationId** | **String**| The ID of the notification entry to be retrieved. | + +### Return type + +[**NotificationEntry**](NotificationEntry.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsEntitlementLimitationsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsEntitlementLimitationsApi.md new file mode 100644 index 000000000..73a96093a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsEntitlementLimitationsApi.md @@ -0,0 +1,124 @@ +# TenantAccountsEntitlementLimitationsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**aggregatorGetAccountLimitation**](TenantAccountsEntitlementLimitationsApi.md#aggregatorGetAccountLimitation) | **GET** v3/accounts/{account_id}/limitations/{limitation_id} | Get an entitlement limitation. +[**aggregatorGetAccountLimitations**](TenantAccountsEntitlementLimitationsApi.md#aggregatorGetAccountLimitations) | **GET** v3/accounts/{account_id}/limitations | Get entitlement limitations. + + + +# **aggregatorGetAccountLimitation** +> AccountLimitation aggregatorGetAccountLimitation(accountId, limitationId) + +Get an entitlement limitation. + +Retrieve an entitlement limitation. <b>Note:</b> This endpoint is restricted to administrators. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsEntitlementLimitationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsEntitlementLimitationsApi apiInstance = new TenantAccountsEntitlementLimitationsApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String limitationId = "limitationId_example"; // String | The ID of the limitation to be fetched. +try { + AccountLimitation result = apiInstance.aggregatorGetAccountLimitation(accountId, limitationId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsEntitlementLimitationsApi#aggregatorGetAccountLimitation"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **limitationId** | **String**| The ID of the limitation to be fetched. | + +### Return type + +[**AccountLimitation**](AccountLimitation.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **aggregatorGetAccountLimitations** +> AccountLimitationList aggregatorGetAccountLimitations(accountId, inheritedEq) + +Get entitlement limitations. + +Retrieve an array of entitlement limitations. <b>Note:</b> This endpoint is restricted to administrators. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsEntitlementLimitationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsEntitlementLimitationsApi apiInstance = new TenantAccountsEntitlementLimitationsApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String inheritedEq = "inheritedEq_example"; // String | Filter for finding account limitations by inheritance. True returns also inherited limitations. False returns only non-inherited ones. +try { + AccountLimitationList result = apiInstance.aggregatorGetAccountLimitations(accountId, inheritedEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsEntitlementLimitationsApi#aggregatorGetAccountLimitations"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **inheritedEq** | **String**| Filter for finding account limitations by inheritance. True returns also inherited limitations. False returns only non-inherited ones. | [optional] + +### Return type + +[**AccountLimitationList**](AccountLimitationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsIdentityProvidersApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsIdentityProvidersApi.md index e0a680fcd..b6cfb67ea 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsIdentityProvidersApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsIdentityProvidersApi.md @@ -8,9 +8,9 @@ Method | HTTP request | Description [**deleteAccountIdentityProvider**](TenantAccountsIdentityProvidersApi.md#deleteAccountIdentityProvider) | **DELETE** v3/accounts/{account_id}/identity-providers/{identity_provider_id} | Delete an identity provider by ID. [**deleteAccountSpCertificate**](TenantAccountsIdentityProvidersApi.md#deleteAccountSpCertificate) | **POST** v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate | Delete the service provider certificate. [**generateAccountSpCertificate**](TenantAccountsIdentityProvidersApi.md#generateAccountSpCertificate) | **POST** v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate | Generate a new service provider certificate. -[**getAccountIdentityProvider**](TenantAccountsIdentityProvidersApi.md#getAccountIdentityProvider) | **GET** v3/accounts/{account_id}/identity-providers/{identity_provider_id} | Retrieve identity provider by ID. +[**getAccountIdentityProvider**](TenantAccountsIdentityProvidersApi.md#getAccountIdentityProvider) | **GET** v3/accounts/{account_id}/identity-providers/{identity_provider_id} | Get an identity provider. [**getAllAccountIdentityProviders**](TenantAccountsIdentityProvidersApi.md#getAllAccountIdentityProviders) | **GET** v3/accounts/{account_id}/identity-providers | Get all identity providers. -[**refreshAccountJwks**](TenantAccountsIdentityProvidersApi.md#refreshAccountJwks) | **POST** v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks | Refreshes the OIDC signing keys. +[**refreshAccountJwks**](TenantAccountsIdentityProvidersApi.md#refreshAccountJwks) | **POST** v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks | Refresh the OIDC signing keys. [**updateAccountIdentityProvider**](TenantAccountsIdentityProvidersApi.md#updateAccountIdentityProvider) | **PUT** v3/accounts/{account_id}/identity-providers/{identity_provider_id} | Update an existing identity provider. @@ -20,7 +20,7 @@ Method | HTTP request | Description Create a new identity provider. -Create a new identity provider. +Create a new identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -79,7 +79,7 @@ Name | Type | Description | Notes Delete an identity provider by ID. -Delete an identity provider by ID. +Delete an identity provider by ID. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -136,7 +136,7 @@ Name | Type | Description | Notes Delete the service provider certificate. -Delete a service provider certificate. +Delete a service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -193,7 +193,7 @@ Name | Type | Description | Notes Generate a new service provider certificate. -Generate a new service provider certificate. +Generate a new service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -250,9 +250,9 @@ Name | Type | Description | Notes # **getAccountIdentityProvider** > IdentityProviderInfo getAccountIdentityProvider(accountId, identityProviderId) -Retrieve identity provider by ID. +Get an identity provider. -Manage identity providers of a tenant account. +Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -309,7 +309,7 @@ Name | Type | Description | Notes Get all identity providers. -Retrieve identity providers in an array. +Retrieve an array of identity providers. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -331,8 +331,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsIdentityProvidersApi apiInstance = new TenantAccountsIdentityProvidersApi(); String accountId = "accountId_example"; // String | The ID of the account. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { IdentityProviderList result = apiInstance.getAllAccountIdentityProviders(accountId, limit, after, order, include); @@ -349,8 +349,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -370,9 +370,9 @@ Name | Type | Description | Notes # **refreshAccountJwks** > IdentityProviderInfo refreshAccountJwks(accountId, identityProviderId) -Refreshes the OIDC signing keys. +Refresh the OIDC signing keys. -Refreshes an OIDC IdP's signing keys. +Refresh an OIDC IdP's signing keys. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -429,7 +429,7 @@ Name | Type | Description | Notes Update an existing identity provider. -Update an existing identity provider. +Update an existing identity provider. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsPolicyGroupsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsPolicyGroupsApi.md index 8345536d4..69778fe1c 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsPolicyGroupsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsPolicyGroupsApi.md @@ -6,17 +6,20 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**addApiKeysToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addApiKeysToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys | Add API keys to Account group. [**addListedApiKeysToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addListedApiKeysToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add | Add API keys to account group. +[**addListedApplicationsToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addListedApplicationsToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/applications/add | Add applications to account group. [**addListedUsersToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addListedUsersToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/users/add | Add users to account group. [**addSubjectsToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addSubjectsToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id} | Add members to a group. [**addUsersToAccountGroup**](TenantAccountsPolicyGroupsApi.md#addUsersToAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/users | Add users to account group. [**createAccountGroup**](TenantAccountsPolicyGroupsApi.md#createAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups | Create a new group. [**deleteAccountGroup**](TenantAccountsPolicyGroupsApi.md#deleteAccountGroup) | **DELETE** v3/accounts/{account_id}/policy-groups/{group_id} | Delete a group. -[**getAccountGroupSummary**](TenantAccountsPolicyGroupsApi.md#getAccountGroupSummary) | **GET** v3/accounts/{account_id}/policy-groups/{group_id} | Get group information. -[**getAllAccountGroups**](TenantAccountsPolicyGroupsApi.md#getAllAccountGroups) | **GET** v3/accounts/{account_id}/policy-groups | Get all group information. -[**getApiKeysOfAccountGroup**](TenantAccountsPolicyGroupsApi.md#getApiKeysOfAccountGroup) | **GET** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys | Get API keys of a group. -[**getUsersOfAccountGroup**](TenantAccountsPolicyGroupsApi.md#getUsersOfAccountGroup) | **GET** v3/accounts/{account_id}/policy-groups/{group_id}/users | Get users of a group. +[**getAccountGroupSummary**](TenantAccountsPolicyGroupsApi.md#getAccountGroupSummary) | **GET** v3/accounts/{account_id}/policy-groups/{group_id} | Get policy group. +[**getAllAccountGroups**](TenantAccountsPolicyGroupsApi.md#getAllAccountGroups) | **GET** v3/accounts/{account_id}/policy-groups | Get policy groups. +[**getApiKeysOfAccountGroup**](TenantAccountsPolicyGroupsApi.md#getApiKeysOfAccountGroup) | **GET** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys | Get API keys in a group. +[**getApplicationsOfAccountGroup**](TenantAccountsPolicyGroupsApi.md#getApplicationsOfAccountGroup) | **GET** v3/accounts/{account_id}/policy-groups/{group_id}/applications | Get applications in a group. +[**getUsersOfAccountGroup**](TenantAccountsPolicyGroupsApi.md#getUsersOfAccountGroup) | **GET** v3/accounts/{account_id}/policy-groups/{group_id}/users | Get users in a policy group. [**removeApiKeysFromAccountGroup**](TenantAccountsPolicyGroupsApi.md#removeApiKeysFromAccountGroup) | **DELETE** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys | Remove API keys from a group. [**removeListedApiKeysFromAccountGroup**](TenantAccountsPolicyGroupsApi.md#removeListedApiKeysFromAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove | Remove API keys from a group. +[**removeListedApplicationsFromAccountGroup**](TenantAccountsPolicyGroupsApi.md#removeListedApplicationsFromAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove | Remove applications from a group. [**removeListedUsersFromAccountGroup**](TenantAccountsPolicyGroupsApi.md#removeListedUsersFromAccountGroup) | **POST** v3/accounts/{account_id}/policy-groups/{group_id}/users/remove | Remove users from a group. [**removeUsersFromAccountGroup**](TenantAccountsPolicyGroupsApi.md#removeUsersFromAccountGroup) | **DELETE** v3/accounts/{account_id}/policy-groups/{group_id}/users | Remove users from a group. [**updateAccountGroupName**](TenantAccountsPolicyGroupsApi.md#updateAccountGroupName) | **PUT** v3/accounts/{account_id}/policy-groups/{group_id} | Update the group name. @@ -24,11 +27,11 @@ Method | HTTP request | Description # **addApiKeysToAccountGroup** -> ApiKeyInfoRespList addApiKeysToAccountGroup(accountId, groupId, body) +> GroupSummary addApiKeysToAccountGroup(accountId, groupId, body) Add API keys to Account group. -Add API keys to account groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Add API keys to account groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -52,7 +55,7 @@ String accountId = "accountId_example"; // String | The ID of the account. String groupId = "groupId_example"; // String | The ID of the group to retrieve API keys for. SubjectList body = new SubjectList(); // SubjectList | A list of API keys to add to the group. try { - ApiKeyInfoRespList result = apiInstance.addApiKeysToAccountGroup(accountId, groupId, body); + GroupSummary result = apiInstance.addApiKeysToAccountGroup(accountId, groupId, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#addApiKeysToAccountGroup"); @@ -70,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[**ApiKeyInfoRespList**](ApiKeyInfoRespList.md) +[**GroupSummary**](GroupSummary.md) ### Authorization @@ -83,11 +86,11 @@ Name | Type | Description | Notes # **addListedApiKeysToAccountGroup** -> ApiKeyInfoRespList addListedApiKeysToAccountGroup(accountId, groupId, body) +> GroupSummary addListedApiKeysToAccountGroup(accountId, groupId, body) Add API keys to account group. -Add API keys to account groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add \\ -H 'Authorization: Bearer <api_key>' ``` +Add API keys to account groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -108,10 +111,10 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | The ID of the account. -String groupId = "groupId_example"; // String | The ID of the group to retrieve API keys for. +String groupId = "groupId_example"; // String | The ID of the group to remove API keys from. SubjectList body = new SubjectList(); // SubjectList | A list of API keys to add to the group. try { - ApiKeyInfoRespList result = apiInstance.addListedApiKeysToAccountGroup(accountId, groupId, body); + GroupSummary result = apiInstance.addListedApiKeysToAccountGroup(accountId, groupId, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#addListedApiKeysToAccountGroup"); @@ -124,12 +127,71 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **groupId** | **String**| The ID of the group to retrieve API keys for. | + **groupId** | **String**| The ID of the group to remove API keys from. | **body** | [**SubjectList**](SubjectList.md)| A list of API keys to add to the group. | ### Return type -[**ApiKeyInfoRespList**](ApiKeyInfoRespList.md) +[**GroupSummary**](GroupSummary.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **addListedApplicationsToAccountGroup** +> GroupSummary addListedApplicationsToAccountGroup(accountId, groupId, body) + +Add applications to account group. + +Add applications to account groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"applications\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String groupId = "groupId_example"; // String | The ID of the group to add applications to. +SubjectList body = new SubjectList(); // SubjectList | A list of applications to add to the group. +try { + GroupSummary result = apiInstance.addListedApplicationsToAccountGroup(accountId, groupId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#addListedApplicationsToAccountGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **groupId** | **String**| The ID of the group to add applications to. | + **body** | [**SubjectList**](SubjectList.md)| A list of applications to add to the group. | + +### Return type + +[**GroupSummary**](GroupSummary.md) ### Authorization @@ -142,11 +204,11 @@ Name | Type | Description | Notes # **addListedUsersToAccountGroup** -> ApiKeyInfoRespList addListedUsersToAccountGroup(accountId, groupId, body) +> GroupSummary addListedUsersToAccountGroup(accountId, groupId, body) Add users to account group. -Add users to account group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer <api_key>' ``` +Add users to account group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -167,10 +229,10 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | The ID of the account. -String groupId = "groupId_example"; // String | The ID of the group to retrieve API keys for. -SubjectList body = new SubjectList(); // SubjectList | A list of API keys to add to the group. +String groupId = "groupId_example"; // String | The ID of the group to retrieve users for. +SubjectList body = new SubjectList(); // SubjectList | A list of users to add to the group. try { - ApiKeyInfoRespList result = apiInstance.addListedUsersToAccountGroup(accountId, groupId, body); + GroupSummary result = apiInstance.addListedUsersToAccountGroup(accountId, groupId, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#addListedUsersToAccountGroup"); @@ -183,12 +245,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **groupId** | **String**| The ID of the group to retrieve API keys for. | - **body** | [**SubjectList**](SubjectList.md)| A list of API keys to add to the group. | + **groupId** | **String**| The ID of the group to retrieve users for. | + **body** | [**SubjectList**](SubjectList.md)| A list of users to add to the group. | ### Return type -[**ApiKeyInfoRespList**](ApiKeyInfoRespList.md) +[**GroupSummary**](GroupSummary.md) ### Authorization @@ -205,7 +267,7 @@ Name | Type | Description | Notes Add members to a group. -Add users and API keys to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Add users and API keys to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -260,11 +322,11 @@ Name | Type | Description | Notes # **addUsersToAccountGroup** -> ApiKeyInfoRespList addUsersToAccountGroup(accountId, groupId, body) +> GroupSummary addUsersToAccountGroup(accountId, groupId, body) Add users to account group. -Add users to account group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' ``` +Add users to account group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -285,10 +347,10 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | The ID of the account. -String groupId = "groupId_example"; // String | The ID of the group to retrieve API keys for. -SubjectList body = new SubjectList(); // SubjectList | A list of API keys to add to the group. +String groupId = "groupId_example"; // String | The ID of the group to add users to. +SubjectList body = new SubjectList(); // SubjectList | A list of user IDs to add to the group. try { - ApiKeyInfoRespList result = apiInstance.addUsersToAccountGroup(accountId, groupId, body); + GroupSummary result = apiInstance.addUsersToAccountGroup(accountId, groupId, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#addUsersToAccountGroup"); @@ -301,12 +363,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **groupId** | **String**| The ID of the group to retrieve API keys for. | - **body** | [**SubjectList**](SubjectList.md)| A list of API keys to add to the group. | + **groupId** | **String**| The ID of the group to add users to. | + **body** | [**SubjectList**](SubjectList.md)| A list of user IDs to add to the group. | ### Return type -[**ApiKeyInfoRespList**](ApiKeyInfoRespList.md) +[**GroupSummary**](GroupSummary.md) ### Authorization @@ -323,7 +385,7 @@ Name | Type | Description | Notes Create a new group. -Create a new group. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"MyGroup1\"}' ``` +Create a new group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"MyGroup1\"}' ``` ### Example ```java @@ -380,7 +442,7 @@ Name | Type | Description | Notes Delete a group. -Delete a group. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete a group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -435,9 +497,9 @@ Name | Type | Description | Notes # **getAccountGroupSummary** > GroupSummary getAccountGroupSummary(accountId, groupId) -Get group information. +Get policy group. -Retrieve general information about the group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve policy group details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -492,9 +554,9 @@ Name | Type | Description | Notes # **getAllAccountGroups** > GroupSummaryList getAllAccountGroups(accountId, limit, after, order, include, nameEq) -Get all group information. +Get policy groups. -Retrieve all group information. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -516,8 +578,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | Account ID. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String nameEq = "nameEq_example"; // String | Filter for group name. try { @@ -535,8 +597,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| Account ID. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **nameEq** | **String**| Filter for group name. | [optional] @@ -557,9 +619,9 @@ Name | Type | Description | Notes # **getApiKeysOfAccountGroup** > ApiKeyInfoRespList getApiKeysOfAccountGroup(accountId, groupId, limit, after, order, include) -Get API keys of a group. +Get API keys in a group. -List the API keys of the group with details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of API keys associated with a policy group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -582,8 +644,8 @@ TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | Account ID. String groupId = "groupId_example"; // String | The ID of the group to retrieve API keys for. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { ApiKeyInfoRespList result = apiInstance.getApiKeysOfAccountGroup(accountId, groupId, limit, after, order, include); @@ -601,8 +663,8 @@ Name | Type | Description | Notes **accountId** | **String**| Account ID. | **groupId** | **String**| The ID of the group to retrieve API keys for. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -613,6 +675,71 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getApplicationsOfAccountGroup** +> ApplicationList getApplicationsOfAccountGroup(accountId, groupId, limit, after, order, include) + +Get applications in a group. + +Retrieve an array of applications associated with a policy group. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String groupId = "groupId_example"; // String | The ID of the group to retrieve applications for. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + ApplicationList result = apiInstance.getApplicationsOfAccountGroup(accountId, groupId, limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#getApplicationsOfAccountGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **groupId** | **String**| The ID of the group to retrieve applications for. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**ApplicationList**](ApplicationList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: Not defined @@ -622,9 +749,9 @@ Name | Type | Description | Notes # **getUsersOfAccountGroup** > UserInfoRespList getUsersOfAccountGroup(accountId, groupId, limit, after, order, include, statusEq, statusIn, statusNin) -Get users of a group. +Get users in a policy group. -List a group's users, with details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of users associated with a policy group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -647,8 +774,8 @@ TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); String accountId = "accountId_example"; // String | Account ID. String groupId = "groupId_example"; // String | The ID of the group to retrieve users for. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String statusEq = "statusEq_example"; // String | An optional filter to retrieve users by status. String statusIn = "statusIn_example"; // String | An optional filter to retrieve users with a specified set of statuses. @@ -669,8 +796,8 @@ Name | Type | Description | Notes **accountId** | **String**| Account ID. | **groupId** | **String**| The ID of the group to retrieve users for. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **statusEq** | **String**| An optional filter to retrieve users by status. | [optional] **statusIn** | **String**| An optional filter to retrieve users with a specified set of statuses. | [optional] @@ -695,7 +822,7 @@ Name | Type | Description | Notes Remove API keys from a group. -Remove API keys from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Remove API keys from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -754,7 +881,7 @@ Name | Type | Description | Notes Remove API keys from a group. -Remove API keys from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Remove API keys from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"apikeys\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -802,6 +929,65 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **removeListedApplicationsFromAccountGroup** +> GroupSummary removeListedApplicationsFromAccountGroup(accountId, groupId, body) + +Remove applications from a group. + +Remove applications from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"applications\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsPolicyGroupsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsPolicyGroupsApi apiInstance = new TenantAccountsPolicyGroupsApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String groupId = "groupId_example"; // String | The ID of the group to remove applications from. +SubjectList body = new SubjectList(); // SubjectList | A list of applications to remove from the group. +try { + GroupSummary result = apiInstance.removeListedApplicationsFromAccountGroup(accountId, groupId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsPolicyGroupsApi#removeListedApplicationsFromAccountGroup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **groupId** | **String**| The ID of the group to remove applications from. | + **body** | [**SubjectList**](SubjectList.md)| A list of applications to remove from the group. | + +### Return type + +[**GroupSummary**](GroupSummary.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: application/json @@ -813,7 +999,7 @@ Name | Type | Description | Notes Remove users from a group. -Remove users from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Remove users from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -872,7 +1058,7 @@ Name | Type | Description | Notes Remove users from a group. -Remove users from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` +Remove users from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' ``` ### Example ```java @@ -931,7 +1117,7 @@ Name | Type | Description | Notes Update the group name. -Update a group name. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestGroup2\"}' ``` +Update a group name. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestGroup2\"}' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsUserInvitationsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsUserInvitationsApi.md index edcd5423c..03eb976cb 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsUserInvitationsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsUserInvitationsApi.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**createAccountInvitation**](TenantAccountsUserInvitationsApi.md#createAccountInvitation) | **POST** v3/accounts/{account_id}/user-invitations | Create a user invitation. [**deleteAccountInvitation**](TenantAccountsUserInvitationsApi.md#deleteAccountInvitation) | **DELETE** v3/accounts/{account_id}/user-invitations/{invitation_id} | Delete a user invitation. [**getAccountInvitation**](TenantAccountsUserInvitationsApi.md#getAccountInvitation) | **GET** v3/accounts/{account_id}/user-invitations/{invitation_id} | Details of a user invitation. -[**getAllAccountInvitations**](TenantAccountsUserInvitationsApi.md#getAllAccountInvitations) | **GET** v3/accounts/{account_id}/user-invitations | Get the details of all user invitations. +[**getAllAccountInvitations**](TenantAccountsUserInvitationsApi.md#getAllAccountInvitations) | **GET** v3/accounts/{account_id}/user-invitations | Get user invitations. @@ -16,7 +16,7 @@ Method | HTTP request | Description Create a user invitation. -Invite a new or existing user. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` +Invite a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` ### Example ```java @@ -73,7 +73,7 @@ Name | Type | Description | Notes Delete a user invitation. -Delete an active user invitation sent to a new or existing user. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete an active user invitation sent to a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -130,7 +130,7 @@ Name | Type | Description | Notes Details of a user invitation. -Retrieve details of an active user invitation sent for a new or existing user. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve details of an active user invitation sent for a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -185,9 +185,9 @@ Name | Type | Description | Notes # **getAllAccountInvitations** > UserInvitationRespList getAllAccountInvitations(accountId, limit, after, order, loginProfilesEq) -Get the details of all user invitations. +Get user invitations. -Retrieve details of all active user invitations sent for new or existing users. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of active user invitations. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -209,8 +209,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsUserInvitationsApi apiInstance = new TenantAccountsUserInvitationsApi(); String accountId = "accountId_example"; // String | Account ID. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String loginProfilesEq = "loginProfilesEq_example"; // String | Filter to retrieve user invitations by a specified login profile. try { UserInvitationRespList result = apiInstance.getAllAccountInvitations(accountId, limit, after, order, loginProfilesEq); @@ -227,8 +227,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| Account ID. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **loginProfilesEq** | **String**| Filter to retrieve user invitations by a specified login profile. | [optional] ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/TenantAccountsUsersApi.md b/backends/pelioncloud_devicemanagement/docs/TenantAccountsUsersApi.md index d6cf08ecb..42e99244b 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantAccountsUsersApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantAccountsUsersApi.md @@ -9,8 +9,9 @@ Method | HTTP request | Description [**createAccountUser**](TenantAccountsUsersApi.md#createAccountUser) | **POST** v3/accounts/{account_id}/users | Create a new user. [**deleteAccountUser**](TenantAccountsUsersApi.md#deleteAccountUser) | **DELETE** v3/accounts/{account_id}/users/{user_id} | Delete a user. [**getAccountUser**](TenantAccountsUsersApi.md#getAccountUser) | **GET** v3/accounts/{account_id}/users/{user_id} | Details of the user. -[**getAllAccountUsers**](TenantAccountsUsersApi.md#getAllAccountUsers) | **GET** v3/accounts/{account_id}/users | Get the details of all users. -[**getGroupsOfAccountUser**](TenantAccountsUsersApi.md#getGroupsOfAccountUser) | **GET** v3/accounts/{account_id}/users/{user_id}/groups | Get user's groups. +[**getAllAccountUsers**](TenantAccountsUsersApi.md#getAllAccountUsers) | **GET** v3/accounts/{account_id}/users | Get users. +[**getGroupsOfAccountUser**](TenantAccountsUsersApi.md#getGroupsOfAccountUser) | **GET** v3/accounts/{account_id}/users/{user_id}/groups | Get policy groups for a user. +[**removeAccountUserFromAccount**](TenantAccountsUsersApi.md#removeAccountUserFromAccount) | **POST** v3/accounts/{account_id}/users/{user_id}/remove | Remove user from the account. [**removeAccountUserFromGroups**](TenantAccountsUsersApi.md#removeAccountUserFromGroups) | **DELETE** v3/accounts/{account_id}/users/{user_id}/groups | Remove user from groups. [**removeAccountUserFromListedGroups**](TenantAccountsUsersApi.md#removeAccountUserFromListedGroups) | **POST** v3/accounts/{account_id}/users/{user_id}/groups/remove | Remove user from groups. [**updateAccountUser**](TenantAccountsUsersApi.md#updateAccountUser) | **PUT** v3/accounts/{account_id}/users/{user_id} | Update user details. @@ -23,7 +24,7 @@ Method | HTTP request | Description Add user to a list of groups. -Add user to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -82,7 +83,7 @@ Name | Type | Description | Notes Add user to a list of groups. -Add a user to groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Add a user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -141,7 +142,7 @@ Name | Type | Description | Notes Create a new user. -Create or invite a new user to the account. Only email address is used; other attributes are set in the second step. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` +Create or invite a new user to the account. Only email address is used; other attributes are set in the second step. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} ``` ### Example ```java @@ -200,7 +201,7 @@ Name | Type | Description | Notes Delete a user. -Delete a user. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Delete a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -257,7 +258,7 @@ Name | Type | Description | Notes Details of the user. -Retrieve user details. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -312,9 +313,9 @@ Name | Type | Description | Notes # **getAllAccountUsers** > UserInfoRespList getAllAccountUsers(accountId, limit, after, order, include, emailEq, statusEq, statusIn, statusNin, loginProfilesEq) -Get the details of all users. +Get users. -Retrieve details of all users. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -336,8 +337,8 @@ Bearer.setApiKey("YOUR API KEY"); TenantAccountsUsersApi apiInstance = new TenantAccountsUsersApi(); String accountId = "accountId_example"; // String | Account ID. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. String emailEq = "emailEq_example"; // String | Filter for email address. String statusEq = "statusEq_example"; // String | Filter for status. @@ -359,8 +360,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| Account ID. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] **emailEq** | **String**| Filter for email address. | [optional] **statusEq** | **String**| Filter for status. | [optional] @@ -385,9 +386,9 @@ Name | Type | Description | Notes # **getGroupsOfAccountUser** > GroupSummaryList getGroupsOfAccountUser(accountId, userId, limit, after, order, include) -Get user's groups. +Get policy groups for a user. -Retrieve user's groups. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve an array of policy groups associated with a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -410,8 +411,8 @@ TenantAccountsUsersApi apiInstance = new TenantAccountsUsersApi(); String accountId = "accountId_example"; // String | Account ID. String userId = "userId_example"; // String | The ID of the user. Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. -String after = "after_example"; // String | The entity ID to fetch after the given one. -String order = "ASC"; // String | Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. try { GroupSummaryList result = apiInstance.getGroupsOfAccountUser(accountId, userId, limit, after, order, include); @@ -429,8 +430,8 @@ Name | Type | Description | Notes **accountId** | **String**| Account ID. | **userId** | **String**| The ID of the user. | **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] - **after** | **String**| The entity ID to fetch after the given one. | [optional] - **order** | **String**| Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] ### Return type @@ -441,6 +442,63 @@ Name | Type | Description | Notes [Bearer](../README.md#Bearer) +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **removeAccountUserFromAccount** +> Void removeAccountUserFromAccount(accountId, userId) + +Remove user from the account. + +Remove user from the account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/remove \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsUsersApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantAccountsUsersApi apiInstance = new TenantAccountsUsersApi(); +String accountId = "accountId_example"; // String | The ID of the account. +String userId = "userId_example"; // String | The ID of the user to remove from the account. +try { + Void result = apiInstance.removeAccountUserFromAccount(accountId, userId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantAccountsUsersApi#removeAccountUserFromAccount"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| The ID of the account. | + **userId** | **String**| The ID of the user to remove from the account. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + ### HTTP request headers - **Content-Type**: Not defined @@ -452,7 +510,7 @@ Name | Type | Description | Notes Remove user from groups. -Remove user from groups. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -511,7 +569,7 @@ Name | Type | Description | Notes Remove user from groups. -Remove a user from groups. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` +Remove a user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' ``` ### Example ```java @@ -570,7 +628,7 @@ Name | Type | Description | Notes Update user details. -Update user details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' ``` +Update user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' ``` ### Example ```java @@ -629,7 +687,7 @@ Name | Type | Description | Notes Validate the user email. -Validate user email. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\ -H 'Authorization: Bearer <api_key>' ``` +Validate user email. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java diff --git a/backends/pelioncloud_devicemanagement/docs/TenantSecurityAndIdentityCertificatesApi.md b/backends/pelioncloud_devicemanagement/docs/TenantSecurityAndIdentityCertificatesApi.md new file mode 100644 index 000000000..def63f0f1 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TenantSecurityAndIdentityCertificatesApi.md @@ -0,0 +1,330 @@ +# TenantSecurityAndIdentityCertificatesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addAccountCertificate**](TenantSecurityAndIdentityCertificatesApi.md#addAccountCertificate) | **POST** v3/accounts/{account_id}/trusted-certificates | Upload new trusted certificate. +[**deleteAccountCertificate**](TenantSecurityAndIdentityCertificatesApi.md#deleteAccountCertificate) | **DELETE** v3/accounts/{account_id}/trusted-certificates/{cert_id} | Delete a trusted certificate by ID. +[**getAccountCertificate**](TenantSecurityAndIdentityCertificatesApi.md#getAccountCertificate) | **GET** v3/accounts/{account_id}/trusted-certificates/{cert_id} | Get a trusted certificate. +[**getAllAccountCertificates**](TenantSecurityAndIdentityCertificatesApi.md#getAllAccountCertificates) | **GET** v3/accounts/{account_id}/trusted-certificates | Get trusted certificates. +[**updateAccountCertificate**](TenantSecurityAndIdentityCertificatesApi.md#updateAccountCertificate) | **PUT** v3/accounts/{account_id}/trusted-certificates/{cert_id} | Update trusted certificate. + + + +# **addAccountCertificate** +> TrustedCertificateResp addAccountCertificate(accountId, body) + +Upload new trusted certificate. + +Upload new trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantSecurityAndIdentityCertificatesApi apiInstance = new TenantSecurityAndIdentityCertificatesApi(); +String accountId = "accountId_example"; // String | Account ID. +TrustedCertificateReq body = new TrustedCertificateReq(); // TrustedCertificateReq | A trusted certificate object with attributes. Signature is optional. +try { + TrustedCertificateResp result = apiInstance.addAccountCertificate(accountId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantSecurityAndIdentityCertificatesApi#addAccountCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID. | + **body** | [**TrustedCertificateReq**](TrustedCertificateReq.md)| A trusted certificate object with attributes. Signature is optional. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteAccountCertificate** +> Void deleteAccountCertificate(accountId, certId) + +Delete a trusted certificate by ID. + +Delete a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantSecurityAndIdentityCertificatesApi apiInstance = new TenantSecurityAndIdentityCertificatesApi(); +String accountId = "accountId_example"; // String | Account ID. +String certId = "certId_example"; // String | The ID of the trusted certificate to delete. +try { + Void result = apiInstance.deleteAccountCertificate(accountId, certId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantSecurityAndIdentityCertificatesApi#deleteAccountCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID. | + **certId** | **String**| The ID of the trusted certificate to delete. | + +### Return type + +[**Void**](.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAccountCertificate** +> TrustedCertificateResp getAccountCertificate(accountId, certId) + +Get a trusted certificate. + +Retrieve a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantSecurityAndIdentityCertificatesApi apiInstance = new TenantSecurityAndIdentityCertificatesApi(); +String accountId = "accountId_example"; // String | Account ID. +String certId = "certId_example"; // String | The ID of the trusted certificate to retrieve. +try { + TrustedCertificateResp result = apiInstance.getAccountCertificate(accountId, certId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantSecurityAndIdentityCertificatesApi#getAccountCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID. | + **certId** | **String**| The ID of the trusted certificate to retrieve. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getAllAccountCertificates** +> TrustedCertificateRespList getAllAccountCertificates(accountId, limit, after, order, include, nameEq, serviceEq, expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, statusEq, issuerLike, subjectLike, certificateFingerprintEq, validEq) + +Get trusted certificates. + +Retrieve an array of trusted certificates. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantSecurityAndIdentityCertificatesApi apiInstance = new TenantSecurityAndIdentityCertificatesApi(); +String accountId = "accountId_example"; // String | Account ID. +Integer limit = 50; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The entity ID to retrieve after the given one. +String order = "ASC"; // String | Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +String nameEq = "nameEq_example"; // String | Filter for certificate name. +String serviceEq = "serviceEq_example"; // String | Filter for service. +Integer expireEq = 56; // Integer | Filter for expire. +Integer deviceExecutionModeEq = 56; // Integer | Filter for developer certificates. +Integer deviceExecutionModeNeq = 56; // Integer | Filter for not developer certificates. +String ownerEq = "ownerEq_example"; // String | Owner name filter. +Boolean enrollmentModeEq = true; // Boolean | Enrollment mode filter. +String statusEq = "statusEq_example"; // String | Filter for certificate status. +String issuerLike = "issuerLike_example"; // String | Filter for issuer. Finds all matches where the filter value is a case-insensitive substring of the result. Example: issuer__like=cn=iss matches CN=issuer. +String subjectLike = "subjectLike_example"; // String | Filter for subject. Finds all matches where the filter value is a case-insensitive substring of the result. Example: subject__like=cn=su matches CN=subject. +String certificateFingerprintEq = "certificateFingerprintEq_example"; // String | Filter for certificate fingerprint. +Boolean validEq = true; // Boolean | Filter for finding certificates by validity. True returns certificates which are not yet expired. False returns certificates which have expired. +try { + TrustedCertificateRespList result = apiInstance.getAllAccountCertificates(accountId, limit, after, order, include, nameEq, serviceEq, expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, statusEq, issuerLike, subjectLike, certificateFingerprintEq, validEq); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantSecurityAndIdentityCertificatesApi#getAllAccountCertificates"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID. | + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] [default to 50] + **after** | **String**| The entity ID to retrieve after the given one. | [optional] + **order** | **String**| Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. | [optional] [default to ASC] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + **nameEq** | **String**| Filter for certificate name. | [optional] + **serviceEq** | **String**| Filter for service. | [optional] + **expireEq** | **Integer**| Filter for expire. | [optional] + **deviceExecutionModeEq** | **Integer**| Filter for developer certificates. | [optional] + **deviceExecutionModeNeq** | **Integer**| Filter for not developer certificates. | [optional] + **ownerEq** | **String**| Owner name filter. | [optional] + **enrollmentModeEq** | **Boolean**| Enrollment mode filter. | [optional] + **statusEq** | **String**| Filter for certificate status. | [optional] + **issuerLike** | **String**| Filter for issuer. Finds all matches where the filter value is a case-insensitive substring of the result. Example: issuer__like=cn=iss matches CN=issuer. | [optional] + **subjectLike** | **String**| Filter for subject. Finds all matches where the filter value is a case-insensitive substring of the result. Example: subject__like=cn=su matches CN=subject. | [optional] + **certificateFingerprintEq** | **String**| Filter for certificate fingerprint. | [optional] + **validEq** | **Boolean**| Filter for finding certificates by validity. True returns certificates which are not yet expired. False returns certificates which have expired. | [optional] + +### Return type + +[**TrustedCertificateRespList**](TrustedCertificateRespList.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **updateAccountCertificate** +> TrustedCertificateResp updateAccountCertificate(accountId, certId, body) + +Update trusted certificate. + +Update a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"description\": \"very important cert\"} ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +TenantSecurityAndIdentityCertificatesApi apiInstance = new TenantSecurityAndIdentityCertificatesApi(); +String accountId = "accountId_example"; // String | Account ID. +String certId = "certId_example"; // String | The ID of the trusted certificate to update. +TrustedCertificateUpdateReq body = new TrustedCertificateUpdateReq(); // TrustedCertificateUpdateReq | A trusted certificate object with attributes. +try { + TrustedCertificateResp result = apiInstance.updateAccountCertificate(accountId, certId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling TenantSecurityAndIdentityCertificatesApi#updateAccountCertificate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **String**| Account ID. | + **certId** | **String**| The ID of the trusted certificate to update. | + **body** | [**TrustedCertificateUpdateReq**](TrustedCertificateUpdateReq.md)| A trusted certificate object with attributes. | + +### Return type + +[**TrustedCertificateResp**](TrustedCertificateResp.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationColorsApi.md b/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationColorsApi.md index 1ea5b3759..038cae3dc 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationColorsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationColorsApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Updates an array of dark theme branding colors. -Update an array of dark theme branding colors of a tenant account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"#f3f93e\" }]' ``` +Update an array of dark theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"#f3f93e\" }]' ``` ### Example ```java @@ -46,7 +46,7 @@ Bearer.setApiKey("YOUR API KEY"); TenantUserInterfaceConfigurationColorsApi apiInstance = new TenantUserInterfaceConfigurationColorsApi(); String accountId = "accountId_example"; // String | The ID of the account. -List body = Arrays.asList(new BrandingColor()); // List | List of branding colors. +List body = Arrays.asList(new BrandingColorUpdate()); // List | List of branding colors. try { Void result = apiInstance.bulkSetAccountDarkColors(accountId, body); System.out.println(result); @@ -61,7 +61,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **body** | [**List<BrandingColor>**](BrandingColor.md)| List of branding colors. | + **body** | [**List<BrandingColorUpdate>**](BrandingColorUpdate.md)| List of branding colors. | ### Return type @@ -82,7 +82,7 @@ Name | Type | Description | Notes Updates an array of light theme branding colors. -Update an array of light theme branding colors of a tenant account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"purple\" }]' ``` +Update an array of light theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"purple\" }]' ``` ### Example ```java @@ -103,7 +103,7 @@ Bearer.setApiKey("YOUR API KEY"); TenantUserInterfaceConfigurationColorsApi apiInstance = new TenantUserInterfaceConfigurationColorsApi(); String accountId = "accountId_example"; // String | The ID of the account. -List body = Arrays.asList(new BrandingColor()); // List | List of branding colors. +List body = Arrays.asList(new BrandingColorUpdate()); // List | List of branding colors. try { Void result = apiInstance.bulkSetAccountLightColors(accountId, body); System.out.println(result); @@ -118,7 +118,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **body** | [**List<BrandingColor>**](BrandingColor.md)| List of branding colors. | + **body** | [**List<BrandingColorUpdate>**](BrandingColorUpdate.md)| List of branding colors. | ### Return type @@ -139,7 +139,7 @@ Name | Type | Description | Notes Delete all colors. -Delete account branding colors for all themes. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors -H 'Authorization: Bearer API_KEY'` +Delete account branding colors for all themes. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -194,7 +194,7 @@ Name | Type | Description | Notes Delete colors in the dark theme. -Delete account dark theme branding colors. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark -H 'Authorization: Bearer API_KEY'` +Delete account dark theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -249,7 +249,7 @@ Name | Type | Description | Notes Delete colors in the light theme. -Delete account light theme branding colors. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light -H 'Authorization: Bearer API_KEY'` +Delete account light theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -304,7 +304,7 @@ Name | Type | Description | Notes Get dark theme branding color. -Retrieve the requested dark theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the requested dark theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -340,7 +340,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -361,7 +361,7 @@ Name | Type | Description | Notes Get dark theme branding colors. -Retrieve dark theme branding colors for an account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve dark theme branding colors for an account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -416,7 +416,7 @@ Name | Type | Description | Notes Get light theme branding color. -Retrieve the requested light theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} -H 'Authorization: Bearer <api_key>' ``` +Retrieve the requested light theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -452,7 +452,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -473,7 +473,7 @@ Name | Type | Description | Notes Get light theme branding colors. -Retrieve light theme branding colors for an account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve light theme branding colors for an account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -528,7 +528,7 @@ Name | Type | Description | Notes Reset branding color to default. -Resets the branding color of a tenant account to its dark theme default. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Resets the branding color to its dark theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -564,7 +564,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -585,7 +585,7 @@ Name | Type | Description | Notes Reset branding color to default. -Resets the branding color of a tenant account to its light theme default. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Resets the branding color to its light theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -621,7 +621,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -642,7 +642,7 @@ Name | Type | Description | Notes Updates a dark theme branding color. -Update a dark theme branding color of a tenant account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"#f3f93e\" }' ``` +Update a dark theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"#f3f93e\" }' ``` ### Example ```java @@ -679,7 +679,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] **body** | [**BrandingColor**](BrandingColor.md)| The branding color. | ### Return type @@ -701,7 +701,7 @@ Name | Type | Description | Notes Updates light theme branding color. -Update a light theme branding color of a tenant account. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"purple\" }' ``` +Update a light theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"purple\" }' ``` ### Example ```java @@ -738,7 +738,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] **body** | [**BrandingColor**](BrandingColor.md)| The branding color. | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationImagesApi.md b/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationImagesApi.md index da68095d3..41b5438e7 100644 --- a/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationImagesApi.md +++ b/backends/pelioncloud_devicemanagement/docs/TenantUserInterfaceConfigurationImagesApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Revert an image to dark theme default. -Revert an account branding image to dark theme default. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\ -H 'Authorization: Bearer <api_key>' ``` +Revert an account branding image to dark theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -61,7 +61,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -82,7 +82,7 @@ Name | Type | Description | Notes Revert an image to light theme default. -Revert an account branding image to light theme default. **Example:** ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\ -H 'Authorization: Bearer <api_key>' ``` +Revert an account branding image to light theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -118,7 +118,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -139,7 +139,7 @@ Name | Type | Description | Notes Delete images in the dark theme. -Delete account dark theme branding images. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark -H 'Authorization: Bearer API_KEY'` +Delete account dark theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -194,7 +194,7 @@ Name | Type | Description | Notes Delete all images. -Delete account branding images for all themes. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images -H 'Authorization: Bearer API_KEY'` +Delete account branding images for all themes. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -249,7 +249,7 @@ Name | Type | Description | Notes Delete images in the light theme. -Delete account light theme branding images. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light -H 'Authorization: Bearer API_KEY'` +Delete account light theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -304,7 +304,7 @@ Name | Type | Description | Notes Get metadata of a dark theme image. -Retrieve metadata of one account dark theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve metadata of one account dark theme branding image. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -340,7 +340,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -361,7 +361,7 @@ Name | Type | Description | Notes Get metadata of a light theme image. -Retrieve metadata for one account light theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve metadata for one account light theme branding image. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -397,7 +397,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -418,7 +418,7 @@ Name | Type | Description | Notes Get metadata of all dark theme images. -Retrieve the metadata of all dark theme branding images. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the metadata of all dark theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -473,7 +473,7 @@ Name | Type | Description | Notes Get metadata of all light theme images. -Retrieve the metadata of all light theme branding images. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the metadata of all light theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -528,7 +528,7 @@ Name | Type | Description | Notes Upload a dark theme image. -Upload a new account dark theme branding image in PNG or JPEG format. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer <api_key>' -H 'content-type: image/png' --data-binary '@myimage.png' ``` +Upload a new account dark theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer <access_key>' -H 'content-type: image/png' --data-binary '@myimage.png' ``` ### Example ```java @@ -565,7 +565,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **body** | [**String**](String.md)| The image in PNG or JPEG format. | ### Return type @@ -587,7 +587,7 @@ Name | Type | Description | Notes Upload a dark theme image. -Upload a new account dark theme branding image as form data in PNG or JPEG format. +Upload a new account dark theme branding image as form data in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -624,7 +624,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **image** | **File**| The image in PNG or JPEG format as multipart form data. | ### Return type @@ -646,7 +646,7 @@ Name | Type | Description | Notes Upload a light theme image. -Upload a new account light theme branding image in PNG or JPEG format. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` +Upload a new account light theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` ### Example ```java @@ -683,7 +683,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **body** | [**String**](String.md)| The image in PNG or JPEG format. | ### Return type @@ -705,7 +705,7 @@ Name | Type | Description | Notes Upload a light theme image. -Upload a new account branding image as form data in PNG or JPEG format. +Upload a new account branding image as form data in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -742,7 +742,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accountId** | **String**| The ID of the account. | - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **image** | **File**| The image in PNG or JPEG format as multipart form data. | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/TierHistory.md b/backends/pelioncloud_devicemanagement/docs/TierHistory.md new file mode 100644 index 000000000..3461e26b1 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TierHistory.md @@ -0,0 +1,11 @@ + +# TierHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tier** | **String** | The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Last update UTC time RFC3339. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/TokenRequest.md b/backends/pelioncloud_devicemanagement/docs/TokenRequest.md new file mode 100644 index 000000000..e02451e34 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TokenRequest.md @@ -0,0 +1,13 @@ + +# TokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aud** | **List<String>** | Array of \\<type\\>:\\<identity\\> tuples representing devices for which access is being requested. There must be at least one id/ep tuple.<br/> \\<type\\> ::= id|ep <br/> \\<identity\\>::=[a-zA-Z0-9+/=- ]+ <br/>\\<audience\\> :== \\<type\\> \":\" \\<identity\\> <br/> \\<identity\\> can be up to 60 characters long, and can contain spaces. <br/> The audience array can contain up to 50 tuples. If IAM does not authorize even one item in the list, Secure Device Access does not authorize the whole request and does not return an access token (access denied). | +**cnf** | **String** | The Android application proof-of-possession public key. | +**grantType** | **String** | Hardcoded - can only be \"client_credentials\". | +**scope** | **String** | The space-delimited list of operations that user is requesting permission for. The array must contain at least one scope item. A scope item can have up to 60 characters. A scope list can hold up to 20 scope items. <br/> \\<scope\\>::=[a-zA-Z][a-zA-Z0-9-]* <br/> \\<scope-list\\>::= \\<scope\\> | \\<scope\\> \" \" | \\<scope\\> \" \" \\<scope-list\\> <br/> The scope being requested must match the action that the Android application eventually performs on the IoT device. The device matches the scope in the access token to the action requested in the operation bundle. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/TokenResponse.md b/backends/pelioncloud_devicemanagement/docs/TokenResponse.md new file mode 100644 index 000000000..61d42792c --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TokenResponse.md @@ -0,0 +1,11 @@ + +# TokenResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **byte[]** | The generated CWT (CBOR Web Token) access token as a Base64 string. | [optional] +**grantedUntil** | [**DateTime**](DateTime.md) | Grant expiration UTC time RFC3339. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/TrustAnchorResponse.md b/backends/pelioncloud_devicemanagement/docs/TrustAnchorResponse.md new file mode 100644 index 000000000..cd54ae358 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/TrustAnchorResponse.md @@ -0,0 +1,18 @@ + +# TrustAnchorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time. | [optional] +**description** | **String** | The updated notes about the trust anchor. | [optional] +**etag** | **String** | Entity instance signature, 1 or Unix timestamp of last customer update. | [optional] +**fingerprint** | **byte[]** | The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format. | [optional] +**id** | **String** | The ID of the entity. | [optional] +**object** | **String** | The API resource entity | [optional] +**publicKey** | **byte[]** | The trust anchor public key in PEM format. | [optional] +**publicKeyDer** | **byte[]** | The generated trust anchor public key in Base64-encoded DER format. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Update UTC time. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateReq.md b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateReq.md index a8a048dcd..1d8cd0baf 100644 --- a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateReq.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **certificate** | **String** | A chain of X509.v3 trusted certificates in PEM format. The chain must contain all certificates from root to leaf. Otherwise, the signature parameter is required. | **description** | **String** | Human readable description of this certificate. | [optional] -**enrollmentMode** | **Boolean** | Certificate is used in enrollment mode. Default value is false. | [optional] +**enrollmentMode** | **Boolean** | DEPRECATED: Certificate is used in enrollment mode. Default value is false. | [optional] **name** | **String** | Certificate name. | **service** | [**ServiceEnum**](#ServiceEnum) | Service name where the certificate must be used. | **signature** | **String** | DEPRECATED: Base64 encoded signature of the account ID signed by the certificate to upload. The signature must be hashed with SHA256. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateResp.md b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateResp.md index f12b776ef..4c99b1822 100644 --- a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateResp.md +++ b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateResp.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **createdAt** | [**DateTime**](DateTime.md) | Creation UTC time RFC3339. | [optional] **description** | **String** | Human readable description of this certificate. | [optional] **deviceExecutionMode** | **Integer** | Device execution mode where 1 means a developer certificate. | [optional] -**enrollmentMode** | **Boolean** | If true, signature is not required. Default value false. | [optional] +**enrollmentMode** | **Boolean** | DEPRECATED: Certificate is used in enrollment mode. Default value is false. | [optional] **etag** | **String** | API resource entity version. | **id** | **String** | Entity ID. | **issuer** | **String** | Issuer of the certificate. | diff --git a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateRespList.md b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateRespList.md index 40401ff27..9a76bbb10 100644 --- a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateRespList.md +++ b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateRespList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<TrustedCertificateResp>**](TrustedCertificateResp.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return (2-1000), or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateUpdateReq.md b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateUpdateReq.md index 568c8892f..d1efa969f 100644 --- a/backends/pelioncloud_devicemanagement/docs/TrustedCertificateUpdateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/TrustedCertificateUpdateReq.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **description** | **String** | Human readable description of this certificate. | [optional] **enrollmentMode** | **Boolean** | Certificate is used in enrollment mode. Default value is false. | [optional] **name** | **String** | Certificate name. | [optional] -**service** | [**ServiceEnum**](#ServiceEnum) | Service name where the certificate must be used. | [optional] +**service** | [**ServiceEnum**](#ServiceEnum) | Service name where the certificate must be used. Service cannot be updated for developer certificates. | [optional] **signature** | **String** | DEPRECATED: Base64 encoded signature of the account ID signed by the certificate to be uploaded. The signature must be hashed with SHA256. | [optional] **status** | [**StatusEnum**](#StatusEnum) | Status of the certificate. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/UpdateCampaign.md b/backends/pelioncloud_devicemanagement/docs/UpdateCampaign.md index eefd9fadb..cb26d11c8 100644 --- a/backends/pelioncloud_devicemanagement/docs/UpdateCampaign.md +++ b/backends/pelioncloud_devicemanagement/docs/UpdateCampaign.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **campaignStrategy** | [**CampaignStrategyEnum**](#CampaignStrategyEnum) | How the campaign adds devices. A `one-shot` campaign does not add new devices after it has started. A `continuous` campaign means that devices may be added to the campaign after it has started. The default is `one-shot`. | [optional] **createdAt** | [**DateTime**](DateTime.md) | The time the entity was created. | [optional] **description** | **String** | An optional description of the campaign. | [optional] -**deviceFilter** | **String** | The filter for the devices the campaign is targeting at. | [optional] +**deviceFilter** | **String** | The filter for the devices the campaign targets. Refer to this using the filter ID. | [optional] **etag** | **String** | API resource entity version. | [optional] **finished** | [**DateTime**](DateTime.md) | The time the campaign finished. | [optional] **id** | **String** | The campaign ID. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPostRequest.md b/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPostRequest.md index 80b185c95..8b27f2839 100644 --- a/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPostRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPostRequest.md @@ -9,9 +9,11 @@ Name | Type | Description | Notes **autostopSuccessPercent** | [**BigDecimal**](BigDecimal.md) | | [optional] **campaignStrategy** | [**CampaignStrategyEnum**](#CampaignStrategyEnum) | How the campaign adds devices. A `one-shot` campaign does not add new devices after it has started. A `continuous` campaign means that devices may be added to the campaign after it has started. The default is `one-shot`. | [optional] **description** | **String** | An optional description of the campaign. | [optional] -**deviceFilter** | **String** | The filter for the devices the campaign is targeted at. | +**deviceFilter** | **String** | The filter for the devices the campaign targets. Refer to this using the filter ID. | **name** | **String** | The name for this campaign. | [optional] **rootManifestId** | **String** | | [optional] +**state** | [**StateEnum**](#StateEnum) | DEPRECATED: The state of the campaign (use phase instead) | [optional] +**when** | [**DateTime**](DateTime.md) | The scheduled start time for the update campaign. Not in use. | [optional] @@ -22,4 +24,12 @@ ONE_SHOT | "one-shot" CONTINUOUS | "continuous" + +## Enum: StateEnum +Name | Value +---- | ----- +DRAFT | "draft" +SCHEDULED | "scheduled" + + diff --git a/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPutRequest.md b/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPutRequest.md index 8204ddec6..b0c1f20dc 100644 --- a/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPutRequest.md +++ b/backends/pelioncloud_devicemanagement/docs/UpdateCampaignPutRequest.md @@ -8,9 +8,36 @@ Name | Type | Description | Notes **autostop** | **Boolean** | | [optional] **autostopSuccessPercent** | [**BigDecimal**](BigDecimal.md) | | [optional] **description** | **String** | An optional description of the campaign. | [optional] -**deviceFilter** | **String** | The filter for the devices the campaign is targeting at. | [optional] +**deviceFilter** | **String** | The filter for the devices the campaign targets. Refer to this using the filter ID. | [optional] **name** | **String** | The campaign's name. | [optional] **rootManifestId** | **String** | | [optional] +**state** | [**StateEnum**](#StateEnum) | DEPRECATED: The state of the campaign (use phase instead). | [optional] +**when** | [**DateTime**](DateTime.md) | The scheduled start time for the update campaign. Not in use. | [optional] + + + +## Enum: StateEnum +Name | Value +---- | ----- +DRAFT | "draft" +SCHEDULED | "scheduled" +ALLOCATINGQUOTA | "allocatingquota" +ALLOCATEDQUOTA | "allocatedquota" +QUOTAALLOCATIONFAILED | "quotaallocationfailed" +CHECKINGMANIFEST | "checkingmanifest" +CHECKEDMANIFEST | "checkedmanifest" +DEVICEFETCH | "devicefetch" +DEVICECOPY | "devicecopy" +DEVICECHECK | "devicecheck" +PUBLISHING | "publishing" +DEPLOYING | "deploying" +DEPLOYED | "deployed" +MANIFESTREMOVED | "manifestremoved" +EXPIRED | "expired" +STOPPING | "stopping" +AUTOSTOPPED | "autostopped" +USERSTOPPED | "userstopped" +CONFLICT | "conflict" diff --git a/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorRequest.md b/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorRequest.md new file mode 100644 index 000000000..9f9bd3254 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorRequest.md @@ -0,0 +1,10 @@ + +# UpdateTrustAnchorRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The new description for the trust anchor. | + + + diff --git a/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorResponse.md b/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorResponse.md new file mode 100644 index 000000000..5b962fa87 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UpdateTrustAnchorResponse.md @@ -0,0 +1,18 @@ + +# UpdateTrustAnchorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdAt** | [**DateTime**](DateTime.md) | Creation UTC time. | [optional] +**description** | **String** | The updated notes about the trust anchor. | [optional] +**etag** | **String** | Entity instance signature, 1 or Unix timestamp of last customer update. | [optional] +**fingerprint** | **byte[]** | The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format. | [optional] +**id** | **String** | The ID of the entity. | [optional] +**object** | **String** | The API resource entity | [optional] +**publicKey** | **byte[]** | The trust anchor public key in PEM format. | [optional] +**publicKeyDer** | **byte[]** | The generated trust anchor public key in Base64-encoded DER format. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | Update UTC time. | [optional] + + + diff --git a/backends/pelioncloud_devicemanagement/docs/UsageBillingReportsApi.md b/backends/pelioncloud_devicemanagement/docs/UsageBillingReportsApi.md new file mode 100644 index 000000000..832ffffaa --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UsageBillingReportsApi.md @@ -0,0 +1,280 @@ +# UsageBillingReportsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getBillingReport**](UsageBillingReportsApi.md#getBillingReport) | **GET** v3/billing-report | Get billing report. +[**getBillingReportActiveDevices**](UsageBillingReportsApi.md#getBillingReportActiveDevices) | **GET** v3/billing-report-active-devices | Get raw billing data of the active devices for the month. +[**getBillingReportFirmwareUpdates**](UsageBillingReportsApi.md#getBillingReportFirmwareUpdates) | **GET** v3/billing-report-firmware-updates | Get raw billing data of the firmware updates for the month. +[**getServicePackageQuota**](UsageBillingReportsApi.md#getServicePackageQuota) | **GET** v3/service-packages-quota | Service package quota. +[**getServicePackages**](UsageBillingReportsApi.md#getServicePackages) | **GET** v3/service-packages | Get all service packages. + + + +# **getBillingReport** +> ReportResponse getBillingReport(month) + +Get billing report. + +Fetch the billing report generated for the currently authenticated commercial account. The billing reports for tenant accounts are also included in their aggregator's billing report response. The response contains below additional counters when the account's business model is set to `API calls` by the account administrator. - rest_api_requests_with_user_token - rest_api_requests_with_api_key_token - pelion_to_webapp_notifications - device_to_pelion_messages - pelion_to_device_messages **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07 \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageBillingReportsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageBillingReportsApi apiInstance = new UsageBillingReportsApi(); +String month = "month_example"; // String | Queried year and month of billing report. +try { + ReportResponse result = apiInstance.getBillingReport(month); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageBillingReportsApi#getBillingReport"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **month** | **String**| Queried year and month of billing report. | + +### Return type + +[**ReportResponse**](ReportResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getBillingReportActiveDevices** +> BillingReportRawDataResponse getBillingReportActiveDevices(month) + +Get raw billing data of the active devices for the month. + +Fetch raw billing data for active devices for the currently authenticated commercial account. This is supplementary data for the billing report. The raw billing data of the active devices for tenant accounts are included in their aggregator's raw billing data of the active devices. The endpoint returns the URL to download the gzipped CSV file. The first line is the header providing information on active devices, for example, the ID of an active device. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-active-devices?month=2018-07 \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageBillingReportsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageBillingReportsApi apiInstance = new UsageBillingReportsApi(); +String month = "month_example"; // String | Queried year and month of billing report. +try { + BillingReportRawDataResponse result = apiInstance.getBillingReportActiveDevices(month); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageBillingReportsApi#getBillingReportActiveDevices"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **month** | **String**| Queried year and month of billing report. | + +### Return type + +[**BillingReportRawDataResponse**](BillingReportRawDataResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getBillingReportFirmwareUpdates** +> BillingReportRawDataResponse getBillingReportFirmwareUpdates(month) + +Get raw billing data of the firmware updates for the month. + +Fetch raw billing data for firmware updates for the currently authenticated commercial account. This is supplementary data for the billing report. The raw billing data of the firmware updates for tenant accounts are also included in their aggregator's raw billing data of the firmware updates. The endpoint returns the URL to download the gzipped CSV file. The first line is the header providing information on the firmware updates, for example, the ID of a firmware update. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-firmware-updates?month=2018-07 \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageBillingReportsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageBillingReportsApi apiInstance = new UsageBillingReportsApi(); +String month = "month_example"; // String | Queried year and month of billing report. +try { + BillingReportRawDataResponse result = apiInstance.getBillingReportFirmwareUpdates(month); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageBillingReportsApi#getBillingReportFirmwareUpdates"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **month** | **String**| Queried year and month of billing report. | + +### Return type + +[**BillingReportRawDataResponse**](BillingReportRawDataResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getServicePackageQuota** +> ServicePackageQuota getServicePackageQuota() + +Service package quota. + +Get the available firmware update quota for the current authenticated commercial account. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageBillingReportsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageBillingReportsApi apiInstance = new UsageBillingReportsApi(); +try { + ServicePackageQuota result = apiInstance.getServicePackageQuota(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageBillingReportsApi#getServicePackageQuota"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServicePackageQuota**](ServicePackageQuota.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getServicePackages** +> ServicePackagesResponse getServicePackages() + +Get all service packages. + +Get information for all service packages for the current authenticated commercial account. The response is returned in descending order by service package created timestamp: first the pending service package, then the active service package, then the previous service packages. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageBillingReportsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageBillingReportsApi apiInstance = new UsageBillingReportsApi(); +try { + ServicePackagesResponse result = apiInstance.getServicePackages(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageBillingReportsApi#getServicePackages"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ServicePackagesResponse**](ServicePackagesResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/UsageServiceMetricsApi.md b/backends/pelioncloud_devicemanagement/docs/UsageServiceMetricsApi.md new file mode 100644 index 000000000..7e686db57 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UsageServiceMetricsApi.md @@ -0,0 +1,78 @@ +# UsageServiceMetricsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getMetrics**](UsageServiceMetricsApi.md#getMetrics) | **GET** v3/metrics | Provides account-specific statistics for other cloud services. + + + +# **getMetrics** +> SuccessfulResponse getMetrics(include, interval, start, end, period, limit, after, order) + +Provides account-specific statistics for other cloud services. + +Get account-specific statistics. + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageServiceMetricsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageServiceMetricsApi apiInstance = new UsageServiceMetricsApi(); +String include = "include_example"; // String | A comma-separated list of requested metrics and total_count (if included, the response will contain total_count to specify the total number of records available). Supported values are: - `transactions` - `full_registrations` - `registration_updates` - `deleted_registrations` - `expired_registrations` - `bootstraps_successful` - `bootstraps_failed` - `bootstraps_pending` - `handshakes_successful` - `connect_rest_api_success` - `connect_rest_api_error` - `device_proxy_request_success` - `device_proxy_request_error` - `device_subscription_request_success` - `device_subscription_request_error` - `device_observations` - `total_count` **Note:** The metrics `device_proxy_request_success`, `device_proxy_request_error`, `device_subscription_request_success`, `device_subscription_request_error` and `device_observations` monitor only the response from the device to Device Management Connect. They do not confirm that the response is delivered to the client callback URLs used when you try to access device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. New metrics will be added to monitor the response delivery to client callback URLs later. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170207&end=20170407&interval=1d \\ -H \"Authorization : Bearer \" ``` **Response:** { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"after\": \"2017-07-26T00:00:00Z\", \"has_more\": true, \"data\": [ { \"id\": \"015d8157c800015e306fffff005374617473000\", \"timestamp\": \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, { \"id\": \"015d867e2400015e306fffff005374617473000\", \"timestamp\": \"2017-07-28T00:00:00Z\", \"transactions\": 27480 } ] } ``` +String interval = "interval_example"; // String | Group the data by this interval in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. The interval cannot exceed one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. +LocalDate start = new LocalDate(); // LocalDate | UTC time/year/date in RFC3339 format. Fetch the data with timestamp greater than or equal to this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between start and end parameters cannot exceed one year (365 days). The parameter is not mandatory if the period is specified. +LocalDate end = new LocalDate(); // LocalDate | UTC time/year/date in RFC3339 format. Fetch the data with timestamp less than this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between start and end parameters cannot exceed one year (365 days). The parameter is not mandatory if the period is specified. +String period = "period_example"; // String | Period. Fetch the data for the period in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. The parameter is not mandatory if the start and end time are specified. The period cannot exceed one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. +Integer limit = 56; // Integer | The number of results to return (2-1000). Default 50. +String after = "after_example"; // String | The metric ID after which to start fetching. This also can be used for pagination. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20 \\ -H \"Authorization : Bearer \" ``` **Response:** ``` { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"has_more\": true, \"data\": [ { \"id\": \"015d1a589800015e306fffff005374617473000\", \"timestamp\": \"2017-07-07T00:00:00Z\", \"transactions\": 26381 }, . . . { \"id\": \"015d7c316c00015e306fffff005374617473000\", \"timestamp\": \"2017-07-26T00:00:00Z\", \"transactions\": 25569 } ] } ``` If the parameter `has more` is true, it indicates that the list is not complete and more values are available. You can give the last ID of the list as the value of the `after` query parameter, and you get the next page of values. You can keep doing this until `has more` is false. ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20&after=015d7c316c00015e306fffff005374617473000 \\ -H \"Authorization : Bearer \" ``` **Response:** ``` { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"after\": \"2017-07-26T00:00:00Z\", \"has_more\": true, \"data\": [ { \"id\": \"015d8157c800015e306fffff005374617473000\", \"timestamp\": \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, . . . { \"id\": \"015de3309c00015e306fffff005374617473000\", \"timestamp\": \"2017-08-15T00:00:00Z\", \"transactions\": 24707 } ] } ``` +String order = "order_example"; // String | 'Record order. Acceptable values: ASC, DESC. Default: ASC.' +try { + SuccessfulResponse result = apiInstance.getMetrics(include, interval, start, end, period, limit, after, order); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageServiceMetricsApi#getMetrics"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **include** | **String**| A comma-separated list of requested metrics and total_count (if included, the response will contain total_count to specify the total number of records available). Supported values are: - `transactions` - `full_registrations` - `registration_updates` - `deleted_registrations` - `expired_registrations` - `bootstraps_successful` - `bootstraps_failed` - `bootstraps_pending` - `handshakes_successful` - `connect_rest_api_success` - `connect_rest_api_error` - `device_proxy_request_success` - `device_proxy_request_error` - `device_subscription_request_success` - `device_subscription_request_error` - `device_observations` - `total_count` **Note:** The metrics `device_proxy_request_success`, `device_proxy_request_error`, `device_subscription_request_success`, `device_subscription_request_error` and `device_observations` monitor only the response from the device to Device Management Connect. They do not confirm that the response is delivered to the client callback URLs used when you try to access device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. New metrics will be added to monitor the response delivery to client callback URLs later. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170207&end=20170407&interval=1d \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"after\": \"2017-07-26T00:00:00Z\", \"has_more\": true, \"data\": [ { \"id\": \"015d8157c800015e306fffff005374617473000\", \"timestamp\": \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, { \"id\": \"015d867e2400015e306fffff005374617473000\", \"timestamp\": \"2017-07-28T00:00:00Z\", \"transactions\": 27480 } ] } ``` | + **interval** | **String**| Group the data by this interval in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. The interval cannot exceed one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. | + **start** | **LocalDate**| UTC time/year/date in RFC3339 format. Fetch the data with timestamp greater than or equal to this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between start and end parameters cannot exceed one year (365 days). The parameter is not mandatory if the period is specified. | [optional] + **end** | **LocalDate**| UTC time/year/date in RFC3339 format. Fetch the data with timestamp less than this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between start and end parameters cannot exceed one year (365 days). The parameter is not mandatory if the period is specified. | [optional] + **period** | **String**| Period. Fetch the data for the period in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. The parameter is not mandatory if the start and end time are specified. The period cannot exceed one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. | [optional] + **limit** | **Integer**| The number of results to return (2-1000). Default 50. | [optional] + **after** | **String**| The metric ID after which to start fetching. This also can be used for pagination. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20 \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** ``` { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"has_more\": true, \"data\": [ { \"id\": \"015d1a589800015e306fffff005374617473000\", \"timestamp\": \"2017-07-07T00:00:00Z\", \"transactions\": 26381 }, . . . { \"id\": \"015d7c316c00015e306fffff005374617473000\", \"timestamp\": \"2017-07-26T00:00:00Z\", \"transactions\": 25569 } ] } ``` If the parameter `has more` is true, it indicates that the list is not complete and more values are available. You can give the last ID of the list as the value of the `after` query parameter, and you get the next page of values. You can keep doing this until `has more` is false. ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20&after=015d7c316c00015e306fffff005374617473000 \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** ``` { \"object\": \"list\", \"limit\": 20, \"total_count\": 54, \"after\": \"2017-07-26T00:00:00Z\", \"has_more\": true, \"data\": [ { \"id\": \"015d8157c800015e306fffff005374617473000\", \"timestamp\": \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, . . . { \"id\": \"015de3309c00015e306fffff005374617473000\", \"timestamp\": \"2017-08-15T00:00:00Z\", \"transactions\": 24707 } ] } ``` | [optional] + **order** | **String**| 'Record order. Acceptable values: ASC, DESC. Default: ASC.' | [optional] + +### Return type + +[**SuccessfulResponse**](SuccessfulResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/UsageServicePackagesApi.md b/backends/pelioncloud_devicemanagement/docs/UsageServicePackagesApi.md new file mode 100644 index 000000000..af235c941 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UsageServicePackagesApi.md @@ -0,0 +1,68 @@ +# UsageServicePackagesApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getServicePackageQuotaHistory**](UsageServicePackagesApi.md#getServicePackageQuotaHistory) | **GET** v3/service-packages-quota-history | Service package quota history. + + + +# **getServicePackageQuotaHistory** +> ServicePackageQuotaHistoryResponse getServicePackageQuotaHistory(limit, after, order) + +Service package quota history. + +Get your quota usage history. This API is available only for commercial accounts. Aggregator accounts can see their own and tenant quota usage data. Data is in ascending order based on creation time. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota-history \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageServicePackagesApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageServicePackagesApi apiInstance = new UsageServicePackagesApi(); +Integer limit = 56; // Integer | Maximum number of quota history entries in one paged response. +String after = "after_example"; // String | Results after specified entry ID. +String order = "order_example"; // String | Record order. Acceptable values: ASC, DESC. Default: ASC. +try { + ServicePackageQuotaHistoryResponse result = apiInstance.getServicePackageQuotaHistory(limit, after, order); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageServicePackagesApi#getServicePackageQuotaHistory"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Integer**| Maximum number of quota history entries in one paged response. | [optional] + **after** | **String**| Results after specified entry ID. | [optional] + **order** | **String**| Record order. Acceptable values: ASC, DESC. Default: ASC. | [optional] [enum: ASC, DESC] + +### Return type + +[**ServicePackageQuotaHistoryResponse**](ServicePackageQuotaHistoryResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/UsageStatisticsApi.md b/backends/pelioncloud_devicemanagement/docs/UsageStatisticsApi.md new file mode 100644 index 000000000..a15bcc23e --- /dev/null +++ b/backends/pelioncloud_devicemanagement/docs/UsageStatisticsApi.md @@ -0,0 +1,78 @@ +# UsageStatisticsApi + +All URIs are relative to *https://api.us-east-1.mbedcloud.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getStatisticsView**](UsageStatisticsApi.md#getStatisticsView) | **GET** v3/billing-statistics | Get statistics view of Device Management usage. + + + +# **getStatisticsView** +> StatisticsViewResponse getStatisticsView(interval, start, end, period, limit, after, order, include) + +Get statistics view of Device Management usage. + +Fetch the statistics view of Device Management usage in time series for the currently authenticated commercial account. The response contains the additional counters below, if the account business model is set to `API calls` by the account administrator: - device_to_pelion_messages - pelion_to_device_messages - pelion_to_webapp_notifications - rest_api_requests_with_api_key_token - rest_api_requests_with_user_token The return data is retrieved during a defined time window and grouped by defined interval. The time window for data retrieval is defined as a range, that can be either absolute (for instance, using timestamps) or relative (referring to the 'period' parameter). Range start is inclusive, while range end is exclusive. The specified range must be equal to or greater than the specified interval. Returned data does not include any tenant usage. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-statistics?start=2019-11-01T00:00:00.000Z&end=2019-12-01T00:00:00.000Z&interval=1d \\ -H 'Authorization: Bearer <access_key>' ``` + +### Example +```java +// Import classes: +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiException; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.Configuration; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.auth.*; +//import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.UsageStatisticsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: Bearer +ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer"); +Bearer.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Bearer.setApiKeyPrefix("Token"); + +UsageStatisticsApi apiInstance = new UsageStatisticsApi(); +String interval = "interval_example"; // String | Group the data by this interval in minutes, hours, days, weeks or months. One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. Minimum supported interval is 5 minutes. The specified interval must not be greater than the specified range. +DateTime start = new DateTime(); // DateTime | Start time of the statistics view in RFC3339 date-time format, with millisecond accuracy and UTC time zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have specified the period. Fetch data with timestamp greater than or equal to this value. Sample value: 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum supported range is 98 days when using timestamps to specify the range. +DateTime end = new DateTime(); // DateTime | End time of the statistics view in RFC3339 date-time format with millisecond accuracy and UTC time zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have specified the period. Fetch the data with timestamp less than this value. Sample value: 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum supported range is 98 days when using timestamps to specify the range. +String period = "period_example"; // String | Period. Alternative for specifying the range if not using start and end parameters. The parameter is mandatory if the start and end parameters are not specified. Do not set the parameter if you have specified the start and end parameters. Fetch the data for the period in minutes, hours, days, weeks or months. One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. The allowed periods (inclusive) are 5m-141120m/1h-2352h/1d-98d/1w-14w/1mo-3mo. +Integer limit = 50; // Integer | Maximum number of statistics view records in one paginated response. +String after = "after_example"; // String | Results after specified record ID. +String order = "order_example"; // String | Record order. Acceptable values (case insensitive): ASC, DESC. Default: ASC. +String include = "include_example"; // String | Comma-separated additional data to return. Currently supported: total_count. +try { + StatisticsViewResponse result = apiInstance.getStatisticsView(interval, start, end, period, limit, after, order, include); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UsageStatisticsApi#getStatisticsView"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **interval** | **String**| Group the data by this interval in minutes, hours, days, weeks or months. One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. Minimum supported interval is 5 minutes. The specified interval must not be greater than the specified range. | + **start** | **DateTime**| Start time of the statistics view in RFC3339 date-time format, with millisecond accuracy and UTC time zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have specified the period. Fetch data with timestamp greater than or equal to this value. Sample value: 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum supported range is 98 days when using timestamps to specify the range. | [optional] + **end** | **DateTime**| End time of the statistics view in RFC3339 date-time format with millisecond accuracy and UTC time zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have specified the period. Fetch the data with timestamp less than this value. Sample value: 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum supported range is 98 days when using timestamps to specify the range. | [optional] + **period** | **String**| Period. Alternative for specifying the range if not using start and end parameters. The parameter is mandatory if the start and end parameters are not specified. Do not set the parameter if you have specified the start and end parameters. Fetch the data for the period in minutes, hours, days, weeks or months. One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. The allowed periods (inclusive) are 5m-141120m/1h-2352h/1d-98d/1w-14w/1mo-3mo. | [optional] + **limit** | **Integer**| Maximum number of statistics view records in one paginated response. | [optional] [default to 50] + **after** | **String**| Results after specified record ID. | [optional] + **order** | **String**| Record order. Acceptable values (case insensitive): ASC, DESC. Default: ASC. | [optional] + **include** | **String**| Comma-separated additional data to return. Currently supported: total_count. | [optional] + +### Return type + +[**StatisticsViewResponse**](StatisticsViewResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + diff --git a/backends/pelioncloud_devicemanagement/docs/UserInfoRespList.md b/backends/pelioncloud_devicemanagement/docs/UserInfoRespList.md index 26b8a935b..5a570452a 100644 --- a/backends/pelioncloud_devicemanagement/docs/UserInfoRespList.md +++ b/backends/pelioncloud_devicemanagement/docs/UserInfoRespList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<UserInfoResp>**](UserInfoResp.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return (2-1000), or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationColorsApi.md b/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationColorsApi.md index f28fd47fd..f46179b79 100644 --- a/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationColorsApi.md +++ b/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationColorsApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Updates an array of dark theme branding colors. -Update an array of dark theme branding colors. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"#f3f93e\" }]' ``` +Update an array of dark theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"#f3f93e\" }]' ``` ### Example ```java @@ -45,7 +45,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); UserInterfaceConfigurationColorsApi apiInstance = new UserInterfaceConfigurationColorsApi(); -List body = Arrays.asList(new BrandingColor()); // List | List of branding colors. +List body = Arrays.asList(new BrandingColorUpdate()); // List | List of branding colors. try { Void result = apiInstance.bulkSetDarkColors(body); System.out.println(result); @@ -59,7 +59,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<BrandingColor>**](BrandingColor.md)| List of branding colors. | + **body** | [**List<BrandingColorUpdate>**](BrandingColorUpdate.md)| List of branding colors. | ### Return type @@ -80,7 +80,7 @@ Name | Type | Description | Notes Updates an array of light theme branding colors. -Update an array of light theme branding colors. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"purple\" }]' ``` +Update an array of light theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", \"color\": \"purple\" }]' ``` ### Example ```java @@ -100,7 +100,7 @@ Bearer.setApiKey("YOUR API KEY"); //Bearer.setApiKeyPrefix("Token"); UserInterfaceConfigurationColorsApi apiInstance = new UserInterfaceConfigurationColorsApi(); -List body = Arrays.asList(new BrandingColor()); // List | List of branding colors. +List body = Arrays.asList(new BrandingColorUpdate()); // List | List of branding colors. try { Void result = apiInstance.bulkSetLightColors(body); System.out.println(result); @@ -114,7 +114,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<BrandingColor>**](BrandingColor.md)| List of branding colors. | + **body** | [**List<BrandingColorUpdate>**](BrandingColorUpdate.md)| List of branding colors. | ### Return type @@ -135,7 +135,7 @@ Name | Type | Description | Notes Delete all colors. -Delete account branding colors for all themes. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors -H 'Authorization: Bearer API_KEY'` +Delete account branding colors for all themes. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -186,7 +186,7 @@ This endpoint does not need any parameter. Delete colors in the dark theme. -Delete account dark theme branding colors. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer API_KEY'` +Delete account dark theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -237,7 +237,7 @@ This endpoint does not need any parameter. Delete colors in the light theme. -Delete account light theme branding colors. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer API_KEY'` +Delete account light theme branding colors. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -288,7 +288,7 @@ This endpoint does not need any parameter. Get dark theme branding color. -Retrieve the requested dark theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the requested dark theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -322,7 +322,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -343,7 +343,7 @@ Name | Type | Description | Notes Get dark theme branding colors. -Retrieve the dark theme branding colors. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the dark theme branding colors. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -394,7 +394,7 @@ This endpoint does not need any parameter. Get light theme branding color. -Retrieve the requested light theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the requested light theme branding color. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -428,7 +428,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -449,7 +449,7 @@ Name | Type | Description | Notes Get light theme branding colors. -Retrieve the light theme branding colors. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the light theme branding colors. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -500,7 +500,7 @@ This endpoint does not need any parameter. Reset branding color to default. -Resets the branding color to its dark theme default. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Resets the branding color to its dark theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -534,7 +534,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -555,7 +555,7 @@ Name | Type | Description | Notes Reset branding color to default. -Resets the branding color to its light theme default. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Resets the branding color to its light theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -589,7 +589,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] ### Return type @@ -610,7 +610,7 @@ Name | Type | Description | Notes Updates a dark theme branding color. -Update a dark theme branding color. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"#f3f93e\" }' ``` +Update a dark theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"#f3f93e\" }' ``` ### Example ```java @@ -645,7 +645,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] **body** | [**BrandingColor**](BrandingColor.md)| The branding color. | ### Return type @@ -667,7 +667,7 @@ Name | Type | Description | Notes Updates light theme branding color. -Update light theme branding color. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"purple\" }' ``` +Update light theme branding color. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": \"purple\" }' ``` ### Example ```java @@ -702,7 +702,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color] + **reference** | **String**| The name of the branding color. | [enum: error_color, primary, secondary, success_color, warning_color, canvas_background, canvas_background_font_color, workspace_background, workspace_background_font_color, info_color, info_font_color, primary_font_color, secondary_font_color, error_font_color, success_font_color, warning_font_color, menu_background_color, menu_text_color, nav_menu_background, nav_menu_background_font_color, nav_menu_active_background, nav_menu_active_background_font_color, nav_menu_highlight, nav_menu_highlight_font_color] **body** | [**BrandingColor**](BrandingColor.md)| The branding color. | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationImagesApi.md b/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationImagesApi.md index 37d17b4c2..43bc9b09c 100644 --- a/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationImagesApi.md +++ b/backends/pelioncloud_devicemanagement/docs/UserInterfaceConfigurationImagesApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description Revert an image to dark theme default. -Revert an account branding image to dark theme default. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\ -H 'Authorization: Bearer <api_key>' ``` +Revert an account branding image to dark theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -59,7 +59,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -80,7 +80,7 @@ Name | Type | Description | Notes Revert an image to light theme default. -Revert an account branding image to light theme default. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\ -H 'Authorization: Bearer <api_key>' ``` +Revert an account branding image to light theme default. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -114,7 +114,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -135,7 +135,7 @@ Name | Type | Description | Notes Delete images in the dark theme. -Delete account dark theme branding images. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer API_KEY'` +Delete account dark theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -186,7 +186,7 @@ This endpoint does not need any parameter. Delete all images. -Delete account branding images for all themes. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images -H 'Authorization: Bearer API_KEY'` +Delete account branding images for all themes. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -237,7 +237,7 @@ This endpoint does not need any parameter. Delete images in the light theme. -Delete account light theme branding images. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer API_KEY'` +Delete account light theme branding images. <b>Note:</b> This endpoint is restricted to administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer <access_key>'` ### Example ```java @@ -288,7 +288,7 @@ This endpoint does not need any parameter. Get metadata of all dark theme images. -Retrieve metadata for all dark theme branding images. **Example:** `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve metadata for all dark theme branding images. **Example:** `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -339,7 +339,7 @@ This endpoint does not need any parameter. Get metadata of all light theme images. -Retrieve the metadata of all light theme branding images. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve the metadata of all light theme branding images. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -390,7 +390,7 @@ This endpoint does not need any parameter. Get metadata of a dark theme image. -Retrieve metadata for one account dark theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve metadata for one account dark theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -424,7 +424,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -445,7 +445,7 @@ Name | Type | Description | Notes Get metadata of a light theme image. -Retrieve metadata for one account light theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\ -H 'Authorization: Bearer <api_key>' ``` +Retrieve metadata for one account light theme branding image. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\ -H 'Authorization: Bearer <access_key>' ``` ### Example ```java @@ -479,7 +479,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] ### Return type @@ -500,7 +500,7 @@ Name | Type | Description | Notes Upload a dark theme image. -Upload a new account branding image in the dark theme in PNG or JPEG format. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` +Upload a new account branding image in the dark theme in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` ### Example ```java @@ -535,7 +535,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **body** | [**String**](String.md)| The image in PNG or JPEG format. | ### Return type @@ -557,7 +557,7 @@ Name | Type | Description | Notes Upload a dark theme image. -Upload a new account branding image as form data in the dark theme in PNG or JPEG format. +Upload a new account branding image as form data in the dark theme in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -592,7 +592,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **image** | **File**| The image in PNG or JPEG format as multipart form data. | ### Return type @@ -614,7 +614,7 @@ Name | Type | Description | Notes Upload a light theme image. -Upload a new account light theme branding image in PNG or JPEG format. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` +Upload a new account light theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' ``` ### Example ```java @@ -649,7 +649,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **body** | [**String**](String.md)| The image in PNG or JPEG format. | ### Return type @@ -671,7 +671,7 @@ Name | Type | Description | Notes Upload a light theme image. -Upload a new account branding image as form data in the light theme in PNG or JPEG format. +Upload a new account branding image as form data in the light theme in PNG or JPEG format. <b>Note:</b> This endpoint is restricted to administrators. ### Example ```java @@ -706,7 +706,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] + **reference** | **String**| Name of the branding images (icon or picture). | [enum: brand_logo_portrait, brand_logo_square, brand_logo_landscape, brand_logo_email, app_logo_landscape, app_logo_portrait, app_logo_square, desktop_background_landscape, desktop_background_square, desktop_background_portrait, carousel_image_portrait_0, carousel_image_portrait_1, carousel_image_portrait_2, carousel_image_portrait_3, carousel_image_portrait_4, carousel_image_portrait_5, carousel_image_portrait_6, carousel_image_portrait_7, carousel_image_portrait_8, carousel_image_portrait_9, carousel_image_square_0, carousel_image_square_1, carousel_image_square_2, carousel_image_square_3, carousel_image_square_4, carousel_image_square_5, carousel_image_square_6, carousel_image_square_7, carousel_image_square_8, carousel_image_square_9, carousel_image_landscape_0, carousel_image_landscape_1, carousel_image_landscape_2, carousel_image_landscape_3, carousel_image_landscape_4, carousel_image_landscape_5, carousel_image_landscape_6, carousel_image_landscape_7, carousel_image_landscape_8, carousel_image_landscape_9] **image** | **File**| The image in PNG or JPEG format as multipart form data. | ### Return type diff --git a/backends/pelioncloud_devicemanagement/docs/UserInvitationRespList.md b/backends/pelioncloud_devicemanagement/docs/UserInvitationRespList.md index ffb2bab6e..c40446e93 100644 --- a/backends/pelioncloud_devicemanagement/docs/UserInvitationRespList.md +++ b/backends/pelioncloud_devicemanagement/docs/UserInvitationRespList.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**after** | **String** | The entity ID to fetch after the given one. | [optional] +**after** | **String** | The entity ID to retrieve after the given one. | [optional] **data** | [**List<UserInvitationResp>**](UserInvitationResp.md) | A list of entities. | **hasMore** | **Boolean** | Flag indicating whether there are more results. | **limit** | **Integer** | The number of results to return (2-1000), or equal to `total_count`. | diff --git a/backends/pelioncloud_devicemanagement/docs/UserUpdateReq.md b/backends/pelioncloud_devicemanagement/docs/UserUpdateReq.md index 4639d18d1..febbd3dad 100644 --- a/backends/pelioncloud_devicemanagement/docs/UserUpdateReq.md +++ b/backends/pelioncloud_devicemanagement/docs/UserUpdateReq.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **groups** | **List<String>** | A list of group IDs this user belongs to. Can be updated by the Account Admin only. | [optional] **isGtcAccepted** | **Boolean** | A flag indicating that the user has accepted General Terms and Conditions. | [optional] **isMarketingAccepted** | **Boolean** | A flag indicating that the user has consented to receive marketing information. | [optional] -**isTotpEnabled** | **Boolean** | A flag indicating whether mandatory two-factor authentication (TOTP) is enabled. | [optional] +**isTotpEnabled** | **Boolean** | A flag indicating whether two-factor authentication (TOTP) is enabled. An account administrator can disable it, but cannot enable it for other users. | [optional] **loginProfiles** | [**List<LoginProfile>**](LoginProfile.md) | 'A list of login profiles for the user, specified as identity providers associated with the user. Only the ID attribute of the login profile should be set in the request object. The list cannot be empty. Only an account admin may update login profiles.' | [optional] **phoneNumber** | **String** | Phone number. | [optional] **status** | [**StatusEnum**](#StatusEnum) | The status of the user. ENROLLING indicates that the user is in the middle of the enrollment process. INVITED means that the user has not accepted the invitation request. RESET means that the password must be changed immediately. INACTIVE users are locked out and not permitted to use the system. Can be changed by the Aggregator Admin only. | [optional] diff --git a/backends/pelioncloud_devicemanagement/docs/Webhook.md b/backends/pelioncloud_devicemanagement/docs/Webhook.md index ec7d5effc..714e971d7 100644 --- a/backends/pelioncloud_devicemanagement/docs/Webhook.md +++ b/backends/pelioncloud_devicemanagement/docs/Webhook.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **headers** | **Map<String, String>** | The headers (key/value) sent with the notification. Optional. | [optional] -**serialization** | **Object** | Serialization configuration for a channel. | [optional] +**serialization** | [**SerializationConfigData**](SerializationConfigData.md) | | [optional] **url** | **String** | The URL to which the notifications are sent. We recommend that you serve this URL over HTTPS. | diff --git a/backends/pelioncloud_devicemanagement/docs/WebsocketChannel.md b/backends/pelioncloud_devicemanagement/docs/WebsocketChannel.md index 4d1ba4ed7..f0743d51a 100644 --- a/backends/pelioncloud_devicemanagement/docs/WebsocketChannel.md +++ b/backends/pelioncloud_devicemanagement/docs/WebsocketChannel.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**queueSize** | **Integer** | Number of events in the channel's event queue waiting to be delivered. | [optional] -**serialization** | **Object** | Serialization configuration for a channel. | [optional] -**status** | [**StatusEnum**](#StatusEnum) | Channel status is 'connected' when the channel has an active WebSocket bound to it. The state is 'disconnected' when either the channel or the WebSocket bound to it is closed. | [optional] +**queueSize** | **Integer** | Number of events in the channel's event queue waiting to be delivered. If the server cannot determine the queue size the value will be set to `-1`. | [optional] +**serialization** | [**SerializationConfigData**](SerializationConfigData.md) | | [optional] +**status** | [**StatusEnum**](#StatusEnum) | Channel status is 'connected' when the channel has an active WebSocket bound to it. The status is 'disconnected' when either the channel or the WebSocket bound to it is closed and 'unknown' when the server cannot determine it. | [optional] @@ -15,6 +15,7 @@ Name | Value ---- | ----- CONNECTED | "connected" DISCONNECTED | "disconnected" +UNKNOWN | "unknown" diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApi.java new file mode 100644 index 000000000..92072909f --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApi.java @@ -0,0 +1,51 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKeyList; + +public interface AccountAccessKeysApi { + /** + * Get access key. Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/access-keys/{access_key_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param accessKeyId + * The ID of the access key to retrieve. (required) + * @return Call<AccessKey> + */ + @GET("v3/access-keys/{access_key_id}") + Call getAccessKey(@retrofit2.http.Path(value = "access_key_id", encoded = true) String accessKeyId); + + /** + * Get all access keys. Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys \\ + * -H 'Authorization: Bearer <access_key>' ``` + * + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @param applicationIdEq + * Application filter. (optional) + * @return Call<AccessKeyList> + */ + @GET("v3/access-keys") + Call + getAllAccessKeys(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq, + @retrofit2.http.Query("application_id__eq") String applicationIdEq); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApi.java index 261a293bc..45b924e4c 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApi.java @@ -16,9 +16,10 @@ public interface AccountApiKeysApi { /** - * Add API key to a list of groups. Add API key to groups. **Example:** ``` curl -X POST + * Add API key to a list of groups. Add API key to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -34,9 +35,10 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", @retrofit2.http.Body List body); /** - * Add API key to a list of groups. Add API key to groups. **Example:** ``` curl -X POST + * Add API key to a list of groups. Add API key to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -54,8 +56,8 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", /** * Add API key to a list of groups. Add API key to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -70,7 +72,7 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", /** * Add API key to a list of groups. Add API key to groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -85,7 +87,8 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", /** * Create a new API key. Create a new API key. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' ``` + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' + * ``` * * @param body * The details of the API key to create. (required) @@ -97,8 +100,8 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", /** * Delete API key. Delete the API key. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param apikeyId * The ID of the API key to delete. (required) @@ -108,23 +111,22 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", Call deleteApiKey(@retrofit2.http.Path(value = "apikey_id", encoded = true) String apikeyId); /** - * Get all API keys. Retrieve API keys in an array, optionally filtered by the owner. **Example:** + * Get all API keys. Retrieve an array of API keys, optionally filtered by the owner. **Example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param keyEq * API key filter. Do not include the private portion of the API key (the last 32 characters). (optional) * @param ownerEq - * Owner name filter. (optional) + * Owner name filter. <b>Note:</b> This parameter is restricted to administrators. (optional) * @return Call<ApiKeyInfoRespList> */ @GET("v3/api-keys") @@ -134,9 +136,9 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", @retrofit2.http.Query("key__eq") String keyEq, @retrofit2.http.Query("owner__eq") String ownerEq); /** - * Get API key details. Retrieve API key details. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Get API key. Retrieve details of an API key. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param apikeyId * The ID of the API key to retrieve. (required) @@ -146,19 +148,19 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", Call getApiKey(@retrofit2.http.Path(value = "apikey_id", encoded = true) String apikeyId); /** - * Get groups of the API key. Retrieve groups associated with the API key. **Example:** ``` curl -X + * Get policy groups of an API key. Retrieve an array of policy groups associated with an API key. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X * GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param apikeyId * The ID of the API key. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<GroupSummaryList> @@ -170,17 +172,16 @@ Call addApiKeyToGroups(@retrofit2.http.Path(value = "apikey_id", @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include); /** - * Get groups of the API key. Retrieve groups associated with the API key. **Example:** ``` curl -X - * GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Get policy groups of the current API key. Retrieve an array of policy groups associated with the current API key. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<GroupSummaryList> @@ -192,8 +193,8 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege @retrofit2.http.Query("include") String include); /** - * Get API key details. Retrieve API key details. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' + * Get current API key. Retrieve details of current API key. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' * ``` * * @return Call<ApiKeyInfoResp> @@ -202,9 +203,10 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege Call getMyApiKey(); /** - * Remove API key from groups. Remove API key from groups. **Example:** ``` curl -X DELETE + * Remove API key from groups. Remove API key from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -221,9 +223,10 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege @retrofit2.http.Body List body); /** - * Remove API key from groups. Remove API key from groups. **Example:** ``` curl -X POST + * Remove API key from groups. Remove API key from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -242,7 +245,7 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege /** * Remove API key from groups. Remove API key from groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -256,8 +259,8 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege /** * Remove API key from groups. Remove API key from groups. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -272,7 +275,7 @@ Call getGroupsOfMyApiKey(@retrofit2.http.Query("limit") Intege /** * Reset the secret key. Reset the secret key of the API key. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param apikeyId * The ID of the API key to reset. (required) @@ -286,9 +289,9 @@ Call resetSecret(@retrofit2.http.Path(value = "apikey_id", encod /** * Update API key details. Update API key details. **Example:** `curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * \"TestApiKey25\"}' ``` * * @param apikeyId * The ID of the API key to update. (required) @@ -302,7 +305,7 @@ Call updateApiKey(@retrofit2.http.Path(value = "apikey_id", enco /** * Update API key details. Update API key details. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' \\ -H + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' \\ -H * 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' * ``` * diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApi.java new file mode 100644 index 000000000..3827c10d7 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApi.java @@ -0,0 +1,267 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKeyList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoResp; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Application; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApplicationList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupIdList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummaryList; + +public interface AccountApplicationsApi { + /** + * Add application to a list of groups. Add application to groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + * + * @param applicationId + * The ID of the application to add to the group. (required) + * @param body + * A list of IDs of the groups to update. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/applications/{application_id}/groups/add") + Call + addApplicationToGroups(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Body GroupIdList body); + + /** + * Create a new application. Create a new application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications + * -d '{\"name\": \"MyApplication1\"}' \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' ``` + * + * @param body + * The details of the application to create. (required) + * @return Call<Application> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/applications") + Call createApplication(@retrofit2.http.Body Application body); + + /** + * Create a new applicationaccess key. Create a new access key for the application. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys -d '{\"name\": + * \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param body + * The details of the access key to create. (required) + * @return Call<AccessKey> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/applications/{application_id}/access-keys") + Call + createApplicationAccessKey(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Body AccessKey body); + + /** + * Delete application. Delete the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param applicationId + * The ID of the application to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/applications/{application_id}") + Call deleteApplication(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId); + + /** + * Delete access key associated with the application. Delete the access key associated with the application. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/applications/{application_id}/access-keys/{access_key_id}") + Call + deleteApplicationAccessKey(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", encoded = true) String accessKeyId); + + /** + * Get all access keys associated with the application. Retrieve an array of access keys associated with the + * application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * \\ -H 'Authorization: Bearer <access_key>' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @return Call<AccessKeyList> + */ + @GET("v3/applications/{application_id}/access-keys") + Call + getAllApplicationAccessKeys(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq); + + /** + * Get all applications. Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications + * \\ -H 'Authorization: Bearer <access_key>' ``` + * + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @return Call<ApplicationList> + */ + @GET("v3/applications") + Call + getAllApplications(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq); + + /** + * Get application. Retrieve details of an application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param applicationId + * The ID of the application to retrieve. (required) + * @return Call<Application> + */ + @GET("v3/applications/{application_id}") + Call + getApplication(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId); + + /** + * Get access key. Retrieve details of an access key associated with the application. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to retrieve. (required) + * @return Call<AccessKey> + */ + @GET("v3/applications/{application_id}/access-keys/{access_key_id}") + Call + getApplicationAccessKey(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", encoded = true) String accessKeyId); + + /** + * Get policy groups of an application. Retrieve an array of policy groups associated with an application. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<GroupSummaryList> + */ + @GET("v3/applications/{application_id}/groups") + Call + getGroupsOfApplication(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + + /** + * Remove application from groups. Remove application from groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + * + * @param applicationId + * The ID of the application to remove from the group. (required) + * @param body + * A list of IDs of the groups to update. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/applications/{application_id}/groups/remove") + Call + removeApplicationFromGroups(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Body GroupIdList body); + + /** + * Update applicationdetails. Update application details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * \"TestApplication25\"}' ``` + * + * @param applicationId + * The ID of the application to update. (required) + * @param body + * New applicationattributes to store. (required) + * @return Call<ApiKeyInfoResp> + */ + @PUT("v3/applications/{application_id}") + Call + updateApplication(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Body Application body); + + /** + * Update access key details. Update access key details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestAccessKey\"}' ``` + * + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to update. (required) + * @param body + * New access key attributes to store. (required) + * @return Call<AccessKey> + */ + @PUT("v3/applications/{application_id}/access-keys/{access_key_id}") + Call + updateApplicationAccessKey(@retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", encoded = true) String accessKeyId, + @retrofit2.http.Body AccessKey body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApi.java index 75e65b89c..dcdf3ad36 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApi.java @@ -5,19 +5,19 @@ import retrofit2.Call; import retrofit2.http.*; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.NotificationEntry; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.NotificationEntryList; public interface AccountEmailNotificationLogsApi { /** - * Get notification events for an account. Retrieve notifications for an account. + * Get logs of email notifications. Retrieve an array of email notification logs. * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @return Call<NotificationEntryList> */ @GET("v3/accounts/me/notifications") @@ -25,4 +25,15 @@ Call getNofificationEntries(@retrofit2.http.Query("limit" @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order); + /** + * Get an email notification. Retrieve an email notification log entry. + * + * @param notificationId + * The ID of the log entry to be retrieved. (required) + * @return Call<NotificationEntry> + */ + @GET("v3/accounts/me/notifications/{notification_id}") + Call + getNofificationEntry(@retrofit2.http.Path(value = "notification_id", encoded = true) String notificationId); + } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApi.java new file mode 100644 index 000000000..a215afc33 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApi.java @@ -0,0 +1,34 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitation; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitationList; + +public interface AccountEntitlementLimitationsApi { + /** + * Get an entitlement limitation. Retrieve an entitlement limitation. + * + * @param limitationId + * The ID of the limitation to be fetched. (required) + * @return Call<AccountLimitation> + */ + @GET("v3/limitations/{limitation_id}") + Call + getAccountLimitation(@retrofit2.http.Path(value = "limitation_id", encoded = true) String limitationId); + + /** + * Get entitlement limitations. Retrieve an array of entitlement limitations. + * + * @param inheritedEq + * Filter for finding account limitations by inheritance. True returns also inherited limitations. False + * returns only non-inherited ones. (optional) + * @return Call<AccountLimitationList> + */ + @GET("v3/limitations") + Call getAccountLimitations(@retrofit2.http.Query("inherited__eq") String inheritedEq); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApi.java index 2cf258270..984b40aef 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApi.java @@ -13,7 +13,8 @@ public interface AccountIdentityProvidersApi { /** - * Create a new identity provider. Create a new identity provider. + * Create a new identity provider. Create a new identity provider. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param body * Details of the identity provider to create. (required) @@ -29,7 +30,8 @@ Call createIdentityProvider(@retrofit2.http.Body IdentityP @retrofit2.http.Query("discovery") Boolean discovery); /** - * Delete an identity provider by ID. Delete an identity provider by ID. + * Delete an identity provider by ID. Delete an identity provider by ID. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param identityProviderId * The ID of the identity provider to delete. (required) @@ -40,7 +42,8 @@ Call deleteIdentityProvider(@retrofit2.http.Path(value = "identity_provide encoded = true) String identityProviderId); /** - * Delete the service provider certificate. Delete a service provider certificate. + * Delete the service provider certificate. Delete a service provider certificate. <b>Note:</b> This + * endpoint is restricted to administrators. * * @param identityProviderId * The ID of the identity provider. (required) @@ -53,6 +56,7 @@ Call deleteSpCertificate(@retrofit2.http.Path(value = "ide /** * Generate a new service provider certificate. Generate a new service provider certificate. + * <b>Note:</b> This endpoint is restricted to administrators. * * @param identityProviderId * The ID of the identity provider to generate a certificate for. (required) @@ -68,15 +72,15 @@ Call generateSpCertificate( @retrofit2.http.Body CertificateGenerationReq body); /** - * Get all identity providers. Retrieve identity providers in an array. + * Get all identity providers. Retrieve an array of identity providers. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<IdentityProviderList> @@ -89,7 +93,8 @@ Call getAllIdentityProviders(@retrofit2.http.Query("limit" @retrofit2.http.Query("include") String include); /** - * Get identity provider by ID. Retrieve by ID. + * Get identity provider. Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to + * administrators. * * @param identityProviderId * The ID of the identity provider to retrieve. (required) @@ -100,7 +105,8 @@ Call getIdentityProvider(@retrofit2.http.Path(value = "ide encoded = true) String identityProviderId); /** - * Refreshes the OIDC signing keys. Refreshes an OIDC IdP's signing keys. + * Refreshes the OIDC signing keys. Refreshes an OIDC IdP's signing keys. <b>Note:</b> This endpoint + * is restricted to administrators. * * @param identityProviderId * The ID of the identity provider for which to refresh the signing keys. (required) @@ -112,7 +118,8 @@ Call getIdentityProvider(@retrofit2.http.Path(value = "ide refreshJwks(@retrofit2.http.Path(value = "identity_provider_id", encoded = true) String identityProviderId); /** - * Update an existing identity provider. Update an existing identity provider. + * Update an existing identity provider. Update an existing identity provider. <b>Note:</b> This + * endpoint is restricted to administrators. * * @param identityProviderId * The ID of the identity provider to update. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApi.java index 55f85c47e..6b1d316bc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApi.java @@ -6,6 +6,7 @@ import retrofit2.http.*; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoRespList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApplicationList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupCreationInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummary; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummaryList; @@ -17,7 +18,9 @@ public interface AccountPolicyGroupsApi { /** * Add API keys to the group. Add API keys to the group. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` * * @param groupId * The ID of the group. (required) @@ -31,8 +34,10 @@ Call addApiKeysToGroup(@retrofit2.http.Path(value = "group_id", en /** * Add API Keys to the group. Add API keys to the group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` * * @param groupId * The ID of the group. (required) @@ -45,9 +50,31 @@ Call addListedApiKeysToGroup(@retrofit2.http.Path(value = "group_i @retrofit2.http.Body SubjectList body); /** - * Add users to the group. Add users to the group. **Example:** ``` curl -X POST + * Add applications to the group. Add applications to the group. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` + * + * @param groupId + * The ID of the group. (required) + * @param body + * A list of applications to add to the group. (required) + * @return Call<GroupSummary> + */ + @POST("v3/policy-groups/{group_id}/applications/add") + Call + addListedApplicationsToGroup(@retrofit2.http.Path(value = "group_id", encoded = true) String groupId, + @retrofit2.http.Body SubjectList body); + + /** + * Add users to the group. Add users to the group. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` * * @param groupId * The ID of the group. (required) @@ -60,9 +87,10 @@ Call addListedUsersToGroup_(@retrofit2.http.Path(value = "group_id @retrofit2.http.Body SubjectList body); /** - * Add members to a group. Add users and API keys to a group. **Example:** ``` curl -X POST + * Add members to a group. Add users and API keys to a group. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` * @@ -78,9 +106,12 @@ Call addSubjectsToGroup(@retrofit2.http.Path(value = "group_id", e @retrofit2.http.Body SubjectList body); /** - * Add users to the group. Add users to the group. **Example:** ``` curl -X POST + * Add users to the group. Add users to the group. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` * * @param groupId * The ID of the group. (required) @@ -93,10 +124,10 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc @retrofit2.http.Body SubjectList body); /** - * Create a new group. Create a new group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}' - * ``` + * Create a new group. Create a new group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' -d + * '{\"name\": \"MyGroup1\"}' ``` * * @param body * Details of the group to create. (required) @@ -107,9 +138,9 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc Call createGroup(@retrofit2.http.Body GroupCreationInfo body); /** - * Delete a group. Delete a group. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Delete a group. Delete a group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ + * -H 'Authorization: Bearer <access_key>' ``` * * @param groupId * The ID of the group to delete. (required) @@ -119,17 +150,16 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc Call deleteGroup(@retrofit2.http.Path(value = "group_id", encoded = true) String groupId); /** - * Get all group information. Retrieve all group information. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' + * Get policy groups. Retrieve an array of policy groups. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <access_key>' * ``` * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param nameEq @@ -143,19 +173,18 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc @retrofit2.http.Query("name__eq") String nameEq); /** - * Get the API keys of a group. Manage policy groups. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Get the API keys of a policy group. Retrieve an array of API keys associated with a policy group. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param groupId * The ID of the group. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<ApiKeyInfoRespList> @@ -167,31 +196,56 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include); /** - * Get group information. Retrieve general information about a group. **Example:** ``` curl -X GET + * Get the applications of a policy group. Retrieve an array of applications associated with a policy group. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param groupId + * The ID of the group. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<ApplicationList> + */ + @GET("v3/policy-groups/{group_id}/applications") + Call + getApplicationsOfGroup(@retrofit2.http.Path(value = "group_id", encoded = true) String groupId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + + /** + * Get a policy group. Retrieve a policy group. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param groupId - * The ID of the group to retrieve. (required) + * The ID of the policy group to retrieve. (required) * @return Call<GroupSummary> */ @GET("v3/policy-groups/{group_id}") Call getGroupSummary(@retrofit2.http.Path(value = "group_id", encoded = true) String groupId); /** - * Get users of a group. Retrieve users of a group with details. **Example:** ``` curl -X GET + * Get users of a policy group. Retrieve an array of users associated with a policy group. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param groupId * The ID of the group. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param statusEq @@ -214,8 +268,8 @@ Call addUsersToGroup_(@retrofit2.http.Path(value = "group_id", enc /** * Remove API keys from a group. Remove API keys from groups. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` * * @param groupId @@ -232,8 +286,8 @@ Call removeApiKeysFromGroup(@retrofit2.http.Path(value = "group_id /** * Remove API keys from a group. Remove API keys from groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` * * @param groupId @@ -249,10 +303,31 @@ Call removeApiKeysFromGroup(@retrofit2.http.Path(value = "group_id @retrofit2.http.Body SubjectList body); /** - * Remove users from a group. Manage policy groups. **Example:** ``` curl -X POST + * Remove applications from a group. Remove applications from groups. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` + * + * @param groupId + * The ID of the group. (required) + * @param body + * A list of applications to remove from the group. (required) + * @return Call<GroupSummary> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/policy-groups/{group_id}/applications/remove") + Call + removeListedApplicationsFromGroup(@retrofit2.http.Path(value = "group_id", encoded = true) String groupId, + @retrofit2.http.Body SubjectList body); + + /** + * Remove users from a group. Remove users from a policy group. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` * * @param groupId @@ -268,10 +343,11 @@ Call removeApiKeysFromGroup(@retrofit2.http.Path(value = "group_id @retrofit2.http.Body SubjectList body); /** - * Remove users from a group. Manage policy groups. **Example:** ``` curl -X DELETE + * Remove users from a group. Manage policy groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` * * @param groupId @@ -286,9 +362,10 @@ Call removeUsersFromGroup(@retrofit2.http.Path(value = "group_id", @retrofit2.http.Body SubjectList body); /** - * Update the group name. Update a group name. **Example:** ``` curl -X PUT + * Update the group name. Update a group name. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"TestGroup2\"}' ``` * * @param groupId diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApi.java index ae7d54902..31b0741a7 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApi.java @@ -10,9 +10,9 @@ public interface AccountProfileApi { /** - * Get account info. Retrieve detailed information about the account. **Example:** ``` curl -X GET + * Get account information. Retrieve information about the account. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param include * Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts. @@ -26,10 +26,10 @@ Call getMyAccountInfo(@retrofit2.http.Query("include") String inclu @retrofit2.http.Query("properties") String properties); /** - * Updates attributes of the account. Update the account. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' - * ``` + * Updates attributes of the account. Update the account. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"phone_number\": \"12345678\"}' ``` * * @param body * Details of the account to update. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApi.java index d2c45deb9..a29bd88c2 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApi.java @@ -11,9 +11,10 @@ public interface AccountUserInvitationsApi { /** - * Create a user invitation. Invite a new or existing user. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <api_key>' \\ - * -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} + * Create a user invitation. Invite a new or existing user. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <access_key>' + * \\ -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} * ``` * * @param body @@ -25,9 +26,10 @@ public interface AccountUserInvitationsApi { Call createInvitation(@retrofit2.http.Body UserInvitationReq body); /** - * Delete a user invitation. Delete an active user invitation sent to a new or existing user. **Example:** - * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Delete a user invitation. Delete an active user invitation sent to a new or existing user. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param invitationId * The ID of the invitation to delete. (required) @@ -37,17 +39,17 @@ public interface AccountUserInvitationsApi { Call deleteInvitation(@retrofit2.http.Path(value = "invitation_id", encoded = true) String invitationId); /** - * Get the details of all user invitations. Retrieve details for all the active user invitations. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Get user invitations. Retrieve an array of active user invitations sent by email. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <access_key>' + * ``` * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param loginProfilesEq * Filter to retrieve user invitations by a specified login profile. (optional) * @return Call<UserInvitationRespList> @@ -59,9 +61,10 @@ Call getAllInvitations(@retrofit2.http.Query("limit") In @retrofit2.http.Query("login_profiles__eq") String loginProfilesEq); /** - * Details of a user invitation. Retrieve the details of an active user invitation. **Example:** ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Details of a user invitation. Retrieve the details of an active user invitation. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param invitationId * The ID of the invitation to retrieve. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApi.java index cbaeff42e..2a95b2ab5 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApi.java @@ -16,9 +16,10 @@ public interface AccountUsersApi { /** - * Add user to a list of groups. Add user to groups. **Example:** ``` curl -X POST + * Add user to a list of groups. Add user to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -34,9 +35,10 @@ Call addUserToGroups(@retrofit2.http.Path(value = "user_id", encod @retrofit2.http.Body List body); /** - * Add user to a list of groups. Add user to groups. **Example:** ``` curl -X POST + * Add user to a list of groups. Add user to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -52,10 +54,11 @@ Call addUserToListedGroups(@retrofit2.http.Path(value = "user_id", @retrofit2.http.Body GroupIdList body); /** - * Create a new user. Create or invite a new user to the account. Only email address is used; other attributes are - * set in the second step. **Example:** ``` curl -X POST + * Create a new user. Create or invite a new user to the account. The invited user has to accept the invitation by + * clicking the link in the invitation email. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": * \"myemail@company.com\"} ``` * * @param body @@ -69,9 +72,9 @@ Call addUserToListedGroups(@retrofit2.http.Path(value = "user_id", Call createUser(@retrofit2.http.Body UserInfoReq body, @retrofit2.http.Query("action") String action); /** - * Delete a user. Delete a user. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Delete a user. Delete a user. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param userId * The ID of the user to delete. (required) @@ -81,17 +84,16 @@ Call addUserToListedGroups(@retrofit2.http.Path(value = "user_id", Call deleteUser(@retrofit2.http.Path(value = "user_id", encoded = true) String userId); /** - * Get the details of all users. Retrieve the details of all users. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/users \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Get users. Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param emailEq @@ -117,19 +119,19 @@ Call addUserToListedGroups(@retrofit2.http.Path(value = "user_id", @retrofit2.http.Query("login_profiles__eq") String loginProfilesEq); /** - * Get groups of the user. Retrieve groups of the user. **Example:** ``` curl -X GET + * Get policy groups for a user. Retrieve an array of policy groups associated with a user. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param userId * The ID of the user. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<GroupSummaryList> @@ -141,25 +143,9 @@ Call addUserToListedGroups(@retrofit2.http.Path(value = "user_id", @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include); /** - * Details of the current user. Retrieve the details of the logged-in user. - * - * @param scratchCodes - * Request to regenerate new emergency scratch codes. (optional) - * @param properties - * Request to return account-specific user property values according to the given property name. - * (optional) - * @param include - * Comma-separated additional data to return. Currently supported: active_sessions. (optional) - * @return Call<UserInfoResp> - */ - @GET("v3/users/me") - Call getMyUser(@retrofit2.http.Query("scratch_codes") String scratchCodes, - @retrofit2.http.Query("properties") String properties, - @retrofit2.http.Query("include") String include); - - /** - * Details of a user. Retrieve the details of a user. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' + * Details of a user. Retrieve the details of a user. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <access_key>' * ``` * * @param userId @@ -170,9 +156,23 @@ Call getMyUser(@retrofit2.http.Query("scratch_codes") String scrat Call getUser(@retrofit2.http.Path(value = "user_id", encoded = true) String userId); /** - * Remove user from groups. Remove user from groups. **Example:** ``` curl -X DELETE + * Remove user from the account. Remove user from the account. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/remove \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param userId + * The ID of the user to remove from the account. (required) + * @return Call<Void> + */ + @POST("v3/users/{user_id}/remove") + Call removeUserFromAccount(@retrofit2.http.Path(value = "user_id", encoded = true) String userId); + + /** + * Remove user from groups. Remove user from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -188,9 +188,10 @@ Call removeUserFromGroups(@retrofit2.http.Path(value = "user_id", @retrofit2.http.Body List body); /** - * Remove user from groups. Remove user from groups. **Example:** ``` curl -X POST + * Remove user from groups. Remove user from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -206,24 +207,10 @@ Call removeUserFromListedGroups(@retrofit2.http.Path(value = "user @retrofit2.http.Body GroupIdList body); /** - * Update user details. Update user details. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/users/me \\ -H 'Authorization: Bearer <token>' \\ -H - * 'content-type: application/json' \\ -d '{\"full_name\": \"fullname\"}' - * ``` - * - * @param body - * A user object with attributes. (required) - * @return Call<UserInfoResp> - */ - @Headers({ "Content-Type:application/json" }) - @PUT("v3/users/me") - Call updateMyUser(@retrofit2.http.Body UserUpdateReq body); - - /** - * Update user details. Update user details **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' \\ - * -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' - * ``` + * Update user details. Update user details. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"username\": \"myusername\"}' ``` * * @param userId * The ID of the user. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApi.java new file mode 100644 index 000000000..633c4f9c8 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApi.java @@ -0,0 +1,243 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ChannelMetadata; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.NotificationMessage; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.RegisterWebsocketChannel; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Webhook; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.WebsocketChannel; + +public interface DeviceDataNotificationsApi { + /** + * Open the websocket. A websocket channel can have only one active connection at a time. If a websocket connection + * for a channel exists and a new connection to the same channel is made, the connection is accepted and the older + * connection is closed. A websocket client library should be used when connecting to this endpoint. Once the socket + * has been opened, the server may close it with one of the following status codes. <table> <thead> + * <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> + * <tr> <td><b>1000</b></td> <td>Socket closed normally by the client, or by the + * server when the channel is deleted with a REST call.</td> </tr> <tr> + * <td><b>1001</b></td> <td>Going away. Set when another socket opens on the used + * channel.</td> </tr> <tr> <td><b>1006</b></td> <td>Abnormal + * closure. The client should reconnect after receiving this status code. A short reconnect delay is + * recommended.</td> </tr> <tr> <td><b>1008</b></td> <td>Policy + * violation. Set if the access key is lost or invalidated after a successful WebSocket handshake.</td> + * </tr> <tr> <td><b>1011</b></td> <td>Unexpected condition. The socket is + * closed with this status in an attempt to open a socket to a nonexistent channel (without a prior PUT request). + * This code is also used to indicate a closing socket for any other unexpected condition in the server.</td> + * </tr> <tr> <td><b>1012</b></td> <td>Service restart. Set when the + * server restarts for update, maintenance, and so on. The client should reconnect after receiving this status code. + * A short reconnect delay is recommended.</td> </tr> </tbody> </table> **Expected client + * behaviour:** If the connection is closed with code 1006 or 1012, the client should try to reconnect to maintain + * the notification flow. The client might disconnect several times in a relatively short period, for example, + * during service updates. This is normal. The desired client behavior is to reconnect after each disconnect. + * **Example:** The example is meant only for testing. For production devices, use a WebSocket client library. + * Websocat (https://github.com/vi/websocat) is a command-line client for WebSockets, like netcat or cURL. The + * example command opens a new WebSocket, waits for any data sent to the socket from the server, and prints it to + * `stdout`. ``` websocat + * wss://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect \\ -H + * \"Sec-WebSocket-Protocol:wss,pelion_ak_<access_key>\" ``` + * + * @param connection + * (required) + * @param upgrade + * (required) + * @param origin + * Originating host of the request. (required) + * @param secWebSocketVersion + * WebSocket version. Must be 13. (required) + * @param secWebSocketKey + * The value of this header field must be a nonce consisting of a randomly selected 16-byte value that + * has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each + * connection. (required) + * @param secWebSocketProtocol + * Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if + * Authorization header cannot be provided**: + * `Sec-WebSocket-Protocol:\"wss,pelion_ak_{access_key}\"`. Refer to the notification + * service documentation for examples. (optional) + * @return Call<Void> + */ + @GET("v2/notification/websocket-connect") + Call connectWebsocket(@retrofit2.http.Header("Connection") String connection, + @retrofit2.http.Header("Upgrade") String upgrade, + @retrofit2.http.Header("Origin") String origin, + @retrofit2.http.Header("Sec-WebSocket-Version") Integer secWebSocketVersion, + @retrofit2.http.Header("Sec-WebSocket-Key") String secWebSocketKey, + @retrofit2.http.Header("Sec-WebSocket-Protocol") String secWebSocketProtocol); + + /** + * Delete notification Long Poll channel. Delete a notification Long Poll channel. This is required to change the + * channel from Long Poll to another type. Do not make a GET `/v2/notification/pull` call for two minutes + * after deleting the channel, because it can implicitly recreate the pull channel. You can also have some random + * responses with payload or 410 GONE with \"CHANNEL_DELETED\" as a payload or 200/204 until the old + * channel is purged. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H 'Authorization: Bearer <access_key>' + * ``` + * + * @return Call<Void> + */ + @DELETE("v2/notification/pull") + Call deleteLongPollChannel(); + + /** + * Delete websocket channel. Delete a notification websocket channel bound to the application. This is required to + * change the channel from websocket to another type. Deleting the websocket channel also removes the channel's + * notification queue. Any unsent notifications are lost when the channel is deleted. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @return Call<Void> + */ + @DELETE("v2/notification/websocket") + Call deleteWebsocket(); + + /** + * Delete callback URL. Deletes the callback URL. Deleting the callback URL also removes the channel's + * notification queue. Any unsent notifications are lost when the channel is deleted. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @return Call<Void> + */ + @DELETE("v2/notification/callback") + Call deregisterWebhook(); + + /** + * Get channel metadata. Get channel delivery mechanism. **Example:** curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/channel \\ -H 'Authorization: Bearer + * <access_key>' + * + * @return Call<ChannelMetadata> + */ + @GET("v2/notification/channel") + Call getChannelMetadata(); + + /** + * Check callback URL. Shows the current callback URL if it exists. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @return Call<Webhook> + */ + @GET("v2/notification/callback") + Call getWebhook(); + + /** + * Get websocket channel information. Returns 200 with websocket connection status, if websocket channel exists. + * **Note**: The current version does not yet have the capability to determine the channel status and will always + * return status 'unknown' and queue size '-1'. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @return Call<WebsocketChannel> + */ + @GET("v2/notification/websocket") + Call getWebsocket(); + + /** + * Get notifications using Long Poll In this case, notifications are delivered through HTTP long poll requests. The + * HTTP request is kept open until one or more event notifications are delivered to the client, or the request times + * out (response code 204). In both cases, the client should open a new polling connection after the previous one + * closes. Only a single long polling connection per application can be ongoing at any given time. We recommend + * using a persistent connection (Connection keep-alive header in the request) to avoid excess TLS handshakes. The + * pull channel is implicitly created by the first GET call to `/v2/notification/pull`. It refreshes on + * each GET call. If the channel is not polled for a long time (10 minutes), it expires and is deleted. This means + * that no notifications will stay in the queue between polls. A channel can be also be deleted explicitly with a + * DELETE call. **Note:** If you cannot have a public-facing callback URL, for example, when developing on your + * local machine, you can use long polling to check for new messages. However, **long polling is deprecated** and + * will likely be replaced in the future. It is meant only for experimentation, not commercial use. The proper + * method to receive notifications is a **notification callback**. There can only be one notification channel per + * application in Device Management Connect. If a notification channel of other type already exists for the + * application, delete it before creating a long poll notification channel. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @return Call<NotificationMessage> + */ + @GET("v2/notification/pull") + Call longPollNotifications(); + + /** + * Register a callback URL. Register a URL to which the server delivers notifications of changes to the subscribed + * resource. To push notifications, you must first place subscriptions. The maximum length of the URL, header keys, + * and values, all combined, is 400 characters. Notifications are delivered as PUT requests to the HTTP server, + * which the client defines with a subscription server message. The given URL must be accessible, and respond to the + * PUT request with a response code of 200 or 204. Device Management Connect tests the callback URL with an empty + * JSON payload `{}` when the URL is registered. Callback implementation does not support URL redirection. + * For more information on notification messages, see [NotificationMessage](#NotificationMessage). **Optional + * headers in a callback message:** You can set optional headers to a callback in a **Webhook** object. Device + * Management Connect includes the header and key pairs in the notification messages send them to callback URL. The + * callback URLs and headers are application-specific. One possible use for additional headers is checking the + * origin of a PUT request, as well as distinguishing the application to which the notification belongs. **Note**: + * Only one callback URL for each application can be active. If you register a new URL while another one is active, + * it replaces the active one. There can be only one notification channel at a time for each application. If another + * type of channel is already present, you need to delete it before setting the callback URL. **Expiration of a + * callback URL:** A callback can expire when Device Management cannot deliver a notification due to a connection + * timeout or error response (4xx or 5xx). After each delivery failure, Device Management sets an exponential + * back-off time and makes a retry attempt after that. The first retry delay is 1 second, then 2s, 4s, 8s, up to a + * maximum delay of two minutes. The retry delay is applied when the response is received, or in case of timeout, + * after the timeout expires. The request timeout is 20 seconds; in the case of timeout, the first retry happens 20 + * + 1 seconds after the first delivery attempt, then 20 + 2 seconds, and so on. The callback URL is removed if all + * retries fail within 24 hours. More about [notification sending + * logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) + * in the Device Management documentation. **Supported callback URL protocols:** Currently, only HTTP and HTTPS + * protocols are supported. **HTTPS callback URLs:** When delivering a notification to an HTTPS-based callback URL, + * Device Management Connect identifies itself with a valid client certificate. The certificate is signed by a + * trusted certificate authority (GlobalSign), with a Common Name (CN) set to + * `notifications.mbedcloud.com`. **Configuration options:** The event notification channel provides + * configurations options defined in [Serialization config](#SerializationConfigObjectV2). **Example:** This example + * command shows how to set your callback URL. It also sets an optional header authorization. When Device Management + * Connect calls your callback URL, the call contains the authorization header with the defined value. + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"url\": \"{callback-url}\", \"headers\": {\"authorization\": + * \"f4b93d6e-4652-4874-82e4-41a3ced0cd56\"}, \"serialization\": {\"type\": + * \"v2\", \"max_chunk_size\": \"100\", \"cfg\": + * {\"deregistrations_as_object\": \"true\", \"include_uid\": \"true\", + * \"include_timestamp\": \"true\", \"include_original_ep\": \"true\" } } + * }' ``` + * + * @param webhook + * A JSON object that contains the optional headers and URL where notifications are sent. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @PUT("v2/notification/callback") + Call registerWebhook(@retrofit2.http.Body Webhook webhook); + + /** + * Register a websocket channel. Register (or update) a channel using websocket connection to deliver notifications. + * The websocket channel should be opened by client using `/v2/notification/websocket-connect` endpoint. + * To get notifications pushed, you must place subscriptions. For more information on notification messages, see + * [NotificationMessage](#NotificationMessage). A websocket channel can have only one active websocket connection at + * a time. If a websocket connection for a channel exists and a new connection to the same channel is made, the + * connection is accepted and the older connection is closed. **Note**: Only one websocket channel for each + * application can be active at a time. If you register a new websocket channel while another one is active, it + * replaces the previously active one. If another type of channel is already present, you need to delete it before + * registering a websocket channel. **Note**: The current version does not yet have the capability to determine the + * channel status and will always return status 'unknown' and queue size '-1'. **Expiration of a + * websocket:** A websocket channel is expired if the channel does not have an opened websocket connection for a + * 24-hour period. Channel expiration means the channel is deleted and any undelivered notifications stored in its + * internal queue is removed. As long as the channel has an opened websocket connection or time between successive + * websocket connections is less than 24 hours, the channel is considered active, notifications are stored in its + * internal queue and delivered when a websocket connection is active. A channel can be also deleted explicitly with + * a DELETE call. More about [notification sending + * logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic). + * **Configuration options:** The event notification channel provides configurations options defined in + * [Serialization config](#SerializationConfigObjectV2) **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer + * <access_key>' \\ -d '{ \"serialization\": {\"type\": \"v2\", + * \"max_chunk_size\": \"100\", \"cfg\": {\"deregistrations_as_object\": + * \"true\", \"include_uid\": \"true\", \"include_timestamp\": + * \"true\", \"include_original_ep\": \"true\" } } } ``` + * + * @return Call<RegisterWebsocketChannel> + */ + @Headers({ "Content-Type:application/json" }) + @PUT("v2/notification/websocket") + Call registerWebsocket(); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApi.java new file mode 100644 index 000000000..96366433d --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApi.java @@ -0,0 +1,98 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceRequest; + +public interface DeviceDataRequestsApi { + /** + * Send an asynchronous request to read, write or post to a device resource. This API provides an interface to call + * CoAP (Constrained Application Protocol) methods on a device and send commands to device resources. As part of the + * request body, you must specify the CoAP method you want to call on the device: - Use the GET method to read + * resource values. For example, to read the value of resource `/3200/0/5501`, use: ``` + * curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-requests/{device_id}?async-id={async-response-id} + * \\ -H 'Authorization: Bearer {access_key}' \\ -H 'content-type: application/json' \\ -d + * '{\"method\": \"GET\", \"uri\": \"/3200/0/5501\"}' + * ``` > For `GET` methods, the API may fetch values from an internal cache, instead of + * contacting the device. > If the value is not in the cache, the read command goes all the way to the device. - + * Use the PUT method to write [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) or + * resource values for a resource. Example payload to write a notification rule: ``` { + * \"method\": \"PUT\", \"uri\": + * \"/5/0/1?lt=10&gt=60&pmax=120\" } ``` - Example payload to write + * a value to resource `/5/0/1`: ``` { \"method\": \"PUT\", + * \"uri\": \"/5/0/1?k1=v1&k2=v2\", \"accept\": + * \"text/plain\", \"content-type\": \"text/plain\", \"payload-b64\": + * \"dmFsdWUxCg==\" } ``` - Use the POST method to execute or create a resource + * on a LWM2M supporting device. When you create a resource, `uri` must refer to an object, and + * `payload-b64` must be in LWM2M TLV format for example: ``` { \"method\": + * \"POST\", \"uri\": \"/123\", \"content-type\": + * \"application/vnd.oma.lwm2m+tlv\", \"payload-b64\": \"BwHFAnZhbHVl\" } + * ``` - Use the POST method to execute resource on a LWM2M supporting device. Example payload to + * execute LWM2M resource `/123/1/1`: ``` { \"method\": \"POST\", + * \"uri\": \"/123/1/1\" } ``` - Device Management sends responses through the + * currently configured notification channel as `AsyncIDResponse`. Example `AsyncIDResponse` + * delivered through the notification channel: ``` { \"async-responses\": [ { + * \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 200, + * \"payload\": \"dmFsdWUxCg==\", \"ct\": \"text/plain\", + * \"max-age\": 600 } ] } ``` ``` { \"async-responses\": [ { + * \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 504, + * \"error\": \"TIMEOUT\" } ] } ``` > If it cannot reach the device at the + * time of the request, Device Management puts the requests in a queue. **Queueing behavior** If Device Management + * does not reach the device, or the device fails to respond, the server queues the request and retries the + * delivery, for the period of time defined by `expiry-seconds`, the next time the device contacts the + * server. The queue is limited to 20 requests per device. If the queue is full, subsequent messages will be + * rejected until some of the existing messages are delivered or expired. Device Management delivers requests from + * the queue in the order of insertion, one at a time, and not concurrently. Delivery attempts follow + * protocol-specific retransmission logic. There can be multiple transmissions, depending on the protocol. For CoAP, + * the retransmissions have an exponential backoff of 2, 4, 8, 16, and up to 64 seconds, taking in total over two + * minutes. If the device does not respond within this two-minute period, the delivery fails, Device Management + * performs one retry and then puts the request back into the queue until the retry count reaches its limit. Device + * Management attempts to redeliver the request when the device next contacts the server. When Device Management + * reaches the `retry` or `expiry-seconds` limit, the server discards the request and sends an + * error in `AsyncIDResponse`. For example: - Retries could be exhausted if the device periodically + * contacts the server and receives the request from the queue, but then fails to respond to the server. - The + * device may lose its network connectivity, and the requests in the queue may expire and get discarded before the + * device regains connectivity. When Device Management delivers the request to the device, the status code in + * `AsyncIDResponse` is *2xx* or *4xx*, based on the device's response. If Device Management could not + * deliver the request, the server generates a status code of *429* or *5xx*. + * + * @param deviceId + * The device ID generated by Device Management. (required) + * @param asyncId + * A client-generated ID that lets the REST client track the end-to-end flow and prevents race conditions + * with the notification channel. The `async-id` can be, for example, a UUID or the web + * application session ID along with the device ID and the resource. (required) + * @param body + * Device request to send. The body element has `method`, `uri`, `accept`, + * `content-type` and `payload-b64` fields. - The `method` is one of + * `GET`, `PUT`, `POST`, `DELETE`. - The `uri` field is + * the path to the LwM2M object and can include query parameters. This can include key-value pairs, for + * example, `/5/0/1?key1=value1;key2=value2`. - The `accept` field defines + * the content type that the requesting client will accept. - The `content-type` describes the + * content type of the base-64 encoded `payload-b64` field. - The `payload-b64` is + * the payload to send to the device in base-64 encoded form. (required) + * @param retry + * The number of attempts to deliver the request to the device after the first delivery attempt. For + * example, two retries sums up to the total of three delivery attempts. When retries are exhausted, + * Device Management discards the request and delivers an error in the AsyncIDResponse. The default + * number of retries for a non-queue mode device is `0`. The default number of retries for a + * queue-mode device is `2`. (optional) + * @param expirySeconds + * The time period during which the delivery is attempted, in seconds. If the device is not reachable + * within this period, Device Management discards the request and delivers an error in the + * AsyncIDResponse. The default time period during which the delivery is attempted is two hours for a + * non-queue mode device and three days for a queue-mode device. (optional) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v2/device-requests/{device-id}") + Call createAsyncRequest(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Query("async-id") String asyncId, + @retrofit2.http.Body DeviceRequest body, @retrofit2.http.Query("retry") Integer retry, + @retrofit2.http.Query("expiry-seconds") Integer expirySeconds); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApi.java new file mode 100644 index 000000000..b1befe798 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApi.java @@ -0,0 +1,173 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AsyncID; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ResourceArray; + +public interface DeviceDataResourcesApi { + /** + * (DEPRECATED) Delete a resource path. (DEPRECATED) A request to delete a resource path must be handled by both + * Device Management Client and Device Management Connect. All resource APIs are asynchronous. These APIs respond + * only if the device is on and connected to Device Management Connect, and there is an active notification channel. + * **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * The resource URL. (required) + * @param noResp + * If you make a request with `noResp=true`, Device Management Connect makes a CoAP + * non-confirmable request to the device. Such requests are not guaranteed to arrive at the device, and + * do not return an async-response-id. When calls with this parameter enabled succeed, they return with + * the status code `204 No Content`. If the underlying protocol does not support + * non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code + * `409 Conflict`. (optional) + * @return Call<AsyncID> + */ + @DELETE("v2/endpoints/{device-id}/{resourcePath}") + Call deleteResourcePath(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath, + @retrofit2.http.Query("noResp") Boolean noResp); + + /** + * (DEPRECATED) Execute a function on a Resource or create new Object instance. (DEPRECATED) [Execute a + * function](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html#the-execute-operation) + * on an existing resource and create a new Object instance on the device. The resource path does not have to exist; + * you can set it with the call. The maximum length of the resource path is 255 characters. All resource APIs are + * asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there + * is an active notification channel. Supported content types depend on the device and its resource. Device + * Management translates HTTP to the equivalent CoAP content type. **Example:** This example resets the min and max + * values of the [temperature sensor](http://www.openmobilealliance.org/tech/profiles/lwm2m/3303.xml) instance 0 by + * executing Resource 5605 'Reset Min and Max Measured Values'. ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3303/0/5605 \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * The resource URL. (required) + * @param resourceFunction + * This value is not needed. Most of the time, resources do not accept a function; they have their own + * functions predefined. You can use this to trigger them. If a function is included, the body of this + * request is passed as a char* to the function in Device Management Client. (optional) + * @param noResp + * If you make a request with `noResp=true`, Device Management Connect makes a CoAP + * non-confirmable request to the device. Such requests are not guaranteed to arrive in the device, and + * you do not get back an async-response-id. When calls with this parameter enabled succeed, they return + * with the status code `204 No Content`. If the underlying protocol does not support + * non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code + * `409 Conflict`. (optional) + * @return Call<AsyncID> + */ + @Headers({ "Content-Type:application/vnd.oma.lwm2m+json" }) + @POST("v2/endpoints/{device-id}/{resourcePath}") + Call + executeOrCreateResource(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath, + @retrofit2.http.Body String resourceFunction, + @retrofit2.http.Query("noResp") Boolean noResp); + + /** + * List the resources on a device. Retrieves information about the resource structure for a device from Device + * Management. This call does not reach the device. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @return Call<ResourceArray> + */ + @GET("v2/endpoints/{device-id}") + Call getEndpointResources(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId); + + /** + * (DEPRECATED) Read from a resource. (DEPRECATED) Requests the resource value either from the device or cache. If + * the value is not in the cache, the request goes all the way to the device. When the response is available, an + * `AsyncIDResponse` JSON object is received in the notification channel. The resource values can also be + * in cache based on `max_age` defined by the device. The value found from the cache is returned + * immediately in the response. The preferred way to get resource values is to use the **subscribe** and + * **callback** methods. All resource APIs are asynchronous. These APIs only respond if the device is on and + * connected to Device Management. See also how [resource + * caching](https://developer.pelion.com/docs/device-management/current/connecting/device-guidelines.html#resource-cache) + * works. Please see the [Lightweight Machine to Machine Technical + * specification](http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf) + * for more information. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * Unique Device Management device ID for the endpoint. The ID must be an exact match. Do not use + * wildcards. (required) + * @param resourcePath + * The resource URL. (required) + * @param cacheOnly + * If true, the response comes only from the cache. Default: false. Device Management Connect caches the + * received resource values for the time of + * [max_age](https://developer.pelion.com/docs/device-management/current/resources/working-with-the-resources.html) + * defined in the client. (optional) + * @param noResp + * If a request is made with `noResp=true`, Device Management Connect makes a CoAP + * non-confirmable request to the device. Such requests are not guaranteed to arrive on the device, and + * no `async-response-id` returns. Successful calls return with the status code `204 No + * Content`. If the underlying protocol does not support non-confirmable requests, or if the + * endpoint is registered in queue mode, the response is status code `409 Conflict`. (optional) + * @return Call<Void> + */ + @GET("v2/endpoints/{device-id}/{resourcePath}") + Call getResourceValue(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath, + @retrofit2.http.Query("cacheOnly") Boolean cacheOnly, + @retrofit2.http.Query("noResp") Boolean noResp); + + /** + * (DEPRECATED) Write to a Resource or use write-attributes (notification rules) for a Resource. (DEPRECATED) With + * this API, you can [write a new value to existing + * Resources](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) or + * use the **write** attribute to set [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) for the + * Resources. The notification rules only work on the device client side and may not be supported by all clients. + * This API can also be used to transfer files to the device. Device Management Connect LwM2M server implements + * Option 1 from RFC7959. The maximum block size is 1024 bytes. Note block size versus transferred file size in + * low-quality networks. The customer application needs to know what type of file is transferred (for example, TXT) + * and the customer can encrypt the payload. The maximum payload size is 1048576 bytes. All resource APIs are + * asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there + * is an active notification channel. Supported content types depend on the device and its resource. Device + * Management translates HTTP to equivalent CoAP content type. **Example:** This example sets the alarm on a buzzer. + * The command writes the [Buzzer](http://www.openmobilealliance.org/tech/profiles/lwm2m/3338.xml) instance 0, + * \"On/Off\" boolean resource to '1'. ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3338/0/5850 \\ -H \"content-type: + * text/plain\" \\ -H 'Authorization: Bearer <access_key>' \\ -d '1' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * Resource URL. (required) + * @param resourceValue + * The value to set to the resource. (required) + * @param noResp + * If you make a request with `noResp=true`, Device Management Connect makes a CoAP + * non-confirmable request to the device. Such requests are not guaranteed to arrive to the device, and + * do not return an `async_response_id`. When a call with this parameter enabled succeeds, it + * return status code `204 No Content`. If the underlying protocol does not support + * non-confirmable requests, or if the endpoint is registered in queue mode, the response is status code + * `409 Conflict`. (optional) + * @return Call<AsyncID> + */ + @Headers({ "Content-Type:application/vnd.oma.lwm2m+json" }) + @PUT("v2/endpoints/{device-id}/{resourcePath}") + Call updateResourceValue(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath, + @retrofit2.http.Body String resourceValue, + @retrofit2.http.Query("noResp") Boolean noResp); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApi.java new file mode 100644 index 000000000..32e66322c --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApi.java @@ -0,0 +1,168 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.PresubscriptionArray; + +public interface DeviceDataSubscriptionsApi { + /** + * Subscribe to a resource to receive updates about resource changes. Subscribe to a resource to receive updated + * resource content, periodically or based on a more sophisticated solution-dependent logic. To place dynamic + * observation rules for individual object instances and resources and define when the device sends observations, + * set [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + * **Note:** Device Management removes all manual subscriptions during a full device registration, at which point + * applications must re-subscribe. To avoid this, use `/subscriptions` to set a pre-subscription. You can + * subscribe to resources, objects and object instances. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` **Important:** You must also call a + * [`/notification/callback`](https://developer.pelion.com/docs/device-management-api/notifications/) + * method for Device Management Connect to push resource change notifications. + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * The resource URL. This can be the path to: - An object; for example, `3303`. - An object + * instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more + * information about the Device Management resource model, please see the [Device Management + * documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). + * (required) + * @return Call<Void> + */ + @PUT("v2/subscriptions/{device-id}/{resourcePath}") + Call + addResourceSubscription(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath); + + /** + * Read the subscription status for a specific resource. Check whether you are subscribed to receive resource + * content updates for a specific resource. + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * The resource URL. This can be the path to: - An object; for example, `3303`. - An object + * instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more + * information about the Device Management resource model, please see the [Device Management + * documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). + * (required) + * @return Call<Void> + */ + @GET("v2/subscriptions/{device-id}/{resourcePath}") + Call + checkResourceSubscription(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath); + + /** + * Delete all subscriptions on a device. Delete all resource subscriptions in a single device. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @return Call<Void> + */ + @DELETE("v2/subscriptions/{device-id}") + Call deleteEndpointSubscriptions(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId); + + /** + * Remove pre-subscriptions. Remove pre-subscriptions. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' + * ``` + * + * @return Call<Void> + */ + @DELETE("v2/subscriptions") + Call deletePreSubscriptions(); + + /** + * Remove a subscription. Remove an existing subscription to a resource. **Example:** ``` curl -X + * DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: + * Bearer <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @param resourcePath + * The resource URL. This can be the path to: - An object; for example, `3303`. - An object + * instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more + * information about the Device Management resource model, please see the [Device Management + * documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). + * (required) + * @return Call<Void> + */ + @DELETE("v2/subscriptions/{device-id}/{resourcePath}") + Call + deleteResourceSubscription(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId, + @retrofit2.http.Path(value = "resourcePath", encoded = true) String resourcePath); + + /** + * View all subscriptions on a device. Retrieve a list of all subscribed resources on a single device. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. The ID must be an exact match. Do not use wildcards. + * (required) + * @return Call<String> + */ + @GET("v2/subscriptions/{device-id}") + Call getEndpointSubscriptions(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId); + + /** + * View pre-subscriptions. Retrieve pre-subscription data. The server returns a JSON structure. If there are no + * pre-subscribed resources, the server returns an empty array. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' + * ``` + * + * @return Call<PresubscriptionArray> + */ + @GET("v2/subscriptions") + Call getPreSubscriptions(); + + /** + * Set pre-subscriptions. A pre-subscription is a set of rules you define to subscribe to specific resources + * automatically when certain devices register or does a register update. You can set subscription rules based on + * the endpoint ID (optionally having an `*` character at the end), endpoint type, a list of resources, or + * expressions with an `*` character at the end. When a device that meets the subscription rules + * registered, Device Management Connect automatically sends subscription requests to the device for the resources + * you specify. To remove the pre-subscription data, put an empty array as a rule. To place dynamic observation + * rules for individual object instances and resources and define when the device sends observations, set + * [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + * **Note:** The subscription is bound to the application you are using. To get notifications of the resource value + * changes, you need to create an [event notification + * channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html) + * with an access key of the same application. **Example request:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' \\ + * -H 'content-type: application/json' \\ -d '[ { \"endpoint-name\": \"node-001\", + * \"resource-path\": [\"/dev\"] }, { \"endpoint-type\": \"Light\", + * \"resource-path\": [\"/sen/_*\"] }, { \"endpoint-name\": \"node*\" }, { + * \"endpoint-type\": \"Sensor\" }, { \"resource-path\": + * [\"/dev/temp\",\"/dev/hum\"] } ]' ``` - Subscribe to `/dev` + * resource of endpoint named `node-001`. - Subscribe to `Light` type of endpoints and their + * resources prefixed with `/sen/`. - Subscribe to all observable resources of endpoint names prefixed + * with `node`. - Subscribe to all observable resources of `Sensor` type endpoints. - Subscribe + * to `/dev/temp` and `/dev/hum` resources of all endpoints. **Limits**: - The maximum length of + * the endpoint name and endpoint type is 64 characters. - The maximum length of the resource path is 128 + * characters. - You can subscribe to 256 separate resource paths. - The maximum number of pre-subscription entries + * is 1024. **Note**: To save bandwidth and avoid unnecessary traffic, use resource path patterns to limit the + * matching resources in the presubscription data. This prevents your web application from receiving unwanted + * resource notifications. See [Subscribe only to what you + * need](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + * + * @param presubscription + * Array of pre-subscriptions. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @PUT("v2/subscriptions") + Call updatePreSubscriptions(@retrofit2.http.Body PresubscriptionArray presubscription); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApi.java new file mode 100644 index 000000000..65bd76645 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApi.java @@ -0,0 +1,171 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import org.joda.time.DateTime; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceQuery; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceQueryPage; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceQueryPostPutRequest; + +public interface DeviceDirectoryDeviceQueriesApi { + /** + * Create a device query. Create a new device query. + * + * @param device + * (required) + * @return Call<DeviceQuery> + */ + @POST("v3/device-queries/") + Call deviceQueryCreate(@retrofit2.http.Body DeviceQueryPostPutRequest device); + + /** + * Delete a device query. Delete a device query. + * + * @param queryId + * (required) + * @return Call<Void> + */ + @DELETE("v3/device-queries/{query_id}/") + Call deviceQueryDestroy(@retrofit2.http.Path(value = "query_id", encoded = true) String queryId); + + /** + * List device queries. List all device queries. + * + * @param limit + * How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the + * closest limit. (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) + * @param after + * The ID of the item after which to retrieve the next page. (optional) + * @param include + * Comma-separated list of data fields to return. Currently supported: `total_count`. + * (optional) + * @param filter + * URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL + * encoded query string}` The query string is made up of key/value pairs separated by ampersands. So + * for a query of `key1=value1&key2=value2&key3=value3`, this would be + * encoded as: `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable + * fields The below table lists all filterable fields: <table> <thead> <tr> + * <th>Field</th> <th>= / __eq / __neq</th> <th>__in / + * __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> + * <td>created_at</td> <td>✓</td> <td>✓</td> + * <td>✓</td> </tr> <tr> <td>etag</td> <td>✓</td> + * <td>✓</td> <td>✓</td> </tr> <tr> <td>id</td> + * <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> + * <tr> <td>name</td> <td>✓</td> <td>✓</td> + * <td>&nbsp;</td> </tr> <tr> <td>query</td> + * <td>✓</td> <td>✓</td> <td>&nbsp;</td> </tr> + * <tr> <td>updated_at</td> <td>✓</td> <td>✓</td> + * <td>✓</td> </tr> </tbody> </table> &nbsp; The examples below show + * the queries in *unencoded* form. ###### By device query properties (all properties are filterable): + * For example: `description={value}` ###### On date-time fields: Date-time fields should + * be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted + * variations: * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z. * UTC RFC3339 + * without milliseconds, for example, 2016-11-30T16:25:12Z. * UTC RFC3339 shortened - without + * milliseconds and punctuation, for example, 20161130T162512Z. Date-time filtering supports three + * operators: * Equality. * Greater than or equal to &ndash; field name suffixed with + * `__gte`. * Less than or equal to &ndash; field name suffixed with `__lte`. + * Lower and upper limits to a date-time range may be specified by including both the `__gte` + * and `__lte` forms in the filter: `{field name}[|__lte|__gte]={UTC RFC3339 + * date-time}`. ##### Multi-field example + * `query_id=0158d38771f70000000000010010038c&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` + * Encoded: + * `filter=query_id%3D0158d38771f70000000000010010038c%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z` + * ##### Filtering with filter operators String field filtering supports the following operators: * + * Equality: `__eq`. * Non-equality: `__neq`. * In : `__in`. * Not in: + * `__nin`. For `__in` and `__nin` filters list of parameters must be + * comma-separated: `name__nin=query1,query2` (optional) + * @param createdAtIn + * in filter for the \"created_at\" field (optional) + * @param createdAtNin + * nin filter for the \"created_at\" field (optional) + * @param createdAtLte + * lte filter for the \"created_at\" field (optional) + * @param createdAtGte + * gte filter for the \"created_at\" field (optional) + * @param idEq + * eq filter for the \"id\" field (optional) + * @param idNeq + * neq filter for the \"id\" field (optional) + * @param idIn + * in filter for the \"id\" field (optional) + * @param idNin + * nin filter for the \"id\" field (optional) + * @param nameEq + * eq filter for the \"name\" field (optional) + * @param nameNeq + * neq filter for the \"name\" field (optional) + * @param nameIn + * in filter for the \"name\" field (optional) + * @param nameNin + * nin filter for the \"name\" field (optional) + * @param queryEq + * eq filter for the \"query\" field (optional) + * @param queryNeq + * neq filter for the \"query\" field (optional) + * @param queryIn + * in filter for the \"query\" field (optional) + * @param queryNin + * nin filter for the \"query\" field (optional) + * @param updatedAtIn + * in filter for the \"updated_at\" field (optional) + * @param updatedAtNin + * nin filter for the \"updated_at\" field (optional) + * @param updatedAtLte + * lte filter for the \"updated_at\" field (optional) + * @param updatedAtGte + * gte filter for the \"updated_at\" field (optional) + * @return Call<DeviceQueryPage> + */ + @GET("v3/device-queries/") + Call + deviceQueryList(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("filter") String filter, + @retrofit2.http.Query("created_at__in") String createdAtIn, + @retrofit2.http.Query("created_at__nin") String createdAtNin, + @retrofit2.http.Query("created_at__lte") DateTime createdAtLte, + @retrofit2.http.Query("created_at__gte") DateTime createdAtGte, + @retrofit2.http.Query("id__eq") String idEq, @retrofit2.http.Query("id__neq") String idNeq, + @retrofit2.http.Query("id__in") String idIn, @retrofit2.http.Query("id__nin") String idNin, + @retrofit2.http.Query("name__eq") String nameEq, + @retrofit2.http.Query("name__neq") String nameNeq, + @retrofit2.http.Query("name__in") String nameIn, + @retrofit2.http.Query("name__nin") String nameNin, + @retrofit2.http.Query("query__eq") String queryEq, + @retrofit2.http.Query("query__neq") String queryNeq, + @retrofit2.http.Query("query__in") String queryIn, + @retrofit2.http.Query("query__nin") String queryNin, + @retrofit2.http.Query("updated_at__in") String updatedAtIn, + @retrofit2.http.Query("updated_at__nin") String updatedAtNin, + @retrofit2.http.Query("updated_at__lte") DateTime updatedAtLte, + @retrofit2.http.Query("updated_at__gte") DateTime updatedAtGte); + + /** + * Retrieve a device query. Retrieve a specific device query. + * + * @param queryId + * (required) + * @return Call<DeviceQuery> + */ + @GET("v3/device-queries/{query_id}/") + Call deviceQueryRetrieve(@retrofit2.http.Path(value = "query_id", encoded = true) String queryId); + + /** + * Update a device query. Update a specifc device query. + * + * @param queryId + * (required) + * @param body + * Device query update object. (required) + * @return Call<DeviceQuery> + */ + @PUT("v3/device-queries/{query_id}/") + Call deviceQueryUpdate(@retrofit2.http.Path(value = "query_id", encoded = true) String queryId, + @retrofit2.http.Body DeviceQueryPostPutRequest body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApi.java index 87d18de1e..bf917c905 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApi.java @@ -14,7 +14,8 @@ public interface DeviceDirectoryDevicesApi { /** - * Create a device. Create a new device. + * Create a device. Create a new device in Device Management. Usually you do not need to create a device this way, + * as it is automatically created when it bootstraps or connects to Device Management. * * @param device * (required) @@ -25,18 +26,23 @@ public interface DeviceDirectoryDevicesApi { /** * Delete a device. Delete device. Only available for devices with a developer certificate. Attempting to delete a - * device with a production certicate returns a 400 response. + * device with a production certificate returns a 400 response. * * @param id - * The ID of the device. (required) + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. (required) * @return Call<Void> */ @DELETE("v3/devices/{id}/") Call deviceDestroy(@retrofit2.http.Path(value = "id", encoded = true) String id); /** - * List all devices. List all devices. **Example:** Following example filters devices according to state field and - * returns only devices in 'registered' state: ``` curl -X GET + * List all devices. List all devices enrolled to Device Management for the account. The URL length must be fewer + * than 4096 characters. Requests that exceed this limit, such as those including too many query parameters in a + * filter, fail with a bad request response. devices with too long list of query parameters, the request is deemed + * as bad request. **Example:** Following example filters devices according to state field and returns only devices + * in 'registered' state: ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\ -H 'Authorization: Bearer * <API key>' ``` * @@ -47,6 +53,38 @@ public interface DeviceDirectoryDevicesApi { * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) * @param after * The ID of the item after which to retrieve the next page. (optional) + * @param filter + * URL encoded query string parameter to filter returned data. ##### Filtering + * ```?filter={URL encoded query string}``` The query string is made + * up of key/value pairs separated by ampersands. So for a query of + * ```key1=value1&key2=value2&key3=value3``` this + * would be encoded as follows: + * ```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3``` The + * examples below show the queries in *unencoded* form. ###### By device properties (all properties are + * filterable): + * ```state=[unenrolled|cloud_enrolling|bootstrapped|registered]``` + * ```device_class={value}``` ###### On date-time fields: Date-time + * fields should be specified in UTC RFC3339 format + * ```YYYY-MM-DDThh:mm:ss.msZ```. There are three permitted variations: * + * UTC RFC3339 with milliseconds e.g. 2016-11-30T16:25:12.1234Z * UTC RFC3339 without milliseconds e.g. + * 2016-11-30T16:25:12Z * UTC RFC3339 shortened - without milliseconds and punctuation e.g. + * 20161130T162512Z Date-time filtering supports three operators: * equality * greater than or equal to + * &ndash; field name suffixed with ```__gte``` * less than or equal to + * &ndash; field name suffixed with ```__lte``` Lower and upper limits + * to a date-time range may be specified by including both the ```__gte``` + * and ```__lte``` forms in the filter. ```{field + * name}[|__lte|__gte]={UTC RFC3339 date-time}``` ###### On device custom attributes: + * ```custom_attributes__{param}={value}``` + * ```custom_attributes__tag=TAG1``` ###### On device component + * attributes: ```component_attributes__{name}={version}``` + * ```component_attributes__ble=1.2.3``` ##### Multi-field example + * ```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z``` + * Encoded: + * ```?filter=state%3Dbootstrapped%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z``` + * ##### Filtering with filter operators String field filtering supports the following operators: * + * equality: `__eq` * non-equality: `__neq` * in : `__in` * not in: + * `__nin` For `__in` and `__nin` filters list of parameters must be + * comma-separated: `state__nin=unenrolled,dergistered` (optional) * @param include * Comma-separated list of data fields to return. Currently supported: `total_count`. * (optional) @@ -286,6 +324,14 @@ public interface DeviceDirectoryDevicesApi { * in filter for the \"name\" field (optional) * @param nameNin * nin filter for the \"name\" field (optional) + * @param netIdEq + * eq filter for the \"net_id\" field (optional) + * @param netIdNeq + * neq filter for the \"net_id\" field (optional) + * @param netIdIn + * in filter for the \"net_id\" field (optional) + * @param netIdNin + * nin filter for the \"net_id\" field (optional) * @param serialNumberEq * eq filter for the \"serial_number\" field (optional) * @param serialNumberNeq @@ -323,7 +369,8 @@ public interface DeviceDirectoryDevicesApi { @GET("v3/devices/") Call deviceList(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("order") String order, - @retrofit2.http.Query("after") String after, @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("filter") String filter, + @retrofit2.http.Query("include") String include, @retrofit2.http.Query("lifecycle_status__eq") String lifecycleStatusEq, @retrofit2.http.Query("lifecycle_status__neq") String lifecycleStatusNeq, @retrofit2.http.Query("lifecycle_status__in") String lifecycleStatusIn, @@ -436,6 +483,10 @@ public interface DeviceDirectoryDevicesApi { @retrofit2.http.Query("mechanism_url__nin") String mechanismUrlNin, @retrofit2.http.Query("name__eq") String nameEq, @retrofit2.http.Query("name__neq") String nameNeq, @retrofit2.http.Query("name__in") String nameIn, @retrofit2.http.Query("name__nin") String nameNin, + @retrofit2.http.Query("net_id__eq") String netIdEq, + @retrofit2.http.Query("net_id__neq") String netIdNeq, + @retrofit2.http.Query("net_id__in") String netIdIn, + @retrofit2.http.Query("net_id__nin") String netIdNin, @retrofit2.http.Query("serial_number__eq") String serialNumberEq, @retrofit2.http.Query("serial_number__neq") String serialNumberNeq, @retrofit2.http.Query("serial_number__in") String serialNumberIn, @@ -454,13 +505,18 @@ public interface DeviceDirectoryDevicesApi { @retrofit2.http.Query("vendor_id__nin") String vendorIdNin); /** - * Get a device. Retrieve information about a specific device. **Example:** Following example must be updated with - * the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" + * Get a device. Retrieve information about a specific device. This API returns + * [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). If you want to see the + * structure of resources in the device or the actual resource values, use the [Connect + * API](https://developer.pelion.com/docs/device-management-api/connect/). **Example:** Following example must be + * updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/<device_ID> \\ -H * 'Authorization: Bearer <API key>' ``` * * @param id - * The ID of the device. (required) + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. (required) * @return Call<DeviceData> */ @GET("v3/devices/{id}/") @@ -474,7 +530,9 @@ public interface DeviceDirectoryDevicesApi { * description field\"}' ``` * * @param id - * The ID of the device. (required) + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. (required) * @param device * (required) * @return Call<DeviceData> diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApi.java index ec783e81b..8fe26dcfb 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApi.java @@ -11,8 +11,11 @@ public interface DeviceDirectoryEventsApi { /** - * List all device events. List all device events for an account. **Example:** Following example gets device-events - * limiting returned results to max 5 events ``` curl -X GET + * List all device events. List all or a filtered list of device events for the account. Device events are events + * significant to operation or lifetime, such as creation, firmware update, and suspension. To see statistics for + * device connectivity and usage, use the [Statistics + * API](https://developer.pelion.com/docs/device-management-api/connect-statistics/). **Example:** Following example + * gets device-events limiting returned results to max 5 events ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\ -H 'Authorization: Bearer <API * key>' ``` or to get events for certain device filter based on device_id: ``` * curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=<device_id> \\ -H @@ -31,9 +34,9 @@ public interface DeviceDirectoryEventsApi { * @param filter * URL-encoded query string parameter to filter returned data. ##### Filtering `?filter={URL * encoded query string}` The query string is made up of key/value pairs separated by ampersands. So - * for a query of `key1=value1&key2=value2&key3=value3`, this would be - * encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable - * fields: The below table lists all filterable fields: <table> <thead> <tr> + * for a query of `key1=value1&key2=value2&key3=value3`, this is encoded + * as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`. ###### Filterable fields: + * The below table lists all filterable fields: <table> <thead> <tr> * <th>Field</th> <th>= / __eq / __neq</th> <th>__in / * __nin</th> <th>__lte / __gte</th> <tr> <thead> <tbody> <tr> * <td>date_time</td> <td>✓</td> <td>✓</td> @@ -138,10 +141,12 @@ public interface DeviceDirectoryEventsApi { @retrofit2.http.Query("state_change__neq") Boolean stateChangeNeq); /** - * Retrieve a device event. Retrieve a specific device event. **Example:** To fetch a specific event you can use the - * 'id' field form the '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4' - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/<device_event_id> \\ -H - * 'Authorization: Bearer <API key>' ``` + * Retrieve a device event. \"Retrieve a specific device event. See '/v3/device-events/' for + * information on device events, and how to get the device_event_id.\" **Example:** To fetch a specific event + * you can use the 'id' field from '/v3/device-events'. Form of + * '016c03d40a4e000000000001001003b4' ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/device-events/<device_event_id> \\ -H 'Authorization: Bearer + * <API key>' ``` * * @param deviceEventId * (required) @@ -152,8 +157,7 @@ public interface DeviceDirectoryEventsApi { deviceEventRetrieve(@retrofit2.http.Path(value = "device_event_id", encoded = true) String deviceEventId); /** - * DEPRECATED: List all device events. DEPRECATED: List all device events. Use `/v3/device-events/` - * instead. + * DEPRECATED: List all device events. DEPRECATED: This API is replaced with `/v3/device-events/`. * * @param limit * How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the @@ -281,8 +285,8 @@ public interface DeviceDirectoryEventsApi { @retrofit2.http.Query("state_change__nin") String stateChangeNin); /** - * DEPRECATED: Retrieve a device event. Retrieve device event (deprecated, use /v3/device-events/{device_event_id}/ - * instead). + * DEPRECATED: Retrieve a device event. DEPRECATED: This API is replaced by `/v3/device-events/` and + * `/v3/device-events/{device_event_id}/`. * * @param deviceEventId * (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApi.java index 304311816..49d6d9f06 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApi.java @@ -26,7 +26,7 @@ public interface DeviceDirectoryGroupsApi { Call groupCreate(@retrofit2.http.Body Group group); /** - * Delete a group. Delete a group. + * Delete a group. Delete a group. This deletes the group, but not the devices in the group. * * @param deviceGroupId * The ID of the group. (required) @@ -62,7 +62,9 @@ public interface DeviceDirectoryGroupsApi { * <td>name</td> <td>✓</td> <td>✓</td> * <td>&nbsp;</td> </tr> <tr> <td>custom_attributes</td> * <td>✓</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> - * <tr> <td>created_at</td> <td>✓</td> <td>✓</td> + * <tr> <td>component_attributes</td> <td>✓</td> + * <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> + * <td>created_at</td> <td>✓</td> <td>✓</td> * <td>✓</td> </tr> <tr> <td>updated_at</td> * <td>✓</td> <td>✓</td> <td>✓</td> </tr> <tr> * <td>etag</td> <td>✓</td> <td>✓</td> <td>✓</td> @@ -77,8 +79,11 @@ public interface DeviceDirectoryGroupsApi { * suffixed with `__lte`. Lower and upper limits to a date-time range may be specified by * including both the `__gte` and `__lte` forms in the filter: `{field * name}[|__lte|__gte]={UTC RFC3339 date-time}` ###### By device group custom attributes: - * `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` ##### - * Multi-field example + * `custom_attributes__{param}={value}` `custom_attributes__tag=TAG1` + * ###### By device group component attributes: `component_attributes__{name}={version}` + * `component_attributes__{name}__{operator}={version}` + * `component_attributes__ble=1.2.3` `component_attributes__main__gt=1.2.3` + * ##### Multi-field example * `name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z` * Encoded: * `?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z` @@ -157,7 +162,7 @@ public interface DeviceDirectoryGroupsApi { @retrofit2.http.Query("updated_at__gte") DateTime updatedAtGte); /** - * Add a device to a group. Add one device to a group. + * Add a device to a group. Add one device to a group. A device can be in multiple groups. * * @param deviceGroupId * The ID of the group. (required) @@ -183,7 +188,7 @@ Call groupMembersRemove(@retrofit2.http.Path(value = "device-group-id", en @retrofit2.http.Body DeviceGroupManipulation body); /** - * Get a page of devices. Get a page of devices. + * Get a page of devices. Get a page of devices in a specified group. * * @param deviceGroupId * (required) @@ -433,6 +438,14 @@ Call groupMembersRemove(@retrofit2.http.Path(value = "device-group-id", en * in filter for the \"name\" field (optional) * @param nameNin * nin filter for the \"name\" field (optional) + * @param netIdEq + * eq filter for the \"net_id\" field (optional) + * @param netIdNeq + * neq filter for the \"net_id\" field (optional) + * @param netIdIn + * in filter for the \"net_id\" field (optional) + * @param netIdNin + * nin filter for the \"net_id\" field (optional) * @param serialNumberEq * eq filter for the \"serial_number\" field (optional) * @param serialNumberNeq @@ -589,6 +602,10 @@ Call groupMembersRemove(@retrofit2.http.Path(value = "device-group-id", en @retrofit2.http.Query("name__neq") String nameNeq, @retrofit2.http.Query("name__in") String nameIn, @retrofit2.http.Query("name__nin") String nameNin, + @retrofit2.http.Query("net_id__eq") String netIdEq, + @retrofit2.http.Query("net_id__neq") String netIdNeq, + @retrofit2.http.Query("net_id__in") String netIdIn, + @retrofit2.http.Query("net_id__nin") String netIdNin, @retrofit2.http.Query("serial_number__eq") String serialNumberEq, @retrofit2.http.Query("serial_number__neq") String serialNumberNeq, @retrofit2.http.Query("serial_number__in") String serialNumberIn, @@ -607,7 +624,9 @@ Call groupMembersRemove(@retrofit2.http.Path(value = "device-group-id", en @retrofit2.http.Query("vendor_id__nin") String vendorIdNin); /** - * Get a group. Get a group. + * Get a group. Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) + * info what contains info of the group, for example, name and updated date. To list the devices in the group, use + * '/v3/device-groups/{device-group-id}/devices/'. * * @param deviceGroupId * The group ID (required) @@ -618,7 +637,7 @@ Call groupMembersRemove(@retrofit2.http.Path(value = "device-group-id", en groupRetrieve(@retrofit2.http.Path(value = "device-group-id", encoded = true) String deviceGroupId); /** - * Modify the attributes of a group. Modify the attributes of a group. + * Modify the attributes of a group. Modify the attributes of a group, such as the description. * * @param deviceGroupId * (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApi.java index c6564740d..53ff1993b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApi.java @@ -14,19 +14,18 @@ public interface DeviceDirectoryLifecycleApi { /** * List all device block categories List all device block categories. A block category is a short description of why - * a device was suspended or returned to service. **Example:** Get all defined categories of why device is blocked - * from the device management ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H 'Authorization: Bearer <API - * key>' ``` + * a device was suspended or returned to service. **Example:** Get all defined device suspension categories: + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H + * 'Authorization: Bearer <API key>' ``` * * @param limit * This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is - * ignored (optional) + * ignored. (optional) * @param order * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) * @param after * This endpoint doesn't support paging. Parameter is accepted for API compatibility. Value is - * ignored (optional) + * ignored. (optional) * @param include * Comma-separated list of data fields to return. Currently supported: `total_count`. * (optional) @@ -76,14 +75,19 @@ Call blockCategoriesList(@retrofit2.http.Query("limit") encoded = true) String blockCategoryReference); /** - * Return a device to service. Returning a device to service restores connectivity to the device. All API - * functionality is restored. **Example:** Following example enables device to connect again to Pelion Device - * Management. Note that the category must match the reason why device was suspended. This device was reported - * stolen but was now found. ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": - * \"lost_or_stolen\", \"description\": \"Was found, was not stolen but miss - * placed\"}' ``` + * Return a device to service. [Returning a device to + * service](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#using-the-api-suspending-and-resuming-devices) + * allows the device to connect to Device Management again. The connection is established according to the + * device's reconnection logic. The device reports a [registration + * event](https://developer.pelion.com/docs/device-management-api/connect/) through a [notification + * channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). + * The default reconnection logic is a progressive back-off for 2, 4, 8, or 16 seconds, up to one week. All API + * functionality is restored. **Example:** The following example enables a device to reconnect to Pelion Device + * Management. The category must match the reason device was suspended. This device was reported stolen, but was + * found: ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"category\": \"lost_or_stolen\", \"description\": \"Was found, was not stolen + * but miss placed\"}' ``` * * @param id * The ID of the device. (required) @@ -96,18 +100,26 @@ Call deviceResume(@retrofit2.http.Path(value = "id", encoded = true) Strin @retrofit2.http.Body Block block); /** - * Suspend a device. Suspending a device prevents it from connecting to Device Management. If a device is currently - * connected, it will be disconnected. Some API operations will fail while a device is suspended. ***Example:* - * Following example suspends a device with category \"Lost or stolen\". You can see available categories - * with '/v3/device-block-categories/'. ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": - * \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer contacted via phone and - * reported device being stolen. Specific time of the theft was not know. Device last used in May/2019\"}' - * ``` + * Suspend a device. [Suspending a + * device](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#suspending-and-resuming-devices) + * prevents it from connecting to Device Management. If a device is currently connected, it disconnects and shows as + * deregistered. You can also receive [deregistration + * events](https://developer.pelion.com/docs/device-management-api/connect/) in [notification + * channels](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). + * API operations needing device transactions fail while a device is suspended. Example use case to use suspending + * is that device is reported lost or stolen. You can block the device to connect and this way prevent device to + * cause unreliable data to your system. ***Example:* The following example suspends a device with category + * \"Lost or stolen\". You can see available categories with '/v3/device-block-categories/'. + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"category\": \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer + * contacted via phone and reported device being stolen. Specific time of the theft was not know. Device last used + * in May/2019\"}' ``` * * @param id - * The ID of the device. (required) + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. (required) * @param block * The device block. (required) * @return Call<Void> diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApi.java new file mode 100644 index 000000000..0c0975316 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApi.java @@ -0,0 +1,44 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoDevice; + +public interface DeviceEchoApi { + /** + * Delete the Device Echo object. Calling this API removes your application data and device from the Device Echo + * service. You can still find the device using 'GET /v3/devices/{id}' from the Device Directory API. For + * privacy reasons, you might need to delete device data that contains personal information about the device owner + * or user. Private information is stored by the application; Pelion Device Management Client does not provide or + * store any private data. **Note:** If the device is able to connect, its data will reappear in Echo the next time + * the device sends that information to the service. To ensure data is permanently removed, suspend the device first + * by calling 'POST /v3/devices/{id}/suspend'. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. (required) + * @return Call<Void> + */ + @DELETE("v3/devices/{device-id}/echo") + Call deleteDeviceEchoObject(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId); + + /** + * Get the Device Echo object. Retrieve the Device Echo object, which represents the last known state of the device. + * The state includes the resources and their reported values with the desired state of the device. Auto-observable + * and subscribed resources are stored as the reported state of the device. To change the desired state, issue write + * commands with `/v2/device-requests/{device-id}`. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param deviceId + * The device ID generated by Device Management. (required) + * @return Call<EchoDevice> + */ + @GET("v3/devices/{device-id}/echo") + Call getDeviceEchoObject(@retrofit2.http.Path(value = "device-id", encoded = true) String deviceId); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApi.java new file mode 100644 index 000000000..35d69c66b --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApi.java @@ -0,0 +1,215 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import okhttp3.MultipartBody; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BulkResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EnrollmentId; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EnrollmentIdentities; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EnrollmentIdentity; + +public interface DeviceOwnershipEnrollmentsApi { + /** + * Bulk upload. With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs. + * **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -F + * 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads ``` **To ensure your CSV + * file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated + * values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid + * enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty + * lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a + * line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode + * U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid + * enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed + * and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid + * enrollment file:** ``` \"Examples of valid identites, notes\" + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is + * ignored. A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , + * Whitespace is trimmed before validation. + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , + * Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** + * ``` + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * First line is ignored. + * A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid + * version identifier. + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short + * identity. \"\", Empty quotation marks are an invalid identity \" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", + * Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** + * ``` \"Examples of blank lines that are ignored\" ,, , This is also considered a blank + * line. ``` + * + * @param enrollmentIdentities + * The `CSV` file containing the enrollment IDs. The maximum file size is 10 MB. (required) + * @return Call<BulkResponse> + */ + @retrofit2.http.Multipart + @POST("v3/device-enrollments-bulk-uploads") + Call createBulkDeviceEnrollment(@retrofit2.http.Part() MultipartBody.Part enrollmentIdentities); + + /** + * Create a single enrollment. When the device connects to the bootstrap server and provides the enrollment ID, it + * is assigned to your account. <br> **Example:** ``` curl -X POST \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments \\ -d '{\"enrollment_identity\": + * \"A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5\"}' + * ``` + * + * @param enrollmentIdentity + * (required) + * @return Call<EnrollmentIdentity> + */ + @POST("v3/device-enrollments") + Call createDeviceEnrollment(@retrofit2.http.Body EnrollmentId enrollmentIdentity); + + /** + * Bulk delete. With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to + * delete. **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ + * -F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes ``` **To ensure your CSV + * file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated + * values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid + * enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty + * lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a + * line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode + * U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid + * enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed + * and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid + * enrollment file:** ``` \"Examples of valid identites, notes\" + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is + * ignored, A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , + * Whitespace is trimmed before validation. + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , + * Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** + * ``` + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * First line is ignored. + * A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid + * version identifier. + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23, Too-short + * identity. \"\", Empty quotation marks are an invalid identity. \" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", + * Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** + * ``` \"Examples of blank lines that are ignored.\" ,, , This is also considered to a + * blank line. ``` + * + * @param enrollmentIdentities + * The `CSV` file containing the enrollment IDs. The maximum file size is 10MB. (required) + * @return Call<BulkResponse> + */ + @retrofit2.http.Multipart + @POST("v3/device-enrollments-bulk-deletes") + Call deleteBulkDeviceEnrollment(@retrofit2.http.Part() MultipartBody.Part enrollmentIdentities); + + /** + * Delete an enrollment by ID. To free a device from your account, delete the enrollment claim. To bypass the device + * ownership, you need to delete the enrollment and factory reset the device. For more information, see + * [Transferring ownership using + * First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). + * <br> **Example:** ``` curl -X DELETE \\ -H 'Authorization: Bearer + * <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + * + * @param id + * Enrollment identity. (required) + * @return Call<Void> + */ + @DELETE("v3/device-enrollments/{id}") + Call deleteDeviceEnrollment(@retrofit2.http.Path(value = "id", encoded = true) String id); + + /** + * Get bulk upload entity. Provides information on bulk upload for the given ID, for example, bulk status and number + * of processed enrollment identities. Provides links to bulk upload reports as well. **Report file format:** The + * report files have a header line, and the values are separated by commas. Delimit lines with a line break (CRLF). + * Make sure the report file is compliant with IETF Informal CSV common format [RFC + * 4180](https://tools.ietf.org/html/rfc4180). An example of a full report file: ``` + * \"entity__id\",\"entity__created_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * ``` An example of an error report file: ``` + * \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ``` + * + * @param id + * Bulk create task entity ID. (required) + * @return Call<BulkResponse> + */ + @GET("v3/device-enrollments-bulk-uploads/{id}") + Call getBulkDeviceEnrollment(@retrofit2.http.Path(value = "id", encoded = true) String id); + + /** + * Get bulk delete entity. Provides information on bulk delete for the given ID, for example, bulk status and the + * number of processed enrollment identities. Provides links to bulk delete reports as well. **Report file format:** + * The report files have a header line and the value are separated by commas. The lines are delimited by a line + * break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC + * 4180](https://tools.ietf.org/html/rfc4180). An example of a full report file: ``` + * \"entity__id\",\"entity__deleted_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * ``` An example of an error report file: ``` + * \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} ``` + * + * @param id + * Bulk delete task entity ID. (required) + * @return Call<BulkResponse> + */ + @GET("v3/device-enrollments-bulk-deletes/{id}") + Call getBulkDeviceEnrollmentDelete(@retrofit2.http.Path(value = "id", encoded = true) String id); + + /** + * Get details of an single enrollment by ID. Check detailed enrollment info, for example, date of claim or + * expiration date. **Example:** ``` curl -X GET \\ -H 'Authorization: Bearer + * <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + * + * @param id + * Enrollment identity. (required) + * @return Call<EnrollmentIdentity> + */ + @GET("v3/device-enrollments/{id}") + Call getDeviceEnrollment(@retrofit2.http.Path(value = "id", encoded = true) String id); + + /** + * Get a list of enrollments per account. Provides a list of pending and claimed enrollments. **Example:** + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments ``` With query parameters: + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * 'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10' ``` + * + * @param limit + * Number of results to return (2-1000). (optional) + * @param after + * Entity ID to fetch after. (optional) + * @param order + * ASC or DESC (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<EnrollmentIdentities> + */ + @GET("v3/device-enrollments") + Call getDeviceEnrollments(@retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApi.java index 7f9a8758a..a99cb209e 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApi.java @@ -13,7 +13,7 @@ public interface DeviceSecurityDeviceCertificateRenewalsApi { /** * Get a certificate enrollment by ID. Get a certificate enrollment by ID. **Example:** ``` curl -X * GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param certificateEnrollmentId * Certificate enrollment ID. (required) @@ -27,9 +27,9 @@ public interface DeviceSecurityDeviceCertificateRenewalsApi { /** * Get certificate enrollments list. Get certificate enrollments list, optionally filtered. **Examples:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\ -H - * 'Authorization: Bearer <api_key>' ``` ``` curl -X GET + * 'Authorization: Bearer <access_key>' ``` ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 - * \\ -H 'Authorization: Bearer <api_key>' ``` + * \\ -H 'Authorization: Bearer <access_key>' ``` * * @param deviceIdEq * An optional filter for the device ID. (optional) @@ -85,7 +85,7 @@ public interface DeviceSecurityDeviceCertificateRenewalsApi { /** * Request certificate renewal. Request a certificate renewal. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew - * \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-length: 0' ``` + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-length: 0' ``` * * @param deviceId * The device ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApi.java index 2532c38e1..3c79b67b8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApi.java @@ -21,8 +21,8 @@ public interface DeviceUpdateCampaignsApi { /** * Archive a campaign. Archive a campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -32,13 +32,13 @@ public interface DeviceUpdateCampaignsApi { Call updateCampaignArchive(@retrofit2.http.Path(value = "campaign_id", encoded = true) String campaignId); /** - * Create a campaign Create an update campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: <valid access token>' - * \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": + * Create a campaign Create an update campaign. To include a filter for targeted devices, refer to the filter using + * `<filter_id>` in the message body. <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: Bearer <api_key>' \\ + * -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": * \"one-shot\", \"description\": \"Campaign is for ...\", - * \"device_filter\": \"id__eq=123400000000000000000000000ae45\", \"name\": - * \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' - * ``` + * \"device_filter\": \"<filter_id>\", \"name\": \"campaign\", + * \"root_manifest_id\": \"56780000000000a5b70000000000bd98\" }' ``` * * @param campaign * Update campaign. (required) @@ -49,8 +49,8 @@ public interface DeviceUpdateCampaignsApi { /** * Delete a campaign Delete an update campaign. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -62,8 +62,8 @@ public interface DeviceUpdateCampaignsApi { /** * Get a list of events grouped by summary Get a list of events grouped by summary. <br> **Usage example:** * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types + * \\ -H 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -78,17 +78,38 @@ public interface DeviceUpdateCampaignsApi { encoded = true) String summaryStatusId); /** - * Get an event type for a campaign Get the count for a specific event type; for example, succeeded, failed, or + * Get an event type for a campaign Get the count for a specific event type, for example, succeeded, failed or * skipped. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 + * \\ -H 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) * @param summaryStatusId * The summary status. For example, fail. (required) * @param eventTypeId - * The event type parameter. For example, UPD4_FAIL_101. (required) + * The event type parameter. Event types are grouped into the four values of the summary_status, i.e. + * fail, success, info and skipped. success: SYS_112, UPD4_OK_M1, UPD1_OK_1, UPD4_OK_100, UPD2_OK_19, + * UPD2_OK_1, UPD2_OK_18 fail: UPD4_FAIL_508, UPD4_FAIL_217, UPD4_FAIL_305, UPD4_FAIL_405, UPD4_FAIL_511, + * UPD4_FAIL_220, UPD1_FAIL_6, UPD4_FAIL_302, UPD2_FAIL_11, UPD4_FAIL_219, SYS_103, UPD4_FAIL_407, + * UPD4_FAIL_224, SYS_111, UPD4_FAIL_210, UPD4_FAIL_306, UPD2_FAIL_14, UPD4_FAIL_221, UPD4_FAIL_315, + * UPD4_FAIL_403, UPD2_FAIL_12, UPD4_FAIL_207, UPD4_FAIL_215, UPD4_FAIL_504, UPD2_FAIL_3, UPD4_FAIL_103, + * UPD2_FAIL_16, UPD2_FAIL_6, UPD4_FAIL_101, UPD4_FAIL_202, UPD4_FAIL_313, UPD4_FAIL_209, UPD4_FAIL_301, + * UPD2_FAIL_4, SYS_123, UPD4_FAIL_314, UPD4_FAIL_205, UPD4_FAIL_212, UPD4_FAIL_311, UPD4_FAIL_304, + * UPD4_FAIL_223, UPD4_FAIL_226, UPD1_FAIL_2, UPD4_FAIL_203, UPD4_FAIL_507, UPD4_FAIL_402, UPD4_FAIL_204, + * UPD4_FAIL_510, UPD1_FAIL_7, UPD4_FAIL_218, UPD1_FAIL_8, UPD2_FAIL_5, UPD4_FAIL_201, UPD4_FAIL_213, + * UPD4_FAIL_400, UPD2_FAIL_17, UPD4_FAIL_310, UPD4_FAIL_206, UPD4_FAIL_102, UPD2_FAIL_7, UPD1_FAIL_9, + * UPD4_FAIL_22, UPD4_FAIL_502, UPD4_FAIL_211, UPD1_FAIL_4, UPD1_FAIL_3, UPD4_FAIL_409, UPD4_FAIL_408, + * UPD4_FAIL_200, SYS_104, UPD2_FAIL_10, UPD2_FAIL_15, UPD4_FAIL_216, UPD4_FAIL_214, UPD4_FAIL_308, + * UPD4_FAIL_401, UPD1_FAIL_5, UPD2_FAIL_13, UPD4_FAIL_208, UPD2_FAIL_2, UPD4_FAIL_312, UPD4_FAIL_509, + * UPD4_FAIL_303, UPD4_FAIL_512, UPD2_FAIL_9, UPD4_FAIL_316, UPD4_FAIL_506, SYS_101, UPD4_FAIL_309, + * UPD4_FAIL_307, UPD4_FAIL_404, UPD4_FAIL_503, UPD4_FAIL_225, UPD4_FAIL_300, UPD4_FAIL_500, + * UPD4_FAIL_505, UPD4_FAIL_406, UPD4_FAIL_222, UPD4_FAIL_501, UPD2_FAIL_8, SYS_124 info: UPD1_STATE_0, + * UPD2_REPORT_HASH, UPD1_REPORT_HASH, UPD2_STATE_5, UPD2_STATE_0, UPD2_STATE_4, UPD2_STATE_3, SYS_107, + * SYS_105, SYS_106, UPD1_REPORT_VERSION, UPD1_STATE_2, SYS_116, SYS_108, SYS_100, UPD2_STATE_8, + * UPD2_STATE_7, SYS_120, UPD2_STATE_1, SYS_113, UPD2_STATE_6, UPD2_REPORT_VERSION, SYS_115, + * UPD2_STATE_2, SYS_114, UPD1_STATE_3, UPD1_STATE_1, SYS_125 skipped: SYS_121, SYS_118, SYS_122, + * SYS_110, SYS_117 (required) * @return Call<EventType> */ @GET("v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id}") @@ -102,7 +123,7 @@ public interface DeviceUpdateCampaignsApi { /** * List all campaigns Get update campaigns for devices specified by a filter. <br> **Usage example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: - * <valid access token>' ``` + * Bearer <api_key>' ``` * * @param limit * How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values @@ -300,8 +321,8 @@ public interface DeviceUpdateCampaignsApi { /** * List all campaign device metadata Get metadata for all devices in a campaign. <br> **Usage example:** * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata + * \\ -H 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -327,8 +348,8 @@ public interface DeviceUpdateCampaignsApi { /** * Get a campaign device metadata Get update campaign metadata for a specific device. <br> **Usage example:** * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 + * \\ -H 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -344,11 +365,11 @@ public interface DeviceUpdateCampaignsApi { /** * Get campaign metrics Get - * [information](https://www.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) + * [information](https://developer.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) * for a campaign based on **SUCCESS**, **FAIL**, or **SKIPPED** criteria for each device. <br> **Usage * example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/metrics \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123467f9012ab567890120000789012/metrics \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -360,8 +381,8 @@ public interface DeviceUpdateCampaignsApi { /** * Get a campaign. Get an update campaign. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -373,8 +394,8 @@ public interface DeviceUpdateCampaignsApi { /** * Start a campaign. Start a campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -386,8 +407,8 @@ public interface DeviceUpdateCampaignsApi { /** * Get statistics for a campaign Get a list of statistics for a campaign, including the number of devices reporting * specific event codes. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -400,8 +421,8 @@ public interface DeviceUpdateCampaignsApi { /** * Get a status summary Get the count of successfully updated, skipped, and failed devices. <br> **Usage * example:** ``` curl - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -417,10 +438,10 @@ public interface DeviceUpdateCampaignsApi { /** * Stop a campaign. Stop a campaign. Stopping is a process that requires the campaign go through several - * [phases](../updating-firmware/running-update-campaigns.html#stopping). <br> **Usage example:** - * ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop \\ -H - * 'Authorization: <valid access token>' ``` + * [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html). + * <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param campaignId * The campaign ID. (required) @@ -431,11 +452,11 @@ public interface DeviceUpdateCampaignsApi { /** * Modify a campaign Modify an update campaign. <br> **Usage example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' \\ d '{ \"description\": \"Campaign is for - * ...\", \"device_filter\": \"id__eq=123400000000000000000000000ae45\", - * \"name\": \"campaign\", \"root_manifest_id\": - * \"5678000000000000000000000000bd98\", }' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' \\ d '{ \"description\": \"Campaign is for + * ...\", \"device_filter\": \"123400000000000000000000000ae45\", \"name\": + * \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' + * ``` * * @param campaignId * The campaign ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApi.java index 995516632..36cc95d0a 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApi.java @@ -18,14 +18,17 @@ public interface DeviceUpdateFirmwareImagesApi { /** - * Create an image Create a firmware image. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' - * \\ -H 'Content-Type: multipart/form-data' \\ -F + * Create an image Create a firmware image. <BR/> **Note:** Only use this API for images smaller than 100 MB. + * For larger images, [upload in + * chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). + * <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' \\ + * -H 'Content-Type: multipart/form-data' \\ -F * 'datafile=@myimage.bin;type=application/octet-stream' -F 'description=bla bla' \\ * -F 'name=My Linux Image' ``` * * @param datafile - * The firmware image file to upload. (required) + * The firmware image file to upload. File name must not exceed 166 characters. (required) * @param description * The description of the firmware image. (optional) * @param name @@ -40,8 +43,8 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Delete an image Delete a firmware image. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: - * <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \\ -H 'Authorization: + * Bearer <api_key>' ``` * * @param imageId * The firmware image ID. (required) @@ -52,7 +55,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * List all images List all firmware images. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' * ``` * * @param limit @@ -65,7 +68,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par * @param include * A comma-separated list of data fields to return. Currently supported: total_count. (optional) * @param filter - * URL-encoded query string parameter to filter returned data `?filter={URL-encoded query + * URL-encoded query string parameter to filter returned data. `?filter={URL-encoded query * string}` ###### Filterable fields: The table lists all the fields that can be filtered on with * certain filters: <table> <thead> <tr> <th>Field</th> <th>= / * __eq / __neq</th> <th>__in / __nin</th> <th>__lte / __gte</th> @@ -207,8 +210,8 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Get an image. Retrieve a firmware image. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: - * <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \\ -H 'Authorization: + * Bearer <api_key>' ``` * * @param imageId * The firmware image ID (required) @@ -219,13 +222,11 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Append a chunk to an upload job Append a chunk to an upload job. To finish a job, upload a zero-length chunk. - * <br> **Usage example:** ``` curl -X POST + * <BR/> **Note:** Chunk size must be between 5MB and 100MB, the last chunk can be less than 5MB; the maximum + * number of chunks is limited to 10,000. <br> **Usage example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H - * 'Authorization: <valid access token>' \\ -H 'Content-MD5: - * Q2h1Y2sgSW51ZwDIAXR5IQ==' \\ -H 'Content-Type: binary/octet-stream' \\ -H - * 'Content-Length: 999' \\ -d '{ - * \"IGh0dHBzOi8vYXBpLnVzLWVhc3QtMS5tYmVkY2xvdWQuY29tLy92My9maXJtd2FyZS1pbWFnZXMvdXBsb2FkLWpvYnMve3VwbG9hZF9qb2JfaWR9W5rcw==\" - * }' ``` + * 'Authorization: Bearer <api_key>' \\ -H 'Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ==' + * \\ -H 'Content-Type: binary/octet-stream' \\ --data-binary '@chunkfile.bin' ``` * * @param contentMD5 * The base64-encoded binary digest of the body (chunk data). (required) @@ -249,7 +250,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par * List all metadata for uploaded chunks List all metadata for uploaded chunks. <br> **Usage example:** * ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` * * @param uploadJobId * The upload job ID. (required) @@ -374,7 +375,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par * Get metadata about a chunk Get metadata about a chunk. <br> **Usage example:** ``` curl -X * GET * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * \\ -H 'Authorization: Bearer <api_key>' ``` * * @param uploadJobId * The upload job ID. (required) @@ -389,10 +390,10 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Create a new upload job. Create a new upload job <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access - * token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"name\": - * \"New Linux update\", \"description\": \"New Linux update for my devices\" }' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer + * <api_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"name\": \"New Linux update\", \"description\": \"New Linux update for my + * devices\" }' ``` * * @param uploadJob * Upload job. (required) @@ -404,7 +405,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Delete an upload job Delete an upload job. <br> **Usage example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` * * @param uploadJobId * The upload job ID. (required) @@ -415,8 +416,8 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Get all upload jobs Get all upload jobs. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access - * token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer + * <api_key>' ``` * * @param limit * How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values @@ -553,7 +554,7 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Retrieve information for an upload job Get an upload job. <br> **Usage example:** ``` curl * -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` * * @param uploadJobId * The upload job ID. (required) @@ -565,9 +566,8 @@ Call firmwareImageCreate(@retrofit2.http.Part() MultipartBody.Par /** * Update an upload job Update an upload job. <br> **Usage example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' \\ -d '{ \"name\": \"New Linux - * update\", \"description\": \"New Linux update for my class XX devices\" }' - * ``` + * 'Authorization: Bearer <api_key>' \\ -d '{ \"name\": \"New Linux update\", + * \"description\": \"New Linux update for my class XX devices\" }' ``` * * @param uploadJobId * The upload job ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApi.java index 3c13d8760..e81881b80 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApi.java @@ -15,32 +15,34 @@ public interface DeviceUpdateFirmwareManifestsApi { /** * Upload a manifest Upload a firmware manifest. The API enforces a maximum manifest size of 2KB. <br> **Usage * example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H - * 'Authorization: <valid access token>' \\ -H 'Content-Type: multipart/form-data' \\ -F + * 'Authorization: Bearer <api_key>' \\ -H 'Content-Type: multipart/form-data' \\ -F * 'datafile=@myimage.bin;type=application/octet-stream' \\ -F 'description=bla bla' * \\ -F 'key_table=@myKeyTable.proto;type=' \\ -F 'name=My Manifest' * ``` * * @param datafile - * The manifest file to create. The API gateway enforces the account-specific file size. (required) + * The manifest file to create. The API gateway enforces the account-specific file size. File name must + * not exceed 100 characters. (required) + * @param name + * The name of the firmware manifest. (required) * @param description * The description of the firmware manifest. (optional) * @param keyTable - * The key table of pre-shared keys for devices. The table is generated by the manifest tool. (optional) - * @param name - * The name of the firmware manifest. (optional) + * The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name + * must not exceed 100 characters. (optional) * @return Call<FirmwareManifest> */ @retrofit2.http.Multipart @POST("v3/firmware-manifests/") Call firmwareManifestCreate(@retrofit2.http.Part() MultipartBody.Part datafile, + @retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description, - @retrofit2.http.Part() MultipartBody.Part keyTable, - @retrofit2.http.Part("name") String name); + @retrofit2.http.Part() MultipartBody.Part keyTable); /** * Delete a manifest Delete a firmware manifest. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param manifestId * The firmware manifest ID. (required) @@ -51,8 +53,8 @@ Call firmwareManifestCreate(@retrofit2.http.Part() MultipartBo /** * List all firmware manifests. List all firmware manifests. <br> **Usage example:** ``` curl - * -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: <valid access - * token>' ``` + * -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: Bearer + * <api_key>' ``` * * @param limit * How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values @@ -221,8 +223,8 @@ Call firmwareManifestCreate(@retrofit2.http.Part() MultipartBo /** * Get a manifest Retrieve a firmware manifest. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` * * @param manifestId * The firmware manifest ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApi.java new file mode 100644 index 000000000..7ec5200d0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApi.java @@ -0,0 +1,46 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +public interface EdgeProxyApi { + /** + * Establish a tunnel connection to connected devices. This WebSocket-based API for clients establishes connections + * to services on connected gateways. <br> Establish WebSocket connections to the edge-proxy service. After + * you establish a Websocket connection, the Edge proxy sends data between cloud- and gateway-based services. + * <br> All communication is byte-based. + * + * @param connection + * The websocket connection header. Must be 'Upgrade'. (required) + * @param upgrade + * The protocol upgrade header. Must be 'websocket'. (required) + * @param secWebSocketVersion + * WebSocket version of the protocol. Must be 13. (required) + * @param secWebSocketKey + * The value of this header field must be a nonce consisting of a randomly selected 16-byte value that + * has been base64-encoded (see this section from RFC6455 - + * https://tools.ietf.org/html/rfc6455#section-11.3.1). The nonce must be selected randomly for each + * connection. An example is \"dGhlIHNhbXBsZSBub25jZQ==\". (required) + * @param id + * The Device ID. (required) + * @param address + * The address of the TCP service listening on a specific port on the gateway. If a TCP service is + * listening on localhost with port 5000 and is ready to accept incoming traffic, the value of this + * parameter should be `localhost:5000`. (required) + * @param origin + * Originating host of the request. (optional) + * @return Call<Void> + */ + @GET("v3preview1/devices/{id}/services/{address}/connection") + Call + communicateWithGatewayBasedServices(@retrofit2.http.Header("Connection") String connection, + @retrofit2.http.Header("Upgrade") String upgrade, + @retrofit2.http.Header("Sec-WebSocket-Version") Integer secWebSocketVersion, + @retrofit2.http.Header("Sec-WebSocket-Key") byte[] secWebSocketKey, + @retrofit2.http.Path(value = "id", encoded = true) String id, + @retrofit2.http.Path(value = "address", encoded = true) String address, + @retrofit2.http.Header("Origin") String origin); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApi.java new file mode 100644 index 000000000..470a18673 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApi.java @@ -0,0 +1,28 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import org.joda.time.DateTime; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.StatisticsReportListResponse; + +public interface FactoryManufacturingStatisticsApi { + /** + * Retrieve provisioning statistics for devices in your factories. Get manufacturing statistics report. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/manufacturing/statistics?start=2020-06-23T21:00:00.000Z&end=2020-07-01T20:59:59.999Z + * --header 'Authorization: Bearer <access_key>' ``` + * + * @param start + * The start date and time for the report. (required) + * @param end + * The end date and time for the report. The default value is the current date-time. (optional) + * @return Call<StatisticsReportListResponse> + */ + @GET("v3/manufacturing/statistics") + Call manufacturingStatisticsReport(@retrofit2.http.Query("start") DateTime start, + @retrofit2.http.Query("end") DateTime end); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApi.java new file mode 100644 index 000000000..49a20049a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApi.java @@ -0,0 +1,111 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import org.joda.time.DateTime; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Log; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.LogsPage; + +public interface GatewayLogsPublicApiApi { + /** + * Retrieve a device log by ID. Retrieve a device log from a device by log ID. **Example usage:** ``` + * curl -X GET \\ -H 'Authorization: Bearer <valid access token>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-logs/(device_log_id) ``` + * + * @param deviceLogId + * The ID of the device log. (required) + * @return Call<Log> + */ + @GET("v3/device-logs/{device_log_id}") + Call + getDeviceLogBasedOnLogID(@retrofit2.http.Path(value = "device_log_id", encoded = true) String deviceLogId); + + /** + * List all device logs based on filters List logs for all devices based on a combination of filters. **Example + * usage:** ``` curl -X GET \\ -H 'Authorization: Bearer <valid access token>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-logs ``` + * + * @param deviceIdIn + * The device ID for which to retrieve logs. (optional) + * @param limit + * Limit the number of returned results. The default value is 100. (optional, default to 100) + * @param after + * The entity ID to fetch after the given one. (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. (optional, default to DESC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count (optional) + * @param timestampLte + * RFC 3339 UTC timestamp range upper limit. (optional) + * @param timestampGte + * RFC 3339 UTC timestamp range lower limit. (optional) + * @param appNameEq + * Name of the application on a device that generated logs. (optional) + * @param typeEq + * Device log type filter. (optional) + * @param messageEq + * Device log message filter. (optional) + * @param levelGte + * Minimum severity level of logs to retrieve. (optional) + * @return Call<LogsPage> + */ + @GET("v3/device-logs") + Call listGatewayDeviceLogs(@retrofit2.http.Query("device_id__in") String deviceIdIn, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("timestamp__lte") DateTime timestampLte, + @retrofit2.http.Query("timestamp__gte") DateTime timestampGte, + @retrofit2.http.Query("app_name__eq") String appNameEq, + @retrofit2.http.Query("type__eq") String typeEq, + @retrofit2.http.Query("message__eq") String messageEq, + @retrofit2.http.Query("level__gte") String levelGte); + + /** + * Return the logs for a specific device. Retrieve logs for a given device based on a combination of filters. + * **Example usage:** ``` curl -X GET \\ -H 'Authorization: Bearer <valid access + * token>' \\ https://api.us-east-1.mbedcloud.com/v3/devices/{device_id}/logs ``` + * + * @param deviceId + * The id of the device (required) + * @param limit + * Limit the number of returned results. The default value is 100. (optional, default to 100) + * @param after + * The entity ID to fetch after the given one. (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. (optional, default to DESC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count (optional) + * @param timestampLte + * RFC 3339 UTC timestamp range upper limit. (optional) + * @param timestampGte + * RFC 3339 UTC timestamp range lower limit. (optional) + * @param appNameEq + * Name of the application on a device that generated logs. (optional) + * @param typeEq + * Device log type filter. (optional) + * @param messageEq + * Device log message filter. (optional) + * @param levelGte + * Minimum severity level of logs to retrieve. (optional) + * @return Call<LogsPage> + */ + @GET("v3/devices/{device_id}/logs") + Call + listSingleGatewayDeviceLogs(@retrofit2.http.Path(value = "device_id", encoded = true) String deviceId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("timestamp__lte") DateTime timestampLte, + @retrofit2.http.Query("timestamp__gte") DateTime timestampGte, + @retrofit2.http.Query("app_name__eq") String appNameEq, + @retrofit2.http.Query("type__eq") String typeEq, + @retrofit2.http.Query("message__eq") String messageEq, + @retrofit2.http.Query("level__gte") String levelGte); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApi.java new file mode 100644 index 000000000..dc14188e0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApi.java @@ -0,0 +1,77 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +public interface GatewayTerminalPublicApiApi { + /** + * Establish a console session This WebSocket-based API establishes a console session with a gateway device. + * <br> Use this endpoint to establish a WebSocket connection to the device console. Once the connection is in + * place, you can use the protocol below to exchange messages related to the console session. You must provide the + * api key as bearer token to authenticate the request. All messages sent between the server and the client are + * contained inside a message envelope. The envelope contains a type field describing what format the payload is in + * and how to interpret the message: ```json { \"type\": [string], \"payload\": + * [any], \"sessionID\": [string] } ``` <br> ## Message types and payload formats | + * Message Type | Payload Format | Description | |:------------- |:------------- |:------------- | | **resize** | + * `ResizePayload` | Can be sent by the client to the server to notify the device that the console window + * size has changed. | | **input** | `string` | Sent from the client to the server when keyboard input is + * provided to the console. stdin | | **output** | `string` | Sent from the server to the client when + * console output is produced. stdout + stderr | ### `ResizePayload` ```json { + * \"width\": [integer], // number of columns \"height\": [integer] // number of rows } + * ``` | Field Name | Format | Description | |:------------- |:------------- |:------------- | | + * width | integer | The width of the console window in columns. | | height | integer | The height of the console + * window in rows. | <br> ## Protocol Sequence Diagram The diagram shows how messages are passed between the + * client and the server after initiating a console session: ``` Client Pelion Cloud + * (/v3/devices/{id}/console) Device | | | | | | |-----------------[Input]------------------>| | | + * |-----------------[Input]------------------>| | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | |-----------------[Input]------------------>| | | + * |-----------------[Input]------------------>| | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | | | | |-----------------[Resize]----------------->| | | + * |-----------------[Resize]----------------->| | | | | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | | | | | | | | | | Input is always forwarded from the client to + * the console session on the relevant device to be passed to the stdin stream. The client does not need to provide + * a session ID for input messages. Ouptut is forwarded from the device console session's stdout and stderr + * streams to the client. Resize messages are forwarded from the client to the console session on the device. + * ``` <br> If the console session is terminated by the device disconnecting, the WebSocket + * connection is closed. <br> All communication is text-based. <br> ## Errors and Close Codes - If you + * send binary data instead of text data over the websocket connection, the socket closes with code 1003. - If you + * send text data that is not valid JSON, the socket closes with code 1002 and error message 'Data could not be + * parsed as JSON'. - If you send text data that is valid JSON but does not follow a valid message schema, the + * socket closes with code 1002 and error message 'Object format invalid'. - If you try to establish a + * console session with a device that is not prepared for console, the socket closes with code 1011 and error + * message 'The device console is not working'. - If your client fails to respond to ping messages from the + * server with a matching pong message, the server disconnects the client, assuming the connection has timed out. + * + * @param id + * The id of the device (required) + * @param connection + * The websocket connection header. Must be 'Upgrade'. (required) + * @param upgrade + * The protocol upgrade header. Must be 'websocket'. (required) + * @param secWebSocketVersion + * WebSocket version. Must be 13. (required) + * @param secWebSocketKey + * The value of this header field must be a nonce consisting of a randomly selected 16-byte value that + * has been base64-encoded (see Section 4 of [RFC4648]). The nonce must be selected randomly for each + * connection. (required) + * @param secWebSocketProtocol + * Access key or user token must be present in the `Sec-WebSocket-Protocol` header **if + * Authorization header cannot be provided**: + * `Sec-WebSocket-Protocol:wss,pelion_ak_{access_key}`. (optional) + * @param origin + * Originating host of the request. (optional) + * @return Call<Void> + */ + @GET("v3/devices/{id}/console") + Call + establishGatewayDeviceConsoleSession(@retrofit2.http.Path(value = "id", encoded = true) String id, + @retrofit2.http.Header("Connection") String connection, + @retrofit2.http.Header("Upgrade") String upgrade, + @retrofit2.http.Header("Sec-WebSocket-Version") Integer secWebSocketVersion, + @retrofit2.http.Header("Sec-WebSocket-Key") byte[] secWebSocketKey, + @retrofit2.http.Header("Sec-WebSocket-Protocol") String secWebSocketProtocol, + @retrofit2.http.Header("Origin") String origin); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApi.java new file mode 100644 index 000000000..cf51d35b0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApi.java @@ -0,0 +1,44 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ArchiveInfoResponse; + +public interface ManufacturingFactoryConfiguratorUtilityFcuApi { + /** + * Download the Factory Configurator Utility archive. Downloads the Factory Configurator Utility (FCU) archive .zip + * file for the account ID associated with the access token. <br> **Example:** <br> ``` + * curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @return Call<Void> + */ + @GET("downloads/fcu/factory_configurator_utility.zip") + Call downloadFactoryTool(); + + /** + * Download information about the Factory Configurator Utility archive. Returns information about the Factory + * Configurator Utility (FCU) archive. <br> **Example:** <br> ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/downloads/fcu/inf \\ -H 'Authorization: Bearer <access_key>' + * ``` + * + * @return Call<ArchiveInfoResponse> + */ + @GET("downloads/fcu/info") + Call getFactoryToolInfo(); + + /** + * Download Factory Configurator Utility release notes. Downloads the Factory Configurator Utility (FCU) release + * notes. <br> **Example:** <br> ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @return Call<Void> + */ + @GET("downloads/fcu/release_notes") + Call getFactoryToolReleaseNotes(); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApi.java new file mode 100644 index 000000000..094485f32 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApi.java @@ -0,0 +1,127 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerConfigListResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerConfigRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerConfigResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CreateCertificateIssuerConfig; + +public interface SecurityAndIdentityCertificateIssuerConfigurationsApi { + /** + * Create certificate issuer configuration. Configure the certificate issuer to use when creating device custom + * certificates. <br> **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"reference\": \"customer.dlms\", \"certificate_issuer_id\": + * \"01621a36719d507b9d48a91b00000000\" }' ``` + * + * @param createCertificateIssuerConfig + * Certificate issuer configuration request. (required) + * @return Call<CertificateIssuerConfigResponse> + */ + @POST("v3/certificate-issuer-configurations") + Call + createCertificateIssuerConfig(@retrofit2.http.Body CreateCertificateIssuerConfig createCertificateIssuerConfig); + + /** + * Delete certificate issuer configuration. Delete certificate issuer configuration. You can only delete custom + * certificate configurations. + * + * @param certificateIssuerConfigurationId + * Certificate issuer ID configuration. (required) + * @return Call<Void> + */ + @DELETE("v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}") + Call + deleteCertificateIssuerConfigByID(@retrofit2.http.Path(value = "certificate-issuer-configuration-id", + encoded = true) String certificateIssuerConfigurationId); + + /** + * Get certificate issuer configuration. Provides the configured certificate issuer used when creating device + * certificates for LwM2M. + * + * @return Call<CertificateIssuerConfigResponse> + */ + @GET("v3/certificate-issuer-configurations/lwm2m") + Call getCertificateIssuerConfig(); + + /** + * Get certificate issuer configuration. Provides the configured certificate issuer. + * + * @param certificateIssuerConfigurationId + * Certificate issuer ID configuration. (required) + * @return Call<CertificateIssuerConfigResponse> + */ + @GET("v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}") + Call + getCertificateIssuerConfigByID(@retrofit2.http.Path(value = "certificate-issuer-configuration-id", + encoded = true) String certificateIssuerConfigurationId); + + /** + * Get certificate issuer configurations. Get certificate issuer configurations, optionally filtered by reference. + * <br> **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ ``` + * <br> ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ ``` **Note:** This endpoint does not implement + * pagination, and therefore ignores list control parameters such as `limit` or `after`. + * + * @param limit + * The number of results to return (2-1000). Values outside of this range are set to the closest limit. + * (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) + * @param after + * The ID of the item after which to retrieve the next page. (optional) + * @param include + * Comma-separated list of data fields to return. Currently supported: `total_count`. + * (optional) + * @param referenceEq + * The certificate name to which the certificate issuer configuration applies. (optional) + * @return Call<CertificateIssuerConfigListResponse> + */ + @GET("v3/certificate-issuer-configurations") + Call + getCertificateIssuerConfigs(@retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("reference__eq") String referenceEq); + + /** + * Update certificate issuer configuration. Configure the certificate issuer used when creating device certificates + * for LwM2M. <br> **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations/lwm2m \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\" }' ``` + * + * @param certificateIssuerConfigRequest + * Certificate Issuer Configuration Request (required) + * @return Call<CertificateIssuerConfigResponse> + */ + @PUT("v3/certificate-issuer-configurations/lwm2m") + Call + updateCertificateIssuerConfig(@retrofit2.http.Body CertificateIssuerConfigRequest certificateIssuerConfigRequest); + + /** + * Update certificate issuer configuration. Update certificate issuer configuration. + * + * @param certificateIssuerConfigRequest + * Certificate issuer configuration request. (required) + * @param certificateIssuerConfigurationId + * Certificate issuer ID configuration. (required) + * @return Call<CertificateIssuerConfigResponse> + */ + @PUT("v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}") + Call + updateCertificateIssuerConfigByID(@retrofit2.http.Body CertificateIssuerConfigRequest certificateIssuerConfigRequest, + @retrofit2.http.Path(value = "certificate-issuer-configuration-id", + encoded = true) String certificateIssuerConfigurationId); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApi.java new file mode 100644 index 000000000..3d19c1006 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApi.java @@ -0,0 +1,124 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerInfo; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerInfoListResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerUpdateRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerVerifyResponse; + +public interface SecurityAndIdentityCertificateIssuersApi { + /** + * Create certificate issuer. Create a certificate issuer. <br> The maximum number of issuers is limited to 20 + * per account. <br> You can create multiple certificate issuers of the same type, provided they have + * different names. This allows verification of the certificate issuer configuration before activation. <br> + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"issuer_type\": \"GLOBAL_SIGN\", + * \"name\": \"GS Issuer\", \"description\": \"Sample GlobalSign certificate + * issuer\", \"issuer_attributes\": null, \"issuer_credentials\": { \"api_key\": + * \"e510e289e6cd8947\", \"api_secret\": \"a477a8393d17a55ecb2ba6a61f58feb84770b621\", + * \"client_certificate\": \"-----BEGIN + * CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END + * CERTIFICATE-----\", \"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: + * 4,ENCRYPTED\\nDEK-Info: + * DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END + * RSA PRIVATE KEY-----\", \"passphrase\": \"helloworld\" } }' ``` + * + * @param certificateIssuerRequest + * Certificate issuer request. (required) + * @return Call<CertificateIssuerInfo> + */ + @POST("v3/certificate-issuers") + Call + createCertificateIssuer(@retrofit2.http.Body CertificateIssuerRequest certificateIssuerRequest); + + /** + * Delete certificate issuer. Delete a certificate issuer by ID. <br> **Example:** ``` curl -X + * DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 \\ -H + * 'Authorization: Bearer <access_key>' \\ ``` + * + * @param certificateIssuerId + * Certificate issuer ID. An active certificate issuer cannot be deleted. (required) + * @return Call<Void> + */ + @DELETE("v3/certificate-issuers/{certificate-issuer-id}") + Call deleteCertificateIssuer(@retrofit2.http.Path(value = "certificate-issuer-id", + encoded = true) String certificateIssuerId); + + /** + * Get certificate issuer by ID. + * + * @param certificateIssuerId + * Certificate issuer ID. (required) + * @return Call<CertificateIssuerInfo> + */ + @GET("v3/certificate-issuers/{certificate-issuer-id}") + Call getCertificateIssuer(@retrofit2.http.Path(value = "certificate-issuer-id", + encoded = true) String certificateIssuerId); + + /** + * Get certificate issuers list. **Note:** This endpoint does not use pagination, and therefore ignores list control + * parameters such as `limit` or `after`. + * + * @param limit + * The number of results to return (2-1000). Values outside of this range are set to the closest limit. + * (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) + * @param after + * The ID of the item after which to retrieve the next page. (optional) + * @param include + * Comma-separated list of data fields to return. Currently supported: `total_count`. + * (optional) + * @return Call<CertificateIssuerInfoListResponse> + */ + @GET("v3/certificate-issuers") + Call getCertificateIssuers(@retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("include") String include); + + /** + * Update certificate issuer. Update a certificate issuer. <br> **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"description\": \"Sample GlobalSign + * certificate issuer - updated.\", \"name\": \"GlobalSign Issuer\" }' + * ``` + * + * @param certificateIssuerId + * Certificate issuer ID. (required) + * @param certificateIssuerUpdateRequest + * Certificate issuer update request. (required) + * @return Call<CertificateIssuerInfo> + */ + @PUT("v3/certificate-issuers/{certificate-issuer-id}") + Call + updateCertificateIssuer(@retrofit2.http.Path(value = "certificate-issuer-id", + encoded = true) String certificateIssuerId, + @retrofit2.http.Body CertificateIssuerUpdateRequest certificateIssuerUpdateRequest); + + /** + * Verify certificate issuer. Validates the certificate issuer by sending a signing request for a test certificate. + * This should be done before the configuration is made active. <br> **Note:** The API requests the 3rd party + * CA to sign a test certificate. For some 3rd party CAs, this operation may use the account quota. <br> + * **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ ``` + * + * @param certificateIssuerId + * Certificate issuer ID. (required) + * @return Call<CertificateIssuerVerifyResponse> + */ + @POST("v3/certificate-issuers/{certificate-issuer-id}/verify") + Call + verifyCertificateIssuer(@retrofit2.http.Path(value = "certificate-issuer-id", + encoded = true) String certificateIssuerId); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApi.java new file mode 100644 index 000000000..821d3c2db --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApi.java @@ -0,0 +1,131 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateResp; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateRespList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateUpdateReq; + +public interface SecurityAndIdentityCertificatesApi { + /** + * Upload a new trusted certificate. Upload new trusted certificates. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"name\": + * \"myCert1\", \"description\": \"very important cert\", \"certificate\": + * \"certificate_data\", \"service\": \"lwm2m\"} ``` + * + * @param body + * A trusted certificate object with attributes. (required) + * @return Call<TrustedCertificateResp> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/trusted-certificates") + Call addCertificate(@retrofit2.http.Body TrustedCertificateReq body); + + /** + * Delete a trusted certificate by ID. Delete a trusted certificate. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param certId + * The ID of the trusted certificate to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/trusted-certificates/{cert_id}") + Call deleteCertificate(@retrofit2.http.Path(value = "cert_id", encoded = true) String certId); + + /** + * Get all trusted certificates. Retrieve an array of trusted certificates. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param nameEq + * Filter for certificate name. (optional) + * @param serviceEq + * Service filter, either LwM2M or bootstrap. (optional) + * @param expireEq + * Expire filter in days. (optional) + * @param deviceExecutionModeEq + * Device execution mode: 1 for developer certificates or another natural integer value. (optional) + * @param deviceExecutionModeNeq + * Device execution mode `not_equals` filter. (optional) + * @param ownerEq + * Owner name filter. (optional) + * @param enrollmentModeEq + * Enrollment mode filter. (optional) + * @param statusEq + * Filter for certificate status. (optional) + * @param issuerLike + * Issuer filter. Finds all matches where the filter value is a case-insensitive substring of the result. + * Example: issuer__like=cn=iss matches CN=issuer. (optional) + * @param subjectLike + * Subject filter. Finds all matches where the filter value is a case-insensitive substring of the + * result. Example: subject__like=cn=su matches CN=subject. (optional) + * @param certificateFingerprintEq + * Filter for certificate fingerprint. (optional) + * @param validEq + * Filter for finding certificates by validity. True returns certificates which are not yet expired. + * False returns certificates which have expired. (optional) + * @return Call<TrustedCertificateRespList> + */ + @GET("v3/trusted-certificates") + Call + getAllCertificates(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("name__eq") String nameEq, + @retrofit2.http.Query("service__eq") String serviceEq, + @retrofit2.http.Query("expire__eq") Integer expireEq, + @retrofit2.http.Query("device_execution_mode__eq") Integer deviceExecutionModeEq, + @retrofit2.http.Query("device_execution_mode__neq") Integer deviceExecutionModeNeq, + @retrofit2.http.Query("owner__eq") String ownerEq, + @retrofit2.http.Query("enrollment_mode__eq") Boolean enrollmentModeEq, + @retrofit2.http.Query("status__eq") String statusEq, + @retrofit2.http.Query("issuer__like") String issuerLike, + @retrofit2.http.Query("subject__like") String subjectLike, + @retrofit2.http.Query("certificate_fingerprint__eq") String certificateFingerprintEq, + @retrofit2.http.Query("valid__eq") Boolean validEq); + + /** + * Get a trusted certificate. Retrieve a trusted certificate. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param certId + * The ID of the trusted certificate to retrieve. (required) + * @return Call<TrustedCertificateResp> + */ + @GET("v3/trusted-certificates/{cert_id}") + Call getCertificate(@retrofit2.http.Path(value = "cert_id", encoded = true) String certId); + + /** + * Update trusted certificate. Update existing trusted certificates. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"description\": + * \"very important cert\"} ``` + * + * @param certId + * The ID of the trusted certificate to update. (required) + * @param body + * A trusted certificate object with attributes. (required) + * @return Call<TrustedCertificateResp> + */ + @Headers({ "Content-Type:application/json" }) + @PUT("v3/trusted-certificates/{cert_id}") + Call + updateCertificate(@retrofit2.http.Path(value = "cert_id", encoded = true) String certId, + @retrofit2.http.Body TrustedCertificateUpdateReq body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApi.java new file mode 100644 index 000000000..dc762f687 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApi.java @@ -0,0 +1,45 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeveloperCertificateRequestData; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeveloperCertificateResponseData; + +public interface SecurityAndIdentityDeveloperClassCertificatesApi { + /** + * Create a new developer certificate to connect to the bootstrap server. Create a developer certificate (a + * certificate that can be flashed to multiple devices to connect to the bootstrap server). **Note:** The number of + * developer certificates allowed per account is limited. Please see [Setting up a Certificate + * Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). + * **Example:** ``` curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \\ -H + * \"Authorization: Bearer <access_key>\" \\ -H \"content-type: application/json\" \\ -d { + * \"name\": \"<certificate_name>\", \"description\": + * \"<certificate_description>\" } ``` + * + * @param body + * (required) + * @return Call<DeveloperCertificateResponseData> + */ + @POST("v3/developer-certificates") + Call + createDeveloperCertificate(@retrofit2.http.Body DeveloperCertificateRequestData body); + + /** + * Fetch an existing developer certificate to connect to the bootstrap server. Return an existing developer + * certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server). **Example:** + * ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\ + * -H \"Authorization: Bearer <access_key>\" ``` + * + * @param developerCertificateId + * A unique identifier for the developer certificate. (required) + * @return Call<DeveloperCertificateResponseData> + */ + @GET("v3/developer-certificates/{developerCertificateId}") + Call + getDeveloperCertificate(@retrofit2.http.Path(value = "developerCertificateId", + encoded = true) String developerCertificateId); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApi.java new file mode 100644 index 000000000..88adf6591 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApi.java @@ -0,0 +1,77 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ListOfPreSharedKeysWithoutSecret; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.PreSharedKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.PreSharedKeyWithoutSecret; + +public interface SecurityAndIdentityPreSharedKeysApi { + /** + * Remove a PSK. Remove a PSK. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H \"Authorization: Bearer + * <access_key>\" ``` + * + * @param endpointName + * The unique endpoint identifier that this PSK applies to. [Reserved + * characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must + * be percent-encoded. (required) + * @return Call<Void> + */ + @DELETE("v2/device-shared-keys/{endpoint_name}") + Call deletePreSharedKey(@retrofit2.http.Path(value = "endpoint_name", encoded = true) String endpointName); + + /** + * Get a PSK. Check if a PSK for an endpoint exists or not. The response does not contain the secret itself. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H \"Authorization: Bearer + * <access_key>\" ``` + * + * @param endpointName + * The unique endpoint identifier that this PSK applies to. [Reserved + * characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) must + * be percent-encoded. (required) + * @return Call<PreSharedKeyWithoutSecret> + */ + @GET("v2/device-shared-keys/{endpoint_name}") + Call + getPreSharedKey(@retrofit2.http.Path(value = "endpoint_name", encoded = true) String endpointName); + + /** + * List PSKs. Retrieve pre-shared keys (PSKs) with pagination. Default page size of 50 entries. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H + * \"Authorization: Bearer <access_key>\" ``` + * + * @param limit + * The number of objects to retrieve on a page (2-1000). Values outside the range are set to the closest + * limit. (optional, default to 50) + * @param after + * An offset token for fetching a specific page. Provided by the server. (optional) + * @return Call<ListOfPreSharedKeysWithoutSecret> + */ + @Headers({ "Content-Type:application/json" }) + @GET("v2/device-shared-keys") + Call listPreSharedKeys(@retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after); + + /** + * Upload a PSK to Pelion Device Management. Upload a PSK for an endpoint to allow it to bootstrap. The existing key + * cannot be overwritten, but needs to be deleted first in the case of re-setting a PSK for an endpoint. **Note**: + * The PSK APIs are available only to accounts that have this feature enabled. **Example:** ``` curl + * -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H \"Authorization: Bearer + * <access_key>\" \\ -H \"content-type: application/json\" \\ -d '{ + * \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": + * \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }' ``` + * + * @param body + * PSK to upload. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v2/device-shared-keys") + Call uploadPreSharedKey(@retrofit2.http.Body PreSharedKey body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApi.java new file mode 100644 index 000000000..6167a9b28 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApi.java @@ -0,0 +1,105 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CreateTrustAnchorRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CreateTrustAnchorResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GetTrustAnchorsResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TokenRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TokenResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.UpdateTrustAnchorRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.UpdateTrustAnchorResponse; + +public interface SecurityAndIdentitySecureDeviceAccessApi { + /** + * Get an access token to use with a device. Generate a signed CWT (CBOR Web Token). The SDA Android SDK uses this + * API to gain access to perform actions on the devices specified in the audience (aud). <br> Authorized for + * roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/ace-auth/token \\ -H 'Authorization: <valid JWT>' \\ -H + * 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"grant_type\":\"client_credentials\", + * \"aud\":[\"id:f90b1017e52f4c70ad92684e802c9249\",\"ep:dev1\"], + * \"scope\":\"turn-led-on\", \"cnf\":\"-----BEGIN PUBLIC + * KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ...XwIDAQAB-----END PUBLIC KEY-----\" }' ``` + * + * @param body + * Create access token request. (required) + * @return Call<TokenResponse> + */ + @POST("/ace-auth/token") + Call createAceAuthToken(@retrofit2.http.Body TokenRequest body); + + /** + * Create a new trust anchor for the account. Create a trust anchor key pair and return the public key and creation + * time. Each account can have one trust anchor only. This API fails if a trust anchor already exists for the + * account. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H 'Authorization: + * <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"description\": \"Trust anchor for room lighting controller.\" }' ``` + * + * @param body + * Request a new trust anchor. (required) + * @return Call<CreateTrustAnchorResponse> + */ + @POST("/v3/trust-anchors") + Call createTrustAnchor(@retrofit2.http.Body CreateTrustAnchorRequest body); + + /** + * Delete a trust anchor. Delete the specified trust anchor. Unrecoverable. <br> Authorized for roles: + * Service, ServiceAdministrator <br> **Usage example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: + * <valid JWT>' \\ ``` + * + * @param trustAnchorId + * The id of the trust anchor to be deleted (required) + * @return Call<Void> + */ + @DELETE("/v3/trust-anchors/{trust_anchor_id}") + Call deleteTrustAnchor(@retrofit2.http.Path(value = "trust_anchor_id", encoded = true) String trustAnchorId); + + /** + * Get the account's trust anchor used to sign the access token. Get all trust anchors that match the account ID + * specified in the JWT. <br> Authorized for roles: Service, ServiceAdministrator <br> **Usage + * example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H + * 'Authorization: <valid JWT>' ``` + * + * @param limit + * Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. + * Limit values outside of this range are set to the closest limit. (optional) + * @param order + * Indicates how to order the entries based on when they were created. `ASC` by default. + * (optional) + * @param after + * The ID of the item after which to retrieve the next page. (optional) + * @param include + * Comma-separated list of data fields to return. Currently supported: `total_count`. + * (optional) + * @return Call<GetTrustAnchorsResponse> + */ + @GET("/v3/trust-anchors") + Call + getTrustAnchors(@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("include") String include); + + /** + * Update trust anchor attributes (description). Updates a trust anchor description attribute. <br> Authorized + * for roles: Service, ServiceAdministrator <br> **Usage example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: + * <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"description\": \"Trust anchor for ambient light module\" }' ``` + * + * @param trustAnchorId + * The id of the trust anchor to be updated (required) + * @param body + * Update trust anchor request. (required) + * @return Call<UpdateTrustAnchorResponse> + */ + @PUT("/v3/trust-anchors/{trust_anchor_id}") + Call + updateTrustAnchor(@retrofit2.http.Path(value = "trust_anchor_id", encoded = true) String trustAnchorId, + @retrofit2.http.Body UpdateTrustAnchorRequest body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApi.java new file mode 100644 index 000000000..60343ced5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApi.java @@ -0,0 +1,44 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AllServerCredentialsResponseData; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ServerCredentialsResponseData; + +public interface SecurityAndIdentityServerCredentialsApi { + /** + * Fetch all (Bootstrap and LwM2M) server credentials. Return all (bootstrap and LwM2M) server credentials for + * client to connect to bootstrap or LwM2M server. **Example:** ``` curl -X GET + * http://api.us-east-1.mbedcloud.com/v3/server-credentials \\ -H \"Authorization: Bearer + * <access_key>\" ``` + * + * @return Call<AllServerCredentialsResponseData> + */ + @GET("v3/server-credentials") + Call getAllServerCredentials(); + + /** + * Fetch bootstrap server credentials. Return bootstrap server credentials for client to connect to bootstrap + * server. **Example:** ``` curl -X GET + * http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \\ -H \"Authorization: Bearer + * <access_key>\" ``` + * + * @return Call<ServerCredentialsResponseData> + */ + @GET("v3/server-credentials/bootstrap") + Call getBootstrapServerCredentials(); + + /** + * Fetch LwM2M server credentials. Return LwM2M server credentials for client to connect to LwM2M server. + * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \\ -H + * \"Authorization: Bearer <access_key>\" ``` + * + * @return Call<ServerCredentialsResponseData> + */ + @GET("v3/server-credentials/lwm2m") + Call getL2M2MServerCredentials(); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApi.java new file mode 100644 index 000000000..2b708fdbf --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApi.java @@ -0,0 +1,61 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKeyList; + +public interface TenantAccountsAccessKeysApi { + /** + * Get access key. Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param accessKeyId + * The ID of the access key to retrieve. (required) + * @return Call<AccessKey> + */ + @GET("v3/accounts/{account_id}/access-keys/{access_key_id}") + Call + getAccountAccessKey(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "access_key_id", encoded = true) String accessKeyId); + + /** + * Get all access keys. Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @param applicationIdEq + * Application filter. (optional) + * @return Call<AccessKeyList> + */ + @GET("v3/accounts/{account_id}/access-keys") + Call + getAllAccountAccessKeys(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq, + @retrofit2.http.Query("application_id__eq") String applicationIdEq); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApi.java index ca8367ff1..ebbfeff31 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApi.java @@ -6,15 +6,17 @@ import retrofit2.http.*; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountCreationReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountCreationResp; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfoList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountUpdateRootReq; public interface TenantAccountsAccountsApi { /** - * Create a new account. Create a new account. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' \\ -d '{\"display_name\": \"MyAccount1\", + * Create a new account. Create a new account. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"display_name\": \"MyAccount1\", \"aliases\": [ \"my-account\" ], * \"admin_name\": \"accountAdmin1\", \"email\": * \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", * \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", @@ -31,20 +33,21 @@ public interface TenantAccountsAccountsApi { * its admin user has ENROLLING status. If the user already exists, its status is not modified. Email to * finish enrollment or notify the existing user about the new account is sent to the * `admin_email` defined in the request. </li></ul> (optional, default to create) - * @return Call<AccountInfo> + * @return Call<AccountCreationResp> */ @Headers({ "Content-Type:application/json" }) @POST("v3/accounts") - Call createAccount(@retrofit2.http.Body AccountCreationReq body, - @retrofit2.http.Query("action") String action); + Call createAccount(@retrofit2.http.Body AccountCreationReq body, + @retrofit2.http.Query("action") String action); /** - * Get account info. Retrieve detailed information about an account. **Example:** ``` curl -X GET + * Get account information. Retrieve detailed information about an account. <b>Note:</b> This endpoint + * is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param accountId - * The ID of the account to fetch. (required) + * The ID of the account to retrieve. (required) * @param include * Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, * history. (optional) @@ -58,9 +61,10 @@ Call getAccountInfo(@retrofit2.http.Path(value = "account_id", enco @retrofit2.http.Query("properties") String properties); /** - * Get all accounts. Returns an array of account objects, optionally filtered by status and tier level. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Get all accounts. Retrieve an array of tenant accounts, optionally filtered by status and tier level. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <access_key>' + * ``` * * @param statusEq * An optional filter for account status, ENROLLING, ACTIVE, RESTRICTED, or SUSPENDED. (optional) @@ -80,7 +84,7 @@ Call getAccountInfo(@retrofit2.http.Path(value = "account_id", enco * @param limit * The number of results to return (2-1000). Default 1000. (optional, default to 1000) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include @@ -107,9 +111,10 @@ Call getAccountInfo(@retrofit2.http.Path(value = "account_id", enco @retrofit2.http.Query("properties") String properties); /** - * Update attributes of an existing account. Update an account. **Example:** ``` curl -X PUT + * Update attributes of an existing account. Update an account. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": * \"12345678\"}' ``` * * @param accountId diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApi.java index cff65c35d..a389eda30 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApi.java @@ -16,9 +16,10 @@ public interface TenantAccountsApiKeysApi { /** - * Add API key to a list of groups. Add API key to groups. **Example:** ``` curl -X POST + * Add API key to a list of groups. Add API key to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -38,9 +39,10 @@ public interface TenantAccountsApiKeysApi { @retrofit2.http.Body List body); /** - * Add API key to a list of groups. Add an API key to groups. **Example:** ``` curl -X POST + * Add API key to a list of groups. Add an API key to groups. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -61,9 +63,10 @@ public interface TenantAccountsApiKeysApi { /** * Create a new API key. Create a new API key. There is no default value for the owner ID, and it must be from the - * same account where the new API key is created. **Example:** ``` curl -X POST + * same account where the new API key is created. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"MyKey1\"}' ``` * * @param accountId @@ -79,9 +82,10 @@ public interface TenantAccountsApiKeysApi { @retrofit2.http.Body ApiKeyInfoReq body); /** - * Delete the API key. Delete an API key. **Example:** ``` curl -X DELETE + * Delete the API key. Delete an API key. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -94,9 +98,10 @@ Call deleteAccountApiKey(@retrofit2.http.Path(value = "account_id", encode @retrofit2.http.Path(value = "apikey_id", encoded = true) String apikeyId); /** - * Get API key details. Retrieve API key details. **Example:** ``` curl -X GET + * Get API key details. Retrieve details of an API key. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -109,19 +114,19 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Path(value = "apikey_id", encoded = true) String apikeyId); /** - * Get all API keys. Retrieve API keys in an array, optionally filtered by the owner. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Get all API keys. Retrieve an array of API keys, optionally filtered by the owner. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param accountId * Account ID. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param keyEq @@ -140,10 +145,10 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Query("owner__eq") String ownerEq); /** - * Get groups associated with the API key. Retrieve groups associated with the API key. **Example:** - * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Get policy groups of an API key. Retrieve an array of policy groups associated with an API key. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -152,10 +157,9 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<GroupSummaryList> @@ -170,9 +174,10 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Query("include") String include); /** - * Remove API key from groups. Remove API key from groups. **Example:** ``` curl -X DELETE + * Remove API key from groups. Remove API key from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -192,9 +197,10 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Body List body); /** - * Remove API key from groups. Remove an API key from groups. **Example:** ``` curl -X POST + * Remove API key from groups. Remove an API key from groups. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -214,9 +220,10 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Body GroupIdList body); /** - * Reset the secret key. Reset the secret key of the API key. **Example:** ``` curl -X POST + * Reset the secret key. Reset the secret key of the API key. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -233,9 +240,10 @@ Call getAccountApiKey(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Body ApiKeyUpdateReq body); /** - * Update API key details. Update API key details. **Example:** ``` curl -X PUT + * Update API key details. Update API key details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"TestApiKey25\"}' ``` * * @param accountId diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApi.java new file mode 100644 index 000000000..e32339abb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApi.java @@ -0,0 +1,326 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKeyList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoResp; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Application; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApplicationList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupIdList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummaryList; + +public interface TenantAccountsApplicationsApi { + /** + * Add application to a list of groups. Add application to groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application to add to the group. (required) + * @param body + * A list of IDs of the groups to update. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/applications/{application_id}/groups/add") + Call + addAccountApplicationToGroups(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Body GroupIdList body); + + /** + * Create a new application. Create a new application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications -d '{\"name\": + * \"MyApplication1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H + * 'content-type: application/json' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param body + * The details of the application to create. (required) + * @return Call<Application> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/applications") + Call + createAccountApplication(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Body Application body); + + /** + * Create a new application access key. Create a new access key for the application. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys -d + * '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ + * -H 'content-type: application/json' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param body + * The details of the access key to create. (required) + * @return Call<AccessKey> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/applications/{application_id}/access-keys") + Call + createAccountApplicationAccessKey(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Body AccessKey body); + + /** + * Delete application. Delete the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/accounts/{account_id}/applications/{application_id}") + Call + deleteAccountApplication(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", encoded = true) String applicationId); + + /** + * Delete access key associated with the application. Delete the access key associated with the application. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}") + Call + deleteAccountApplicationAccessKey(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", + encoded = true) String accessKeyId); + + /** + * Get application. Retrieve details of an application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application to retrieve. (required) + * @return Call<Application> + */ + @GET("v3/accounts/{account_id}/applications/{application_id}") + Call + getAccountApplication(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", encoded = true) String applicationId); + + /** + * Get access key. Retrieve details of an access key associated with the application. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to retrieve. (required) + * @return Call<AccessKey> + */ + @GET("v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}") + Call + getAccountApplicationAccessKey(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", + encoded = true) String accessKeyId); + + /** + * Get all access keys associated with the application. Retrieve an array of access keys associated with the + * application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @return Call<AccessKeyList> + */ + @GET("v3/accounts/{account_id}/applications/{application_id}/access-keys") + Call + getAllAccountApplicationAccessKeys(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq); + + /** + * Get all applications. Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param statusEq + * Status filter. (optional) + * @return Call<ApplicationList> + */ + @GET("v3/accounts/{account_id}/applications") + Call + getAllAccountApplications(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("status__eq") String statusEq); + + /** + * Get policy groups of an application. Retrieve an array of policy groups associated with an application. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<GroupSummaryList> + */ + @GET("v3/accounts/{account_id}/applications/{application_id}/groups") + Call + getGroupsOfAccountApplication(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + + /** + * Remove application from groups. Remove application from groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application to remove from the group. (required) + * @param body + * A list of IDs of the groups to update. (required) + * @return Call<Void> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/applications/{application_id}/groups/remove") + Call + removeAccountApplicationFromGroups(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Body GroupIdList body); + + /** + * Update application details. Update application details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestApplication25\"}' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application to update. (required) + * @param body + * New applicationattributes to store. (required) + * @return Call<ApiKeyInfoResp> + */ + @PUT("v3/accounts/{account_id}/applications/{application_id}") + Call + updateAccountApplication(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", encoded = true) String applicationId, + @retrofit2.http.Body Application body); + + /** + * Update access key details. Update access key details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestAccessKey\"}' ``` + * + * @param accountId + * The ID of the account to retrieve. (required) + * @param applicationId + * The ID of the application. (required) + * @param accessKeyId + * The ID of the access key to update. (required) + * @param body + * New access key attributes to store. (required) + * @return Call<AccessKey> + */ + @PUT("v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}") + Call + updateAccountApplicationAccessKey(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "application_id", + encoded = true) String applicationId, + @retrofit2.http.Path(value = "access_key_id", + encoded = true) String accessKeyId, + @retrofit2.http.Body AccessKey body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApi.java index f6148ebc3..6c3a7eba0 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApi.java @@ -5,21 +5,22 @@ import retrofit2.Call; import retrofit2.http.*; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.NotificationEntry; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.NotificationEntryList; public interface TenantAccountsEmailNotificationLogsApi { /** - * Get the notification events of an account. Retrieve notifications. + * Get email notifications. Retrieve an array of email notification logs. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param accountId * Account ID. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @return Call<NotificationEntryList> */ @GET("v3/accounts/{account_id}/notifications") @@ -29,4 +30,20 @@ public interface TenantAccountsEmailNotificationLogsApi { @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order); + /** + * Get an email notification. Retrieve an email notifications log entry. <b>Note:</b> This endpoint is + * restricted to administrators. + * + * @param accountId + * The ID of the account for which this notification should be retrieved. (required) + * @param notificationId + * The ID of the notification entry to be retrieved. (required) + * @return Call<NotificationEntry> + */ + @GET("v3/accounts/{account_id}/notifications/{notification_id}") + Call + getAccountNofificationEntry(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "notification_id", + encoded = true) String notificationId); + } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApi.java new file mode 100644 index 000000000..a6bdac1f3 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApi.java @@ -0,0 +1,44 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitation; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitationList; + +public interface TenantAccountsEntitlementLimitationsApi { + /** + * Get an entitlement limitation. Retrieve an entitlement limitation. <b>Note:</b> This endpoint is + * restricted to administrators. + * + * @param accountId + * The ID of the account. (required) + * @param limitationId + * The ID of the limitation to be fetched. (required) + * @return Call<AccountLimitation> + */ + @GET("v3/accounts/{account_id}/limitations/{limitation_id}") + Call + aggregatorGetAccountLimitation(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "limitation_id", + encoded = true) String limitationId); + + /** + * Get entitlement limitations. Retrieve an array of entitlement limitations. <b>Note:</b> This endpoint + * is restricted to administrators. + * + * @param accountId + * The ID of the account. (required) + * @param inheritedEq + * Filter for finding account limitations by inheritance. True returns also inherited limitations. False + * returns only non-inherited ones. (optional) + * @return Call<AccountLimitationList> + */ + @GET("v3/accounts/{account_id}/limitations") + Call + aggregatorGetAccountLimitations(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Query("inherited__eq") String inheritedEq); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApi.java index d954ec88b..c9197b41e 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApi.java @@ -13,7 +13,8 @@ public interface TenantAccountsIdentityProvidersApi { /** - * Create a new identity provider. Create a new identity provider. + * Create a new identity provider. Create a new identity provider. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param accountId * Account ID. (required) @@ -33,7 +34,8 @@ public interface TenantAccountsIdentityProvidersApi { @retrofit2.http.Query("discovery") Boolean discovery); /** - * Delete an identity provider by ID. Delete an identity provider by ID. + * Delete an identity provider by ID. Delete an identity provider by ID. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param accountId * Account ID. (required) @@ -48,7 +50,8 @@ public interface TenantAccountsIdentityProvidersApi { encoded = true) String identityProviderId); /** - * Delete the service provider certificate. Delete a service provider certificate. + * Delete the service provider certificate. Delete a service provider certificate. <b>Note:</b> This + * endpoint is restricted to administrators. * * @param accountId * Account ID. (required) @@ -65,6 +68,7 @@ public interface TenantAccountsIdentityProvidersApi { /** * Generate a new service provider certificate. Generate a new service provider certificate. + * <b>Note:</b> This endpoint is restricted to administrators. * * @param accountId * Account ID. (required) @@ -83,7 +87,8 @@ public interface TenantAccountsIdentityProvidersApi { @retrofit2.http.Body CertificateGenerationReq body); /** - * Retrieve identity provider by ID. Manage identity providers of a tenant account. + * Get an identity provider. Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to + * administrators. * * @param accountId * Account ID. (required) @@ -98,17 +103,17 @@ public interface TenantAccountsIdentityProvidersApi { encoded = true) String identityProviderId); /** - * Get all identity providers. Retrieve identity providers in an array. + * Get all identity providers. Retrieve an array of identity providers. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param accountId * The ID of the account. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<IdentityProviderList> @@ -123,7 +128,8 @@ public interface TenantAccountsIdentityProvidersApi { @retrofit2.http.Query("include") String include); /** - * Refreshes the OIDC signing keys. Refreshes an OIDC IdP's signing keys. + * Refresh the OIDC signing keys. Refresh an OIDC IdP's signing keys. <b>Note:</b> This endpoint is + * restricted to administrators. * * @param accountId * The ID of the account to be managed. (required) @@ -139,7 +145,8 @@ public interface TenantAccountsIdentityProvidersApi { encoded = true) String identityProviderId); /** - * Update an existing identity provider. Update an existing identity provider. + * Update an existing identity provider. Update an existing identity provider. <b>Note:</b> This + * endpoint is restricted to administrators. * * @param accountId * Account ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApi.java index 20d0118b2..48badffec 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApi.java @@ -6,6 +6,7 @@ import retrofit2.http.*; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoRespList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApplicationList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupCreationInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummary; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummaryList; @@ -15,9 +16,10 @@ public interface TenantAccountsPolicyGroupsApi { /** - * Add API keys to Account group. Add API keys to account groups. **Example:** ``` curl -X POST + * Add API keys to Account group. Add API keys to account groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -25,56 +27,84 @@ public interface TenantAccountsPolicyGroupsApi { * The ID of the group to retrieve API keys for. (required) * @param body * A list of API keys to add to the group. (required) - * @return Call<ApiKeyInfoRespList> + * @return Call<GroupSummary> */ @POST("v3/accounts/{account_id}/policy-groups/{group_id}/api-keys") - Call + Call addApiKeysToAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, @retrofit2.http.Body SubjectList body); /** - * Add API keys to account group. Add API keys to account groups. **Example:** ``` curl -X POST + * Add API keys to account group. Add API keys to account groups. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"apikeys\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` * * @param accountId * The ID of the account. (required) * @param groupId - * The ID of the group to retrieve API keys for. (required) + * The ID of the group to remove API keys from. (required) * @param body * A list of API keys to add to the group. (required) - * @return Call<ApiKeyInfoRespList> + * @return Call<GroupSummary> */ @POST("v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add") - Call + Call addListedApiKeysToAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, @retrofit2.http.Body SubjectList body); /** - * Add users to account group. Add users to account group. **Example:** ``` curl -X POST + * Add applications to account group. Add applications to account groups. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` + * + * @param accountId + * The ID of the account. (required) + * @param groupId + * The ID of the group to add applications to. (required) + * @param body + * A list of applications to add to the group. (required) + * @return Call<GroupSummary> + */ + @POST("v3/accounts/{account_id}/policy-groups/{group_id}/applications/add") + Call + addListedApplicationsToAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, + @retrofit2.http.Body SubjectList body); + + /** + * Add users to account group. Add users to account group. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) * @param groupId - * The ID of the group to retrieve API keys for. (required) + * The ID of the group to retrieve users for. (required) * @param body - * A list of API keys to add to the group. (required) - * @return Call<ApiKeyInfoRespList> + * A list of users to add to the group. (required) + * @return Call<GroupSummary> */ @POST("v3/accounts/{account_id}/policy-groups/{group_id}/users/add") - Call + Call addListedUsersToAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, @retrofit2.http.Body SubjectList body); /** - * Add members to a group. Add users and API keys to groups. **Example:** ``` curl -X POST + * Add members to a group. Add users and API keys to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` * @@ -94,28 +124,30 @@ public interface TenantAccountsPolicyGroupsApi { @retrofit2.http.Body SubjectList body); /** - * Add users to account group. Add users to account group. **Example:** ``` curl -X POST + * Add users to account group. Add users to account group. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) * @param groupId - * The ID of the group to retrieve API keys for. (required) + * The ID of the group to add users to. (required) * @param body - * A list of API keys to add to the group. (required) - * @return Call<ApiKeyInfoRespList> + * A list of user IDs to add to the group. (required) + * @return Call<GroupSummary> */ @POST("v3/accounts/{account_id}/policy-groups/{group_id}/users") - Call + Call addUsersToAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, @retrofit2.http.Body SubjectList body); /** - * Create a new group. Create a new group. **Example:** ``` curl -X POST + * Create a new group. Create a new group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"MyGroup1\"}' ``` * * @param accountId @@ -130,9 +162,10 @@ Call createAccountGroup(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Body GroupCreationInfo body); /** - * Delete a group. Delete a group. **Example:** ``` curl -X DELETE + * Delete a group. Delete a group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -145,9 +178,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Path(value = "group_id", encoded = true) String groupId); /** - * Get group information. Retrieve general information about the group. **Example:** ``` curl -X GET + * Get policy group. Retrieve policy group details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -161,19 +195,19 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Path(value = "group_id", encoded = true) String groupId); /** - * Get all group information. Retrieve all group information. **Example:** ``` curl -X GET + * Get policy groups. Retrieve an array of policy groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param accountId * Account ID. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param nameEq @@ -189,9 +223,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Query("name__eq") String nameEq); /** - * Get API keys of a group. List the API keys of the group with details. **Example:** ``` curl -X GET + * Get API keys in a group. Retrieve an array of API keys associated with a policy group. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -200,10 +235,9 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<ApiKeyInfoRespList> @@ -218,9 +252,39 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Query("include") String include); /** - * Get users of a group. List a group's users, with details. **Example:** ``` curl -X GET + * Get applications in a group. Retrieve an array of applications associated with a policy group. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account. (required) + * @param groupId + * The ID of the group to retrieve applications for. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<ApplicationList> + */ + @GET("v3/accounts/{account_id}/policy-groups/{group_id}/applications") + Call + getApplicationsOfAccountGroup(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "group_id", encoded = true) String groupId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + + /** + * Get users in a policy group. Retrieve an array of users associated with a policy group. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -229,10 +293,9 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param statusEq @@ -255,9 +318,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Query("status__nin") String statusNin); /** - * Remove API keys from a group. Remove API keys from groups. **Example:** ``` curl -X DELETE + * Remove API keys from a group. Remove API keys from groups. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"apikeys\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -278,9 +342,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Body SubjectList body); /** - * Remove API keys from a group. Remove API keys from groups. **Example:** ``` curl -X POST + * Remove API keys from a group. Remove API keys from groups. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"apikeys\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -301,9 +366,35 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Body SubjectList body); /** - * Remove users from a group. Remove users from groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove applications from a group. Remove applications from groups. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` + * + * @param accountId + * The ID of the account. (required) + * @param groupId + * The ID of the group to remove applications from. (required) + * @param body + * A list of applications to remove from the group. (required) + * @return Call<GroupSummary> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove") + Call removeListedApplicationsFromAccountGroup( + @retrofit2.http.Path(value = "account_id", + encoded = true) String accountId, + @retrofit2.http.Path(value = "group_id", + encoded = true) String groupId, + @retrofit2.http.Body SubjectList body); + + /** + * Remove users from a group. Remove users from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -324,9 +415,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Body SubjectList body); /** - * Remove users from a group. Remove users from groups. **Example:** ``` curl -X DELETE + * Remove users from a group. Remove users from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -347,9 +439,10 @@ Call deleteAccountGroup(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Body SubjectList body); /** - * Update the group name. Update a group name. **Example:** ``` curl -X PUT + * Update the group name. Update a group name. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"TestGroup2\"}' ``` * * @param accountId diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApi.java index 4dd2c678e..5d98f1d51 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApi.java @@ -11,9 +11,10 @@ public interface TenantAccountsUserInvitationsApi { /** - * Create a user invitation. Invite a new or existing user. **Example:** ``` curl -X POST + * Create a user invitation. Invite a new or existing user. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": * \"myemail@company.com\"} ``` * * @param accountId @@ -29,10 +30,10 @@ public interface TenantAccountsUserInvitationsApi { @retrofit2.http.Body UserInvitationReq body); /** - * Delete a user invitation. Delete an active user invitation sent to a new or existing user. **Example:** - * ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Delete a user invitation. Delete an active user invitation sent to a new or existing user. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -47,9 +48,9 @@ public interface TenantAccountsUserInvitationsApi { /** * Details of a user invitation. Retrieve details of an active user invitation sent for a new or existing user. - * **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -63,20 +64,19 @@ public interface TenantAccountsUserInvitationsApi { @retrofit2.http.Path(value = "invitation_id", encoded = true) String invitationId); /** - * Get the details of all user invitations. Retrieve details of all active user invitations sent for new or existing - * users. **Example:** ``` curl -X GET + * Get user invitations. Retrieve an array of active user invitations. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param accountId * Account ID. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param loginProfilesEq * Filter to retrieve user invitations by a specified login profile. (optional) * @return Call<UserInvitationRespList> diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApi.java index 53346d472..afa937977 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApi.java @@ -16,9 +16,10 @@ public interface TenantAccountsUsersApi { /** - * Add user to a list of groups. Add user to groups. **Example:** ``` curl -X POST + * Add user to a list of groups. Add user to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -38,9 +39,10 @@ public interface TenantAccountsUsersApi { @retrofit2.http.Body List body); /** - * Add user to a list of groups. Add a user to groups. **Example:** ``` curl -X POST + * Add user to a list of groups. Add a user to groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -61,10 +63,10 @@ public interface TenantAccountsUsersApi { /** * Create a new user. Create or invite a new user to the account. Only email address is used; other attributes are - * set in the second step. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": - * \"myemail@company.com\"} ``` + * set in the second step. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"email\": \"myemail@company.com\"} ``` * * @param accountId * Account ID. (required) @@ -81,9 +83,10 @@ Call createAccountUser(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Query("action") String action); /** - * Delete a user. Delete a user. **Example:** ``` curl -X DELETE + * Delete a user. Delete a user. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param accountId * Account ID. (required) @@ -96,9 +99,10 @@ Call deleteAccountUser(@retrofit2.http.Path(value = "account_id", encoded @retrofit2.http.Path(value = "user_id", encoded = true) String userId); /** - * Details of the user. Retrieve user details. **Example:** ``` curl -X GET + * Details of the user. Retrieve user details. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @param accountId * Account ID. (required) @@ -111,19 +115,18 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Path(value = "user_id", encoded = true) String userId); /** - * Get the details of all users. Retrieve details of all users. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Get users. Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ + * -H 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @param emailEq @@ -150,9 +153,10 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Query("login_profiles__eq") String loginProfilesEq); /** - * Get user's groups. Retrieve user's groups. **Example:** ``` curl -X GET + * Get policy groups for a user. Retrieve an array of policy groups associated with a user. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param accountId * Account ID. (required) @@ -161,10 +165,9 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc * @param limit * The number of results to return (2-1000). Default 50. (optional, default to 50) * @param after - * The entity ID to fetch after the given one. (optional) + * The entity ID to retrieve after the given one. (optional) * @param order - * Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC. (optional, default to - * ASC) + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) * @param include * Comma-separated additional data to return. Currently supported: total_count. (optional) * @return Call<GroupSummaryList> @@ -178,9 +181,26 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Query("include") String include); /** - * Remove user from groups. Remove user from groups. **Example:** ``` curl -X DELETE + * Remove user from the account. Remove user from the account. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/remove \\ -H 'Authorization: + * Bearer <access_key>' ``` + * + * @param accountId + * The ID of the account. (required) + * @param userId + * The ID of the user to remove from the account. (required) + * @return Call<Void> + */ + @POST("v3/accounts/{account_id}/users/{user_id}/remove") + Call removeAccountUserFromAccount(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "user_id", encoded = true) String userId); + + /** + * Remove user from groups. Remove user from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -200,9 +220,10 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Body List body); /** - * Remove user from groups. Remove a user from groups. **Example:** ``` curl -X POST + * Remove user from groups. Remove a user from groups. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` * @@ -222,9 +243,10 @@ Call getAccountUser(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Body GroupIdList body); /** - * Update user details. Update user details. **Example:** ``` curl -X PUT + * Update user details. Update user details. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": * \"myusername\"}' ``` * * @param accountId @@ -242,9 +264,10 @@ Call updateAccountUser(@retrofit2.http.Path(value = "account_id", @retrofit2.http.Body UserUpdateReq body); /** - * Validate the user email. Validate user email. **Example:** ``` curl -X POST + * Validate the user email. Validate user email. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * Account ID. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApi.java new file mode 100644 index 000000000..c2db0938f --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApi.java @@ -0,0 +1,154 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateResp; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateRespList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateUpdateReq; + +public interface TenantSecurityAndIdentityCertificatesApi { + /** + * Upload new trusted certificate. Upload new trusted certificate. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"name\": + * \"myCert1\", \"description\": \"very important cert\", \"certificate\": + * \"certificate_data\", \"service\": \"lwm2m\"} ``` + * + * @param accountId + * Account ID. (required) + * @param body + * A trusted certificate object with attributes. Signature is optional. (required) + * @return Call<TrustedCertificateResp> + */ + @Headers({ "Content-Type:application/json" }) + @POST("v3/accounts/{account_id}/trusted-certificates") + Call + addAccountCertificate(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Body TrustedCertificateReq body); + + /** + * Delete a trusted certificate by ID. Delete a trusted certificate. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * Account ID. (required) + * @param certId + * The ID of the trusted certificate to delete. (required) + * @return Call<Void> + */ + @DELETE("v3/accounts/{account_id}/trusted-certificates/{cert_id}") + Call deleteAccountCertificate(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "cert_id", encoded = true) String certId); + + /** + * Get a trusted certificate. Retrieve a trusted certificate. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param accountId + * Account ID. (required) + * @param certId + * The ID of the trusted certificate to retrieve. (required) + * @return Call<TrustedCertificateResp> + */ + @GET("v3/accounts/{account_id}/trusted-certificates/{cert_id}") + Call + getAccountCertificate(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "cert_id", encoded = true) String certId); + + /** + * Get trusted certificates. Retrieve an array of trusted certificates. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: + * Bearer <access_key>' ``` + * + * @param accountId + * Account ID. (required) + * @param limit + * The number of results to return (2-1000). Default 50. (optional, default to 50) + * @param after + * The entity ID to retrieve after the given one. (optional) + * @param order + * Record order based on creation. Acceptable values: ASC, DESC. Default: ASC. (optional, default to ASC) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @param nameEq + * Filter for certificate name. (optional) + * @param serviceEq + * Filter for service. (optional) + * @param expireEq + * Filter for expire. (optional) + * @param deviceExecutionModeEq + * Filter for developer certificates. (optional) + * @param deviceExecutionModeNeq + * Filter for not developer certificates. (optional) + * @param ownerEq + * Owner name filter. (optional) + * @param enrollmentModeEq + * Enrollment mode filter. (optional) + * @param statusEq + * Filter for certificate status. (optional) + * @param issuerLike + * Filter for issuer. Finds all matches where the filter value is a case-insensitive substring of the + * result. Example: issuer__like=cn=iss matches CN=issuer. (optional) + * @param subjectLike + * Filter for subject. Finds all matches where the filter value is a case-insensitive substring of the + * result. Example: subject__like=cn=su matches CN=subject. (optional) + * @param certificateFingerprintEq + * Filter for certificate fingerprint. (optional) + * @param validEq + * Filter for finding certificates by validity. True returns certificates which are not yet expired. + * False returns certificates which have expired. (optional) + * @return Call<TrustedCertificateRespList> + */ + @GET("v3/accounts/{account_id}/trusted-certificates") + Call + getAllAccountCertificates(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include, + @retrofit2.http.Query("name__eq") String nameEq, + @retrofit2.http.Query("service__eq") String serviceEq, + @retrofit2.http.Query("expire__eq") Integer expireEq, + @retrofit2.http.Query("device_execution_mode__eq") Integer deviceExecutionModeEq, + @retrofit2.http.Query("device_execution_mode__neq") Integer deviceExecutionModeNeq, + @retrofit2.http.Query("owner__eq") String ownerEq, + @retrofit2.http.Query("enrollment_mode__eq") Boolean enrollmentModeEq, + @retrofit2.http.Query("status__eq") String statusEq, + @retrofit2.http.Query("issuer__like") String issuerLike, + @retrofit2.http.Query("subject__like") String subjectLike, + @retrofit2.http.Query("certificate_fingerprint__eq") String certificateFingerprintEq, + @retrofit2.http.Query("valid__eq") Boolean validEq); + + /** + * Update trusted certificate. Update a trusted certificate. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"description\": \"very important cert\"} ``` + * + * @param accountId + * Account ID. (required) + * @param certId + * The ID of the trusted certificate to update. (required) + * @param body + * A trusted certificate object with attributes. (required) + * @return Call<TrustedCertificateResp> + */ + @Headers({ "Content-Type:application/json" }) + @PUT("v3/accounts/{account_id}/trusted-certificates/{cert_id}") + Call + updateAccountCertificate(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, + @retrofit2.http.Path(value = "cert_id", encoded = true) String certId, + @retrofit2.http.Body TrustedCertificateUpdateReq body); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApi.java index 7282faf26..4701716ed 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApi.java @@ -7,15 +7,16 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColor; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorUpdate; import java.util.List; public interface TenantUserInterfaceConfigurationColorsApi { /** - * Updates an array of dark theme branding colors. Update an array of dark theme branding colors of a tenant - * account. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * Updates an array of dark theme branding colors. Update an array of dark theme branding colors. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": * \"primary\", \"color\": \"#f3f93e\" }]' ``` * * @param accountId @@ -27,13 +28,13 @@ public interface TenantUserInterfaceConfigurationColorsApi { @Headers({ "Content-Type:application/json" }) @PUT("v3/accounts/{account_id}/branding-colors/dark") Call bulkSetAccountDarkColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, - @retrofit2.http.Body List body); + @retrofit2.http.Body List body); /** - * Updates an array of light theme branding colors. Update an array of light theme branding colors of a tenant - * account. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * Updates an array of light theme branding colors. Update an array of light theme branding colors. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": * \"primary\", \"color\": \"purple\" }]' ``` * * @param accountId @@ -45,12 +46,13 @@ Call bulkSetAccountDarkColors(@retrofit2.http.Path(value = "account_id", e @Headers({ "Content-Type:application/json" }) @PUT("v3/accounts/{account_id}/branding-colors/light") Call bulkSetAccountLightColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId, - @retrofit2.http.Body List body); + @retrofit2.http.Body List body); /** - * Delete all colors. Delete account branding colors for all themes. **Example usage:** `curl -X DELETE + * Delete all colors. Delete account branding colors for all themes. <b>Note:</b> This endpoint is + * restricted to administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -60,9 +62,10 @@ Call bulkSetAccountLightColors(@retrofit2.http.Path(value = "account_id", Call deleteAllAccountColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Delete colors in the dark theme. Delete account dark theme branding colors. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark -H 'Authorization: - * Bearer API_KEY'` + * Delete colors in the dark theme. Delete account dark theme branding colors. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark -H 'Authorization: Bearer + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -72,9 +75,10 @@ Call bulkSetAccountLightColors(@retrofit2.http.Path(value = "account_id", Call deleteAllAccountDarkColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Delete colors in the light theme. Delete account light theme branding colors. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light -H 'Authorization: - * Bearer API_KEY'` + * Delete colors in the light theme. Delete account light theme branding colors. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light -H 'Authorization: Bearer + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -84,9 +88,10 @@ Call bulkSetAccountLightColors(@retrofit2.http.Path(value = "account_id", Call deleteAllAccountLightColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Get dark theme branding color. Retrieve the requested dark theme branding color. **Example:** ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Get dark theme branding color. Retrieve the requested dark theme branding color. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -99,9 +104,10 @@ Call getAccountDarkColor(@retrofit2.http.Path(value = "account_id @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Get dark theme branding colors. Retrieve dark theme branding colors for an account. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark - * \\ -H 'Authorization: Bearer <api_key>' ``` + * Get dark theme branding colors. Retrieve dark theme branding colors for an account. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -112,10 +118,10 @@ Call getAccountDarkColor(@retrofit2.http.Path(value = "account_id getAccountDarkColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Get light theme branding color. Retrieve the requested light theme branding color. **Example:** - * ``` curl -X GET + * Get light theme branding color. Retrieve the requested light theme branding color. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -129,9 +135,10 @@ Call getAccountDarkColor(@retrofit2.http.Path(value = "account_id @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Get light theme branding colors. Retrieve light theme branding colors for an account. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light - * \\ -H 'Authorization: Bearer <api_key>' ``` + * Get light theme branding colors. Retrieve light theme branding colors for an account. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -142,10 +149,10 @@ Call getAccountDarkColor(@retrofit2.http.Path(value = "account_id getAccountLightColors(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Reset branding color to default. Resets the branding color of a tenant account to its dark theme default. - * **Example:** ``` curl -X DELETE + * Reset branding color to default. Resets the branding color to its dark theme default. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -158,10 +165,10 @@ Call resetAccountDarkColor(@retrofit2.http.Path(value = "account_id", enco @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Reset branding color to default. Resets the branding color of a tenant account to its light theme default. - * **Example:** ``` curl -X DELETE + * Reset branding color to default. Resets the branding color to its light theme default. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -174,10 +181,10 @@ Call resetAccountLightColor(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Updates a dark theme branding color. Update a dark theme branding color of a tenant account. **Example:** - * ``` curl -X PUT + * Updates a dark theme branding color. Update a dark theme branding color. <b>Note:</b> This endpoint + * is restricted to administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ * \"color\": \"#f3f93e\" }' ``` * * @param accountId @@ -195,10 +202,10 @@ Call setAccountDarkColor(@retrofit2.http.Path(value = "account_id @retrofit2.http.Body BrandingColor body); /** - * Updates light theme branding color. Update a light theme branding color of a tenant account. **Example:** - * ``` curl -X PUT + * Updates light theme branding color. Update a light theme branding color. <b>Note:</b> This endpoint + * is restricted to administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ * \"color\": \"purple\" }' ``` * * @param accountId diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApi.java index 9844b55cc..67c17c807 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApi.java @@ -12,10 +12,10 @@ public interface TenantUserInterfaceConfigurationImagesApi { /** - * Revert an image to dark theme default. Revert an account branding image to dark theme default. **Example:** - * ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Revert an image to dark theme default. Revert an account branding image to dark theme default. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -28,10 +28,10 @@ Call clearAccountDarkImage(@retrofit2.http.Path(value = "account_id", enco @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Revert an image to light theme default. Revert an account branding image to light theme default. **Example:** - * ```curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Revert an image to light theme default. Revert an account branding image to light theme default. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ```curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -44,9 +44,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Delete images in the dark theme. Delete account dark theme branding images. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark -H 'Authorization: - * Bearer API_KEY'` + * Delete images in the dark theme. Delete account dark theme branding images. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark -H 'Authorization: Bearer + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -56,9 +57,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc Call deleteAllAccountDarkImages(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Delete all images. Delete account branding images for all themes. **Example usage:** `curl -X DELETE + * Delete all images. Delete account branding images for all themes. <b>Note:</b> This endpoint is + * restricted to administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -68,9 +70,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc Call deleteAllAccountImages(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Delete images in the light theme. Delete account light theme branding images. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light -H 'Authorization: - * Bearer API_KEY'` + * Delete images in the light theme. Delete account light theme branding images. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light -H 'Authorization: Bearer + * <access_key>'` * * @param accountId * The ID of the account. (required) @@ -80,10 +83,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc Call deleteAllAccountLightImages(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Get metadata of a dark theme image. Retrieve metadata of one account dark theme branding image. **Example:** - * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Get metadata of a dark theme image. Retrieve metadata of one account dark theme branding image. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -97,10 +100,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Get metadata of a light theme image. Retrieve metadata for one account light theme branding image. **Example:** - * ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Get metadata of a light theme image. Retrieve metadata for one account light theme branding image. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\ -H + * 'Authorization: Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -114,9 +117,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Get metadata of all dark theme images. Retrieve the metadata of all dark theme branding images. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark - * \\ -H 'Authorization: Bearer <api_key>' ``` + * Get metadata of all dark theme images. Retrieve the metadata of all dark theme branding images. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -127,9 +131,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc getAllAccountDarkImageData(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Get metadata of all light theme images. Retrieve the metadata of all light theme branding images. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light - * \\ -H 'Authorization: Bearer <api_key>' ``` + * Get metadata of all light theme images. Retrieve the metadata of all light theme branding images. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param accountId * The ID of the account. (required) @@ -140,10 +145,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc getAllAccountLightImageData(@retrofit2.http.Path(value = "account_id", encoded = true) String accountId); /** - * Upload a dark theme image. Upload a new account dark theme branding image in PNG or JPEG format. **Example:** - * ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H - * 'Authorization: Bearer <api_key>' -H 'content-type: image/png' --data-binary + * Upload a dark theme image. Upload a new account dark theme branding image in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H + * 'Authorization: Bearer <access_key>' -H 'content-type: image/png' --data-binary * '@myimage.png' ``` * * @param accountId @@ -163,6 +168,7 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc /** * Upload a dark theme image. Upload a new account dark theme branding image as form data in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. * * @param accountId * The ID of the account. (required) @@ -180,10 +186,10 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc @retrofit2.http.Part() MultipartBody.Part image); /** - * Upload a light theme image. Upload a new account light theme branding image in PNG or JPEG format. **Example:** - * ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary + * Upload a light theme image. Upload a new account light theme branding image in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary * '@myimage.png' ``` * * @param accountId @@ -203,6 +209,7 @@ Call clearAccountLightImage(@retrofit2.http.Path(value = "account_id", enc /** * Upload a light theme image. Upload a new account branding image as form data in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. * * @param accountId * The ID of the account. (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApi.java new file mode 100644 index 000000000..d16c82487 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApi.java @@ -0,0 +1,85 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BillingReportRawDataResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ReportResponse; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ServicePackageQuota; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ServicePackagesResponse; + +public interface UsageBillingReportsApi { + /** + * Get billing report. Fetch the billing report generated for the currently authenticated commercial account. The + * billing reports for tenant accounts are also included in their aggregator's billing report response. The + * response contains below additional counters when the account's business model is set to `API calls` + * by the account administrator. - rest_api_requests_with_user_token - rest_api_requests_with_api_key_token - + * pelion_to_webapp_notifications - device_to_pelion_messages - pelion_to_device_messages **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07 \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param month + * Queried year and month of billing report. (required) + * @return Call<ReportResponse> + */ + @GET("v3/billing-report") + Call getBillingReport(@retrofit2.http.Query("month") String month); + + /** + * Get raw billing data of the active devices for the month. Fetch raw billing data for active devices for the + * currently authenticated commercial account. This is supplementary data for the billing report. The raw billing + * data of the active devices for tenant accounts are included in their aggregator's raw billing data of the + * active devices. The endpoint returns the URL to download the gzipped CSV file. The first line is the header + * providing information on active devices, for example, the ID of an active device. **Example:** ``` + * curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-active-devices?month=2018-07 \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param month + * Queried year and month of billing report. (required) + * @return Call<BillingReportRawDataResponse> + */ + @GET("v3/billing-report-active-devices") + Call getBillingReportActiveDevices(@retrofit2.http.Query("month") String month); + + /** + * Get raw billing data of the firmware updates for the month. Fetch raw billing data for firmware updates for the + * currently authenticated commercial account. This is supplementary data for the billing report. The raw billing + * data of the firmware updates for tenant accounts are also included in their aggregator's raw billing data of + * the firmware updates. The endpoint returns the URL to download the gzipped CSV file. The first line is the header + * providing information on the firmware updates, for example, the ID of a firmware update. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/billing-report-firmware-updates?month=2018-07 \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @param month + * Queried year and month of billing report. (required) + * @return Call<BillingReportRawDataResponse> + */ + @GET("v3/billing-report-firmware-updates") + Call getBillingReportFirmwareUpdates(@retrofit2.http.Query("month") String month); + + /** + * Service package quota. Get the available firmware update quota for the current authenticated commercial account. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota \\ -H + * 'Authorization: Bearer <access_key>' ``` + * + * @return Call<ServicePackageQuota> + */ + @GET("v3/service-packages-quota") + Call getServicePackageQuota(); + + /** + * Get all service packages. Get information for all service packages for the current authenticated commercial + * account. The response is returned in descending order by service package created timestamp: first the pending + * service package, then the active service package, then the previous service packages. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages \\ -H 'Authorization: + * Bearer <access_key>' ``` + * + * @return Call<ServicePackagesResponse> + */ + @GET("v3/service-packages") + Call getServicePackages(); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApi.java new file mode 100644 index 000000000..93440e18b --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApi.java @@ -0,0 +1,98 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import org.joda.time.LocalDate; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.SuccessfulResponse; + +public interface UsageServiceMetricsApi { + /** + * Provides account-specific statistics for other cloud services. Get account-specific statistics. + * + * @param include + * A comma-separated list of requested metrics and total_count (if included, the response will contain + * total_count to specify the total number of records available). Supported values are: - + * `transactions` - `full_registrations` - `registration_updates` - + * `deleted_registrations` - `expired_registrations` - + * `bootstraps_successful` - `bootstraps_failed` - `bootstraps_pending` - + * `handshakes_successful` - `connect_rest_api_success` - + * `connect_rest_api_error` - `device_proxy_request_success` - + * `device_proxy_request_error` - `device_subscription_request_success` - + * `device_subscription_request_error` - `device_observations` - + * `total_count` **Note:** The metrics `device_proxy_request_success`, + * `device_proxy_request_error`, `device_subscription_request_success`, + * `device_subscription_request_error` and `device_observations` monitor only the + * response from the device to Device Management Connect. They do not confirm that the response is + * delivered to the client callback URLs used when you try to access device resources using [Connect + * API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. New metrics will be + * added to monitor the response delivery to client callback URLs later. **Example:** ``` + * curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170207&end=20170407&interval=1d + * \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** { + * \"object\": \"list\", \"limit\": 20, \"total_count\": 54, + * \"after\": \"2017-07-26T00:00:00Z\", \"has_more\": true, + * \"data\": [ { \"id\": \"015d8157c800015e306fffff005374617473000\", + * \"timestamp\": \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, { + * \"id\": \"015d867e2400015e306fffff005374617473000\", \"timestamp\": + * \"2017-07-28T00:00:00Z\", \"transactions\": 27480 } ] } ``` + * (required) + * @param interval + * Group the data by this interval in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. The + * interval cannot exceed one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. + * (required) + * @param start + * UTC time/year/date in RFC3339 format. Fetch the data with timestamp greater than or equal to this + * value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between + * start and end parameters cannot exceed one year (365 days). The parameter is not mandatory if the + * period is specified. (optional) + * @param end + * UTC time/year/date in RFC3339 format. Fetch the data with timestamp less than this value. Sample + * values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. The time between start and end + * parameters cannot exceed one year (365 days). The parameter is not mandatory if the period is + * specified. (optional) + * @param period + * Period. Fetch the data for the period in minutes, hours, days or weeks. Sample values: 5m, 2h, 3d, 4w. + * The parameter is not mandatory if the start and end time are specified. The period cannot exceed one + * year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. (optional) + * @param limit + * The number of results to return (2-1000). Default 50. (optional) + * @param after + * The metric ID after which to start fetching. This also can be used for pagination. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20 + * \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** + * ``` { \"object\": \"list\", \"limit\": 20, + * \"total_count\": 54, \"has_more\": true, \"data\": [ { \"id\": + * \"015d1a589800015e306fffff005374617473000\", \"timestamp\": + * \"2017-07-07T00:00:00Z\", \"transactions\": 26381 }, . . . { \"id\": + * \"015d7c316c00015e306fffff005374617473000\", \"timestamp\": + * \"2017-07-26T00:00:00Z\", \"transactions\": 25569 } ] } ``` If the + * parameter `has more` is true, it indicates that the list is not complete and more values are + * available. You can give the last ID of the list as the value of the `after` query parameter, + * and you get the next page of values. You can keep doing this until `has more` is false. + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20&after=015d7c316c00015e306fffff005374617473000 + * \\ -H \"Authorization : Bearer <access_key>\" ``` **Response:** + * ``` { \"object\": \"list\", \"limit\": 20, + * \"total_count\": 54, \"after\": \"2017-07-26T00:00:00Z\", + * \"has_more\": true, \"data\": [ { \"id\": + * \"015d8157c800015e306fffff005374617473000\", \"timestamp\": + * \"2017-07-27T00:00:00Z\", \"transactions\": 27366 }, . . . { \"id\": + * \"015de3309c00015e306fffff005374617473000\", \"timestamp\": + * \"2017-08-15T00:00:00Z\", \"transactions\": 24707 } ] } ``` + * (optional) + * @param order + * 'Record order. Acceptable values: ASC, DESC. Default: ASC.' (optional) + * @return Call<SuccessfulResponse> + */ + @GET("v3/metrics") + Call + getMetrics(@retrofit2.http.Query("include") String include, @retrofit2.http.Query("interval") String interval, + @retrofit2.http.Query("start") LocalDate start, @retrofit2.http.Query("end") LocalDate end, + @retrofit2.http.Query("period") String period, @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApi.java new file mode 100644 index 000000000..b2700d53a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApi.java @@ -0,0 +1,31 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ServicePackageQuotaHistoryResponse; + +public interface UsageServicePackagesApi { + /** + * Service package quota history. Get your quota usage history. This API is available only for commercial accounts. + * Aggregator accounts can see their own and tenant quota usage data. Data is in ascending order based on creation + * time. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/service-packages-quota-history \\ -H 'Authorization: Bearer + * <access_key>' ``` + * + * @param limit + * Maximum number of quota history entries in one paged response. (optional) + * @param after + * Results after specified entry ID. (optional) + * @param order + * Record order. Acceptable values: ASC, DESC. Default: ASC. (optional) + * @return Call<ServicePackageQuotaHistoryResponse> + */ + @GET("v3/service-packages-quota-history") + Call getServicePackageQuotaHistory(@retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, + @retrofit2.http.Query("order") String order); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApi.java new file mode 100644 index 000000000..095bc771f --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApi.java @@ -0,0 +1,66 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.CollectionFormats.*; + +import retrofit2.Call; +import retrofit2.http.*; + +import org.joda.time.DateTime; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.StatisticsViewResponse; + +public interface UsageStatisticsApi { + /** + * Get statistics view of Device Management usage. Fetch the statistics view of Device Management usage in time + * series for the currently authenticated commercial account. The response contains the additional counters below, + * if the account business model is set to `API calls` by the account administrator: - + * device_to_pelion_messages - pelion_to_device_messages - pelion_to_webapp_notifications - + * rest_api_requests_with_api_key_token - rest_api_requests_with_user_token The return data is retrieved during a + * defined time window and grouped by defined interval. The time window for data retrieval is defined as a range, + * that can be either absolute (for instance, using timestamps) or relative (referring to the 'period' + * parameter). Range start is inclusive, while range end is exclusive. The specified range must be equal to or + * greater than the specified interval. Returned data does not include any tenant usage. **Example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/billing-statistics?start=2019-11-01T00:00:00.000Z&end=2019-12-01T00:00:00.000Z&interval=1d + * \\ -H 'Authorization: Bearer <access_key>' ``` + * + * @param interval + * Group the data by this interval in minutes, hours, days, weeks or months. One week is normalized to 7 + * days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. Minimum supported interval is 5 minutes. The specified + * interval must not be greater than the specified range. (required) + * @param start + * Start time of the statistics view in RFC3339 date-time format, with millisecond accuracy and UTC time + * zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have + * specified the period. Fetch data with timestamp greater than or equal to this value. Sample value: + * 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum + * supported range is 98 days when using timestamps to specify the range. (optional) + * @param end + * End time of the statistics view in RFC3339 date-time format with millisecond accuracy and UTC time + * zone. The parameter is mandatory if the period is not specified. Do not set the parameter if you have + * specified the period. Fetch the data with timestamp less than this value. Sample value: + * 2017-02-07T09:20:56.990Z. The specified range must be equal to or greater than 5 minutes. Maximum + * supported range is 98 days when using timestamps to specify the range. (optional) + * @param period + * Period. Alternative for specifying the range if not using start and end parameters. The parameter is + * mandatory if the start and end parameters are not specified. Do not set the parameter if you have + * specified the start and end parameters. Fetch the data for the period in minutes, hours, days, weeks + * or months. One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. The allowed + * periods (inclusive) are 5m-141120m/1h-2352h/1d-98d/1w-14w/1mo-3mo. (optional) + * @param limit + * Maximum number of statistics view records in one paginated response. (optional, default to 50) + * @param after + * Results after specified record ID. (optional) + * @param order + * Record order. Acceptable values (case insensitive): ASC, DESC. Default: ASC. (optional) + * @param include + * Comma-separated additional data to return. Currently supported: total_count. (optional) + * @return Call<StatisticsViewResponse> + */ + @GET("v3/billing-statistics") + Call + getStatisticsView(@retrofit2.http.Query("interval") String interval, + @retrofit2.http.Query("start") DateTime start, @retrofit2.http.Query("end") DateTime end, + @retrofit2.http.Query("period") String period, @retrofit2.http.Query("limit") Integer limit, + @retrofit2.http.Query("after") String after, @retrofit2.http.Query("order") String order, + @retrofit2.http.Query("include") String include); + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApi.java index 81a752376..a050ea6f6 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApi.java @@ -7,16 +7,17 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColor; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorUpdate; import java.util.List; public interface UserInterfaceConfigurationColorsApi { /** - * Updates an array of dark theme branding colors. Update an array of dark theme branding colors. **Example:** - * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ - * \"reference\": \"primary\", \"color\": \"#f3f93e\" }]' - * ``` + * Updates an array of dark theme branding colors. Update an array of dark theme branding colors. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * \"primary\", \"color\": \"#f3f93e\" }]' ``` * * @param body * List of branding colors. (required) @@ -24,14 +25,14 @@ public interface UserInterfaceConfigurationColorsApi { */ @Headers({ "Content-Type:application/json" }) @PUT("v3/branding-colors/dark") - Call bulkSetDarkColors(@retrofit2.http.Body List body); + Call bulkSetDarkColors(@retrofit2.http.Body List body); /** - * Updates an array of light theme branding colors. Update an array of light theme branding colors. **Example:** - * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ - * \"reference\": \"primary\", \"color\": \"purple\" }]' - * ``` + * Updates an array of light theme branding colors. Update an array of light theme branding colors. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * \"primary\", \"color\": \"purple\" }]' ``` * * @param body * List of branding colors. (required) @@ -39,11 +40,13 @@ public interface UserInterfaceConfigurationColorsApi { */ @Headers({ "Content-Type:application/json" }) @PUT("v3/branding-colors/light") - Call bulkSetLightColors(@retrofit2.http.Body List body); + Call bulkSetLightColors(@retrofit2.http.Body List body); /** - * Delete all colors. Delete account branding colors for all themes. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-colors -H 'Authorization: Bearer API_KEY'` + * Delete all colors. Delete account branding colors for all themes. <b>Note:</b> This endpoint is + * restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -51,9 +54,10 @@ public interface UserInterfaceConfigurationColorsApi { Call deleteAllColors(); /** - * Delete colors in the dark theme. Delete account dark theme branding colors. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer - * API_KEY'` + * Delete colors in the dark theme. Delete account dark theme branding colors. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -61,9 +65,10 @@ public interface UserInterfaceConfigurationColorsApi { Call deleteAllDarkColors(); /** - * Delete colors in the light theme. Delete account light theme branding colors. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer - * API_KEY'` + * Delete colors in the light theme. Delete account light theme branding colors. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -73,7 +78,7 @@ public interface UserInterfaceConfigurationColorsApi { /** * Get dark theme branding color. Retrieve the requested dark theme branding color. **Example:** ``` * curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` * * @param reference * The name of the branding color. (required) @@ -85,7 +90,7 @@ public interface UserInterfaceConfigurationColorsApi { /** * Get dark theme branding colors. Retrieve the dark theme branding colors. **Example:** ``` curl -X * GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @return Call<BrandingColorList> */ @@ -95,7 +100,7 @@ public interface UserInterfaceConfigurationColorsApi { /** * Get light theme branding color. Retrieve the requested light theme branding color. **Example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param reference * The name of the branding color. (required) @@ -107,7 +112,7 @@ public interface UserInterfaceConfigurationColorsApi { /** * Get light theme branding colors. Retrieve the light theme branding colors. **Example:** ``` curl * -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @return Call<BrandingColorList> */ @@ -115,9 +120,10 @@ public interface UserInterfaceConfigurationColorsApi { Call getLightColors(); /** - * Reset branding color to default. Resets the branding color to its dark theme default. **Example:** - * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Reset branding color to default. Resets the branding color to its dark theme default. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param reference * The name of the branding color. (required) @@ -127,9 +133,10 @@ public interface UserInterfaceConfigurationColorsApi { Call resetDarkColor(@retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Reset branding color to default. Resets the branding color to its light theme default. **Example:** - * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Reset branding color to default. Resets the branding color to its light theme default. <b>Note:</b> + * This endpoint is restricted to administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer + * <access_key>' ``` * * @param reference * The name of the branding color. (required) @@ -139,9 +146,10 @@ public interface UserInterfaceConfigurationColorsApi { Call resetLightColor(@retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Updates a dark theme branding color. Update a dark theme branding color. **Example:** ``` curl -X - * PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": + * Updates a dark theme branding color. Update a dark theme branding color. <b>Note:</b> This endpoint + * is restricted to administrators. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": * \"#f3f93e\" }' ``` * * @param reference @@ -156,9 +164,10 @@ Call setDarkColor(@retrofit2.http.Path(value = "reference", encod @retrofit2.http.Body BrandingColor body); /** - * Updates light theme branding color. Update light theme branding color. **Example:** ``` curl -X - * PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": + * Updates light theme branding color. Update light theme branding color. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": * \"purple\" }' ``` * * @param reference diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApi.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApi.java index 3fabfb71c..ff68c4e27 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApi.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApi.java @@ -12,9 +12,10 @@ public interface UserInterfaceConfigurationImagesApi { /** - * Revert an image to dark theme default. Revert an account branding image to dark theme default. **Example:** - * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\ - * -H 'Authorization: Bearer <api_key>' ``` + * Revert an image to dark theme default. Revert an account branding image to dark theme default. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param reference * Name of the branding images (icon or picture). (required) @@ -24,9 +25,10 @@ public interface UserInterfaceConfigurationImagesApi { Call clearDarkImage(@retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Revert an image to light theme default. Revert an account branding image to light theme default. **Example:** - * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\ - * -H 'Authorization: Bearer <api_key>' ``` + * Revert an image to light theme default. Revert an account branding image to light theme default. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\ -H 'Authorization: + * Bearer <access_key>' ``` * * @param reference * Name of the branding images (icon or picture). (required) @@ -36,9 +38,10 @@ public interface UserInterfaceConfigurationImagesApi { Call clearLightImage(@retrofit2.http.Path(value = "reference", encoded = true) String reference); /** - * Delete images in the dark theme. Delete account dark theme branding images. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer - * API_KEY'` + * Delete images in the dark theme. Delete account dark theme branding images. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -46,8 +49,10 @@ public interface UserInterfaceConfigurationImagesApi { Call deleteAllDarkImages(); /** - * Delete all images. Delete account branding images for all themes. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-images -H 'Authorization: Bearer API_KEY'` + * Delete all images. Delete account branding images for all themes. <b>Note:</b> This endpoint is + * restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-images -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -55,9 +60,10 @@ public interface UserInterfaceConfigurationImagesApi { Call deleteAllImages(); /** - * Delete images in the light theme. Delete account light theme branding images. **Example usage:** `curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer - * API_KEY'` + * Delete images in the light theme. Delete account light theme branding images. <b>Note:</b> This + * endpoint is restricted to administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer + * <access_key>'` * * @return Call<Void> */ @@ -67,7 +73,7 @@ public interface UserInterfaceConfigurationImagesApi { /** * Get metadata of all dark theme images. Retrieve metadata for all dark theme branding images. **Example:** * `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` * * @return Call<BrandingImageList> */ @@ -77,7 +83,7 @@ public interface UserInterfaceConfigurationImagesApi { /** * Get metadata of all light theme images. Retrieve the metadata of all light theme branding images. **Example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @return Call<BrandingImageList> */ @@ -87,7 +93,7 @@ public interface UserInterfaceConfigurationImagesApi { /** * Get metadata of a dark theme image. Retrieve metadata for one account dark theme branding image. **Example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param reference * Name of the branding images (icon or picture). (required) @@ -99,7 +105,7 @@ public interface UserInterfaceConfigurationImagesApi { /** * Get metadata of a light theme image. Retrieve metadata for one account light theme branding image. **Example:** * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` * * @param reference * Name of the branding images (icon or picture). (required) @@ -110,9 +116,9 @@ public interface UserInterfaceConfigurationImagesApi { /** * Upload a dark theme image. Upload a new account branding image in the dark theme in PNG or JPEG format. - * **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' * ``` * * @param reference @@ -128,7 +134,7 @@ Call uploadDarkImage(@retrofit2.http.Path(value = "reference", en /** * Upload a dark theme image. Upload a new account branding image as form data in the dark theme in PNG or JPEG - * format. + * format. <b>Note:</b> This endpoint is restricted to administrators. * * @param reference * Name of the branding images (icon or picture). (required) @@ -143,10 +149,11 @@ Call uploadDarkImage(@retrofit2.http.Path(value = "reference", en @retrofit2.http.Part() MultipartBody.Part image); /** - * Upload a light theme image. Upload a new account light theme branding image in PNG or JPEG format. **Example:** - * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload - * \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary - * '@myimage.png' ``` + * Upload a light theme image. Upload a new account light theme branding image in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` curl -X + * POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' + * ``` * * @param reference * Name of the branding images (icon or picture). (required) @@ -161,7 +168,7 @@ Call uploadLightImage(@retrofit2.http.Path(value = "reference", e /** * Upload a light theme image. Upload a new account branding image as form data in the light theme in PNG or JPEG - * format. + * format. <b>Note:</b> This endpoint is restricted to administrators. * * @param reference * Name of the branding images (icon or picture). (required) diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKey.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKey.java new file mode 100644 index 000000000..d51d58a30 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKey.java @@ -0,0 +1,402 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Represents an application in Device Management. + */ +@ApiModel(description = "Represents an application in Device Management.") + +public class AccessKey implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("account_id") + private String accountId = null; + + @SerializedName("application_id") + private String applicationId = null; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("expiration") + private DateTime expiration = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("key") + private String key = null; + + @SerializedName("last_used_at") + private DateTime lastUsedAt = null; + + @SerializedName("name") + private String name = null; + + /** + * Entity name: always 'access-key' + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + KEY("access-key"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + /** + * The status of the access key. ACTIVE means that the access key is operational. INACTIVE means that the access key + * is not operational and it prevents the clients to use the REST API. Inactivating the access key does not + * invalidate existing configurations meaning that subscribed events will continue to flow on existing channels. The + * EXPIRED status is not allowed to be set directly, it is derived from the expiration attribute. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"), + + EXPIRED("EXPIRED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + /** + * The ID of the account. + * + * @return accountId + **/ + @ApiModelProperty(example = "01619571e2e90242ac12000600000000", value = "The ID of the account.") + public String getAccountId() { + return accountId; + } + + /** + * The ID of the application. + * + * @return applicationId + **/ + @ApiModelProperty(example = "01705c6383f6c85b76f92f4e00000000", value = "The ID of the application.") + public String getApplicationId() { + return applicationId; + } + + /** + * Creation UTC time RFC3339. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2020-02-13T09:35:20Z", value = "Creation UTC time RFC3339.") + public DateTime getCreatedAt() { + return createdAt; + } + + public AccessKey description(String description) { + this.description = description; + return this; + } + + /** + * The description of the access key. + * + * @return description + **/ + @ApiModelProperty(example = "Access key to control the warp drive", value = "The description of the access key.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * API resource entity version. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "API resource entity version.") + public String getEtag() { + return etag; + } + + public AccessKey expiration(DateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Expiration time of the access key, as UTC time RFC3339. Expiration makes the access key inoperative and the + * status will be EXPIRED. The client using the expired access key is no longer able to use the REST API. The access + * key expiration does not invalidate existing configurations meaning that subscribed events will continue to flow + * on existing channels. + * + * @return expiration + **/ + @ApiModelProperty(value = "Expiration time of the access key, as UTC time RFC3339. Expiration makes the access key inoperative and the status will be EXPIRED. The client using the expired access key is no longer able to use the REST API. The access key expiration does not invalidate existing configurations meaning that subscribed events will continue to flow on existing channels.") + public DateTime getExpiration() { + return expiration; + } + + public void setExpiration(DateTime expiration) { + this.expiration = expiration; + } + + /** + * The ID of the access key. + * + * @return id + **/ + @ApiModelProperty(example = "01619571f7020242ac12000600000000", value = "The ID of the access key.") + public String getId() { + return id; + } + + /** + * The access key. The full key including the secret part is visible in the response for create only + * + * @return key + **/ + @ApiModelProperty(example = "ak_2MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + value = "The access key. The full key including the secret part is visible in the response for create only") + public String getKey() { + return key; + } + + /** + * The time of the latest access key usage. + * + * @return lastUsedAt + **/ + @ApiModelProperty(example = "2020-02-14T15:24:14Z", value = "The time of the latest access key usage.") + public DateTime getLastUsedAt() { + return lastUsedAt; + } + + public AccessKey name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the access key. + * + * @return name + **/ + @ApiModelProperty(example = "Access key warp", required = true, value = "The display name for the access key.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Entity name: always 'access-key' + * + * @return object + **/ + @ApiModelProperty(value = "Entity name: always 'access-key'") + public ObjectEnum getObject() { + return object; + } + + public AccessKey status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the access key. ACTIVE means that the access key is operational. INACTIVE means that the access key + * is not operational and it prevents the clients to use the REST API. Inactivating the access key does not + * invalidate existing configurations meaning that subscribed events will continue to flow on existing channels. The + * EXPIRED status is not allowed to be set directly, it is derived from the expiration attribute. + * + * @return status + **/ + @ApiModelProperty(example = "ACTIVE", + value = "The status of the access key. ACTIVE means that the access key is operational. INACTIVE means that the access key is not operational and it prevents the clients to use the REST API. Inactivating the access key does not invalidate existing configurations meaning that subscribed events will continue to flow on existing channels. The EXPIRED status is not allowed to be set directly, it is derived from the expiration attribute.") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + * Last update UTC time RFC3339. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2020-02-14T15:24:14Z", value = "Last update UTC time RFC3339.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessKey accessKey = (AccessKey) o; + return Objects.equals(this.accountId, accessKey.accountId) + && Objects.equals(this.applicationId, accessKey.applicationId) + && Objects.equals(this.createdAt, accessKey.createdAt) + && Objects.equals(this.description, accessKey.description) && Objects.equals(this.etag, accessKey.etag) + && Objects.equals(this.expiration, accessKey.expiration) && Objects.equals(this.id, accessKey.id) + && Objects.equals(this.key, accessKey.key) && Objects.equals(this.lastUsedAt, accessKey.lastUsedAt) + && Objects.equals(this.name, accessKey.name) && Objects.equals(this.object, accessKey.object) + && Objects.equals(this.status, accessKey.status) && Objects.equals(this.updatedAt, accessKey.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, applicationId, createdAt, description, etag, expiration, id, key, lastUsedAt, + name, object, status, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccessKey {\n"); + + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKeyList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKeyList.java new file mode 100644 index 000000000..56a53d471 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccessKeyList.java @@ -0,0 +1,333 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * AccessKeyList + */ + +public class AccessKeyList implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = new ArrayList(); + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + /** + * Entity name: always `list`. + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + LIST("list"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String text) { + for (OrderEnum b : OrderEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("order") + private OrderEnum order = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + public AccessKeyList after(String after) { + this.after = after; + return this; + } + + /** + * The entity ID to retrieve after the given one. + * + * @return after + **/ + @ApiModelProperty(example = "01619571f3c00242ac12000600000000", + value = "The entity ID to retrieve after the given one.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public AccessKeyList data(List data) { + this.data = data; + return this; + } + + public AccessKeyList addDataItem(AccessKey dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * A list of entities. + * + * @return data + **/ + @ApiModelProperty(required = true, value = "A list of entities.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public AccessKeyList hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Flag indicating whether there are more results. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", required = true, value = "Flag indicating whether there are more results.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public AccessKeyList limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The number of results to return, or equal to `total_count`. + * + * @return limit + **/ + @ApiModelProperty(example = "50", required = true, + value = "The number of results to return, or equal to `total_count`.") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public AccessKeyList object(ObjectEnum object) { + this.object = object; + return this; + } + + /** + * Entity name: always `list`. + * + * @return object + **/ + @ApiModelProperty(required = true, value = "Entity name: always `list`.") + public ObjectEnum getObject() { + return object; + } + + public void setObject(ObjectEnum object) { + this.object = object; + } + + public AccessKeyList order(OrderEnum order) { + this.order = order; + return this; + } + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + * + * @return order + **/ + @ApiModelProperty(value = "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.") + public OrderEnum getOrder() { + return order; + } + + public void setOrder(OrderEnum order) { + this.order = order; + } + + public AccessKeyList totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The total number of records, if requested. + * + * @return totalCount + **/ + @ApiModelProperty(example = "20", required = true, value = "The total number of records, if requested.") + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessKeyList accessKeyList = (AccessKeyList) o; + return Objects.equals(this.after, accessKeyList.after) && Objects.equals(this.data, accessKeyList.data) + && Objects.equals(this.hasMore, accessKeyList.hasMore) && Objects.equals(this.limit, accessKeyList.limit) + && Objects.equals(this.object, accessKeyList.object) && Objects.equals(this.order, accessKeyList.order) + && Objects.equals(this.totalCount, accessKeyList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccessKeyList {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationReq.java index f68e36f84..1b3456a30 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationReq.java @@ -218,11 +218,11 @@ public AccountCreationReq addAliasesItem(String aliasesItem) { } /** - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. * * @return aliases **/ - @ApiModelProperty(value = "An array of aliases.") + @ApiModelProperty(value = "An array of aliases for the tenant account ID. The aliases must be globally unique.") public List getAliases() { return aliases; } @@ -276,12 +276,12 @@ public AccountCreationReq company(String company) { } /** - * The name of the company. Required for commercial accounts only. + * The name of the company used in billing. Required for commercial accounts only. * * @return company **/ @ApiModelProperty(example = "ARM Holdings Plc", - value = "The name of the company. Required for commercial accounts only.") + value = "The name of the company used in billing. Required for commercial accounts only.") public String getCompany() { return company; } @@ -374,11 +374,11 @@ public AccountCreationReq displayName(String displayName) { } /** - * The display name for the account. + * The display name for the tenant account. * * @return displayName **/ - @ApiModelProperty(example = "ARM", value = "The display name for the account.") + @ApiModelProperty(example = "ARM", value = "The display name for the tenant account.") public String getDisplayName() { return displayName; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationResp.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationResp.java new file mode 100644 index 000000000..902709002 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountCreationResp.java @@ -0,0 +1,1497 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Represents an account in requests and responses. + */ +@ApiModel(description = "Represents an account in requests and responses.") + +public class AccountCreationResp implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("address_line1") + private String addressLine1 = null; + + @SerializedName("address_line2") + private String addressLine2 = null; + + @SerializedName("admin_email") + private String adminEmail = null; + + @SerializedName("admin_full_name") + private String adminFullName = null; + + @SerializedName("admin_id") + private String adminId = null; + + @SerializedName("admin_key") + private String adminKey = null; + + @SerializedName("admin_name") + private String adminName = null; + + @SerializedName("admin_password") + private String adminPassword = null; + + @SerializedName("aliases") + private List aliases = null; + + @SerializedName("business_model") + private BusinessModel businessModel = null; + + @SerializedName("business_model_history") + private List businessModelHistory = null; + + @SerializedName("city") + private String city = null; + + @SerializedName("company") + private String company = null; + + @SerializedName("contact") + private String contact = null; + + @SerializedName("contract_number") + private String contractNumber = null; + + @SerializedName("country") + private String country = null; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("custom_fields") + private Map customFields = null; + + @SerializedName("customer_number") + private String customerNumber = null; + + @SerializedName("display_name") + private String displayName = null; + + @SerializedName("email") + private String email = null; + + @SerializedName("end_market") + private String endMarket = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("expiration") + private DateTime expiration = null; + + @SerializedName("expiration_warning_threshold") + private Integer expirationWarningThreshold = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("idle_timeout") + private Integer idleTimeout = null; + + @SerializedName("limitations") + private List limitations = null; + + @SerializedName("limits") + private Map limits = null; + + /** + * The enforcement status of multi-factor authentication, either `enforced` or `optional`. + */ + @JsonAdapter(MfaStatusEnum.Adapter.class) + public enum MfaStatusEnum { + ENFORCED("enforced"), + + OPTIONAL("optional"); + + private String value; + + MfaStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MfaStatusEnum fromValue(String text) { + for (MfaStatusEnum b : MfaStatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MfaStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MfaStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MfaStatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("mfa_status") + private MfaStatusEnum mfaStatus = null; + + @SerializedName("notification_emails") + private List notificationEmails = null; + + /** + * Entity name: always `account`. + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + ACCOUNT("account"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + @SerializedName("parent_account") + private ParentAccountInfo parentAccount = null; + + @SerializedName("parent_id") + private String parentId = null; + + @SerializedName("password_policy") + private PasswordPolicy passwordPolicy = null; + + @SerializedName("password_recovery_expiration") + private Integer passwordRecoveryExpiration = null; + + @SerializedName("phone_number") + private String phoneNumber = null; + + @SerializedName("policies") + private List policies = null; + + @SerializedName("postal_code") + private String postalCode = null; + + @SerializedName("reason") + private String reason = null; + + @SerializedName("reference_note") + private String referenceNote = null; + + @SerializedName("sales_contact") + private String salesContact = null; + + @SerializedName("state") + private String state = null; + + /** + * The status of the account. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ENROLLING("ENROLLING"), + + ACTIVE("ACTIVE"), + + RESTRICTED("RESTRICTED"), + + SUSPENDED("SUSPENDED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("sub_accounts") + private List subAccounts = null; + + @SerializedName("template_id") + private String templateId = null; + + @SerializedName("tier") + private String tier = null; + + @SerializedName("tier_history") + private List tierHistory = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + @SerializedName("upgraded_at") + private DateTime upgradedAt = null; + + public AccountCreationResp addressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + return this; + } + + /** + * Postal address line 1. + * + * @return addressLine1 + **/ + @ApiModelProperty(example = "110 Fulbourn Rd", value = "Postal address line 1.") + public String getAddressLine1() { + return addressLine1; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + public AccountCreationResp addressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + return this; + } + + /** + * Postal address line 2. + * + * @return addressLine2 + **/ + @ApiModelProperty(example = " ", value = "Postal address line 2.") + public String getAddressLine2() { + return addressLine2; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + public AccountCreationResp adminEmail(String adminEmail) { + this.adminEmail = adminEmail; + return this; + } + + /** + * The email address of the admin user created for this account. Present only in the response for account creation. + * + * @return adminEmail + **/ + @ApiModelProperty(example = "admin@arm.com", + value = "The email address of the admin user created for this account. Present only in the response for account creation.") + public String getAdminEmail() { + return adminEmail; + } + + public void setAdminEmail(String adminEmail) { + this.adminEmail = adminEmail; + } + + public AccountCreationResp adminFullName(String adminFullName) { + this.adminFullName = adminFullName; + return this; + } + + /** + * The full name of the admin user created for this account. Present only in the response for account creation. + * + * @return adminFullName + **/ + @ApiModelProperty(example = "Admin Doe", + value = "The full name of the admin user created for this account. Present only in the response for account creation.") + public String getAdminFullName() { + return adminFullName; + } + + public void setAdminFullName(String adminFullName) { + this.adminFullName = adminFullName; + } + + public AccountCreationResp adminId(String adminId) { + this.adminId = adminId; + return this; + } + + /** + * The ID of the admin user created for this account. Present only in the response for the account creation. + * + * @return adminId + **/ + @ApiModelProperty(example = "01619571e2e89242ac12000600000000", + value = "The ID of the admin user created for this account. Present only in the response for the account creation.") + public String getAdminId() { + return adminId; + } + + public void setAdminId(String adminId) { + this.adminId = adminId; + } + + /** + * The admin API key created for this account. Present only in the response for account creation. + * + * @return adminKey + **/ + @ApiModelProperty(example = "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", + value = "The admin API key created for this account. Present only in the response for account creation.") + public String getAdminKey() { + return adminKey; + } + + public AccountCreationResp adminName(String adminName) { + this.adminName = adminName; + return this; + } + + /** + * The username of the admin user created for this account. Present only in the response for account creation. + * + * @return adminName + **/ + @ApiModelProperty(example = "admin", + value = "The username of the admin user created for this account. Present only in the response for account creation.") + public String getAdminName() { + return adminName; + } + + public void setAdminName(String adminName) { + this.adminName = adminName; + } + + public AccountCreationResp adminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * The password of the admin user created for this account. Present only in the response for account creation. + * + * @return adminPassword + **/ + @ApiModelProperty(example = "PZf9eEUH43DAPE9ULINFeuj", + value = "The password of the admin user created for this account. Present only in the response for account creation.") + public String getAdminPassword() { + return adminPassword; + } + + public void setAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + } + + public AccountCreationResp aliases(List aliases) { + this.aliases = aliases; + return this; + } + + public AccountCreationResp addAliasesItem(String aliasesItem) { + if (this.aliases == null) { + this.aliases = new ArrayList(); + } + this.aliases.add(aliasesItem); + return this; + } + + /** + * An array of aliases for the tenant account ID. The aliases must be globally unique. + * + * @return aliases + **/ + @ApiModelProperty(value = "An array of aliases for the tenant account ID. The aliases must be globally unique.") + public List getAliases() { + return aliases; + } + + public void setAliases(List aliases) { + this.aliases = aliases; + } + + public AccountCreationResp businessModel(BusinessModel businessModel) { + this.businessModel = businessModel; + return this; + } + + /** + * Get businessModel + * + * @return businessModel + **/ + @ApiModelProperty(value = "") + public BusinessModel getBusinessModel() { + return businessModel; + } + + public void setBusinessModel(BusinessModel businessModel) { + this.businessModel = businessModel; + } + + public AccountCreationResp businessModelHistory(List businessModelHistory) { + this.businessModelHistory = businessModelHistory; + return this; + } + + public AccountCreationResp addBusinessModelHistoryItem(BusinessModelHistory businessModelHistoryItem) { + if (this.businessModelHistory == null) { + this.businessModelHistory = new ArrayList(); + } + this.businessModelHistory.add(businessModelHistoryItem); + return this; + } + + /** + * Business model history for this account. + * + * @return businessModelHistory + **/ + @ApiModelProperty(value = "Business model history for this account.") + public List getBusinessModelHistory() { + return businessModelHistory; + } + + public void setBusinessModelHistory(List businessModelHistory) { + this.businessModelHistory = businessModelHistory; + } + + public AccountCreationResp city(String city) { + this.city = city; + return this; + } + + /** + * The city part of the postal address. + * + * @return city + **/ + @ApiModelProperty(example = "Cambridge", value = "The city part of the postal address.") + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public AccountCreationResp company(String company) { + this.company = company; + return this; + } + + /** + * The name of the company used in billing. + * + * @return company + **/ + @ApiModelProperty(example = "ARM Holdings Plc", value = "The name of the company used in billing.") + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } + + public AccountCreationResp contact(String contact) { + this.contact = contact; + return this; + } + + /** + * The name of the contact person for this account. + * + * @return contact + **/ + @ApiModelProperty(example = "J. Doe", value = "The name of the contact person for this account.") + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + public AccountCreationResp contractNumber(String contractNumber) { + this.contractNumber = contractNumber; + return this; + } + + /** + * Contract number of the customer. + * + * @return contractNumber + **/ + @ApiModelProperty(example = "1NX25_0001", value = "Contract number of the customer.") + public String getContractNumber() { + return contractNumber; + } + + public void setContractNumber(String contractNumber) { + this.contractNumber = contractNumber; + } + + public AccountCreationResp country(String country) { + this.country = country; + return this; + } + + /** + * The country part of the postal address. + * + * @return country + **/ + @ApiModelProperty(example = "United Kingdom", value = "The country part of the postal address.") + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public AccountCreationResp createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC time RFC3339. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2018-02-13T09:35:20Z", value = "Creation UTC time RFC3339.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public AccountCreationResp customFields(Map customFields) { + this.customFields = customFields; + return this; + } + + public AccountCreationResp putCustomFieldsItem(String key, String customFieldsItem) { + if (this.customFields == null) { + this.customFields = new HashMap(); + } + this.customFields.put(key, customFieldsItem); + return this; + } + + /** + * Account's custom properties as key-value pairs. + * + * @return customFields + **/ + @ApiModelProperty(value = "Account's custom properties as key-value pairs.") + public Map getCustomFields() { + return customFields; + } + + public void setCustomFields(Map customFields) { + this.customFields = customFields; + } + + public AccountCreationResp customerNumber(String customerNumber) { + this.customerNumber = customerNumber; + return this; + } + + /** + * Customer number of the customer. + * + * @return customerNumber + **/ + @ApiModelProperty(example = "1NC25_0001", value = "Customer number of the customer.") + public String getCustomerNumber() { + return customerNumber; + } + + public void setCustomerNumber(String customerNumber) { + this.customerNumber = customerNumber; + } + + public AccountCreationResp displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name for the tenant account. + * + * @return displayName + **/ + @ApiModelProperty(example = "ARM", value = "The display name for the tenant account.") + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public AccountCreationResp email(String email) { + this.email = email; + return this; + } + + /** + * The company email address for this account. + * + * @return email + **/ + @ApiModelProperty(example = "info@arm.com", value = "The company email address for this account.") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public AccountCreationResp endMarket(String endMarket) { + this.endMarket = endMarket; + return this; + } + + /** + * Account end market. + * + * @return endMarket + **/ + @ApiModelProperty(example = "IT", value = "Account end market.") + public String getEndMarket() { + return endMarket; + } + + public void setEndMarket(String endMarket) { + this.endMarket = endMarket; + } + + public AccountCreationResp etag(String etag) { + this.etag = etag; + return this; + } + + /** + * API resource entity version. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "API resource entity version.") + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public AccountCreationResp expiration(DateTime expiration) { + this.expiration = expiration; + return this; + } + + /** + * Expiration time of the account, as UTC time RFC3339. + * + * @return expiration + **/ + @ApiModelProperty(value = "Expiration time of the account, as UTC time RFC3339.") + public DateTime getExpiration() { + return expiration; + } + + public void setExpiration(DateTime expiration) { + this.expiration = expiration; + } + + public AccountCreationResp expirationWarningThreshold(Integer expirationWarningThreshold) { + this.expirationWarningThreshold = expirationWarningThreshold; + return this; + } + + /** + * Indicates how many days (1-180) before account expiration a notification email is sent. minimum: 1 maximum: 180 + * + * @return expirationWarningThreshold + **/ + @ApiModelProperty(example = "180", + value = "Indicates how many days (1-180) before account expiration a notification email is sent.") + public Integer getExpirationWarningThreshold() { + return expirationWarningThreshold; + } + + public void setExpirationWarningThreshold(Integer expirationWarningThreshold) { + this.expirationWarningThreshold = expirationWarningThreshold; + } + + public AccountCreationResp id(String id) { + this.id = id; + return this; + } + + /** + * Account ID. + * + * @return id + **/ + @ApiModelProperty(example = "01619571e2e90242ac12000600000000", value = "Account ID.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AccountCreationResp idleTimeout(Integer idleTimeout) { + this.idleTimeout = idleTimeout; + return this; + } + + /** + * The reference token expiration time, in minutes, for this account. minimum: 1 maximum: 120 + * + * @return idleTimeout + **/ + @ApiModelProperty(example = "30", value = "The reference token expiration time, in minutes, for this account.") + public Integer getIdleTimeout() { + return idleTimeout; + } + + public void setIdleTimeout(Integer idleTimeout) { + this.idleTimeout = idleTimeout; + } + + public AccountCreationResp limitations(List limitations) { + this.limitations = limitations; + return this; + } + + public AccountCreationResp addLimitationsItem(AccountLimitation limitationsItem) { + if (this.limitations == null) { + this.limitations = new ArrayList(); + } + this.limitations.add(limitationsItem); + return this; + } + + /** + * List of account limitation objects. + * + * @return limitations + **/ + @ApiModelProperty(value = "List of account limitation objects.") + public List getLimitations() { + return limitations; + } + + public void setLimitations(List limitations) { + this.limitations = limitations; + } + + public AccountCreationResp limits(Map limits) { + this.limits = limits; + return this; + } + + public AccountCreationResp putLimitsItem(String key, String limitsItem) { + if (this.limits == null) { + this.limits = new HashMap(); + } + this.limits.put(key, limitsItem); + return this; + } + + /** + * DEPRECATED: Replaced by the limitations parameter. + * + * @return limits + **/ + @ApiModelProperty(value = "DEPRECATED: Replaced by the limitations parameter.") + public Map getLimits() { + return limits; + } + + public void setLimits(Map limits) { + this.limits = limits; + } + + public AccountCreationResp mfaStatus(MfaStatusEnum mfaStatus) { + this.mfaStatus = mfaStatus; + return this; + } + + /** + * The enforcement status of multi-factor authentication, either `enforced` or `optional`. + * + * @return mfaStatus + **/ + @ApiModelProperty(value = "The enforcement status of multi-factor authentication, either `enforced` or `optional`.") + public MfaStatusEnum getMfaStatus() { + return mfaStatus; + } + + public void setMfaStatus(MfaStatusEnum mfaStatus) { + this.mfaStatus = mfaStatus; + } + + public AccountCreationResp notificationEmails(List notificationEmails) { + this.notificationEmails = notificationEmails; + return this; + } + + public AccountCreationResp addNotificationEmailsItem(String notificationEmailsItem) { + if (this.notificationEmails == null) { + this.notificationEmails = new ArrayList(); + } + this.notificationEmails.add(notificationEmailsItem); + return this; + } + + /** + * A list of notification email addresses. + * + * @return notificationEmails + **/ + @ApiModelProperty(value = "A list of notification email addresses.") + public List getNotificationEmails() { + return notificationEmails; + } + + public void setNotificationEmails(List notificationEmails) { + this.notificationEmails = notificationEmails; + } + + public AccountCreationResp object(ObjectEnum object) { + this.object = object; + return this; + } + + /** + * Entity name: always `account`. + * + * @return object + **/ + @ApiModelProperty(value = "Entity name: always `account`.") + public ObjectEnum getObject() { + return object; + } + + public void setObject(ObjectEnum object) { + this.object = object; + } + + public AccountCreationResp parentAccount(ParentAccountInfo parentAccount) { + this.parentAccount = parentAccount; + return this; + } + + /** + * Contact details of the parent account. + * + * @return parentAccount + **/ + @ApiModelProperty(value = "Contact details of the parent account.") + public ParentAccountInfo getParentAccount() { + return parentAccount; + } + + public void setParentAccount(ParentAccountInfo parentAccount) { + this.parentAccount = parentAccount; + } + + public AccountCreationResp parentId(String parentId) { + this.parentId = parentId; + return this; + } + + /** + * The ID of the parent account, if any. + * + * @return parentId + **/ + @ApiModelProperty(example = "01619571dad80242ac12000600000000", value = "The ID of the parent account, if any.") + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public AccountCreationResp passwordPolicy(PasswordPolicy passwordPolicy) { + this.passwordPolicy = passwordPolicy; + return this; + } + + /** + * The password policy for this account. + * + * @return passwordPolicy + **/ + @ApiModelProperty(value = "The password policy for this account.") + public PasswordPolicy getPasswordPolicy() { + return passwordPolicy; + } + + public void setPasswordPolicy(PasswordPolicy passwordPolicy) { + this.passwordPolicy = passwordPolicy; + } + + public AccountCreationResp passwordRecoveryExpiration(Integer passwordRecoveryExpiration) { + this.passwordRecoveryExpiration = passwordRecoveryExpiration; + return this; + } + + /** + * Indicates for how many minutes a password recovery email is valid. minimum: 1 maximum: 45 + * + * @return passwordRecoveryExpiration + **/ + @ApiModelProperty(value = "Indicates for how many minutes a password recovery email is valid.") + public Integer getPasswordRecoveryExpiration() { + return passwordRecoveryExpiration; + } + + public void setPasswordRecoveryExpiration(Integer passwordRecoveryExpiration) { + this.passwordRecoveryExpiration = passwordRecoveryExpiration; + } + + public AccountCreationResp phoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * The phone number of a company representative. + * + * @return phoneNumber + **/ + @ApiModelProperty(example = "+44 (1223) 400 400", value = "The phone number of a company representative.") + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public AccountCreationResp policies(List policies) { + this.policies = policies; + return this; + } + + public AccountCreationResp addPoliciesItem(FeaturePolicy policiesItem) { + if (this.policies == null) { + this.policies = new ArrayList(); + } + this.policies.add(policiesItem); + return this; + } + + /** + * List of policies if requested. + * + * @return policies + **/ + @ApiModelProperty(value = "List of policies if requested.") + public List getPolicies() { + return policies; + } + + public void setPolicies(List policies) { + this.policies = policies; + } + + public AccountCreationResp postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * The postal code part of the postal address. + * + * @return postalCode + **/ + @ApiModelProperty(example = "CB1 9NJ", value = "The postal code part of the postal address.") + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + public AccountCreationResp reason(String reason) { + this.reason = reason; + return this; + } + + /** + * A note with the reason for account status update. + * + * @return reason + **/ + @ApiModelProperty(example = "Subscription paid.", value = "A note with the reason for account status update.") + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public AccountCreationResp referenceNote(String referenceNote) { + this.referenceNote = referenceNote; + return this; + } + + /** + * A reference note for updating the status of the account. + * + * @return referenceNote + **/ + @ApiModelProperty(example = "ARM-INT-0001", value = "A reference note for updating the status of the account.") + public String getReferenceNote() { + return referenceNote; + } + + public void setReferenceNote(String referenceNote) { + this.referenceNote = referenceNote; + } + + public AccountCreationResp salesContact(String salesContact) { + this.salesContact = salesContact; + return this; + } + + /** + * Email address of the sales contact. + * + * @return salesContact + **/ + @ApiModelProperty(example = "sales@arm.com", value = "Email address of the sales contact.") + public String getSalesContact() { + return salesContact; + } + + public void setSalesContact(String salesContact) { + this.salesContact = salesContact; + } + + public AccountCreationResp state(String state) { + this.state = state; + return this; + } + + /** + * The state part of the postal address. + * + * @return state + **/ + @ApiModelProperty(example = " ", value = "The state part of the postal address.") + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public AccountCreationResp status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the account. + * + * @return status + **/ + @ApiModelProperty(example = "ACTIVE", value = "The status of the account.") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public AccountCreationResp subAccounts(List subAccounts) { + this.subAccounts = subAccounts; + return this; + } + + public AccountCreationResp addSubAccountsItem(AccountInfo subAccountsItem) { + if (this.subAccounts == null) { + this.subAccounts = new ArrayList(); + } + this.subAccounts.add(subAccountsItem); + return this; + } + + /** + * List of sub accounts. Not available for developer users. + * + * @return subAccounts + **/ + @ApiModelProperty(value = "List of sub accounts. Not available for developer users.") + public List getSubAccounts() { + return subAccounts; + } + + public void setSubAccounts(List subAccounts) { + this.subAccounts = subAccounts; + } + + public AccountCreationResp templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Account template ID. + * + * @return templateId + **/ + @ApiModelProperty(example = "01619571e7160242ac12000600000000", value = "Account template ID.") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public AccountCreationResp tier(String tier) { + this.tier = tier; + return this; + } + + /** + * The tier level of the account; `0`: free tier, `1`: commercial account, `2`: + * partner tier. Other values are reserved for the future. + * + * @return tier + **/ + @ApiModelProperty(example = "1", + value = "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.") + public String getTier() { + return tier; + } + + public void setTier(String tier) { + this.tier = tier; + } + + public AccountCreationResp tierHistory(List tierHistory) { + this.tierHistory = tierHistory; + return this; + } + + public AccountCreationResp addTierHistoryItem(TierHistory tierHistoryItem) { + if (this.tierHistory == null) { + this.tierHistory = new ArrayList(); + } + this.tierHistory.add(tierHistoryItem); + return this; + } + + /** + * Tier history for this account. + * + * @return tierHistory + **/ + @ApiModelProperty(value = "Tier history for this account.") + public List getTierHistory() { + return tierHistory; + } + + public void setTierHistory(List tierHistory) { + this.tierHistory = tierHistory; + } + + public AccountCreationResp updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last update UTC time RFC3339. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2018-02-14T15:24:14Z", value = "Last update UTC time RFC3339.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public AccountCreationResp upgradedAt(DateTime upgradedAt) { + this.upgradedAt = upgradedAt; + return this; + } + + /** + * Time when upgraded to commercial account in UTC format RFC3339. + * + * @return upgradedAt + **/ + @ApiModelProperty(example = "2018-02-14T15:24:14Z", + value = "Time when upgraded to commercial account in UTC format RFC3339.") + public DateTime getUpgradedAt() { + return upgradedAt; + } + + public void setUpgradedAt(DateTime upgradedAt) { + this.upgradedAt = upgradedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountCreationResp accountCreationResp = (AccountCreationResp) o; + return Objects.equals(this.addressLine1, accountCreationResp.addressLine1) + && Objects.equals(this.addressLine2, accountCreationResp.addressLine2) + && Objects.equals(this.adminEmail, accountCreationResp.adminEmail) + && Objects.equals(this.adminFullName, accountCreationResp.adminFullName) + && Objects.equals(this.adminId, accountCreationResp.adminId) + && Objects.equals(this.adminKey, accountCreationResp.adminKey) + && Objects.equals(this.adminName, accountCreationResp.adminName) + && Objects.equals(this.adminPassword, accountCreationResp.adminPassword) + && Objects.equals(this.aliases, accountCreationResp.aliases) + && Objects.equals(this.businessModel, accountCreationResp.businessModel) + && Objects.equals(this.businessModelHistory, accountCreationResp.businessModelHistory) + && Objects.equals(this.city, accountCreationResp.city) + && Objects.equals(this.company, accountCreationResp.company) + && Objects.equals(this.contact, accountCreationResp.contact) + && Objects.equals(this.contractNumber, accountCreationResp.contractNumber) + && Objects.equals(this.country, accountCreationResp.country) + && Objects.equals(this.createdAt, accountCreationResp.createdAt) + && Objects.equals(this.customFields, accountCreationResp.customFields) + && Objects.equals(this.customerNumber, accountCreationResp.customerNumber) + && Objects.equals(this.displayName, accountCreationResp.displayName) + && Objects.equals(this.email, accountCreationResp.email) + && Objects.equals(this.endMarket, accountCreationResp.endMarket) + && Objects.equals(this.etag, accountCreationResp.etag) + && Objects.equals(this.expiration, accountCreationResp.expiration) + && Objects.equals(this.expirationWarningThreshold, accountCreationResp.expirationWarningThreshold) + && Objects.equals(this.id, accountCreationResp.id) + && Objects.equals(this.idleTimeout, accountCreationResp.idleTimeout) + && Objects.equals(this.limitations, accountCreationResp.limitations) + && Objects.equals(this.limits, accountCreationResp.limits) + && Objects.equals(this.mfaStatus, accountCreationResp.mfaStatus) + && Objects.equals(this.notificationEmails, accountCreationResp.notificationEmails) + && Objects.equals(this.object, accountCreationResp.object) + && Objects.equals(this.parentAccount, accountCreationResp.parentAccount) + && Objects.equals(this.parentId, accountCreationResp.parentId) + && Objects.equals(this.passwordPolicy, accountCreationResp.passwordPolicy) + && Objects.equals(this.passwordRecoveryExpiration, accountCreationResp.passwordRecoveryExpiration) + && Objects.equals(this.phoneNumber, accountCreationResp.phoneNumber) + && Objects.equals(this.policies, accountCreationResp.policies) + && Objects.equals(this.postalCode, accountCreationResp.postalCode) + && Objects.equals(this.reason, accountCreationResp.reason) + && Objects.equals(this.referenceNote, accountCreationResp.referenceNote) + && Objects.equals(this.salesContact, accountCreationResp.salesContact) + && Objects.equals(this.state, accountCreationResp.state) + && Objects.equals(this.status, accountCreationResp.status) + && Objects.equals(this.subAccounts, accountCreationResp.subAccounts) + && Objects.equals(this.templateId, accountCreationResp.templateId) + && Objects.equals(this.tier, accountCreationResp.tier) + && Objects.equals(this.tierHistory, accountCreationResp.tierHistory) + && Objects.equals(this.updatedAt, accountCreationResp.updatedAt) + && Objects.equals(this.upgradedAt, accountCreationResp.upgradedAt); + } + + @Override + public int hashCode() { + return Objects.hash(addressLine1, addressLine2, adminEmail, adminFullName, adminId, adminKey, adminName, + adminPassword, aliases, businessModel, businessModelHistory, city, company, contact, + contractNumber, country, createdAt, customFields, customerNumber, displayName, email, + endMarket, etag, expiration, expirationWarningThreshold, id, idleTimeout, limitations, + limits, mfaStatus, notificationEmails, object, parentAccount, parentId, passwordPolicy, + passwordRecoveryExpiration, phoneNumber, policies, postalCode, reason, referenceNote, + salesContact, state, status, subAccounts, templateId, tier, tierHistory, updatedAt, + upgradedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountCreationResp {\n"); + + sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); + sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" adminEmail: ").append(toIndentedString(adminEmail)).append("\n"); + sb.append(" adminFullName: ").append(toIndentedString(adminFullName)).append("\n"); + sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); + sb.append(" adminKey: ").append(toIndentedString(adminKey)).append("\n"); + sb.append(" adminName: ").append(toIndentedString(adminName)).append("\n"); + sb.append(" adminPassword: ").append(toIndentedString(adminPassword)).append("\n"); + sb.append(" aliases: ").append(toIndentedString(aliases)).append("\n"); + sb.append(" businessModel: ").append(toIndentedString(businessModel)).append("\n"); + sb.append(" businessModelHistory: ").append(toIndentedString(businessModelHistory)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" company: ").append(toIndentedString(company)).append("\n"); + sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); + sb.append(" contractNumber: ").append(toIndentedString(contractNumber)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); + sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" endMarket: ").append(toIndentedString(endMarket)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); + sb.append(" expirationWarningThreshold: ").append(toIndentedString(expirationWarningThreshold)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" idleTimeout: ").append(toIndentedString(idleTimeout)).append("\n"); + sb.append(" limitations: ").append(toIndentedString(limitations)).append("\n"); + sb.append(" limits: ").append(toIndentedString(limits)).append("\n"); + sb.append(" mfaStatus: ").append(toIndentedString(mfaStatus)).append("\n"); + sb.append(" notificationEmails: ").append(toIndentedString(notificationEmails)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" parentAccount: ").append(toIndentedString(parentAccount)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" passwordPolicy: ").append(toIndentedString(passwordPolicy)).append("\n"); + sb.append(" passwordRecoveryExpiration: ").append(toIndentedString(passwordRecoveryExpiration)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" policies: ").append(toIndentedString(policies)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" referenceNote: ").append(toIndentedString(referenceNote)).append("\n"); + sb.append(" salesContact: ").append(toIndentedString(salesContact)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" subAccounts: ").append(toIndentedString(subAccounts)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" tierHistory: ").append(toIndentedString(tierHistory)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" upgradedAt: ").append(toIndentedString(upgradedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfo.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfo.java index 5dbd7c82c..857cc108c 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfo.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfo.java @@ -42,24 +42,6 @@ public class AccountInfo implements Serializable { @SerializedName("address_line2") private String addressLine2 = null; - @SerializedName("admin_email") - private String adminEmail = null; - - @SerializedName("admin_full_name") - private String adminFullName = null; - - @SerializedName("admin_id") - private String adminId = null; - - @SerializedName("admin_key") - private String adminKey = null; - - @SerializedName("admin_name") - private String adminName = null; - - @SerializedName("admin_password") - private String adminPassword = null; - @SerializedName("aliases") private List aliases = null; @@ -320,6 +302,9 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("tier") private String tier = null; + @SerializedName("tier_history") + private List tierHistory = null; + @SerializedName("updated_at") private DateTime updatedAt = null; @@ -364,117 +349,6 @@ public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } - public AccountInfo adminEmail(String adminEmail) { - this.adminEmail = adminEmail; - return this; - } - - /** - * The email address of the admin user created for this account. Present only in the response for account creation. - * - * @return adminEmail - **/ - @ApiModelProperty(example = "admin@arm.com", - value = "The email address of the admin user created for this account. Present only in the response for account creation.") - public String getAdminEmail() { - return adminEmail; - } - - public void setAdminEmail(String adminEmail) { - this.adminEmail = adminEmail; - } - - public AccountInfo adminFullName(String adminFullName) { - this.adminFullName = adminFullName; - return this; - } - - /** - * The full name of the admin user created for this account. Present only in the response for account creation. - * - * @return adminFullName - **/ - @ApiModelProperty(example = "Admin Doe", - value = "The full name of the admin user created for this account. Present only in the response for account creation.") - public String getAdminFullName() { - return adminFullName; - } - - public void setAdminFullName(String adminFullName) { - this.adminFullName = adminFullName; - } - - public AccountInfo adminId(String adminId) { - this.adminId = adminId; - return this; - } - - /** - * The ID of the admin user created for this account. Present only in the response for the account creation. - * - * @return adminId - **/ - @ApiModelProperty(example = "01619571e2e89242ac12000600000000", - value = "The ID of the admin user created for this account. Present only in the response for the account creation.") - public String getAdminId() { - return adminId; - } - - public void setAdminId(String adminId) { - this.adminId = adminId; - } - - /** - * The admin API key created for this account. Present only in the response for account creation. - * - * @return adminKey - **/ - @ApiModelProperty(example = "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - value = "The admin API key created for this account. Present only in the response for account creation.") - public String getAdminKey() { - return adminKey; - } - - public AccountInfo adminName(String adminName) { - this.adminName = adminName; - return this; - } - - /** - * The username of the admin user created for this account. Present only in the response for account creation. - * - * @return adminName - **/ - @ApiModelProperty(example = "admin", - value = "The username of the admin user created for this account. Present only in the response for account creation.") - public String getAdminName() { - return adminName; - } - - public void setAdminName(String adminName) { - this.adminName = adminName; - } - - public AccountInfo adminPassword(String adminPassword) { - this.adminPassword = adminPassword; - return this; - } - - /** - * The password of the admin user created for this account. Present only in the response for account creation. - * - * @return adminPassword - **/ - @ApiModelProperty(example = "PZf9eEUH43DAPE9ULINFeuj", - value = "The password of the admin user created for this account. Present only in the response for account creation.") - public String getAdminPassword() { - return adminPassword; - } - - public void setAdminPassword(String adminPassword) { - this.adminPassword = adminPassword; - } - public AccountInfo aliases(List aliases) { this.aliases = aliases; return this; @@ -489,11 +363,11 @@ public AccountInfo addAliasesItem(String aliasesItem) { } /** - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. * * @return aliases **/ - @ApiModelProperty(value = "An array of aliases.") + @ApiModelProperty(value = "An array of aliases for the tenant account ID. The aliases must be globally unique.") public List getAliases() { return aliases; } @@ -573,11 +447,11 @@ public AccountInfo company(String company) { } /** - * The name of the company. + * The name of the company used in billing. * * @return company **/ - @ApiModelProperty(example = "ARM Holdings Plc", value = "The name of the company.") + @ApiModelProperty(example = "ARM Holdings Plc", value = "The name of the company used in billing.") public String getCompany() { return company; } @@ -714,11 +588,11 @@ public AccountInfo displayName(String displayName) { } /** - * The display name for the account. + * The display name for the tenant account. * * @return displayName **/ - @ApiModelProperty(example = "ARM", value = "The display name for the account.") + @ApiModelProperty(example = "ARM", value = "The display name for the tenant account.") public String getDisplayName() { return displayName; } @@ -902,11 +776,11 @@ public AccountInfo putLimitsItem(String key, String limitsItem) { } /** - * List of limits as key-value pairs if requested. + * DEPRECATED: Replaced by the limitations parameter. * * @return limits **/ - @ApiModelProperty(value = "List of limits as key-value pairs if requested.") + @ApiModelProperty(value = "DEPRECATED: Replaced by the limitations parameter.") public Map getLimits() { return limits; } @@ -1283,6 +1157,33 @@ public void setTier(String tier) { this.tier = tier; } + public AccountInfo tierHistory(List tierHistory) { + this.tierHistory = tierHistory; + return this; + } + + public AccountInfo addTierHistoryItem(TierHistory tierHistoryItem) { + if (this.tierHistory == null) { + this.tierHistory = new ArrayList(); + } + this.tierHistory.add(tierHistoryItem); + return this; + } + + /** + * Tier history for this account. + * + * @return tierHistory + **/ + @ApiModelProperty(value = "Tier history for this account.") + public List getTierHistory() { + return tierHistory; + } + + public void setTierHistory(List tierHistory) { + this.tierHistory = tierHistory; + } + public AccountInfo updatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; return this; @@ -1333,12 +1234,6 @@ public boolean equals(java.lang.Object o) { AccountInfo accountInfo = (AccountInfo) o; return Objects.equals(this.addressLine1, accountInfo.addressLine1) && Objects.equals(this.addressLine2, accountInfo.addressLine2) - && Objects.equals(this.adminEmail, accountInfo.adminEmail) - && Objects.equals(this.adminFullName, accountInfo.adminFullName) - && Objects.equals(this.adminId, accountInfo.adminId) - && Objects.equals(this.adminKey, accountInfo.adminKey) - && Objects.equals(this.adminName, accountInfo.adminName) - && Objects.equals(this.adminPassword, accountInfo.adminPassword) && Objects.equals(this.aliases, accountInfo.aliases) && Objects.equals(this.businessModel, accountInfo.businessModel) && Objects.equals(this.businessModelHistory, accountInfo.businessModelHistory) @@ -1372,19 +1267,20 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.state, accountInfo.state) && Objects.equals(this.status, accountInfo.status) && Objects.equals(this.subAccounts, accountInfo.subAccounts) && Objects.equals(this.templateId, accountInfo.templateId) && Objects.equals(this.tier, accountInfo.tier) + && Objects.equals(this.tierHistory, accountInfo.tierHistory) && Objects.equals(this.updatedAt, accountInfo.updatedAt) && Objects.equals(this.upgradedAt, accountInfo.upgradedAt); } @Override public int hashCode() { - return Objects.hash(addressLine1, addressLine2, adminEmail, adminFullName, adminId, adminKey, adminName, - adminPassword, aliases, businessModel, businessModelHistory, city, company, contact, - contractNumber, country, createdAt, customFields, customerNumber, displayName, email, - endMarket, etag, expiration, expirationWarningThreshold, id, idleTimeout, limitations, - limits, mfaStatus, notificationEmails, object, parentAccount, parentId, passwordPolicy, - passwordRecoveryExpiration, phoneNumber, policies, postalCode, reason, referenceNote, - salesContact, state, status, subAccounts, templateId, tier, updatedAt, upgradedAt); + return Objects.hash(addressLine1, addressLine2, aliases, businessModel, businessModelHistory, city, company, + contact, contractNumber, country, createdAt, customFields, customerNumber, displayName, + email, endMarket, etag, expiration, expirationWarningThreshold, id, idleTimeout, + limitations, limits, mfaStatus, notificationEmails, object, parentAccount, parentId, + passwordPolicy, passwordRecoveryExpiration, phoneNumber, policies, postalCode, reason, + referenceNote, salesContact, state, status, subAccounts, templateId, tier, tierHistory, + updatedAt, upgradedAt); } @Override @@ -1394,12 +1290,6 @@ public String toString() { sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); - sb.append(" adminEmail: ").append(toIndentedString(adminEmail)).append("\n"); - sb.append(" adminFullName: ").append(toIndentedString(adminFullName)).append("\n"); - sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); - sb.append(" adminKey: ").append(toIndentedString(adminKey)).append("\n"); - sb.append(" adminName: ").append(toIndentedString(adminName)).append("\n"); - sb.append(" adminPassword: ").append(toIndentedString(adminPassword)).append("\n"); sb.append(" aliases: ").append(toIndentedString(aliases)).append("\n"); sb.append(" businessModel: ").append(toIndentedString(businessModel)).append("\n"); sb.append(" businessModelHistory: ").append(toIndentedString(businessModelHistory)).append("\n"); @@ -1439,6 +1329,7 @@ public String toString() { sb.append(" subAccounts: ").append(toIndentedString(subAccounts)).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" tierHistory: ").append(toIndentedString(tierHistory)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" upgradedAt: ").append(toIndentedString(upgradedAt)).append("\n"); sb.append("}"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfoList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfoList.java index d6e67e39e..ba11c8225 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfoList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountInfoList.java @@ -150,12 +150,12 @@ public AccountInfoList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitation.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitation.java index 6a340be5c..7d815e43a 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitation.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitation.java @@ -53,55 +53,73 @@ public class AccountLimitation implements Serializable { @SerializedName("inherited_from") private String inheritedFrom = null; - @SerializedName("inherited_type") - private String inheritedType = null; - - @SerializedName("limit") - private Integer limit = null; - - @SerializedName("name") - private String name = null; - /** - * Entity name: always 'limitation' + * Indicates the type of the entity where the limitation is inherited from. */ - @JsonAdapter(ObjectEnum.Adapter.class) - public enum ObjectEnum { - USER("user"), - - API_KEY("api-key"), - - GROUP("group"), - + @JsonAdapter(InheritedTypeEnum.Adapter.class) + public enum InheritedTypeEnum { ACCOUNT("account"), - ACCOUNT_TEMPLATE("account_template"), + TEMPLATE("template"), - TRUSTED_CERT("trusted_cert"), + TIER_TEMPLATE("tier_template"); - LIST("list"), + private String value; - ERROR("error"), + InheritedTypeEnum(String value) { + this.value = value; + } - AGREEMENT("agreement"), + public String getValue() { + return value; + } - SIGNED_AGREEMENT("signed_agreement"), + @Override + public String toString() { + return String.valueOf(value); + } - POLICY("policy"), + public static InheritedTypeEnum fromValue(String text) { + for (InheritedTypeEnum b : InheritedTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } - LIMITATION("limitation"), + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InheritedTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } - IDENTITY_PROVIDER("identity_provider"), + @Override + public InheritedTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InheritedTypeEnum.fromValue(String.valueOf(value)); + } + } + } - USER_SESSION("user_session"), + @SerializedName("inherited_type") + private InheritedTypeEnum inheritedType = null; - USER_INVITATION("user_invitation"), + @SerializedName("inherited_value") + private AccountLimitationInheritedValue inheritedValue = null; - NOTIFICATION_ENTRY("notification_entry"), + @SerializedName("limit") + private Long limit = null; - BRANDING_COLOR("branding_color"), + @SerializedName("name") + private String name = null; - BRANDING_IMAGE("branding_image"); + /** + * Entity name: always 'limitation' + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + LIMITATION("limitation"); private String value; @@ -145,7 +163,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { private ObjectEnum object = null; @SerializedName("quota") - private Integer quota = null; + private Long quota = null; @SerializedName("updated_at") private DateTime updatedAt = null; @@ -156,11 +174,11 @@ public AccountLimitation billingPeriod(Integer billingPeriod) { } /** - * Billing period of the account limitation. + * Billing period of the account limitation. minimum: 1 maximum: 120 * * @return billingPeriod **/ - @ApiModelProperty(value = "Billing period of the account limitation.") + @ApiModelProperty(example = "1", value = "Billing period of the account limitation.") public Integer getBillingPeriod() { return billingPeriod; } @@ -169,11 +187,6 @@ public void setBillingPeriod(Integer billingPeriod) { this.billingPeriod = billingPeriod; } - public AccountLimitation createdAt(DateTime createdAt) { - this.createdAt = createdAt; - return this; - } - /** * Creation UTC time RFC3339. * @@ -184,10 +197,6 @@ public DateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(DateTime createdAt) { - this.createdAt = createdAt; - } - /** * Description of the account limitation. * @@ -198,11 +207,6 @@ public String getDescription() { return description; } - public AccountLimitation etag(String etag) { - this.etag = etag; - return this; - } - /** * API resource entity version. * @@ -213,15 +217,6 @@ public String getEtag() { return etag; } - public void setEtag(String etag) { - this.etag = etag; - } - - public AccountLimitation id(String id) { - this.id = id; - return this; - } - /** * Entity ID. * @@ -232,10 +227,6 @@ public String getId() { return id; } - public void setId(String id) { - this.id = id; - } - /** * Flag indicating whether this limitation is inherited. * @@ -262,11 +253,30 @@ public String getInheritedFrom() { * @return inheritedType **/ @ApiModelProperty(value = "Indicates the type of the entity where the limitation is inherited from.") - public String getInheritedType() { + public InheritedTypeEnum getInheritedType() { return inheritedType; } - public AccountLimitation limit(Integer limit) { + public AccountLimitation inheritedValue(AccountLimitationInheritedValue inheritedValue) { + this.inheritedValue = inheritedValue; + return this; + } + + /** + * Get inheritedValue + * + * @return inheritedValue + **/ + @ApiModelProperty(value = "") + public AccountLimitationInheritedValue getInheritedValue() { + return inheritedValue; + } + + public void setInheritedValue(AccountLimitationInheritedValue inheritedValue) { + this.inheritedValue = inheritedValue; + } + + public AccountLimitation limit(Long limit) { this.limit = limit; return this; } @@ -276,12 +286,12 @@ public AccountLimitation limit(Integer limit) { * * @return limit **/ - @ApiModelProperty(value = "The value of the limit.") - public Integer getLimit() { + @ApiModelProperty(example = "25", value = "The value of the limit.") + public Long getLimit() { return limit; } - public void setLimit(Integer limit) { + public void setLimit(Long limit) { this.limit = limit; } @@ -295,7 +305,7 @@ public AccountLimitation name(String name) { * * @return name **/ - @ApiModelProperty(value = "Name of the account limitation.") + @ApiModelProperty(example = "iam_limit_user_count", value = "Name of the account limitation.") public String getName() { return name; } @@ -304,11 +314,6 @@ public void setName(String name) { this.name = name; } - public AccountLimitation object(ObjectEnum object) { - this.object = object; - return this; - } - /** * Entity name: always 'limitation' * @@ -319,11 +324,7 @@ public ObjectEnum getObject() { return object; } - public void setObject(ObjectEnum object) { - this.object = object; - } - - public AccountLimitation quota(Integer quota) { + public AccountLimitation quota(Long quota) { this.quota = quota; return this; } @@ -333,20 +334,15 @@ public AccountLimitation quota(Integer quota) { * * @return quota **/ - @ApiModelProperty(value = "Quota of the account limitation.") - public Integer getQuota() { + @ApiModelProperty(example = "0", value = "Quota of the account limitation.") + public Long getQuota() { return quota; } - public void setQuota(Integer quota) { + public void setQuota(Long quota) { this.quota = quota; } - public AccountLimitation updatedAt(DateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - /** * Last update UTC time RFC3339. * @@ -357,10 +353,6 @@ public DateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(DateTime updatedAt) { - this.updatedAt = updatedAt; - } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -377,6 +369,7 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.inherited, accountLimitation.inherited) && Objects.equals(this.inheritedFrom, accountLimitation.inheritedFrom) && Objects.equals(this.inheritedType, accountLimitation.inheritedType) + && Objects.equals(this.inheritedValue, accountLimitation.inheritedValue) && Objects.equals(this.limit, accountLimitation.limit) && Objects.equals(this.name, accountLimitation.name) && Objects.equals(this.object, accountLimitation.object) @@ -387,7 +380,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash(billingPeriod, createdAt, description, etag, id, inherited, inheritedFrom, inheritedType, - limit, name, object, quota, updatedAt); + inheritedValue, limit, name, object, quota, updatedAt); } @Override @@ -403,6 +396,7 @@ public String toString() { sb.append(" inherited: ").append(toIndentedString(inherited)).append("\n"); sb.append(" inheritedFrom: ").append(toIndentedString(inheritedFrom)).append("\n"); sb.append(" inheritedType: ").append(toIndentedString(inheritedType)).append("\n"); + sb.append(" inheritedValue: ").append(toIndentedString(inheritedValue)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" object: ").append(toIndentedString(object)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationInheritedValue.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationInheritedValue.java new file mode 100644 index 000000000..596a8c1ad --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationInheritedValue.java @@ -0,0 +1,138 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, + * the value is null. + */ +@ApiModel(description = "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.") + +public class AccountLimitationInheritedValue implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("billing_period") + private Integer billingPeriod = null; + + @SerializedName("limit") + private Long limit = null; + + @SerializedName("quota") + private Long quota = null; + + public AccountLimitationInheritedValue billingPeriod(Integer billingPeriod) { + this.billingPeriod = billingPeriod; + return this; + } + + /** + * Default billing period of the account limitation as defined in the parent entity. minimum: 1 maximum: 120 + * + * @return billingPeriod + **/ + @ApiModelProperty(example = "1", + value = "Default billing period of the account limitation as defined in the parent entity.") + public Integer getBillingPeriod() { + return billingPeriod; + } + + public void setBillingPeriod(Integer billingPeriod) { + this.billingPeriod = billingPeriod; + } + + public AccountLimitationInheritedValue limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Default value of the limit as defined in the parent entity. + * + * @return limit + **/ + @ApiModelProperty(example = "25", value = "Default value of the limit as defined in the parent entity.") + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public AccountLimitationInheritedValue quota(Long quota) { + this.quota = quota; + return this; + } + + /** + * Default quota as defined in the parent entity. + * + * @return quota + **/ + @ApiModelProperty(example = "0", value = "Default quota as defined in the parent entity.") + public Long getQuota() { + return quota; + } + + public void setQuota(Long quota) { + this.quota = quota; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountLimitationInheritedValue accountLimitationInheritedValue = (AccountLimitationInheritedValue) o; + return Objects.equals(this.billingPeriod, accountLimitationInheritedValue.billingPeriod) + && Objects.equals(this.limit, accountLimitationInheritedValue.limit) + && Objects.equals(this.quota, accountLimitationInheritedValue.quota); + } + + @Override + public int hashCode() { + return Objects.hash(billingPeriod, limit, quota); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountLimitationInheritedValue {\n"); + + sb.append(" billingPeriod: ").append(toIndentedString(billingPeriod)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" quota: ").append(toIndentedString(quota)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationList.java index 198676263..9fab6b8d2 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountLimitationList.java @@ -150,12 +150,12 @@ public AccountLimitationList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponse.java new file mode 100644 index 000000000..7055bf945 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponse.java @@ -0,0 +1,230 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * This object represents an account in responses. + */ +@ApiModel(description = "This object represents an account in responses.") + +public class AccountResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("alias") + private String alias = null; + + @SerializedName("display_name") + private String displayName = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("login_profiles") + private List loginProfiles = null; + + @SerializedName("parent_id") + private String parentId = null; + + /** + * The status of the account. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ENROLLING("ENROLLING"), + + ACTIVE("ACTIVE"), + + RESTRICTED("RESTRICTED"), + + SUSPENDED("SUSPENDED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + /** + * Alias of the account. + * + * @return alias + **/ + @ApiModelProperty(example = "cust-314159", value = "Alias of the account.") + public String getAlias() { + return alias; + } + + /** + * The display name for the account. + * + * @return displayName + **/ + @ApiModelProperty(example = "Customer 3.14159", value = "The display name for the account.") + public String getDisplayName() { + return displayName; + } + + /** + * The UUID of the account. + * + * @return id + **/ + @ApiModelProperty(example = "01619571e2e90242ac12000600000000", value = "The UUID of the account.") + public String getId() { + return id; + } + + public AccountResponse loginProfiles(List loginProfiles) { + this.loginProfiles = loginProfiles; + return this; + } + + public AccountResponse addLoginProfilesItem(LoginProfile loginProfilesItem) { + if (this.loginProfiles == null) { + this.loginProfiles = new ArrayList(); + } + this.loginProfiles.add(loginProfilesItem); + return this; + } + + /** + * A list of login profiles for the user in the account. + * + * @return loginProfiles + **/ + @ApiModelProperty(value = "A list of login profiles for the user in the account.") + public List getLoginProfiles() { + return loginProfiles; + } + + public void setLoginProfiles(List loginProfiles) { + this.loginProfiles = loginProfiles; + } + + /** + * The UUID of the parent account, if it has any. + * + * @return parentId + **/ + @ApiModelProperty(example = "01619571f3c00242ac12000600000000", + value = "The UUID of the parent account, if it has any.") + public String getParentId() { + return parentId; + } + + /** + * The status of the account. + * + * @return status + **/ + @ApiModelProperty(example = "ACTIVE", value = "The status of the account.") + public StatusEnum getStatus() { + return status; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountResponse accountResponse = (AccountResponse) o; + return Objects.equals(this.alias, accountResponse.alias) + && Objects.equals(this.displayName, accountResponse.displayName) + && Objects.equals(this.id, accountResponse.id) + && Objects.equals(this.loginProfiles, accountResponse.loginProfiles) + && Objects.equals(this.parentId, accountResponse.parentId) + && Objects.equals(this.status, accountResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(alias, displayName, id, loginProfiles, parentId, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountResponse {\n"); + + sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" loginProfiles: ").append(toIndentedString(loginProfiles)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponseList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponseList.java new file mode 100644 index 000000000..05c4b3151 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountResponseList.java @@ -0,0 +1,286 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * AccountResponseList + */ + +public class AccountResponseList implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = null; + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + /** + * Entity name: always 'list' + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + LIST("list"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String text) { + for (OrderEnum b : OrderEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("order") + private OrderEnum order = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + /** + * The entity ID to fetch after the given one. + * + * @return after + **/ + @ApiModelProperty(example = "01619571f3c00242ac12000600000000", + value = "The entity ID to fetch after the given one.") + public String getAfter() { + return after; + } + + public AccountResponseList data(List data) { + this.data = data; + return this; + } + + public AccountResponseList addDataItem(AccountResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList(); + } + this.data.add(dataItem); + return this; + } + + /** + * A list of entities. + * + * @return data + **/ + @ApiModelProperty(value = "A list of entities.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * Flag indicating whether there is more results. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", value = "Flag indicating whether there is more results.") + public Boolean isHasMore() { + return hasMore; + } + + /** + * The number of results to return, (range: 2-1000), or equals to `total_count` + * + * @return limit + **/ + @ApiModelProperty(example = "50", + value = "The number of results to return, (range: 2-1000), or equals to `total_count`") + public Integer getLimit() { + return limit; + } + + /** + * Entity name: always 'list' + * + * @return object + **/ + @ApiModelProperty(value = "Entity name: always 'list'") + public ObjectEnum getObject() { + return object; + } + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + * + * @return order + **/ + @ApiModelProperty(value = "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.") + public OrderEnum getOrder() { + return order; + } + + /** + * The total number or records, if requested. It might be returned also for small lists. + * + * @return totalCount + **/ + @ApiModelProperty(example = "5", + value = "The total number or records, if requested. It might be returned also for small lists.") + public Integer getTotalCount() { + return totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountResponseList accountResponseList = (AccountResponseList) o; + return Objects.equals(this.after, accountResponseList.after) + && Objects.equals(this.data, accountResponseList.data) + && Objects.equals(this.hasMore, accountResponseList.hasMore) + && Objects.equals(this.limit, accountResponseList.limit) + && Objects.equals(this.object, accountResponseList.object) + && Objects.equals(this.order, accountResponseList.order) + && Objects.equals(this.totalCount, accountResponseList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountResponseList {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateReq.java index dcc8c01b2..42a87124d 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateReq.java @@ -195,11 +195,11 @@ public AccountUpdateReq addAliasesItem(String aliasesItem) { } /** - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. * * @return aliases **/ - @ApiModelProperty(value = "An array of aliases.") + @ApiModelProperty(value = "An array of aliases for the tenant account ID. The aliases must be globally unique.") public List getAliases() { return aliases; } @@ -234,12 +234,12 @@ public AccountUpdateReq company(String company) { } /** - * The name of the company. Required for commercial accounts only. + * The name of the company used in billing. Required for commercial accounts only. * * @return company **/ @ApiModelProperty(example = "ARM Holdings Plc", - value = "The name of the company. Required for commercial accounts only.") + value = "The name of the company used in billing. Required for commercial accounts only.") public String getCompany() { return company; } @@ -321,11 +321,11 @@ public AccountUpdateReq displayName(String displayName) { } /** - * The display name for the account. + * The display name for the tenant account. * * @return displayName **/ - @ApiModelProperty(example = "ARM", value = "The display name for the account.") + @ApiModelProperty(example = "ARM", value = "The display name for the tenant account.") public String getDisplayName() { return displayName; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateRootReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateRootReq.java index fa5d8347f..e18a2c8cc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateRootReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AccountUpdateRootReq.java @@ -208,11 +208,11 @@ public AccountUpdateRootReq addAliasesItem(String aliasesItem) { } /** - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. * * @return aliases **/ - @ApiModelProperty(value = "An array of aliases.") + @ApiModelProperty(value = "An array of aliases for the tenant account ID. The aliases must be globally unique.") public List getAliases() { return aliases; } @@ -266,12 +266,12 @@ public AccountUpdateRootReq company(String company) { } /** - * The name of the company. Required for commercial accounts only. + * The name of the company used in billing. Required for commercial accounts only. * * @return company **/ @ApiModelProperty(example = "ARM Holdings Plc", - value = "The name of the company. Required for commercial accounts only.") + value = "The name of the company used in billing. Required for commercial accounts only.") public String getCompany() { return company; } @@ -306,11 +306,11 @@ public AccountUpdateRootReq contractNumber(String contractNumber) { } /** - * Contract number of the customer. + * Contract number of the customer. An administrator can set this property on tenant accounts only. * * @return contractNumber **/ - @ApiModelProperty(value = "Contract number of the customer.") + @ApiModelProperty(value = "Contract number of the customer. An administrator can set this property on tenant accounts only.") public String getContractNumber() { return contractNumber; } @@ -372,11 +372,11 @@ public AccountUpdateRootReq customerNumber(String customerNumber) { } /** - * Customer number of the customer. + * Customer number of the customer. An administrator can set this property on tenant accounts only. * * @return customerNumber **/ - @ApiModelProperty(value = "Customer number of the customer.") + @ApiModelProperty(value = "Customer number of the customer. An administrator can set this property on tenant accounts only.") public String getCustomerNumber() { return customerNumber; } @@ -391,11 +391,11 @@ public AccountUpdateRootReq displayName(String displayName) { } /** - * The display name for the account. + * The display name for the tenant account. * * @return displayName **/ - @ApiModelProperty(example = "ARM", value = "The display name for the account.") + @ApiModelProperty(example = "ARM", value = "The display name for the tenant account.") public String getDisplayName() { return displayName; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AggregatedQuotaUsageReport.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AggregatedQuotaUsageReport.java index f35fdf521..b687ddca2 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AggregatedQuotaUsageReport.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AggregatedQuotaUsageReport.java @@ -59,7 +59,9 @@ public enum TypeEnum { PACKAGE_CREATION("package_creation"), - PACKAGE_TERMINATION("package_termination"); + PACKAGE_TERMINATION("package_termination"), + + PACKAGE_TOKENS_EDIT("package_tokens_edit"); private String value; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoReq.java index 6dafaa81a..4f6ee1630 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoReq.java @@ -43,7 +43,7 @@ public class ApiKeyInfoReq implements Serializable { private String owner = null; /** - * The status of the API key. + * The status of the API key. Only an administrator can set the status of an API key. */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { @@ -106,11 +106,12 @@ public ApiKeyInfoReq addGroupsItem(String groupsItem) { } /** - * A list of group IDs this API key belongs to. + * A list of group IDs this API key belongs to. Adding an API key to the 'Administrators' group is + * restricted to administrators. * * @return groups **/ - @ApiModelProperty(value = "A list of group IDs this API key belongs to.") + @ApiModelProperty(value = "A list of group IDs this API key belongs to. Adding an API key to the 'Administrators' group is restricted to administrators.") public List getGroups() { return groups; } @@ -144,11 +145,11 @@ public ApiKeyInfoReq owner(String owner) { } /** - * The owner of this API key. + * The owner of this API key. Only an administrator can set the owner of an API key. * * @return owner **/ - @ApiModelProperty(value = "The owner of this API key.") + @ApiModelProperty(value = "The owner of this API key. Only an administrator can set the owner of an API key.") public String getOwner() { return owner; } @@ -163,11 +164,11 @@ public ApiKeyInfoReq status(StatusEnum status) { } /** - * The status of the API key. + * The status of the API key. Only an administrator can set the status of an API key. * * @return status **/ - @ApiModelProperty(value = "The status of the API key.") + @ApiModelProperty(value = "The status of the API key. Only an administrator can set the status of an API key.") public StatusEnum getStatus() { return status; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoRespList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoRespList.java index 022b26160..0895d716b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoRespList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyInfoRespList.java @@ -150,12 +150,12 @@ public ApiKeyInfoRespList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyUpdateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyUpdateReq.java index b82979161..44f2c639f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyUpdateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApiKeyUpdateReq.java @@ -43,7 +43,7 @@ public class ApiKeyUpdateReq implements Serializable { private String owner = null; /** - * The status of the API key. + * The status of the API key. Only the owner of the API key or an administrator can update the status of an API key. */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { @@ -106,11 +106,11 @@ public ApiKeyUpdateReq addGroupsItem(String groupsItem) { } /** - * A list of group IDs this API key belongs to. + * A list of group IDs this API key belongs to. Only an administrator can update the group membership of an API key. * * @return groups **/ - @ApiModelProperty(value = "A list of group IDs this API key belongs to.") + @ApiModelProperty(value = "A list of group IDs this API key belongs to. Only an administrator can update the group membership of an API key.") public List getGroups() { return groups; } @@ -129,7 +129,7 @@ public ApiKeyUpdateReq name(String name) { * * @return name **/ - @ApiModelProperty(required = true, value = "The display name for the API key.") + @ApiModelProperty(value = "The display name for the API key.") public String getName() { return name; } @@ -144,11 +144,11 @@ public ApiKeyUpdateReq owner(String owner) { } /** - * The owner of this API key. + * The owner of this API key. Only an administrator can update the owner of an API key. * * @return owner **/ - @ApiModelProperty(value = "The owner of this API key.") + @ApiModelProperty(value = "The owner of this API key. Only an administrator can update the owner of an API key.") public String getOwner() { return owner; } @@ -163,11 +163,11 @@ public ApiKeyUpdateReq status(StatusEnum status) { } /** - * The status of the API key. + * The status of the API key. Only the owner of the API key or an administrator can update the status of an API key. * * @return status **/ - @ApiModelProperty(value = "The status of the API key.") + @ApiModelProperty(value = "The status of the API key. Only the owner of the API key or an administrator can update the status of an API key.") public StatusEnum getStatus() { return status; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Application.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Application.java new file mode 100644 index 000000000..abff2e497 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Application.java @@ -0,0 +1,376 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Represents an application in Device Management. + */ +@ApiModel(description = "Represents an application in Device Management.") + +public class Application implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("account_id") + private String accountId = null; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("groups") + private List groups = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("last_used_at") + private DateTime lastUsedAt = null; + + @SerializedName("name") + private String name = null; + + /** + * Entity name: always 'application' + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + APPLICATION("application"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + /** + * The status of the application. When admin sets the application as inactive all related data and configurations + * are cleared from the system. If application is activated again, client must open new channels and set new + * subscriptions to start receiving events again. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + ACTIVE("ACTIVE"), + + INACTIVE("INACTIVE"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("status") + private StatusEnum status = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + /** + * The ID of the account. + * + * @return accountId + **/ + @ApiModelProperty(example = "01619571e2e90242ac12000600000000", value = "The ID of the account.") + public String getAccountId() { + return accountId; + } + + /** + * Creation UTC time RFC3339. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2020-02-18T09:16:40Z", value = "Creation UTC time RFC3339.") + public DateTime getCreatedAt() { + return createdAt; + } + + public Application description(String description) { + this.description = description; + return this; + } + + /** + * The description of the application. + * + * @return description + **/ + @ApiModelProperty(example = "Application to control the warp drive", value = "The description of the application.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * API resource entity version. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "API resource entity version.") + public String getEtag() { + return etag; + } + + public Application groups(List groups) { + this.groups = groups; + return this; + } + + public Application addGroupsItem(String groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * A list of group IDs this application belongs to. + * + * @return groups + **/ + @ApiModelProperty(value = "A list of group IDs this application belongs to.") + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + /** + * The ID of the application. + * + * @return id + **/ + @ApiModelProperty(example = "01619571f7020242ac12000600000000", value = "The ID of the application.") + public String getId() { + return id; + } + + /** + * The time of the latest application usage. + * + * @return lastUsedAt + **/ + @ApiModelProperty(example = "2020-02-14T15:24:14Z", value = "The time of the latest application usage.") + public DateTime getLastUsedAt() { + return lastUsedAt; + } + + public Application name(String name) { + this.name = name; + return this; + } + + /** + * The display name for the application. + * + * @return name + **/ + @ApiModelProperty(example = "Application warp", required = true, value = "The display name for the application.") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Entity name: always 'application' + * + * @return object + **/ + @ApiModelProperty(value = "Entity name: always 'application'") + public ObjectEnum getObject() { + return object; + } + + public Application status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * The status of the application. When admin sets the application as inactive all related data and configurations + * are cleared from the system. If application is activated again, client must open new channels and set new + * subscriptions to start receiving events again. + * + * @return status + **/ + @ApiModelProperty(example = "ACTIVE", + value = "The status of the application. When admin sets the application as inactive all related data and configurations are cleared from the system. If application is activated again, client must open new channels and set new subscriptions to start receiving events again.") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + /** + * Last update UTC time RFC3339. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2020-02-19T11:54:32Z", value = "Last update UTC time RFC3339.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Application application = (Application) o; + return Objects.equals(this.accountId, application.accountId) + && Objects.equals(this.createdAt, application.createdAt) + && Objects.equals(this.description, application.description) + && Objects.equals(this.etag, application.etag) && Objects.equals(this.groups, application.groups) + && Objects.equals(this.id, application.id) && Objects.equals(this.lastUsedAt, application.lastUsedAt) + && Objects.equals(this.name, application.name) && Objects.equals(this.object, application.object) + && Objects.equals(this.status, application.status) + && Objects.equals(this.updatedAt, application.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, createdAt, description, etag, groups, id, lastUsedAt, name, object, status, + updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Application {\n"); + + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApplicationList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApplicationList.java new file mode 100644 index 000000000..18baac6b9 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ApplicationList.java @@ -0,0 +1,335 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * ApplicationList + */ + +public class ApplicationList implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = new ArrayList(); + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + /** + * Entity name: always `list`. + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + LIST("list"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String text) { + for (OrderEnum b : OrderEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("order") + private OrderEnum order = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + public ApplicationList after(String after) { + this.after = after; + return this; + } + + /** + * The entity ID to retrieve after the given one. + * + * @return after + **/ + @ApiModelProperty(example = "01619571f3c00242ac12000600000000", + value = "The entity ID to retrieve after the given one.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public ApplicationList data(List data) { + this.data = data; + return this; + } + + public ApplicationList addDataItem(Application dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * A list of entities. + * + * @return data + **/ + @ApiModelProperty(required = true, value = "A list of entities.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public ApplicationList hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Flag indicating whether there are more results. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", required = true, value = "Flag indicating whether there are more results.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public ApplicationList limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The number of results to return, or equal to `total_count`. + * + * @return limit + **/ + @ApiModelProperty(example = "50", required = true, + value = "The number of results to return, or equal to `total_count`.") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public ApplicationList object(ObjectEnum object) { + this.object = object; + return this; + } + + /** + * Entity name: always `list`. + * + * @return object + **/ + @ApiModelProperty(required = true, value = "Entity name: always `list`.") + public ObjectEnum getObject() { + return object; + } + + public void setObject(ObjectEnum object) { + this.object = object; + } + + public ApplicationList order(OrderEnum order) { + this.order = order; + return this; + } + + /** + * The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC. + * + * @return order + **/ + @ApiModelProperty(value = "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.") + public OrderEnum getOrder() { + return order; + } + + public void setOrder(OrderEnum order) { + this.order = order; + } + + public ApplicationList totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The total number of records, if requested. + * + * @return totalCount + **/ + @ApiModelProperty(example = "20", required = true, value = "The total number of records, if requested.") + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplicationList applicationList = (ApplicationList) o; + return Objects.equals(this.after, applicationList.after) && Objects.equals(this.data, applicationList.data) + && Objects.equals(this.hasMore, applicationList.hasMore) + && Objects.equals(this.limit, applicationList.limit) + && Objects.equals(this.object, applicationList.object) + && Objects.equals(this.order, applicationList.order) + && Objects.equals(this.totalCount, applicationList.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApplicationList {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ArchiveInfoResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ArchiveInfoResponse.java new file mode 100644 index 000000000..37ab9edd5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ArchiveInfoResponse.java @@ -0,0 +1,212 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * This object represents the response for the archive info request. + */ +@ApiModel(description = "This object represents the response for the archive info request.") + +public class ArchiveInfoResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("download_size_bytes") + private Integer downloadSizeBytes = null; + + @SerializedName("download_url") + private String downloadUrl = null; + + @SerializedName("license_type") + private String licenseType = null; + + @SerializedName("license_version") + private String licenseVersion = null; + + @SerializedName("release_notes_url") + private String releaseNotesUrl = null; + + @SerializedName("version") + private String version = null; + + public ArchiveInfoResponse downloadSizeBytes(Integer downloadSizeBytes) { + this.downloadSizeBytes = downloadSizeBytes; + return this; + } + + /** + * The size of the archive file in bytes. + * + * @return downloadSizeBytes + **/ + @ApiModelProperty(example = "2402668", required = true, value = "The size of the archive file in bytes.") + public Integer getDownloadSizeBytes() { + return downloadSizeBytes; + } + + public void setDownloadSizeBytes(Integer downloadSizeBytes) { + this.downloadSizeBytes = downloadSizeBytes; + } + + public ArchiveInfoResponse downloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + return this; + } + + /** + * URL to download the Factory Configurator Utility archive. + * + * @return downloadUrl + **/ + @ApiModelProperty(example = "https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip", + required = true, value = "URL to download the Factory Configurator Utility archive.") + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } + + public ArchiveInfoResponse licenseType(String licenseType) { + this.licenseType = licenseType; + return this; + } + + /** + * The license agreement type required for downloading Factory Configurator Utility. + * + * @return licenseType + **/ + @ApiModelProperty(example = "fcu", + value = "The license agreement type required for downloading Factory Configurator Utility.") + public String getLicenseType() { + return licenseType; + } + + public void setLicenseType(String licenseType) { + this.licenseType = licenseType; + } + + public ArchiveInfoResponse licenseVersion(String licenseVersion) { + this.licenseVersion = licenseVersion; + return this; + } + + /** + * The license agreement version required for downloading Factory Configurator Utility. + * + * @return licenseVersion + **/ + @ApiModelProperty(example = "1.0", + value = "The license agreement version required for downloading Factory Configurator Utility.") + public String getLicenseVersion() { + return licenseVersion; + } + + public void setLicenseVersion(String licenseVersion) { + this.licenseVersion = licenseVersion; + } + + public ArchiveInfoResponse releaseNotesUrl(String releaseNotesUrl) { + this.releaseNotesUrl = releaseNotesUrl; + return this; + } + + /** + * URL to the Factory Configurator Utility release notes. + * + * @return releaseNotesUrl + **/ + @ApiModelProperty(example = "https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes", required = true, + value = "URL to the Factory Configurator Utility release notes.") + public String getReleaseNotesUrl() { + return releaseNotesUrl; + } + + public void setReleaseNotesUrl(String releaseNotesUrl) { + this.releaseNotesUrl = releaseNotesUrl; + } + + public ArchiveInfoResponse version(String version) { + this.version = version; + return this; + } + + /** + * The Factory Configurator Utility version. + * + * @return version + **/ + @ApiModelProperty(example = "1.2.9.500", required = true, value = "The Factory Configurator Utility version.") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArchiveInfoResponse archiveInfoResponse = (ArchiveInfoResponse) o; + return Objects.equals(this.downloadSizeBytes, archiveInfoResponse.downloadSizeBytes) + && Objects.equals(this.downloadUrl, archiveInfoResponse.downloadUrl) + && Objects.equals(this.licenseType, archiveInfoResponse.licenseType) + && Objects.equals(this.licenseVersion, archiveInfoResponse.licenseVersion) + && Objects.equals(this.releaseNotesUrl, archiveInfoResponse.releaseNotesUrl) + && Objects.equals(this.version, archiveInfoResponse.version); + } + + @Override + public int hashCode() { + return Objects.hash(downloadSizeBytes, downloadUrl, licenseType, licenseVersion, releaseNotesUrl, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArchiveInfoResponse {\n"); + + sb.append(" downloadSizeBytes: ").append(toIndentedString(downloadSizeBytes)).append("\n"); + sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n"); + sb.append(" licenseType: ").append(toIndentedString(licenseType)).append("\n"); + sb.append(" licenseVersion: ").append(toIndentedString(licenseVersion)).append("\n"); + sb.append(" releaseNotesUrl: ").append(toIndentedString(releaseNotesUrl)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AsyncIDResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AsyncIDResponse.java index 8179e861b..8d641c160 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AsyncIDResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/AsyncIDResponse.java @@ -149,28 +149,33 @@ public AsyncIDResponse status(Integer status) { /** * States whether sending a command to the device succeeded or failed. <table> <thead> <tr> * <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> - * <td><b>200</b></td> <td>Operation succeeded. The playload contains result of the - * operation from the device.</td> </tr> <tr> <td><b>404</b></td> - * <td>Endpoint does not have requested resource.</td> </tr> <tr> - * <td><b>412</b></td> <td>Precondition failed and operation was not executed. Device - * responded with 4.12 CoAP response code.</td> </tr> <tr> + * <td><b>200</b></td> <td>Operation succeeded. The payload contains result of the + * operation from the device.</td> </tr> <tr> <td><b>400</b></td> + * <td>The device rejected the request, possibly because it does not support the request method. See how the + * supported methods are [configured for the device + * resources](https://developer.pelion.com/docs/device-management/current/resources/index.html).</td> + * </tr> <tr> <td><b>404</b></td> <td>The device replied that it does not + * have the requested resource.</td> </tr> <tr> <td><b>412</b></td> + * <td>Precondition failed and the operation was not executed. The device responded with 4.12 CoAP response + * code. The device may reject a subscription request with this response code.</td> </tr> <tr> * <td><b>413</b></td> <td>Request entity is too large and could not be delivered to - * the device.</td> </tr> <tr> <td><b>415</b></td> <td>Endpoint does - * not support media type.</td> </tr> <tr> <td><b>429</b></td> - * <td>Expired request was removed from queue (REQUEST_EXPIRED), device requested deregistration - * (DEVICE_REMOVED_REGISTRATION), or device was suspended (DEVICE_BLOCKED).</td> </tr> <tr> - * <td><b>502</b></td> <td>Request to the device failed and retry count exceeded. Last - * retry failed to establish TCP or TLS connection to endpoint.</td> </tr> <tr> - * <td><b>503</b></td> <td>Request to the device failed and retry count exceeded. Last - * retry failed because endpoint is currently unavailable (NOT_CONNECTED).</td> </tr> <tr> - * <td><b>504</b></td> <td>Request to the device failed and retry count exceeded. Last - * retry failed, as device did not respond in the time of protocol-specific retransmission logic - * (TIMEOUT).</td> </tr> </tbody> </table> + * the device.</td> </tr> <tr> <td><b>415</b></td> <td>The device + * does not support the media type in the request.</td> </tr> <tr> + * <td><b>429</b></td> <td>An expired request was removed from queue + * (REQUEST_EXPIRED), the device requested deregistration (DEVICE_REMOVED_REGISTRATION), or the device was suspended + * (DEVICE_BLOCKED). The request was never delivered to the device.</td> </tr> <tr> + * <td><b>502</b></td> <td>The request to the device failed and the retry count was + * exceeded. The last retry failed to establish TCP or TLS connection to the device.</td> </tr> + * <tr> <td><b>503</b></td> <td>The request to the device failed and the retry + * count was exceeded. The last retry failed because the device is currently unavailable (NOT_CONNECTED).</td> + * </tr> <tr> <td><b>504</b></td> <td>The request to the device failed and + * the retry count was exceeded. The last retry failed because the device did not respond in time according to the + * protocol-specific retransmission logic (TIMEOUT).</td> </tr> </tbody> </table> * * @return status **/ @ApiModelProperty(example = "200", - value = " States whether sending a command to the device succeeded or failed.
Code Description
200 Operation succeeded. The playload contains result of the operation from the device.
404 Endpoint does not have requested resource.
412 Precondition failed and operation was not executed. Device responded with 4.12 CoAP response code.
413 Request entity is too large and could not be delivered to the device.
415 Endpoint does not support media type.
429 Expired request was removed from queue (REQUEST_EXPIRED), device requested deregistration (DEVICE_REMOVED_REGISTRATION), or device was suspended (DEVICE_BLOCKED).
502 Request to the device failed and retry count exceeded. Last retry failed to establish TCP or TLS connection to endpoint.
503 Request to the device failed and retry count exceeded. Last retry failed because endpoint is currently unavailable (NOT_CONNECTED).
504 Request to the device failed and retry count exceeded. Last retry failed, as device did not respond in the time of protocol-specific retransmission logic (TIMEOUT).
") + value = " States whether sending a command to the device succeeded or failed.
Code Description
200 Operation succeeded. The payload contains result of the operation from the device.
400 The device rejected the request, possibly because it does not support the request method. See how the supported methods are [configured for the device resources](https://developer.pelion.com/docs/device-management/current/resources/index.html).
404 The device replied that it does not have the requested resource.
412 Precondition failed and the operation was not executed. The device responded with 4.12 CoAP response code. The device may reject a subscription request with this response code.
413 Request entity is too large and could not be delivered to the device.
415 The device does not support the media type in the request.
429 An expired request was removed from queue (REQUEST_EXPIRED), the device requested deregistration (DEVICE_REMOVED_REGISTRATION), or the device was suspended (DEVICE_BLOCKED). The request was never delivered to the device.
502 The request to the device failed and the retry count was exceeded. The last retry failed to establish TCP or TLS connection to the device.
503 The request to the device failed and the retry count was exceeded. The last retry failed because the device is currently unavailable (NOT_CONNECTED).
504 The request to the device failed and the retry count was exceeded. The last retry failed because the device did not respond in time according to the protocol-specific retransmission logic (TIMEOUT).
") public Integer getStatus() { return status; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColor.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColor.java index 2ee5da9ef..1cfcbcc04 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColor.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColor.java @@ -116,7 +116,23 @@ public enum ReferenceEnum { SUCCESS_FONT_COLOR("success_font_color"), - WARNING_FONT_COLOR("warning_font_color"); + WARNING_FONT_COLOR("warning_font_color"), + + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"); private String value; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorList.java index 1976b1c66..b210e1491 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorList.java @@ -150,12 +150,12 @@ public BrandingColorList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorUpdate.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorUpdate.java new file mode 100644 index 000000000..c42159346 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingColorUpdate.java @@ -0,0 +1,206 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.io.Serializable; + +/** + * BrandingColorUpdate + */ + +public class BrandingColorUpdate implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("color") + private String color = null; + + /** + * Color name. + */ + @JsonAdapter(ReferenceEnum.Adapter.class) + public enum ReferenceEnum { + ERROR_COLOR("error_color"), + + PRIMARY("primary"), + + SECONDARY("secondary"), + + SUCCESS_COLOR("success_color"), + + WARNING_COLOR("warning_color"), + + CANVAS_BACKGROUND("canvas_background"), + + CANVAS_BACKGROUND_FONT_COLOR("canvas_background_font_color"), + + WORKSPACE_BACKGROUND("workspace_background"), + + WORKSPACE_BACKGROUND_FONT_COLOR("workspace_background_font_color"), + + INFO_COLOR("info_color"), + + INFO_FONT_COLOR("info_font_color"), + + PRIMARY_FONT_COLOR("primary_font_color"), + + SECONDARY_FONT_COLOR("secondary_font_color"), + + ERROR_FONT_COLOR("error_font_color"), + + SUCCESS_FONT_COLOR("success_font_color"), + + WARNING_FONT_COLOR("warning_font_color"), + + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"); + + private String value; + + ReferenceEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ReferenceEnum fromValue(String text) { + for (ReferenceEnum b : ReferenceEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ReferenceEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ReferenceEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ReferenceEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("reference") + private ReferenceEnum reference = null; + + public BrandingColorUpdate color(String color) { + this.color = color; + return this; + } + + /** + * The color given as name (purple) or as a hex code. + * + * @return color + **/ + @ApiModelProperty(example = "#f3f93e", value = "The color given as name (purple) or as a hex code.") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + public BrandingColorUpdate reference(ReferenceEnum reference) { + this.reference = reference; + return this; + } + + /** + * Color name. + * + * @return reference + **/ + @ApiModelProperty(required = true, value = "Color name.") + public ReferenceEnum getReference() { + return reference; + } + + public void setReference(ReferenceEnum reference) { + this.reference = reference; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BrandingColorUpdate brandingColorUpdate = (BrandingColorUpdate) o; + return Objects.equals(this.color, brandingColorUpdate.color) + && Objects.equals(this.reference, brandingColorUpdate.reference); + } + + @Override + public int hashCode() { + return Objects.hash(color, reference); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BrandingColorUpdate {\n"); + + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImage.java index 4080f62b9..933b2dfae 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImage.java @@ -91,6 +91,12 @@ public enum ReferenceEnum { BRAND_LOGO_EMAIL("brand_logo_email"), + APP_LOGO_LANDSCAPE("app_logo_landscape"), + + APP_LOGO_PORTRAIT("app_logo_portrait"), + + APP_LOGO_SQUARE("app_logo_square"), + DESKTOP_BACKGROUND_LANDSCAPE("desktop_background_landscape"), DESKTOP_BACKGROUND_SQUARE("desktop_background_square"), diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImageList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImageList.java index 7216ec90b..c1811a7cc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImageList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/BrandingImageList.java @@ -150,12 +150,12 @@ public BrandingImageList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadata.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadata.java index d22af14d0..94850652b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadata.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadata.java @@ -321,7 +321,8 @@ public CampaignDeviceMetadata object(String object) { * * @return object **/ - @ApiModelProperty(value = "The entity name: always 'update-campaign-device-metadata'.") + @ApiModelProperty(example = "update-campaign-device-metadata", + value = "The entity name: always 'update-campaign-device-metadata'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadataPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadataPage.java index 7802842c4..ac7a14b20 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadataPage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignDeviceMetadataPage.java @@ -195,7 +195,7 @@ public CampaignDeviceMetadataPage object(String object) { * * @return object **/ - @ApiModelProperty(value = "The entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "The entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignMetrics.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignMetrics.java index 070bb7506..451890318 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignMetrics.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CampaignMetrics.java @@ -94,7 +94,7 @@ public CampaignMetrics object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'update-campaign-metrics'.") + @ApiModelProperty(example = "update-campaign-metrics", value = "Entity name: always 'update-campaign-metrics'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigListResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigListResponse.java index 9efe798ed..f6b527b3c 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigListResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigListResponse.java @@ -99,11 +99,11 @@ public CertificateIssuerConfigListResponse hasMore(Boolean hasMore) { } /** - * Are there more results available. + * More results are available. * * @return hasMore **/ - @ApiModelProperty(example = "false", value = "Are there more results available.") + @ApiModelProperty(example = "false", value = "More results are available.") public Boolean isHasMore() { return hasMore; } @@ -118,13 +118,13 @@ public CertificateIssuerConfigListResponse limit(Integer limit) { } /** - * How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of - * this range are set to the closest limit. minimum: 2 maximum: 1000 + * The number of results to return (2-1000). Values outside of this range are set to the closest limit. minimum: 2 + * maximum: 1000 * * @return limit **/ @ApiModelProperty(example = "50", - value = "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.") + value = "The number of results to return (2-1000). Values outside of this range are set to the closest limit.") public Integer getLimit() { return limit; } @@ -139,11 +139,11 @@ public CertificateIssuerConfigListResponse object(String object) { } /** - * The type of this API object is a `list`. + * The type of this API object is `list`. * * @return object **/ - @ApiModelProperty(example = "list", value = "The type of this API object is a `list`.") + @ApiModelProperty(example = "list", value = "The type of this API object is `list`.") public String getObject() { return object; } @@ -158,11 +158,11 @@ public CertificateIssuerConfigListResponse order(String order) { } /** - * The creation time based order of the entries. + * Record order based on creation time. * * @return order **/ - @ApiModelProperty(example = "DESC", value = "The creation time based order of the entries.") + @ApiModelProperty(example = "DESC", value = "Record order based on creation time.") public String getOrder() { return order; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigResponse.java index 2ce216091..26ef6eef4 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerConfigResponse.java @@ -105,12 +105,12 @@ public CertificateIssuerConfigResponse certificateIssuerId(String certificateIss } /** - * The ID of the certificate issuer. Null if Device Management internal HSM is used. + * Certificate issuer ID. Null if Device Management internal HSM is used. * * @return certificateIssuerId **/ @ApiModelProperty(example = "01648415a2a30242ac18000500000000", - value = "The ID of the certificate issuer. Null if Device Management internal HSM is used. ") + value = "Certificate issuer ID. Null if Device Management internal HSM is used.") public String getCertificateIssuerId() { return certificateIssuerId; } @@ -163,12 +163,11 @@ public CertificateIssuerConfigResponse id(String id) { } /** - * The ID of the certificate issuer configuration. + * Certificate issuer ID. configuration. * * @return id **/ - @ApiModelProperty(example = "01648415a2a30242ac18000500000000", - value = "The ID of the certificate issuer configuration. ") + @ApiModelProperty(example = "01648415a2a30242ac18000500000000", value = "Certificate issuer ID. configuration.") public String getId() { return id; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfo.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfo.java index 4e792e302..ea8ae31fb 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfo.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfo.java @@ -48,9 +48,9 @@ public class CertificateIssuerInfo implements Serializable { private Map issuerAttributes = null; /** - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must - * provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated - * signing service. The users must provide their own CFSSL host_url and credentials. + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own + * GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You + * must provide your own CFSSL host_url and credentials. */ @JsonAdapter(IssuerTypeEnum.Adapter.class) public enum IssuerTypeEnum { @@ -213,11 +213,11 @@ public CertificateIssuerInfo id(String id) { } /** - * The ID of the certificate issuer. + * Certificate issuer ID. * * @return id **/ - @ApiModelProperty(example = "01234567890ABCDEF01234567890ABCDEF", value = "The ID of the certificate issuer.") + @ApiModelProperty(example = "01234567890ABCDEF01234567890ABCDEF", value = "Certificate issuer ID.") public String getId() { return id; } @@ -240,13 +240,13 @@ public CertificateIssuerInfo putIssuerAttributesItem(String key, String issuerAt } /** - * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be + * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is * empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. * * @return issuerAttributes **/ @ApiModelProperty(example = "{}", - value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. ") + value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.") public Map getIssuerAttributes() { return issuerAttributes; } @@ -261,14 +261,14 @@ public CertificateIssuerInfo issuerType(IssuerTypeEnum issuerType) { } /** - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must - * provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated - * signing service. The users must provide their own CFSSL host_url and credentials. + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own + * GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You + * must provide your own CFSSL host_url and credentials. * * @return issuerType **/ @ApiModelProperty(example = "GLOBAL_SIGN", required = true, - value = "The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. ") + value = "Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You must provide your own CFSSL host_url and credentials.") public IssuerTypeEnum getIssuerType() { return issuerType; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfoListResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfoListResponse.java index cfd5dd663..3336ddb71 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfoListResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerInfoListResponse.java @@ -99,11 +99,11 @@ public CertificateIssuerInfoListResponse hasMore(Boolean hasMore) { } /** - * Are there more results available. + * More results are available. * * @return hasMore **/ - @ApiModelProperty(example = "false", value = "Are there more results available.") + @ApiModelProperty(example = "false", value = "More results are available.") public Boolean isHasMore() { return hasMore; } @@ -118,13 +118,13 @@ public CertificateIssuerInfoListResponse limit(Integer limit) { } /** - * How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of - * this range are set to the closest limit. minimum: 2 maximum: 1000 + * The number of results to return (2-1000). Values outside of this range are set to the closest limit. minimum: 2 + * maximum: 1000 * * @return limit **/ @ApiModelProperty(example = "50", - value = "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.") + value = "The number of results to return (2-1000). Values outside of this range are set to the closest limit.") public Integer getLimit() { return limit; } @@ -139,11 +139,11 @@ public CertificateIssuerInfoListResponse object(String object) { } /** - * The type of this API object is a `list`. + * The type of this API object is `list`. * * @return object **/ - @ApiModelProperty(example = "list", value = "The type of this API object is a `list`.") + @ApiModelProperty(example = "list", value = "The type of this API object is `list`.") public String getObject() { return object; } @@ -158,11 +158,11 @@ public CertificateIssuerInfoListResponse order(String order) { } /** - * The creation time based order of the entries. + * Record order based on creation time. * * @return order **/ - @ApiModelProperty(example = "DESC", value = "The creation time based order of the entries.") + @ApiModelProperty(example = "DESC", value = "Record order based on creation time.") public String getOrder() { return order; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerRequest.java index f8205a938..77a5da7f4 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerRequest.java @@ -41,9 +41,9 @@ public class CertificateIssuerRequest implements Serializable { private Map issuerCredentials = new HashMap(); /** - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must - * provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated - * signing service. The users must provide their own CFSSL host_url and credentials. + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own + * GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You + * must provide your own CFSSL host_url and credentials. */ @JsonAdapter(IssuerTypeEnum.Adapter.class) public enum IssuerTypeEnum { @@ -128,13 +128,13 @@ public CertificateIssuerRequest putIssuerAttributesItem(String key, String issue } /** - * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be + * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is * empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. * * @return issuerAttributes **/ @ApiModelProperty(example = "{}", - value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. ") + value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.") public Map getIssuerAttributes() { return issuerAttributes; } @@ -154,13 +154,13 @@ public CertificateIssuerRequest putIssuerCredentialsItem(String key, String issu } /** - * The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see + * The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see * definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. * * @return issuerCredentials **/ @ApiModelProperty(example = "{}", required = true, - value = "The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. ") + value = "The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.") public Map getIssuerCredentials() { return issuerCredentials; } @@ -175,14 +175,14 @@ public CertificateIssuerRequest issuerType(IssuerTypeEnum issuerType) { } /** - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must - * provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated - * signing service. The users must provide their own CFSSL host_url and credentials. + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own + * GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You + * must provide your own CFSSL host_url and credentials. * * @return issuerType **/ @ApiModelProperty(required = true, - value = "The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. ") + value = "Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You must provide your own CFSSL host_url and credentials.") public IssuerTypeEnum getIssuerType() { return issuerType; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerUpdateRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerUpdateRequest.java index 022445295..562c61655 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerUpdateRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerUpdateRequest.java @@ -71,13 +71,13 @@ public CertificateIssuerUpdateRequest putIssuerAttributesItem(String key, String } /** - * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be + * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is * empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. * * @return issuerAttributes **/ @ApiModelProperty(example = "{}", - value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. ") + value = "General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.") public Map getIssuerAttributes() { return issuerAttributes; } @@ -100,13 +100,13 @@ public CertificateIssuerUpdateRequest putIssuerCredentialsItem(String key, Strin } /** - * The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see + * The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see * definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. * * @return issuerCredentials **/ @ApiModelProperty(example = "{}", - value = "The credentials required for connecting to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. ") + value = "The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.") public Map getIssuerCredentials() { return issuerCredentials; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerVerifyResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerVerifyResponse.java index c2d237f2b..dd7d37e32 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerVerifyResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CertificateIssuerVerifyResponse.java @@ -40,8 +40,8 @@ public CertificateIssuerVerifyResponse message(String message) { * * @return message **/ - @ApiModelProperty(example = "message describing the verification failure", - value = "Provides details in case of failure. ") + @ApiModelProperty(example = "Message describing the verification failure", + value = "Provides details in case of failure.") public String getMessage() { return message; } @@ -60,7 +60,7 @@ public CertificateIssuerVerifyResponse successful(Boolean successful) { * * @return successful **/ - @ApiModelProperty(example = "false", value = "Indicates whether the certificate issuer was verified successfully. ") + @ApiModelProperty(example = "false", value = "Indicates whether the certificate issuer was verified successfully.") public Boolean isSuccessful() { return successful; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAttributes.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAttributes.java index 5fd81015a..8842e208e 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAttributes.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAttributes.java @@ -21,7 +21,7 @@ /** * Describes the attributes required to connect to the CFSSL server. */ -@ApiModel(description = "Describes the attributes required to connect to the CFSSL server. ") +@ApiModel(description = "Describes the attributes required to connect to the CFSSL server.") public class CfsslAttributes implements Serializable { private static final long serialVersionUID = 1L; @@ -45,7 +45,7 @@ public CfsslAttributes cfsslLabel(String cfsslLabel) { * * @return cfsslLabel **/ - @ApiModelProperty(value = "The label that is used by CFSSL when creating the certificate. ") + @ApiModelProperty(value = "The label that is used by CFSSL when creating the certificate.") public String getCfsslLabel() { return cfsslLabel; } @@ -60,11 +60,11 @@ public CfsslAttributes cfsslProfile(String cfsslProfile) { } /** - * The profile that is configured on the CFSSL server and is used by CFSSL when creating the certificate. + * The profile that is configured on the CFSSL server and used by CFSSL when creating the certificate. * * @return cfsslProfile **/ - @ApiModelProperty(value = "The profile that is configured on the CFSSL server and is used by CFSSL when creating the certificate. ") + @ApiModelProperty(value = "The profile that is configured on the CFSSL server and used by CFSSL when creating the certificate.") public String getCfsslProfile() { return cfsslProfile; } @@ -83,7 +83,8 @@ public CfsslAttributes hostUrl(String hostUrl) { * * @return hostUrl **/ - @ApiModelProperty(required = true, value = "The URL to connect to the CFSSL server. ") + @ApiModelProperty(example = "http://my.cfssl.service:5555", required = true, + value = "The URL to connect to the CFSSL server.") public String getHostUrl() { return hostUrl; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAuthCredentials.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAuthCredentials.java index 1e0349dba..d2d3c8e76 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAuthCredentials.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CfsslAuthCredentials.java @@ -21,7 +21,7 @@ /** * Describes the credentials required when using CFSSL authenticated signing. */ -@ApiModel(description = "Describes the credentials required when using CFSSL authenticated signing. ") +@ApiModel(description = "Describes the credentials required when using CFSSL authenticated signing.") public class CfsslAuthCredentials implements Serializable { private static final long serialVersionUID = 1L; @@ -41,7 +41,7 @@ public CfsslAuthCredentials hmacHexKey(String hmacHexKey) { * @return hmacHexKey **/ @ApiModelProperty(example = "0010203ABCD708EF", required = true, - value = "The key that is used to compute the HMAC of the request using the HMAC-SHA-256 algorithm. Must contain an even number of hexadecimal characters. ") + value = "The key that is used to compute the HMAC of the request using the HMAC-SHA-256 algorithm. Must contain an even number of hexadecimal characters.") public String getHmacHexKey() { return hmacHexKey; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateCertificateIssuerConfig.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateCertificateIssuerConfig.java index c258ab46f..db5f0fc9d 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateCertificateIssuerConfig.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateCertificateIssuerConfig.java @@ -36,12 +36,11 @@ public CreateCertificateIssuerConfig certificateIssuerId(String certificateIssue } /** - * The ID of the certificate issuer. + * Certificate issuer ID. * * @return certificateIssuerId **/ - @ApiModelProperty(example = "01648415a2a30242ac18000500000000", required = true, - value = "The ID of the certificate issuer. ") + @ApiModelProperty(example = "01648415a2a30242ac18000500000000", required = true, value = "Certificate issuer ID.") public String getCertificateIssuerId() { return certificateIssuerId; } @@ -62,7 +61,7 @@ public CreateCertificateIssuerConfig reference(String reference) { * @return reference **/ @ApiModelProperty(example = "customer.dlms", required = true, - value = "The certificate name, as created in the factory, to which the certificate issuer configuration applies. The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP. ") + value = "The certificate name, as created in the factory, to which the certificate issuer configuration applies. The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP.") public String getReference() { return reference; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorRequest.java new file mode 100644 index 000000000..46eaae5eb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorRequest.java @@ -0,0 +1,86 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * CreateTrustAnchorRequest + */ + +public class CreateTrustAnchorRequest implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("description") + private String description = null; + + public CreateTrustAnchorRequest description(String description) { + this.description = description; + return this; + } + + /** + * The description of the new trust anchor key pair. + * + * @return description + **/ + @ApiModelProperty(required = true, value = "The description of the new trust anchor key pair.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTrustAnchorRequest createTrustAnchorRequest = (CreateTrustAnchorRequest) o; + return Objects.equals(this.description, createTrustAnchorRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTrustAnchorRequest {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorResponse.java new file mode 100644 index 000000000..9b3a2a1c5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/CreateTrustAnchorResponse.java @@ -0,0 +1,280 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * CreateTrustAnchorResponse + */ + +public class CreateTrustAnchorResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("fingerprint") + private byte[] fingerprint = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("public_key") + private byte[] publicKey = null; + + @SerializedName("public_key_der") + private byte[] publicKeyDer = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + public CreateTrustAnchorResponse createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC time. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Creation UTC time.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public CreateTrustAnchorResponse description(String description) { + this.description = description; + return this; + } + + /** + * Notes about the trust anchor. + * + * @return description + **/ + @ApiModelProperty(value = "Notes about the trust anchor.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CreateTrustAnchorResponse etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Entity instance signature, 1 or Unix timestamp of last customer update. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "Entity instance signature, 1 or Unix timestamp of last customer update.") + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public CreateTrustAnchorResponse fingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + return this; + } + + /** + * The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key + * as a SHA256 hash in Base64-encoded DER format. + * + * @return fingerprint + **/ + @ApiModelProperty(value = "The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format.") + public byte[] getFingerprint() { + return fingerprint; + } + + public void setFingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + } + + public CreateTrustAnchorResponse id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the entity. + * + * @return id + **/ + @ApiModelProperty(example = "01612df56f3b0a580a010fc700000000", value = "The ID of the entity.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreateTrustAnchorResponse object(String object) { + this.object = object; + return this; + } + + /** + * The API resource entity + * + * @return object + **/ + @ApiModelProperty(example = "trust-anchor", value = "The API resource entity") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public CreateTrustAnchorResponse publicKey(byte[] publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The generated trust anchor public key in PEM format. + * + * @return publicKey + **/ + @ApiModelProperty(value = "The generated trust anchor public key in PEM format.") + public byte[] getPublicKey() { + return publicKey; + } + + public void setPublicKey(byte[] publicKey) { + this.publicKey = publicKey; + } + + public CreateTrustAnchorResponse publicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + return this; + } + + /** + * The generated trust anchor public key in Base64-encoded DER format. + * + * @return publicKeyDer + **/ + @ApiModelProperty(value = "The generated trust anchor public key in Base64-encoded DER format.") + public byte[] getPublicKeyDer() { + return publicKeyDer; + } + + public void setPublicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + } + + public CreateTrustAnchorResponse updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Update UTC time. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Update UTC time.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTrustAnchorResponse createTrustAnchorResponse = (CreateTrustAnchorResponse) o; + return Objects.equals(this.createdAt, createTrustAnchorResponse.createdAt) + && Objects.equals(this.description, createTrustAnchorResponse.description) + && Objects.equals(this.etag, createTrustAnchorResponse.etag) + && Objects.equals(this.fingerprint, createTrustAnchorResponse.fingerprint) + && Objects.equals(this.id, createTrustAnchorResponse.id) + && Objects.equals(this.object, createTrustAnchorResponse.object) + && Objects.equals(this.publicKey, createTrustAnchorResponse.publicKey) + && Objects.equals(this.publicKeyDer, createTrustAnchorResponse.publicKeyDer) + && Objects.equals(this.updatedAt, createTrustAnchorResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, description, etag, fingerprint, id, object, publicKey, publicKeyDer, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTrustAnchorResponse {\n"); + + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" publicKeyDer: ").append(toIndentedString(publicKeyDer)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeveloperCertificateRequestData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeveloperCertificateRequestData.java index 2c51f2a01..0c718df55 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeveloperCertificateRequestData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeveloperCertificateRequestData.java @@ -37,11 +37,11 @@ public DeveloperCertificateRequestData description(String description) { /** * Description for the developer certificate. Maximum 500 characters. Please see - * [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). + * [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). * * @return description **/ - @ApiModelProperty(value = "Description for the developer certificate. Maximum 500 characters. Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq).") + @ApiModelProperty(value = "Description for the developer certificate. Maximum 500 characters. Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/).") public String getDescription() { return description; } @@ -57,12 +57,12 @@ public DeveloperCertificateRequestData name(String name) { /** * Name of the developer certificate. Must be unique. Maximum 100 characters. Please see - * [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). + * [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). * * @return name **/ @ApiModelProperty(required = true, - value = "Name of the developer certificate. Must be unique. Maximum 100 characters. Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq).") + value = "Name of the developer certificate. Must be unique. Maximum 100 characters. Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/).") public String getName() { return name; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceData.java index 4c4cb4ba0..7d4052062 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceData.java @@ -50,6 +50,9 @@ public class DeviceData implements Serializable { @SerializedName("ca_id") private String caId = null; + @SerializedName("component_attributes") + private Map componentAttributes = null; + @SerializedName("connector_expiration_date") private LocalDate connectorExpirationDate = null; @@ -170,7 +173,9 @@ public DeployedStateEnum read(final JsonReader jsonReader) throws IOException { private DateTime lastSystemSuspendedUpdatedAt = null; /** - * The lifecycle status of the device. + * The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device Management. * + * Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, + * 'suspended'. */ @JsonAdapter(LifecycleStatusEnum.Adapter.class) public enum LifecycleStatusEnum { @@ -226,7 +231,7 @@ public LifecycleStatusEnum read(final JsonReader jsonReader) throws IOException private DateTime manifestTimestamp = null; /** - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. */ @JsonAdapter(MechanismEnum.Adapter.class) public enum MechanismEnum { @@ -281,6 +286,9 @@ public MechanismEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("name") private String name = null; + @SerializedName("net_id") + private String netId = ""; + @SerializedName("object") private String object = null; @@ -291,7 +299,15 @@ public MechanismEnum read(final JsonReader jsonReader) throws IOException { private String serialNumber = null; /** - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet bootstrapped or + * connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the first time. This state is + * set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to + * bootstrap again after few seconds. * Bootstrapped: The device has bootstrapped, and has credentials to connect to + * Device Management. * Registered: The device has registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. */ @JsonAdapter(StateEnum.Adapter.class) public enum StateEnum { @@ -451,6 +467,35 @@ public void setCaId(String caId) { this.caId = caId; } + public DeviceData componentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + return this; + } + + public DeviceData putComponentAttributesItem(String key, String componentAttributesItem) { + if (this.componentAttributes == null) { + this.componentAttributes = new HashMap(); + } + this.componentAttributes.put(key, componentAttributesItem); + return this; + } + + /** + * Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are + * limited to 128 characters. Updating this field replaces existing contents. + * + * @return componentAttributes + **/ + @ApiModelProperty(example = "{\"key\":\"value\"}", + value = "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.") + public Map getComponentAttributes() { + return componentAttributes; + } + + public void setComponentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + } + public DeviceData connectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; return this; @@ -567,7 +612,7 @@ public DeviceData description(String description) { * * @return description **/ - @ApiModelProperty(example = "description", value = "The description of the device.") + @ApiModelProperty(example = "Temperature measuring device", value = "The description of the device.") public String getDescription() { return description; } @@ -640,12 +685,13 @@ public void setDeviceKey(String deviceKey) { } /** - * The endpoint name given to the device. + * The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory + * tool. * * @return endpointName **/ @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", - value = "The endpoint name given to the device.") + value = "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.") public String getEndpointName() { return endpointName; } @@ -760,11 +806,12 @@ public DeviceData hostGateway(String hostGateway) { } /** - * The ID of the host gateway, if appropriate. + * The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set. * * @return hostGateway **/ - @ApiModelProperty(example = "", value = "The ID of the host gateway, if appropriate.") + @ApiModelProperty(example = "", + value = "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.") public String getHostGateway() { return hostGateway; } @@ -937,11 +984,14 @@ public DeviceData lifecycleStatus(LifecycleStatusEnum lifecycleStatus) { } /** - * The lifecycle status of the device. + * The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device Management. * + * Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, + * 'suspended'. * * @return lifecycleStatus **/ - @ApiModelProperty(example = "enabled", value = "The lifecycle status of the device.") + @ApiModelProperty(example = "enabled", + value = "The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device Management. * Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.") public LifecycleStatusEnum getLifecycleStatus() { return lifecycleStatus; } @@ -994,11 +1044,11 @@ public DeviceData mechanism(MechanismEnum mechanism) { } /** - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. * * @return mechanism **/ - @ApiModelProperty(value = "The ID of the channel used to communicate with the device.") + @ApiModelProperty(value = "NOT USED: The ID of the channel used to communicate with the device.") public MechanismEnum getMechanism() { return mechanism; } @@ -1013,11 +1063,11 @@ public DeviceData mechanismUrl(String mechanismUrl) { } /** - * The address of the connector to use. + * NOT USED: The address of the connector to use. * * @return mechanismUrl **/ - @ApiModelProperty(example = "", value = "The address of the connector to use.") + @ApiModelProperty(example = "", value = "NOT USED: The address of the connector to use.") public String getMechanismUrl() { return mechanismUrl; } @@ -1032,11 +1082,12 @@ public DeviceData name(String name) { } /** - * The name of the device. + * The name given by the web application for the device. Device itself provides only the endpoint_name. * * @return name **/ - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "The name of the device.") + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", + value = "The name given by the web application for the device. Device itself provides only the endpoint_name.") public String getName() { return name; } @@ -1045,6 +1096,26 @@ public void setName(String name) { this.name = name; } + public DeviceData netId(String netId) { + this.netId = netId; + return this; + } + + /** + * Private network identifier. Used to group nodes connected to a specific border router. + * + * @return netId + **/ + @ApiModelProperty(example = "0000:0000:0000:0000:0000:0000:0000:0000", + value = "Private network identifier. Used to group nodes connected to a specific border router.") + public String getNetId() { + return netId; + } + + public void setNetId(String netId) { + this.netId = netId; + } + public DeviceData object(String object) { this.object = object; return this; @@ -1070,11 +1141,11 @@ public DeviceData operatorSuspended(Boolean operatorSuspended) { } /** - * Is the device suspended by the operator? + * Device has been suspended by operator. * * @return operatorSuspended **/ - @ApiModelProperty(value = "Is the device suspended by the operator?") + @ApiModelProperty(value = "Device has been suspended by operator.") public Boolean isOperatorSuspended() { return operatorSuspended; } @@ -1089,11 +1160,14 @@ public DeviceData serialNumber(String serialNumber) { } /** - * The serial number of the device. + * The [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. The serial number is injected by the factory tool during manufacturing. * * @return serialNumber **/ - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "The serial number of the device.") + @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", + value = "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.") public String getSerialNumber() { return serialNumber; } @@ -1108,11 +1182,19 @@ public DeviceData state(StateEnum state) { } /** - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet bootstrapped or + * connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the first time. This state is + * set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to + * bootstrap again after few seconds. * Bootstrapped: The device has bootstrapped, and has credentials to connect to + * Device Management. * Registered: The device has registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. * * @return state **/ - @ApiModelProperty(value = "The current state of the device.") + @ApiModelProperty(value = "The current state of the device. * Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds. * Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management. * Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources. * Deregistered: The device has requested deregistration, or its registration has expired.") public StateEnum getState() { return state; } @@ -1146,11 +1228,11 @@ public DeviceData updatedAt(DateTime updatedAt) { } /** - * The time the object was updated. + * The time this data object was updated. * * @return updatedAt **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time the object was updated.") + @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time this data object was updated.") public DateTime getUpdatedAt() { return updatedAt; } @@ -1192,6 +1274,7 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.bootstrapExpirationDate, deviceData.bootstrapExpirationDate) && Objects.equals(this.bootstrappedTimestamp, deviceData.bootstrappedTimestamp) && Objects.equals(this.caId, deviceData.caId) + && Objects.equals(this.componentAttributes, deviceData.componentAttributes) && Objects.equals(this.connectorExpirationDate, deviceData.connectorExpirationDate) && Objects.equals(this.createdAt, deviceData.createdAt) && Objects.equals(this.customAttributes, deviceData.customAttributes) @@ -1220,7 +1303,8 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.manifestTimestamp, deviceData.manifestTimestamp) && Objects.equals(this.mechanism, deviceData.mechanism) && Objects.equals(this.mechanismUrl, deviceData.mechanismUrl) - && Objects.equals(this.name, deviceData.name) && Objects.equals(this.object, deviceData.object) + && Objects.equals(this.name, deviceData.name) && Objects.equals(this.netId, deviceData.netId) + && Objects.equals(this.object, deviceData.object) && Objects.equals(this.operatorSuspended, deviceData.operatorSuspended) && Objects.equals(this.serialNumber, deviceData.serialNumber) && Objects.equals(this.state, deviceData.state) @@ -1232,13 +1316,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash(accountId, autoUpdate, bootstrapExpirationDate, bootstrappedTimestamp, caId, - connectorExpirationDate, createdAt, customAttributes, deployedState, deployment, - description, deviceClass, deviceExecutionMode, deviceKey, endpointName, endpointType, - enrolmentListTimestamp, etag, firmwareChecksum, groups, hostGateway, id, issuerFingerprint, - lastOperatorSuspendedCategory, lastOperatorSuspendedDescription, + componentAttributes, connectorExpirationDate, createdAt, customAttributes, deployedState, + deployment, description, deviceClass, deviceExecutionMode, deviceKey, endpointName, + endpointType, enrolmentListTimestamp, etag, firmwareChecksum, groups, hostGateway, id, + issuerFingerprint, lastOperatorSuspendedCategory, lastOperatorSuspendedDescription, lastOperatorSuspendedUpdatedAt, lastSystemSuspendedCategory, lastSystemSuspendedDescription, lastSystemSuspendedUpdatedAt, lifecycleStatus, manifest, manifestTimestamp, mechanism, - mechanismUrl, name, object, operatorSuspended, serialNumber, state, systemSuspended, + mechanismUrl, name, netId, object, operatorSuspended, serialNumber, state, systemSuspended, updatedAt, vendorId); } @@ -1252,6 +1336,7 @@ public String toString() { sb.append(" bootstrapExpirationDate: ").append(toIndentedString(bootstrapExpirationDate)).append("\n"); sb.append(" bootstrappedTimestamp: ").append(toIndentedString(bootstrappedTimestamp)).append("\n"); sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); + sb.append(" componentAttributes: ").append(toIndentedString(componentAttributes)).append("\n"); sb.append(" connectorExpirationDate: ").append(toIndentedString(connectorExpirationDate)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" customAttributes: ").append(toIndentedString(customAttributes)).append("\n"); @@ -1288,6 +1373,7 @@ public String toString() { sb.append(" mechanism: ").append(toIndentedString(mechanism)).append("\n"); sb.append(" mechanismUrl: ").append(toIndentedString(mechanismUrl)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" netId: ").append(toIndentedString(netId)).append("\n"); sb.append(" object: ").append(toIndentedString(object)).append("\n"); sb.append(" operatorSuspended: ").append(toIndentedString(operatorSuspended)).append("\n"); sb.append(" serialNumber: ").append(toIndentedString(serialNumber)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceDataPutRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceDataPutRequest.java index bcfe014c5..e3a543b11 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceDataPutRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceDataPutRequest.java @@ -78,11 +78,13 @@ public DeviceDataPutRequest caId(String caId) { } /** - * The certificate issuer's ID. + * The certificate issuer's ID. WARNING: This value comes from the device, and should not be changed via the + * API. * * @return caId **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "The certificate issuer's ID.") + @ApiModelProperty(example = "00000000000000000000000000000000", + value = "The certificate issuer's ID. WARNING: This value comes from the device, and should not be changed via the API.") public String getCaId() { return caId; } @@ -145,12 +147,13 @@ public DeviceDataPutRequest deviceKey(String deviceKey) { } /** - * The fingerprint of the device certificate. + * The fingerprint of the device certificate. WARNING: This value comes from the device, and should not be changed + * via the API. * * @return deviceKey **/ @ApiModelProperty(example = "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", - value = "The fingerprint of the device certificate.") + value = "The fingerprint of the device certificate. WARNING: This value comes from the device, and should not be changed via the API.") public String getDeviceKey() { return deviceKey; } @@ -160,12 +163,13 @@ public void setDeviceKey(String deviceKey) { } /** - * The endpoint name given to the device. + * The endpoint name given to the device. WARNING: This value comes from the device, and should not be changed via + * the API. * * @return endpointName **/ @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", - value = "The endpoint name given to the device.") + value = "The endpoint name given to the device. WARNING: This value comes from the device, and should not be changed via the API.") public String getEndpointName() { return endpointName; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEqNeqFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEqNeqFilter.java index 7b3a3196d..7bf3d0f42 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEqNeqFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEqNeqFilter.java @@ -18,6 +18,7 @@ import java.util.HashMap; import java.util.Map; import org.joda.time.DateTime; +import org.joda.time.LocalDate; import java.io.Serializable; /** @@ -34,7 +35,7 @@ public class DeviceEqNeqFilter implements Serializable { private Boolean autoUpdate = null; @SerializedName("bootstrap_expiration_date") - private DateTime bootstrapExpirationDate = null; + private LocalDate bootstrapExpirationDate = null; @SerializedName("bootstrapped_timestamp") private DateTime bootstrappedTimestamp = null; @@ -42,8 +43,11 @@ public class DeviceEqNeqFilter implements Serializable { @SerializedName("ca_id") private String caId = null; + @SerializedName("component_attributes") + private Map componentAttributes = null; + @SerializedName("connector_expiration_date") - private DateTime connectorExpirationDate = null; + private LocalDate connectorExpirationDate = null; @SerializedName("created_at") private DateTime createdAt = null; @@ -155,7 +159,7 @@ public void setAutoUpdate(Boolean autoUpdate) { this.autoUpdate = autoUpdate; } - public DeviceEqNeqFilter bootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public DeviceEqNeqFilter bootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; return this; } @@ -165,12 +169,12 @@ public DeviceEqNeqFilter bootstrapExpirationDate(DateTime bootstrapExpirationDat * * @return bootstrapExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getBootstrapExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getBootstrapExpirationDate() { return bootstrapExpirationDate; } - public void setBootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public void setBootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; } @@ -212,7 +216,34 @@ public void setCaId(String caId) { this.caId = caId; } - public DeviceEqNeqFilter connectorExpirationDate(DateTime connectorExpirationDate) { + public DeviceEqNeqFilter componentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + return this; + } + + public DeviceEqNeqFilter putComponentAttributesItem(String key, String componentAttributesItem) { + if (this.componentAttributes == null) { + this.componentAttributes = new HashMap(); + } + this.componentAttributes.put(key, componentAttributesItem); + return this; + } + + /** + * Get componentAttributes + * + * @return componentAttributes + **/ + @ApiModelProperty(value = "") + public Map getComponentAttributes() { + return componentAttributes; + } + + public void setComponentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + } + + public DeviceEqNeqFilter connectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; return this; } @@ -222,12 +253,12 @@ public DeviceEqNeqFilter connectorExpirationDate(DateTime connectorExpirationDat * * @return connectorExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getConnectorExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getConnectorExpirationDate() { return connectorExpirationDate; } - public void setConnectorExpirationDate(DateTime connectorExpirationDate) { + public void setConnectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; } @@ -709,6 +740,7 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.bootstrapExpirationDate, deviceEqNeqFilter.bootstrapExpirationDate) && Objects.equals(this.bootstrappedTimestamp, deviceEqNeqFilter.bootstrappedTimestamp) && Objects.equals(this.caId, deviceEqNeqFilter.caId) + && Objects.equals(this.componentAttributes, deviceEqNeqFilter.componentAttributes) && Objects.equals(this.connectorExpirationDate, deviceEqNeqFilter.connectorExpirationDate) && Objects.equals(this.createdAt, deviceEqNeqFilter.createdAt) && Objects.equals(this.customAttributes, deviceEqNeqFilter.customAttributes) @@ -739,9 +771,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash(accountId, autoUpdate, bootstrapExpirationDate, bootstrappedTimestamp, caId, - connectorExpirationDate, createdAt, customAttributes, deployedState, deployment, - description, deviceClass, deviceExecutionMode, deviceKey, endpointName, endpointType, - enrolmentListTimestamp, etag, firmwareChecksum, hostGateway, id, manifest, + componentAttributes, connectorExpirationDate, createdAt, customAttributes, deployedState, + deployment, description, deviceClass, deviceExecutionMode, deviceKey, endpointName, + endpointType, enrolmentListTimestamp, etag, firmwareChecksum, hostGateway, id, manifest, manifestTimestamp, mechanism, mechanismUrl, name, serialNumber, state, updatedAt, vendorId); } @@ -755,6 +787,7 @@ public String toString() { sb.append(" bootstrapExpirationDate: ").append(toIndentedString(bootstrapExpirationDate)).append("\n"); sb.append(" bootstrappedTimestamp: ").append(toIndentedString(bootstrappedTimestamp)).append("\n"); sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); + sb.append(" componentAttributes: ").append(toIndentedString(componentAttributes)).append("\n"); sb.append(" connectorExpirationDate: ").append(toIndentedString(connectorExpirationDate)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" customAttributes: ").append(toIndentedString(customAttributes)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEventData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEventData.java index 17c568024..96c75103f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEventData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceEventData.java @@ -241,12 +241,12 @@ public DeviceEventData eventTypeCategory(String eventTypeCategory) { } /** - * Category code which groups the event type by a summary category. + * Category code that groups the event type by a summary category. * * @return eventTypeCategory **/ @ApiModelProperty(example = "FAIL_MANIFEST_REJECTED", - value = "Category code which groups the event type by a summary category.") + value = "Category code that groups the event type by a summary category.") public String getEventTypeCategory() { return eventTypeCategory; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGroup.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGroup.java index ac264e45e..f058b24fd 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGroup.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGroup.java @@ -60,11 +60,11 @@ public DeviceGroup createdAt(DateTime createdAt) { } /** - * The time the campaign was created. + * The time the group was created. * * @return createdAt **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time the campaign was created.") + @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time the group was created.") public DateTime getCreatedAt() { return createdAt; } @@ -222,11 +222,11 @@ public DeviceGroup updatedAt(DateTime updatedAt) { } /** - * The time the object was updated. + * The time this object was updated. * * @return updatedAt **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time the object was updated.") + @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "The time this object was updated.") public DateTime getUpdatedAt() { return updatedAt; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGteLteFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGteLteFilter.java index 6cefacce3..4a4d05f71 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGteLteFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceGteLteFilter.java @@ -16,6 +16,7 @@ import com.google.gson.annotations.SerializedName; import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime; +import org.joda.time.LocalDate; import java.io.Serializable; /** @@ -26,13 +27,13 @@ public class DeviceGteLteFilter implements Serializable { private static final long serialVersionUID = 1L; @SerializedName("bootstrap_expiration_date") - private DateTime bootstrapExpirationDate = null; + private LocalDate bootstrapExpirationDate = null; @SerializedName("bootstrapped_timestamp") private DateTime bootstrappedTimestamp = null; @SerializedName("connector_expiration_date") - private DateTime connectorExpirationDate = null; + private LocalDate connectorExpirationDate = null; @SerializedName("created_at") private DateTime createdAt = null; @@ -49,7 +50,7 @@ public class DeviceGteLteFilter implements Serializable { @SerializedName("updated_at") private DateTime updatedAt = null; - public DeviceGteLteFilter bootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public DeviceGteLteFilter bootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; return this; } @@ -59,12 +60,12 @@ public DeviceGteLteFilter bootstrapExpirationDate(DateTime bootstrapExpirationDa * * @return bootstrapExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getBootstrapExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getBootstrapExpirationDate() { return bootstrapExpirationDate; } - public void setBootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public void setBootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; } @@ -87,7 +88,7 @@ public void setBootstrappedTimestamp(DateTime bootstrappedTimestamp) { this.bootstrappedTimestamp = bootstrappedTimestamp; } - public DeviceGteLteFilter connectorExpirationDate(DateTime connectorExpirationDate) { + public DeviceGteLteFilter connectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; return this; } @@ -97,12 +98,12 @@ public DeviceGteLteFilter connectorExpirationDate(DateTime connectorExpirationDa * * @return connectorExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getConnectorExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getConnectorExpirationDate() { return connectorExpirationDate; } - public void setConnectorExpirationDate(DateTime connectorExpirationDate) { + public void setConnectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceInNinFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceInNinFilter.java index 156f5e5bb..7111d940b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceInNinFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceInNinFilter.java @@ -18,6 +18,7 @@ import java.util.HashMap; import java.util.Map; import org.joda.time.DateTime; +import org.joda.time.LocalDate; import java.io.Serializable; /** @@ -34,7 +35,7 @@ public class DeviceInNinFilter implements Serializable { private Boolean autoUpdate = null; @SerializedName("bootstrap_expiration_date") - private DateTime bootstrapExpirationDate = null; + private LocalDate bootstrapExpirationDate = null; @SerializedName("bootstrapped_timestamp") private DateTime bootstrappedTimestamp = null; @@ -42,8 +43,11 @@ public class DeviceInNinFilter implements Serializable { @SerializedName("ca_id") private String caId = null; + @SerializedName("component_attributes") + private Map componentAttributes = null; + @SerializedName("connector_expiration_date") - private DateTime connectorExpirationDate = null; + private LocalDate connectorExpirationDate = null; @SerializedName("created_at") private DateTime createdAt = null; @@ -155,7 +159,7 @@ public void setAutoUpdate(Boolean autoUpdate) { this.autoUpdate = autoUpdate; } - public DeviceInNinFilter bootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public DeviceInNinFilter bootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; return this; } @@ -165,12 +169,12 @@ public DeviceInNinFilter bootstrapExpirationDate(DateTime bootstrapExpirationDat * * @return bootstrapExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getBootstrapExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getBootstrapExpirationDate() { return bootstrapExpirationDate; } - public void setBootstrapExpirationDate(DateTime bootstrapExpirationDate) { + public void setBootstrapExpirationDate(LocalDate bootstrapExpirationDate) { this.bootstrapExpirationDate = bootstrapExpirationDate; } @@ -212,7 +216,34 @@ public void setCaId(String caId) { this.caId = caId; } - public DeviceInNinFilter connectorExpirationDate(DateTime connectorExpirationDate) { + public DeviceInNinFilter componentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + return this; + } + + public DeviceInNinFilter putComponentAttributesItem(String key, String componentAttributesItem) { + if (this.componentAttributes == null) { + this.componentAttributes = new HashMap(); + } + this.componentAttributes.put(key, componentAttributesItem); + return this; + } + + /** + * Get componentAttributes + * + * @return componentAttributes + **/ + @ApiModelProperty(value = "") + public Map getComponentAttributes() { + return componentAttributes; + } + + public void setComponentAttributes(Map componentAttributes) { + this.componentAttributes = componentAttributes; + } + + public DeviceInNinFilter connectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; return this; } @@ -222,12 +253,12 @@ public DeviceInNinFilter connectorExpirationDate(DateTime connectorExpirationDat * * @return connectorExpirationDate **/ - @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", value = "") - public DateTime getConnectorExpirationDate() { + @ApiModelProperty(example = "2017-05-22", value = "") + public LocalDate getConnectorExpirationDate() { return connectorExpirationDate; } - public void setConnectorExpirationDate(DateTime connectorExpirationDate) { + public void setConnectorExpirationDate(LocalDate connectorExpirationDate) { this.connectorExpirationDate = connectorExpirationDate; } @@ -709,6 +740,7 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.bootstrapExpirationDate, deviceInNinFilter.bootstrapExpirationDate) && Objects.equals(this.bootstrappedTimestamp, deviceInNinFilter.bootstrappedTimestamp) && Objects.equals(this.caId, deviceInNinFilter.caId) + && Objects.equals(this.componentAttributes, deviceInNinFilter.componentAttributes) && Objects.equals(this.connectorExpirationDate, deviceInNinFilter.connectorExpirationDate) && Objects.equals(this.createdAt, deviceInNinFilter.createdAt) && Objects.equals(this.customAttributes, deviceInNinFilter.customAttributes) @@ -739,9 +771,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash(accountId, autoUpdate, bootstrapExpirationDate, bootstrappedTimestamp, caId, - connectorExpirationDate, createdAt, customAttributes, deployedState, deployment, - description, deviceClass, deviceExecutionMode, deviceKey, endpointName, endpointType, - enrolmentListTimestamp, etag, firmwareChecksum, hostGateway, id, manifest, + componentAttributes, connectorExpirationDate, createdAt, customAttributes, deployedState, + deployment, description, deviceClass, deviceExecutionMode, deviceKey, endpointName, + endpointType, enrolmentListTimestamp, etag, firmwareChecksum, hostGateway, id, manifest, manifestTimestamp, mechanism, mechanismUrl, name, serialNumber, state, updatedAt, vendorId); } @@ -755,6 +787,7 @@ public String toString() { sb.append(" bootstrapExpirationDate: ").append(toIndentedString(bootstrapExpirationDate)).append("\n"); sb.append(" bootstrappedTimestamp: ").append(toIndentedString(bootstrappedTimestamp)).append("\n"); sb.append(" caId: ").append(toIndentedString(caId)).append("\n"); + sb.append(" componentAttributes: ").append(toIndentedString(componentAttributes)).append("\n"); sb.append(" connectorExpirationDate: ").append(toIndentedString(connectorExpirationDate)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" customAttributes: ").append(toIndentedString(customAttributes)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQuery.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQuery.java index 9143f5cfe..ef16fa7f8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQuery.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQuery.java @@ -52,12 +52,12 @@ public DeviceQuery createdAt(DateTime createdAt) { } /** - * The timestamp of when the device was created in Device Directory. + * The timestamp of when the query was created. * * @return createdAt **/ @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", required = true, - value = "The timestamp of when the device was created in Device Directory.") + value = "The timestamp of when the query was created.") public DateTime getCreatedAt() { return createdAt; } @@ -96,7 +96,7 @@ public DeviceQuery id(String id) { * * @return id **/ - @ApiModelProperty(example = "00000000000000000000000000000000", required = true, value = "The ID of the query.") + @ApiModelProperty(example = "015c30671894000000000001001001e9", required = true, value = "The ID of the query.") public String getId() { return id; } @@ -115,7 +115,7 @@ public DeviceQuery name(String name) { * * @return name **/ - @ApiModelProperty(example = "00000000000000000000000000000000", required = true, value = "The name of the query.") + @ApiModelProperty(example = "example-stored-device-query", required = true, value = "The name of the query.") public String getName() { return name; } @@ -153,7 +153,7 @@ public DeviceQuery query(String query) { * * @return query **/ - @ApiModelProperty(example = "id=00000000000000000000000000000000", required = true, value = "The device query.") + @ApiModelProperty(example = "id=0158d38771f70000000000010010038c", required = true, value = "The device query.") public String getQuery() { return query; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQueryPostPutRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQueryPostPutRequest.java index dc11f44d9..1c2fac44e 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQueryPostPutRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceQueryPostPutRequest.java @@ -55,11 +55,14 @@ public DeviceQueryPostPutRequest query(String query) { } /** - * The device query. + * The device query to store. A query is made of key/value pairs separated by ampersands (`&`). The + * key defines the field name to filter by when applying the query. Refer to the endpoint documentation before + * applying a filter, as supported fields vary between endpoints. * * @return query **/ - @ApiModelProperty(required = true, value = "The device query.") + @ApiModelProperty(required = true, + value = "The device query to store. A query is made of key/value pairs separated by ampersands (`&`). The key defines the field name to filter by when applying the query. Refer to the endpoint documentation before applying a filter, as supported fields vary between endpoints.") public String getQuery() { return query; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceToPelionMessagesCounter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceToPelionMessagesCounter.java new file mode 100644 index 000000000..9c5454d54 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/DeviceToPelionMessagesCounter.java @@ -0,0 +1,257 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * The number of messages from the device to Device Management. + */ +@ApiModel(description = "The number of messages from the device to Device Management.") + +public class DeviceToPelionMessagesCounter implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("bootstrap_requests") + private Integer bootstrapRequests = null; + + @SerializedName("est_requests") + private Integer estRequests = null; + + @SerializedName("observations") + private Integer observations = null; + + @SerializedName("proxy_responses") + private Integer proxyResponses = null; + + @SerializedName("registration_deletes") + private Integer registrationDeletes = null; + + @SerializedName("registration_updates") + private Integer registrationUpdates = null; + + @SerializedName("registrations") + private Integer registrations = null; + + @SerializedName("total_count") + private Long totalCount = null; + + public DeviceToPelionMessagesCounter bootstrapRequests(Integer bootstrapRequests) { + this.bootstrapRequests = bootstrapRequests; + return this; + } + + /** + * Get bootstrapRequests + * + * @return bootstrapRequests + **/ + @ApiModelProperty(required = true, value = "") + public Integer getBootstrapRequests() { + return bootstrapRequests; + } + + public void setBootstrapRequests(Integer bootstrapRequests) { + this.bootstrapRequests = bootstrapRequests; + } + + public DeviceToPelionMessagesCounter estRequests(Integer estRequests) { + this.estRequests = estRequests; + return this; + } + + /** + * Get estRequests + * + * @return estRequests + **/ + @ApiModelProperty(required = true, value = "") + public Integer getEstRequests() { + return estRequests; + } + + public void setEstRequests(Integer estRequests) { + this.estRequests = estRequests; + } + + public DeviceToPelionMessagesCounter observations(Integer observations) { + this.observations = observations; + return this; + } + + /** + * Get observations + * + * @return observations + **/ + @ApiModelProperty(required = true, value = "") + public Integer getObservations() { + return observations; + } + + public void setObservations(Integer observations) { + this.observations = observations; + } + + public DeviceToPelionMessagesCounter proxyResponses(Integer proxyResponses) { + this.proxyResponses = proxyResponses; + return this; + } + + /** + * Get proxyResponses + * + * @return proxyResponses + **/ + @ApiModelProperty(required = true, value = "") + public Integer getProxyResponses() { + return proxyResponses; + } + + public void setProxyResponses(Integer proxyResponses) { + this.proxyResponses = proxyResponses; + } + + public DeviceToPelionMessagesCounter registrationDeletes(Integer registrationDeletes) { + this.registrationDeletes = registrationDeletes; + return this; + } + + /** + * Get registrationDeletes + * + * @return registrationDeletes + **/ + @ApiModelProperty(required = true, value = "") + public Integer getRegistrationDeletes() { + return registrationDeletes; + } + + public void setRegistrationDeletes(Integer registrationDeletes) { + this.registrationDeletes = registrationDeletes; + } + + public DeviceToPelionMessagesCounter registrationUpdates(Integer registrationUpdates) { + this.registrationUpdates = registrationUpdates; + return this; + } + + /** + * Get registrationUpdates + * + * @return registrationUpdates + **/ + @ApiModelProperty(required = true, value = "") + public Integer getRegistrationUpdates() { + return registrationUpdates; + } + + public void setRegistrationUpdates(Integer registrationUpdates) { + this.registrationUpdates = registrationUpdates; + } + + public DeviceToPelionMessagesCounter registrations(Integer registrations) { + this.registrations = registrations; + return this; + } + + /** + * Get registrations + * + * @return registrations + **/ + @ApiModelProperty(required = true, value = "") + public Integer getRegistrations() { + return registrations; + } + + public void setRegistrations(Integer registrations) { + this.registrations = registrations; + } + + public DeviceToPelionMessagesCounter totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The number of all inbound requests from devices to Device Management. minimum: 0 + * + * @return totalCount + **/ + @ApiModelProperty(required = true, value = "The number of all inbound requests from devices to Device Management.") + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeviceToPelionMessagesCounter deviceToPelionMessagesCounter = (DeviceToPelionMessagesCounter) o; + return Objects.equals(this.bootstrapRequests, deviceToPelionMessagesCounter.bootstrapRequests) + && Objects.equals(this.estRequests, deviceToPelionMessagesCounter.estRequests) + && Objects.equals(this.observations, deviceToPelionMessagesCounter.observations) + && Objects.equals(this.proxyResponses, deviceToPelionMessagesCounter.proxyResponses) + && Objects.equals(this.registrationDeletes, deviceToPelionMessagesCounter.registrationDeletes) + && Objects.equals(this.registrationUpdates, deviceToPelionMessagesCounter.registrationUpdates) + && Objects.equals(this.registrations, deviceToPelionMessagesCounter.registrations) + && Objects.equals(this.totalCount, deviceToPelionMessagesCounter.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(bootstrapRequests, estRequests, observations, proxyResponses, registrationDeletes, + registrationUpdates, registrations, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeviceToPelionMessagesCounter {\n"); + + sb.append(" bootstrapRequests: ").append(toIndentedString(bootstrapRequests)).append("\n"); + sb.append(" estRequests: ").append(toIndentedString(estRequests)).append("\n"); + sb.append(" observations: ").append(toIndentedString(observations)).append("\n"); + sb.append(" proxyResponses: ").append(toIndentedString(proxyResponses)).append("\n"); + sb.append(" registrationDeletes: ").append(toIndentedString(registrationDeletes)).append("\n"); + sb.append(" registrationUpdates: ").append(toIndentedString(registrationUpdates)).append("\n"); + sb.append(" registrations: ").append(toIndentedString(registrations)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoDevice.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoDevice.java new file mode 100644 index 000000000..7641051ab --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoDevice.java @@ -0,0 +1,270 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * The Device Echo object representing the device. + */ +@ApiModel(description = "The Device Echo object representing the device.") + +public class EchoDevice implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("device_id") + private String deviceId = null; + + @SerializedName("endpoint_name") + private String endpointName = null; + + @SerializedName("last_desired_at") + private DateTime lastDesiredAt = null; + + @SerializedName("last_reported_at") + private DateTime lastReportedAt = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("resources") + private List resources = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + public EchoDevice createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Response creation UTC time. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2020-10-20T10:30:55.123+0000", value = "Response creation UTC time.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public EchoDevice deviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * The device ID. + * + * @return deviceId + **/ + @ApiModelProperty(example = "015f3850a657000000000001001002ab", value = "The device ID.") + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public EchoDevice endpointName(String endpointName) { + this.endpointName = endpointName; + return this; + } + + /** + * The endpoint name. + * + * @return endpointName + **/ + @ApiModelProperty(example = "Sensor3222454", value = "The endpoint name.") + public String getEndpointName() { + return endpointName; + } + + public void setEndpointName(String endpointName) { + this.endpointName = endpointName; + } + + public EchoDevice lastDesiredAt(DateTime lastDesiredAt) { + this.lastDesiredAt = lastDesiredAt; + return this; + } + + /** + * The last time a write command was initiated on a resource. + * + * @return lastDesiredAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", + value = "The last time a write command was initiated on a resource.") + public DateTime getLastDesiredAt() { + return lastDesiredAt; + } + + public void setLastDesiredAt(DateTime lastDesiredAt) { + this.lastDesiredAt = lastDesiredAt; + } + + public EchoDevice lastReportedAt(DateTime lastReportedAt) { + this.lastReportedAt = lastReportedAt; + return this; + } + + /** + * The last time any resource's reported value was updated. + * + * @return lastReportedAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", + value = "The last time any resource's reported value was updated.") + public DateTime getLastReportedAt() { + return lastReportedAt; + } + + public void setLastReportedAt(DateTime lastReportedAt) { + this.lastReportedAt = lastReportedAt; + } + + public EchoDevice object(String object) { + this.object = object; + return this; + } + + /** + * API Resource name + * + * @return object + **/ + @ApiModelProperty(example = "device-echo", value = "API Resource name") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public EchoDevice resources(List resources) { + this.resources = resources; + return this; + } + + public EchoDevice addResourcesItem(EchoResource resourcesItem) { + if (this.resources == null) { + this.resources = new ArrayList(); + } + this.resources.add(resourcesItem); + return this; + } + + /** + * The list of device resources stored in Device Echo. + * + * @return resources + **/ + @ApiModelProperty(value = "The list of device resources stored in Device Echo.") + public List getResources() { + return resources; + } + + public void setResources(List resources) { + this.resources = resources; + } + + public EchoDevice updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The time of last registration event of a Device Echo object. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", + value = "The time of last registration event of a Device Echo object.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EchoDevice echoDevice = (EchoDevice) o; + return Objects.equals(this.createdAt, echoDevice.createdAt) + && Objects.equals(this.deviceId, echoDevice.deviceId) + && Objects.equals(this.endpointName, echoDevice.endpointName) + && Objects.equals(this.lastDesiredAt, echoDevice.lastDesiredAt) + && Objects.equals(this.lastReportedAt, echoDevice.lastReportedAt) + && Objects.equals(this.object, echoDevice.object) && Objects.equals(this.resources, echoDevice.resources) + && Objects.equals(this.updatedAt, echoDevice.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, deviceId, endpointName, lastDesiredAt, lastReportedAt, object, resources, + updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EchoDevice {\n"); + + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deviceId: ").append(toIndentedString(deviceId)).append("\n"); + sb.append(" endpointName: ").append(toIndentedString(endpointName)).append("\n"); + sb.append(" lastDesiredAt: ").append(toIndentedString(lastDesiredAt)).append("\n"); + sb.append(" lastReportedAt: ").append(toIndentedString(lastReportedAt)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResource.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResource.java new file mode 100644 index 000000000..0213bdbcb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResource.java @@ -0,0 +1,162 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * The representation of a single resource of the device stored in Device Echo. + */ +@ApiModel(description = "The representation of a single resource of the device stored in Device Echo.") + +public class EchoResource implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("desired") + private EchoResourceDesired desired = null; + + @SerializedName("reported") + private EchoResourceReported reported = null; + + @SerializedName("resource_path") + private String resourcePath = null; + + @SerializedName("subscribed") + private Boolean subscribed = null; + + public EchoResource desired(EchoResourceDesired desired) { + this.desired = desired; + return this; + } + + /** + * Get desired + * + * @return desired + **/ + @ApiModelProperty(value = "") + public EchoResourceDesired getDesired() { + return desired; + } + + public void setDesired(EchoResourceDesired desired) { + this.desired = desired; + } + + public EchoResource reported(EchoResourceReported reported) { + this.reported = reported; + return this; + } + + /** + * Get reported + * + * @return reported + **/ + @ApiModelProperty(value = "") + public EchoResourceReported getReported() { + return reported; + } + + public void setReported(EchoResourceReported reported) { + this.reported = reported; + } + + public EchoResource resourcePath(String resourcePath) { + this.resourcePath = resourcePath; + return this; + } + + /** + * The path of the resource. + * + * @return resourcePath + **/ + @ApiModelProperty(example = "/3/0/1", value = "The path of the resource.") + public String getResourcePath() { + return resourcePath; + } + + public void setResourcePath(String resourcePath) { + this.resourcePath = resourcePath; + } + + public EchoResource subscribed(Boolean subscribed) { + this.subscribed = subscribed; + return this; + } + + /** + * System-level subscription status of the resource. If any of the applications has placed a subscription, the + * status is true. Overlapping subscriptions from multiple applications do not increase the load on the device as + * the server handles the multiplexing. + * + * @return subscribed + **/ + @ApiModelProperty(value = "System-level subscription status of the resource. If any of the applications has placed a subscription, the status is true. Overlapping subscriptions from multiple applications do not increase the load on the device as the server handles the multiplexing.") + public Boolean isSubscribed() { + return subscribed; + } + + public void setSubscribed(Boolean subscribed) { + this.subscribed = subscribed; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EchoResource echoResource = (EchoResource) o; + return Objects.equals(this.desired, echoResource.desired) + && Objects.equals(this.reported, echoResource.reported) + && Objects.equals(this.resourcePath, echoResource.resourcePath) + && Objects.equals(this.subscribed, echoResource.subscribed); + } + + @Override + public int hashCode() { + return Objects.hash(desired, reported, resourcePath, subscribed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EchoResource {\n"); + + sb.append(" desired: ").append(toIndentedString(desired)).append("\n"); + sb.append(" reported: ").append(toIndentedString(reported)).append("\n"); + sb.append(" resourcePath: ").append(toIndentedString(resourcePath)).append("\n"); + sb.append(" subscribed: ").append(toIndentedString(subscribed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceDesired.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceDesired.java new file mode 100644 index 000000000..8e5101b03 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceDesired.java @@ -0,0 +1,164 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Resource value written, or queued to be written to the device. + */ +@ApiModel(description = "Resource value written, or queued to be written to the device.") + +public class EchoResourceDesired implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("desired_at") + private DateTime desiredAt = null; + + @SerializedName("status") + private BigDecimal status = null; + + @SerializedName("status_updated_at") + private DateTime statusUpdatedAt = null; + + @SerializedName("value") + private String value = null; + + public EchoResourceDesired desiredAt(DateTime desiredAt) { + this.desiredAt = desiredAt; + return this; + } + + /** + * The time of the latest value write was initiated. + * + * @return desiredAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", + value = "The time of the latest value write was initiated.") + public DateTime getDesiredAt() { + return desiredAt; + } + + public void setDesiredAt(DateTime desiredAt) { + this.desiredAt = desiredAt; + } + + public EchoResourceDesired status(BigDecimal status) { + this.status = status; + return this; + } + + /** + * The status of the desired value. 0 = 'pending write', 1 = 'success', 2 = + * 'failed'. + * + * @return status + **/ + @ApiModelProperty(value = "The status of the desired value. 0 = 'pending write', 1 = 'success', 2 = 'failed'.") + public BigDecimal getStatus() { + return status; + } + + public void setStatus(BigDecimal status) { + this.status = status; + } + + public EchoResourceDesired statusUpdatedAt(DateTime statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + return this; + } + + /** + * The time of the last status update. + * + * @return statusUpdatedAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", value = "The time of the last status update.") + public DateTime getStatusUpdatedAt() { + return statusUpdatedAt; + } + + public void setStatusUpdatedAt(DateTime statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public EchoResourceDesired value(String value) { + this.value = value; + return this; + } + + /** + * The desired value in base64 encoded format. + * + * @return value + **/ + @ApiModelProperty(example = "RGVzaXJlZCB2YWx1ZS4=", value = "The desired value in base64 encoded format.") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EchoResourceDesired echoResourceDesired = (EchoResourceDesired) o; + return Objects.equals(this.desiredAt, echoResourceDesired.desiredAt) + && Objects.equals(this.status, echoResourceDesired.status) + && Objects.equals(this.statusUpdatedAt, echoResourceDesired.statusUpdatedAt) + && Objects.equals(this.value, echoResourceDesired.value); + } + + @Override + public int hashCode() { + return Objects.hash(desiredAt, status, statusUpdatedAt, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EchoResourceDesired {\n"); + + sb.append(" desiredAt: ").append(toIndentedString(desiredAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedAt: ").append(toIndentedString(statusUpdatedAt)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceReported.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceReported.java new file mode 100644 index 000000000..5cb42d640 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EchoResourceReported.java @@ -0,0 +1,163 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Reported single resource data received from the device. + */ +@ApiModel(description = "Reported single resource data received from the device.") + +public class EchoResourceReported implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("content_type") + private String contentType = null; + + @SerializedName("expires_at") + private DateTime expiresAt = null; + + @SerializedName("reported_at") + private DateTime reportedAt = null; + + @SerializedName("value") + private String value = null; + + public EchoResourceReported contentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Content type of the reported resource value. + * + * @return contentType + **/ + @ApiModelProperty(example = "text/plain", value = "Content type of the reported resource value.") + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType; + } + + public EchoResourceReported expiresAt(DateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * The time after which the reported value is not valid, calculated based on the max-age of the resource value the + * device reported. + * + * @return expiresAt + **/ + @ApiModelProperty(example = "2019-10-20T10:30:55.123+0000", + value = "The time after which the reported value is not valid, calculated based on the max-age of the resource value the device reported.") + public DateTime getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(DateTime expiresAt) { + this.expiresAt = expiresAt; + } + + public EchoResourceReported reportedAt(DateTime reportedAt) { + this.reportedAt = reportedAt; + return this; + } + + /** + * The time the last value was reported. + * + * @return reportedAt + **/ + @ApiModelProperty(value = "The time the last value was reported.") + public DateTime getReportedAt() { + return reportedAt; + } + + public void setReportedAt(DateTime reportedAt) { + this.reportedAt = reportedAt; + } + + public EchoResourceReported value(String value) { + this.value = value; + return this; + } + + /** + * The reported value in base64 encoded format. + * + * @return value + **/ + @ApiModelProperty(example = "UmVwb3J0ZWQgdmFsdWUu", value = "The reported value in base64 encoded format.") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EchoResourceReported echoResourceReported = (EchoResourceReported) o; + return Objects.equals(this.contentType, echoResourceReported.contentType) + && Objects.equals(this.expiresAt, echoResourceReported.expiresAt) + && Objects.equals(this.reportedAt, echoResourceReported.reportedAt) + && Objects.equals(this.value, echoResourceReported.value); + } + + @Override + public int hashCode() { + return Objects.hash(contentType, expiresAt, reportedAt, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EchoResourceReported {\n"); + + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" reportedAt: ").append(toIndentedString(reportedAt)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ErrorResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ErrorResponse.java index bf24a2439..957d9ccba 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ErrorResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ErrorResponse.java @@ -115,11 +115,11 @@ public ErrorResponse object(String object) { } /** - * Response type, always \"error\". + * Response type: always `error`. * * @return object **/ - @ApiModelProperty(value = "Response type, always \"error\".") + @ApiModelProperty(value = "Response type: always `error`.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventType.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventType.java index 8b9208701..d723b6266 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventType.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventType.java @@ -62,7 +62,7 @@ public EventType campaignId(String campaignId) { * * @return campaignId **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "ID of the associated campaign.") + @ApiModelProperty(example = "016e652be671000000000001001001e5", value = "ID of the associated campaign.") public String getCampaignId() { return campaignId; } @@ -176,7 +176,7 @@ public EventType object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'event-type'.") + @ApiModelProperty(example = "event-type", value = "Entity name: always 'event-type'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummary.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummary.java index 0d35f3a22..9b8049108 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummary.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummary.java @@ -160,7 +160,7 @@ public EventTypeSummary campaignId(String campaignId) { * * @return campaignId **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "ID of the associated campaign.") + @ApiModelProperty(example = "016e652be6710000000000010010013d", value = "ID of the associated campaign.") public String getCampaignId() { return campaignId; } @@ -236,7 +236,7 @@ public EventTypeSummary object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'summary_status'.") + @ApiModelProperty(example = "summary_status", value = "Entity name: always 'summary_status'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummaryList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummaryList.java index 7dea227a1..53ad4e7f3 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummaryList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/EventTypeSummaryList.java @@ -194,7 +194,7 @@ public EventTypeSummaryList object(String object) { * * @return object **/ - @ApiModelProperty(value = "The entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "The entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Fields.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Fields.java index 0c4114eb5..cfbd634d8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Fields.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Fields.java @@ -55,11 +55,11 @@ public Fields name(String name) { } /** - * The field name in the request for which the validation has failed. + * The field name in the failed validation request. * * @return name **/ - @ApiModelProperty(value = "The field name in the request for which the validation has failed.") + @ApiModelProperty(value = "The field name in the failed validation request.") public String getName() { return name; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImage.java index 83a3fdc88..75edd62e6 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImage.java @@ -80,12 +80,11 @@ public FirmwareImage datafile(String datafile) { } /** - * The firmware image file URL + * The firmware image file URL. * * @return datafile **/ - @ApiModelProperty(example = "http://example.com/00000000000000000000000000000000", - value = "The firmware image file URL") + @ApiModelProperty(example = "http://bucket.com/myimage.elf", value = "The firmware image file URL.") public String getDatafile() { return datafile; } @@ -104,7 +103,7 @@ public FirmwareImage datafileChecksum(String datafileChecksum) { * * @return datafileChecksum **/ - @ApiModelProperty(example = "0000000000000000000000000000000000000000000000000000000000000000", + @ApiModelProperty(example = "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", value = "The checksum (sha256) generated for the datafile.") public String getDatafileChecksum() { return datafileChecksum; @@ -181,7 +180,7 @@ public FirmwareImage id(String id) { * * @return id **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "The firmware image ID.") + @ApiModelProperty(example = "016e652be671000000000001001001e5", value = "The firmware image ID.") public String getId() { return id; } @@ -219,7 +218,7 @@ public FirmwareImage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'firmware-image'.") + @ApiModelProperty(example = "firmware-image", value = "Entity name: always 'firmware-image'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageEqNeqFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageEqNeqFilter.java index 6c2e09abe..d83901544 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageEqNeqFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageEqNeqFilter.java @@ -176,7 +176,7 @@ public FirmwareImageEqNeqFilter id(String id) { * * @return id **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c3029f6f7000000000001001000c3", value = "") public String getId() { return id; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageInNinFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageInNinFilter.java index adb5933ce..acbcb06eb 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageInNinFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImageInNinFilter.java @@ -176,7 +176,7 @@ public FirmwareImageInNinFilter id(String id) { * * @return id **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c3029f6f7000000000001001000c3", value = "") public String getId() { return id; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImagePage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImagePage.java index 9212ca458..4873f9d6c 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImagePage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareImagePage.java @@ -193,7 +193,7 @@ public FirmwareImagePage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "Entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifest.java index 8c5ba808c..09bc7fd6d 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifest.java @@ -13,8 +13,14 @@ package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.UUID; import org.joda.time.DateTime; import java.io.Serializable; @@ -34,11 +40,74 @@ public class FirmwareManifest implements Serializable { @SerializedName("datafile_size") private Long datafileSize = null; + @SerializedName("delivered_payload_digest") + private String deliveredPayloadDigest = null; + + @SerializedName("delivered_payload_size") + private Long deliveredPayloadSize = null; + + /** + * Type of the payload to deliver to the device (full or delta image). + */ + @JsonAdapter(DeliveredPayloadTypeEnum.Adapter.class) + public enum DeliveredPayloadTypeEnum { + FULL("full"), + + DELTA("delta"); + + private String value; + + DeliveredPayloadTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DeliveredPayloadTypeEnum fromValue(String text) { + for (DeliveredPayloadTypeEnum b : DeliveredPayloadTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, + final DeliveredPayloadTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeliveredPayloadTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeliveredPayloadTypeEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("delivered_payload_type") + private DeliveredPayloadTypeEnum deliveredPayloadType = null; + + @SerializedName("delivered_payload_url") + private String deliveredPayloadUrl = null; + @SerializedName("description") private String description = null; @SerializedName("device_class") - private String deviceClass = null; + private UUID deviceClass = null; + + @SerializedName("device_vendor") + private UUID deviceVendor = null; @SerializedName("etag") private String etag = null; @@ -49,15 +118,75 @@ public class FirmwareManifest implements Serializable { @SerializedName("key_table") private String keyTable = null; + /** + * Version of the manifest schema (1 or 3). + */ + @JsonAdapter(ManifestSchemaVersionEnum.Adapter.class) + public enum ManifestSchemaVersionEnum { + _1("1"), + + _3("3"); + + private String value; + + ManifestSchemaVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ManifestSchemaVersionEnum fromValue(String text) { + for (ManifestSchemaVersionEnum b : ManifestSchemaVersionEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, + final ManifestSchemaVersionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ManifestSchemaVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ManifestSchemaVersionEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("manifest_schema_version") + private ManifestSchemaVersionEnum manifestSchemaVersion = null; + @SerializedName("name") private String name = null; @SerializedName("object") private String object = null; + @SerializedName("parsed_raw_manifest") + private Object parsedRawManifest = null; + + @SerializedName("precursor_payload_digest") + private String precursorPayloadDigest = null; + @SerializedName("timestamp") private DateTime timestamp = null; + @SerializedName("update_priority") + private Long updatePriority = null; + @SerializedName("updated_at") private DateTime updatedAt = null; @@ -86,12 +215,12 @@ public FirmwareManifest datafile(String datafile) { } /** - * The URL of the firmware manifest binary + * The URL of the ASN.1 DER-encoded firmware manifest binary. * * @return datafile **/ - @ApiModelProperty(example = "http://example.com/12345678901234567890123456789012", - value = "The URL of the firmware manifest binary") + @ApiModelProperty(example = "http://bucket.com/mymanifest.manifest", + value = "The URL of the ASN.1 DER-encoded firmware manifest binary.") public String getDatafile() { return datafile; } @@ -106,11 +235,11 @@ public FirmwareManifest datafileSize(Long datafileSize) { } /** - * The size of the datafile in bytes + * The size of the firmware manifest in bytes. * * @return datafileSize **/ - @ApiModelProperty(value = "The size of the datafile in bytes") + @ApiModelProperty(value = "The size of the firmware manifest in bytes.") public Long getDatafileSize() { return datafileSize; } @@ -119,6 +248,84 @@ public void setDatafileSize(Long datafileSize) { this.datafileSize = datafileSize; } + public FirmwareManifest deliveredPayloadDigest(String deliveredPayloadDigest) { + this.deliveredPayloadDigest = deliveredPayloadDigest; + return this; + } + + /** + * Digest (SHA256, hex-encoded) of the payload to deliver to the device. + * + * @return deliveredPayloadDigest + **/ + @ApiModelProperty(example = "c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc", + value = "Digest (SHA256, hex-encoded) of the payload to deliver to the device.") + public String getDeliveredPayloadDigest() { + return deliveredPayloadDigest; + } + + public void setDeliveredPayloadDigest(String deliveredPayloadDigest) { + this.deliveredPayloadDigest = deliveredPayloadDigest; + } + + public FirmwareManifest deliveredPayloadSize(Long deliveredPayloadSize) { + this.deliveredPayloadSize = deliveredPayloadSize; + return this; + } + + /** + * The size in bytes of the payload to deliver to the device. + * + * @return deliveredPayloadSize + **/ + @ApiModelProperty(value = "The size in bytes of the payload to deliver to the device.") + public Long getDeliveredPayloadSize() { + return deliveredPayloadSize; + } + + public void setDeliveredPayloadSize(Long deliveredPayloadSize) { + this.deliveredPayloadSize = deliveredPayloadSize; + } + + public FirmwareManifest deliveredPayloadType(DeliveredPayloadTypeEnum deliveredPayloadType) { + this.deliveredPayloadType = deliveredPayloadType; + return this; + } + + /** + * Type of the payload to deliver to the device (full or delta image). + * + * @return deliveredPayloadType + **/ + @ApiModelProperty(value = "Type of the payload to deliver to the device (full or delta image).") + public DeliveredPayloadTypeEnum getDeliveredPayloadType() { + return deliveredPayloadType; + } + + public void setDeliveredPayloadType(DeliveredPayloadTypeEnum deliveredPayloadType) { + this.deliveredPayloadType = deliveredPayloadType; + } + + public FirmwareManifest deliveredPayloadUrl(String deliveredPayloadUrl) { + this.deliveredPayloadUrl = deliveredPayloadUrl; + return this; + } + + /** + * The URL of the payload to deliver to the device. + * + * @return deliveredPayloadUrl + **/ + @ApiModelProperty(example = "http://bucket.com/myimage.elf", + value = "The URL of the payload to deliver to the device.") + public String getDeliveredPayloadUrl() { + return deliveredPayloadUrl; + } + + public void setDeliveredPayloadUrl(String deliveredPayloadUrl) { + this.deliveredPayloadUrl = deliveredPayloadUrl; + } + public FirmwareManifest description(String description) { this.description = description; return this; @@ -138,25 +345,44 @@ public void setDescription(String description) { this.description = description; } - public FirmwareManifest deviceClass(String deviceClass) { + public FirmwareManifest deviceClass(UUID deviceClass) { this.deviceClass = deviceClass; return this; } /** - * The class of the device. + * The device class ID. * * @return deviceClass **/ - @ApiModelProperty(example = "00000000-0000-0000-0000-000000000000", value = "The class of the device.") - public String getDeviceClass() { + @ApiModelProperty(example = "42c4d8de-704d-546e-b9d3-1ce1eb316167", value = "The device class ID.") + public UUID getDeviceClass() { return deviceClass; } - public void setDeviceClass(String deviceClass) { + public void setDeviceClass(UUID deviceClass) { this.deviceClass = deviceClass; } + public FirmwareManifest deviceVendor(UUID deviceVendor) { + this.deviceVendor = deviceVendor; + return this; + } + + /** + * The device vendor ID. + * + * @return deviceVendor + **/ + @ApiModelProperty(example = "5d645eae-c231-5a89-9764-2e655cd94fa8", value = "The device vendor ID.") + public UUID getDeviceVendor() { + return deviceVendor; + } + + public void setDeviceVendor(UUID deviceVendor) { + this.deviceVendor = deviceVendor; + } + public FirmwareManifest etag(String etag) { this.etag = etag; return this; @@ -205,7 +431,7 @@ public FirmwareManifest keyTable(String keyTable) { * * @return keyTable **/ - @ApiModelProperty(example = "http://example.com", value = "The key table of pre-shared keys for devices.") + @ApiModelProperty(example = "http://example.com/key-table", value = "The key table of pre-shared keys for devices.") public String getKeyTable() { return keyTable; } @@ -214,17 +440,36 @@ public void setKeyTable(String keyTable) { this.keyTable = keyTable; } + public FirmwareManifest manifestSchemaVersion(ManifestSchemaVersionEnum manifestSchemaVersion) { + this.manifestSchemaVersion = manifestSchemaVersion; + return this; + } + + /** + * Version of the manifest schema (1 or 3). + * + * @return manifestSchemaVersion + **/ + @ApiModelProperty(value = "Version of the manifest schema (1 or 3).") + public ManifestSchemaVersionEnum getManifestSchemaVersion() { + return manifestSchemaVersion; + } + + public void setManifestSchemaVersion(ManifestSchemaVersionEnum manifestSchemaVersion) { + this.manifestSchemaVersion = manifestSchemaVersion; + } + public FirmwareManifest name(String name) { this.name = name; return this; } /** - * The name of the object. + * The name of the manifest. * * @return name **/ - @ApiModelProperty(example = "default_object_name", value = "The name of the object.") + @ApiModelProperty(example = "manifest_name", value = "The name of the manifest.") public String getName() { return name; } @@ -243,7 +488,7 @@ public FirmwareManifest object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'firmware-manifest'.") + @ApiModelProperty(example = "firmware-manifest", value = "Entity name: always 'firmware-manifest'.") public String getObject() { return object; } @@ -252,6 +497,46 @@ public void setObject(String object) { this.object = object; } + public FirmwareManifest parsedRawManifest(Object parsedRawManifest) { + this.parsedRawManifest = parsedRawManifest; + return this; + } + + /** + * Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards compatibility is not + * guaranteed. Recommended for debugging only. + * + * @return parsedRawManifest + **/ + @ApiModelProperty(value = "Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards compatibility is not guaranteed. Recommended for debugging only. ") + public Object getParsedRawManifest() { + return parsedRawManifest; + } + + public void setParsedRawManifest(Object parsedRawManifest) { + this.parsedRawManifest = parsedRawManifest; + } + + public FirmwareManifest precursorPayloadDigest(String precursorPayloadDigest) { + this.precursorPayloadDigest = precursorPayloadDigest; + return this; + } + + /** + * Digest (SHA256, hex-encoded) of the currently installed payload. + * + * @return precursorPayloadDigest + **/ + @ApiModelProperty(example = "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f", + value = "Digest (SHA256, hex-encoded) of the currently installed payload.") + public String getPrecursorPayloadDigest() { + return precursorPayloadDigest; + } + + public void setPrecursorPayloadDigest(String precursorPayloadDigest) { + this.precursorPayloadDigest = precursorPayloadDigest; + } + public FirmwareManifest timestamp(DateTime timestamp) { this.timestamp = timestamp; return this; @@ -271,6 +556,26 @@ public void setTimestamp(DateTime timestamp) { this.timestamp = timestamp; } + public FirmwareManifest updatePriority(Long updatePriority) { + this.updatePriority = updatePriority; + return this; + } + + /** + * Update priority, passed to the application callback when an update is performed. Allows the application to make + * application-specific decisions. + * + * @return updatePriority + **/ + @ApiModelProperty(value = "Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions.") + public Long getUpdatePriority() { + return updatePriority; + } + + public void setUpdatePriority(Long updatePriority) { + this.updatePriority = updatePriority; + } + public FirmwareManifest updatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; return this; @@ -302,20 +607,31 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.createdAt, firmwareManifest.createdAt) && Objects.equals(this.datafile, firmwareManifest.datafile) && Objects.equals(this.datafileSize, firmwareManifest.datafileSize) + && Objects.equals(this.deliveredPayloadDigest, firmwareManifest.deliveredPayloadDigest) + && Objects.equals(this.deliveredPayloadSize, firmwareManifest.deliveredPayloadSize) + && Objects.equals(this.deliveredPayloadType, firmwareManifest.deliveredPayloadType) + && Objects.equals(this.deliveredPayloadUrl, firmwareManifest.deliveredPayloadUrl) && Objects.equals(this.description, firmwareManifest.description) && Objects.equals(this.deviceClass, firmwareManifest.deviceClass) + && Objects.equals(this.deviceVendor, firmwareManifest.deviceVendor) && Objects.equals(this.etag, firmwareManifest.etag) && Objects.equals(this.id, firmwareManifest.id) && Objects.equals(this.keyTable, firmwareManifest.keyTable) + && Objects.equals(this.manifestSchemaVersion, firmwareManifest.manifestSchemaVersion) && Objects.equals(this.name, firmwareManifest.name) && Objects.equals(this.object, firmwareManifest.object) + && Objects.equals(this.parsedRawManifest, firmwareManifest.parsedRawManifest) + && Objects.equals(this.precursorPayloadDigest, firmwareManifest.precursorPayloadDigest) && Objects.equals(this.timestamp, firmwareManifest.timestamp) + && Objects.equals(this.updatePriority, firmwareManifest.updatePriority) && Objects.equals(this.updatedAt, firmwareManifest.updatedAt); } @Override public int hashCode() { - return Objects.hash(createdAt, datafile, datafileSize, description, deviceClass, etag, id, keyTable, name, - object, timestamp, updatedAt); + return Objects.hash(createdAt, datafile, datafileSize, deliveredPayloadDigest, deliveredPayloadSize, + deliveredPayloadType, deliveredPayloadUrl, description, deviceClass, deviceVendor, etag, id, + keyTable, manifestSchemaVersion, name, object, parsedRawManifest, precursorPayloadDigest, + timestamp, updatePriority, updatedAt); } @Override @@ -326,14 +642,23 @@ public String toString() { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" datafile: ").append(toIndentedString(datafile)).append("\n"); sb.append(" datafileSize: ").append(toIndentedString(datafileSize)).append("\n"); + sb.append(" deliveredPayloadDigest: ").append(toIndentedString(deliveredPayloadDigest)).append("\n"); + sb.append(" deliveredPayloadSize: ").append(toIndentedString(deliveredPayloadSize)).append("\n"); + sb.append(" deliveredPayloadType: ").append(toIndentedString(deliveredPayloadType)).append("\n"); + sb.append(" deliveredPayloadUrl: ").append(toIndentedString(deliveredPayloadUrl)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" deviceClass: ").append(toIndentedString(deviceClass)).append("\n"); + sb.append(" deviceVendor: ").append(toIndentedString(deviceVendor)).append("\n"); sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" keyTable: ").append(toIndentedString(keyTable)).append("\n"); + sb.append(" manifestSchemaVersion: ").append(toIndentedString(manifestSchemaVersion)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" parsedRawManifest: ").append(toIndentedString(parsedRawManifest)).append("\n"); + sb.append(" precursorPayloadDigest: ").append(toIndentedString(precursorPayloadDigest)).append("\n"); sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" updatePriority: ").append(toIndentedString(updatePriority)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestEqNeqFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestEqNeqFilter.java index 49d5ee479..313f6660d 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestEqNeqFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestEqNeqFilter.java @@ -179,7 +179,7 @@ public FirmwareManifestEqNeqFilter id(String id) { * * @return id **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c3029f6f7000000000001001000c3", value = "") public String getId() { return id; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestInNinFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestInNinFilter.java index 2c8edfca3..9a519e60f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestInNinFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestInNinFilter.java @@ -179,7 +179,7 @@ public FirmwareManifestInNinFilter id(String id) { * * @return id **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c3029f6f7000000000001001000c3", value = "") public String getId() { return id; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestPage.java index a64d5dbee..6ad7735fa 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestPage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/FirmwareManifestPage.java @@ -193,7 +193,7 @@ public FirmwareManifestPage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "Entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GetTrustAnchorsResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GetTrustAnchorsResponse.java new file mode 100644 index 000000000..ec4f1c7cb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GetTrustAnchorsResponse.java @@ -0,0 +1,293 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * GetTrustAnchorsResponse + */ + +public class GetTrustAnchorsResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = null; + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + @SerializedName("object") + private String object = null; + + /** + * Indicates how to order the entries based on when they were created. + */ + @JsonAdapter(OrderEnum.Adapter.class) + public enum OrderEnum { + ASC("ASC"), + + DESC("DESC"); + + private String value; + + OrderEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderEnum fromValue(String text) { + for (OrderEnum b : OrderEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("order") + private OrderEnum order = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + public GetTrustAnchorsResponse after(String after) { + this.after = after; + return this; + } + + /** + * An offset token for the current page. + * + * @return after + **/ + @ApiModelProperty(example = "01631667477600000000000100100374", value = "An offset token for the current page.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public GetTrustAnchorsResponse data(List data) { + this.data = data; + return this; + } + + public GetTrustAnchorsResponse addDataItem(TrustAnchorResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList(); + } + this.data.add(dataItem); + return this; + } + + /** + * The list of trust anchors of the account. + * + * @return data + **/ + @ApiModelProperty(value = "The list of trust anchors of the account.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public GetTrustAnchorsResponse hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates whether additional results are available. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", value = "Indicates whether additional results are available.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public GetTrustAnchorsResponse limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values + * outside of this range are set to the closest limit. minimum: 2 maximum: 1000 + * + * @return limit + **/ + @ApiModelProperty(value = "Indicates how many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public GetTrustAnchorsResponse object(String object) { + this.object = object; + return this; + } + + /** + * The type of this API object is a `list`. + * + * @return object + **/ + @ApiModelProperty(example = "list", value = "The type of this API object is a `list`.") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public GetTrustAnchorsResponse order(OrderEnum order) { + this.order = order; + return this; + } + + /** + * Indicates how to order the entries based on when they were created. + * + * @return order + **/ + @ApiModelProperty(example = "DESC", value = "Indicates how to order the entries based on when they were created.") + public OrderEnum getOrder() { + return order; + } + + public void setOrder(OrderEnum order) { + this.order = order; + } + + public GetTrustAnchorsResponse totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * + * @return totalCount + **/ + @ApiModelProperty(example = "1", value = "") + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTrustAnchorsResponse getTrustAnchorsResponse = (GetTrustAnchorsResponse) o; + return Objects.equals(this.after, getTrustAnchorsResponse.after) + && Objects.equals(this.data, getTrustAnchorsResponse.data) + && Objects.equals(this.hasMore, getTrustAnchorsResponse.hasMore) + && Objects.equals(this.limit, getTrustAnchorsResponse.limit) + && Objects.equals(this.object, getTrustAnchorsResponse.object) + && Objects.equals(this.order, getTrustAnchorsResponse.order) + && Objects.equals(this.totalCount, getTrustAnchorsResponse.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetTrustAnchorsResponse {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GlobalSignCredentials.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GlobalSignCredentials.java index 8217ba0d0..d7afa9866 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GlobalSignCredentials.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GlobalSignCredentials.java @@ -19,10 +19,10 @@ import java.io.Serializable; /** - * Describes the credentials required to connect to the GlobalSign account. The values should be taken from GlobalSign - * support upon account creation. + * The credentials required to connect to the GlobalSign account. The values should be taken from GlobalSign support + * upon account creation. */ -@ApiModel(description = "Describes the credentials required to connect to the GlobalSign account. The values should be taken from GlobalSign support upon account creation. ") +@ApiModel(description = "The credentials required to connect to the GlobalSign account. The values should be taken from GlobalSign support upon account creation.") public class GlobalSignCredentials implements Serializable { private static final long serialVersionUID = 1L; @@ -53,7 +53,7 @@ public GlobalSignCredentials apiKey(String apiKey) { * @return apiKey **/ @ApiModelProperty(example = "e510e289e6cd8947", required = true, - value = "Unique ID for API client (provided by GlobalSign). ") + value = "Unique ID for API client (provided by GlobalSign).") public String getApiKey() { return apiKey; } @@ -68,12 +68,12 @@ public GlobalSignCredentials apiSecret(String apiSecret) { } /** - * API Secret matching the API key (provided by GlobalSign). + * API secret matching the API key (provided by GlobalSign). * * @return apiSecret **/ @ApiModelProperty(example = "a477a8393d17a55ecb2ba6a61f58feb84770b621", required = true, - value = "API Secret matching the API key (provided by GlobalSign). ") + value = "API secret matching the API key (provided by GlobalSign).") public String getApiSecret() { return apiSecret; } @@ -95,7 +95,7 @@ public GlobalSignCredentials clientCertificate(String clientCertificate) { **/ @ApiModelProperty(example = "\"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END CERTIFICATE-----\"", required = true, - value = "The client certificate provided by GlobalSign to allow HTTPS connection over TLS/SSL. The certificate wraps a public key that matches a private key provided by the customer. The certificate must be in PEM format. ") + value = "The client certificate provided by GlobalSign to allow HTTPS connection over TLS/SSL. The certificate wraps a public key that matches a private key provided by the customer. The certificate must be in PEM format.") public String getClientCertificate() { return clientCertificate; } @@ -115,7 +115,7 @@ public GlobalSignCredentials passphrase(String passphrase) { * @return passphrase **/ @ApiModelProperty(example = "helloworld", - value = "The passphrase to decrypt the private key in case it is encrypted. Empty if the private key is not encrypted. ") + value = "The passphrase to decrypt the private key in case it is encrypted. Empty if the private key is not encrypted.") public String getPassphrase() { return passphrase; } @@ -137,7 +137,7 @@ public GlobalSignCredentials privateKey(String privateKey) { **/ @ApiModelProperty(example = "\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: 4,ENCRYPTED\\nDEK-Info: DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END RSA PRIVATE KEY-----\"", required = true, - value = "The private key that matches the client certificate to allow HTTPS connection over TLS/SSL. The private key may be encrypted using a symmetric encryption key derived from a passphrase. The private key must be in PEM format. ") + value = "The private key that matches the client certificate to allow HTTPS connection over TLS/SSL. The private key may be encrypted using a symmetric encryption key derived from a passphrase. The private key must be in PEM format.") public String getPrivateKey() { return privateKey; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummary.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummary.java index 581e155e0..24358a9a8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummary.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummary.java @@ -38,6 +38,9 @@ public class GroupSummary implements Serializable { @SerializedName("apikey_count") private Integer apikeyCount = null; + @SerializedName("application_count") + private Integer applicationCount = null; + @SerializedName("created_at") private DateTime createdAt = null; @@ -143,6 +146,25 @@ public void setApikeyCount(Integer apikeyCount) { this.apikeyCount = apikeyCount; } + public GroupSummary applicationCount(Integer applicationCount) { + this.applicationCount = applicationCount; + return this; + } + + /** + * The number of applications in this group. + * + * @return applicationCount + **/ + @ApiModelProperty(example = "0", value = "The number of applications in this group.") + public Integer getApplicationCount() { + return applicationCount; + } + + public void setApplicationCount(Integer applicationCount) { + this.applicationCount = applicationCount; + } + public GroupSummary createdAt(DateTime createdAt) { this.createdAt = createdAt; return this; @@ -287,6 +309,7 @@ public boolean equals(java.lang.Object o) { GroupSummary groupSummary = (GroupSummary) o; return Objects.equals(this.accountId, groupSummary.accountId) && Objects.equals(this.apikeyCount, groupSummary.apikeyCount) + && Objects.equals(this.applicationCount, groupSummary.applicationCount) && Objects.equals(this.createdAt, groupSummary.createdAt) && Objects.equals(this.etag, groupSummary.etag) && Objects.equals(this.id, groupSummary.id) && Objects.equals(this.name, groupSummary.name) && Objects.equals(this.object, groupSummary.object) @@ -296,7 +319,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(accountId, apikeyCount, createdAt, etag, id, name, object, updatedAt, userCount); + return Objects.hash(accountId, apikeyCount, applicationCount, createdAt, etag, id, name, object, updatedAt, + userCount); } @Override @@ -306,6 +330,7 @@ public String toString() { sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" apikeyCount: ").append(toIndentedString(apikeyCount)).append("\n"); + sb.append(" applicationCount: ").append(toIndentedString(applicationCount)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummaryList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummaryList.java index 575678bfc..2a56a529e 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummaryList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/GroupSummaryList.java @@ -150,12 +150,12 @@ public GroupSummaryList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderCreationReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderCreationReq.java index 8bc273b56..e8b8035cc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderCreationReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderCreationReq.java @@ -98,7 +98,9 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - SAML2("SAML2"); + SAML2("SAML2"), + + OIDC("OIDC"); private String value; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderInfo.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderInfo.java index a5b6478e9..513467ba4 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderInfo.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderInfo.java @@ -99,6 +99,9 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("object") private ObjectEnum object = null; + @SerializedName("oidc_attributes") + private OIDCInfo oidcAttributes = null; + @SerializedName("saml2_attributes") private SAML2Info saml2Attributes = null; @@ -353,6 +356,25 @@ public void setObject(ObjectEnum object) { this.object = object; } + public IdentityProviderInfo oidcAttributes(OIDCInfo oidcAttributes) { + this.oidcAttributes = oidcAttributes; + return this; + } + + /** + * OIDC specific attributes. + * + * @return oidcAttributes + **/ + @ApiModelProperty(value = "OIDC specific attributes.") + public OIDCInfo getOidcAttributes() { + return oidcAttributes; + } + + public void setOidcAttributes(OIDCInfo oidcAttributes) { + this.oidcAttributes = oidcAttributes; + } + public IdentityProviderInfo saml2Attributes(SAML2Info saml2Attributes) { this.saml2Attributes = saml2Attributes; return this; @@ -446,6 +468,7 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.isDefault, identityProviderInfo.isDefault) && Objects.equals(this.name, identityProviderInfo.name) && Objects.equals(this.object, identityProviderInfo.object) + && Objects.equals(this.oidcAttributes, identityProviderInfo.oidcAttributes) && Objects.equals(this.saml2Attributes, identityProviderInfo.saml2Attributes) && Objects.equals(this.status, identityProviderInfo.status) && Objects.equals(this.type, identityProviderInfo.type) @@ -454,8 +477,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(accountId, createdAt, description, etag, id, isDefault, name, object, saml2Attributes, - status, type, updatedAt); + return Objects.hash(accountId, createdAt, description, etag, id, isDefault, name, object, oidcAttributes, + saml2Attributes, status, type, updatedAt); } @Override @@ -471,6 +494,7 @@ public String toString() { sb.append(" isDefault: ").append(toIndentedString(isDefault)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" oidcAttributes: ").append(toIndentedString(oidcAttributes)).append("\n"); sb.append(" saml2Attributes: ").append(toIndentedString(saml2Attributes)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderList.java index c5d38be33..027a6a54f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderList.java @@ -150,12 +150,12 @@ public IdentityProviderList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderUpdateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderUpdateReq.java index 1f9f92fe2..07b4710c1 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderUpdateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/IdentityProviderUpdateReq.java @@ -98,7 +98,9 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - SAML2("SAML2"); + SAML2("SAML2"), + + OIDC("OIDC"); private String value; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/KeyValue.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/KeyValue.java new file mode 100644 index 000000000..0183e5d12 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/KeyValue.java @@ -0,0 +1,109 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * KeyValue + */ + +public class KeyValue implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("key") + private String key = null; + + @SerializedName("value") + private String value = null; + + public KeyValue key(String key) { + this.key = key; + return this; + } + + /** + * Get key + * + * @return key + **/ + @ApiModelProperty(required = true, value = "") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public KeyValue value(String value) { + this.value = value; + return this; + } + + /** + * Get value + * + * @return value + **/ + @ApiModelProperty(required = true, value = "") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + KeyValue keyValue = (KeyValue) o; + return Objects.equals(this.key, keyValue.key) && Objects.equals(this.value, keyValue.value); + } + + @Override + public int hashCode() { + return Objects.hash(key, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class KeyValue {\n"); + + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Log.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Log.java new file mode 100644 index 000000000..fcfb64724 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Log.java @@ -0,0 +1,388 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Log + */ + +public class Log implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("account_id") + private String accountId = null; + + @SerializedName("app_name") + private String appName = null; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("device_id") + private String deviceId = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("id") + private String id = null; + + /** + * Log entry severity level. + */ + @JsonAdapter(LevelEnum.Adapter.class) + public enum LevelEnum { + DEBUG("DEBUG"), + + TRACE("TRACE"), + + INFO("INFO"), + + WARNING("WARNING"), + + ERROR("ERROR"), + + CRITICAL("CRITICAL"); + + private String value; + + LevelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LevelEnum fromValue(String text) { + for (LevelEnum b : LevelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LevelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LevelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LevelEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("level") + private LevelEnum level = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("timestamp") + private DateTime timestamp = null; + + @SerializedName("type") + private String type = null; + + public Log accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account associated with the device. + * + * @return accountId + **/ + @ApiModelProperty(example = "0168e7bff4f2263cf4be560700000000", + value = "The ID of the account associated with the device.") + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public Log appName(String appName) { + this.appName = appName; + return this; + } + + /** + * A tag indicating which application or software module produced the log message. + * + * @return appName + **/ + @ApiModelProperty(example = "modbus", + value = "A tag indicating which application or software module produced the log message.") + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public Log createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * RFC 3339 UTC timestamp indicating when the resource entity was created. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2017-07-21T17:32:28Z", + value = "RFC 3339 UTC timestamp indicating when the resource entity was created.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public Log deviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Device ID. + * + * @return deviceId + **/ + @ApiModelProperty(example = "00005a4e027f0a580a01081c00000000", value = "Device ID.") + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public Log etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Entity instance signature, or Unix timestamp of last customer update. + * + * @return etag + **/ + @ApiModelProperty(example = "stdout", + value = "Entity instance signature, or Unix timestamp of last customer update.") + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public Log id(String id) { + this.id = id; + return this; + } + + /** + * mUUID Entity ID. Each device log has a unique ID. + * + * @return id + **/ + @ApiModelProperty(example = "2d238a89038b4ddb84699dd36a901063", + value = "mUUID Entity ID. Each device log has a unique ID.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Log level(LevelEnum level) { + this.level = level; + return this; + } + + /** + * Log entry severity level. + * + * @return level + **/ + @ApiModelProperty(example = "ERROR", value = "Log entry severity level.") + public LevelEnum getLevel() { + return level; + } + + public void setLevel(LevelEnum level) { + this.level = level; + } + + public Log message(String message) { + this.message = message; + return this; + } + + /** + * Log message body. + * + * @return message + **/ + @ApiModelProperty(example = "ModbusRTU Driver: Failed to start undefined", value = "Log message body.") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Log object(String object) { + this.object = object; + return this; + } + + /** + * Device log resource name. + * + * @return object + **/ + @ApiModelProperty(example = "device-log", value = "Device log resource name.") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public Log timestamp(DateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * RFC 3339 UTC timestamp indicating indicating the device time the message was printed. + * + * @return timestamp + **/ + @ApiModelProperty(example = "2017-07-21T17:40:28Z", + value = "RFC 3339 UTC timestamp indicating indicating the device time the message was printed.") + public DateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(DateTime timestamp) { + this.timestamp = timestamp; + } + + public Log type(String type) { + this.type = type; + return this; + } + + /** + * Device log type. + * + * @return type + **/ + @ApiModelProperty(example = "syslog", value = "Device log type.") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Log log = (Log) o; + return Objects.equals(this.accountId, log.accountId) && Objects.equals(this.appName, log.appName) + && Objects.equals(this.createdAt, log.createdAt) && Objects.equals(this.deviceId, log.deviceId) + && Objects.equals(this.etag, log.etag) && Objects.equals(this.id, log.id) + && Objects.equals(this.level, log.level) && Objects.equals(this.message, log.message) + && Objects.equals(this.object, log.object) && Objects.equals(this.timestamp, log.timestamp) + && Objects.equals(this.type, log.type); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, appName, createdAt, deviceId, etag, id, level, message, object, timestamp, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Log {\n"); + + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" appName: ").append(toIndentedString(appName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" deviceId: ").append(toIndentedString(deviceId)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LoginProfile.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LoginProfile.java index 5fae1f62d..bfee494e8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LoginProfile.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LoginProfile.java @@ -31,6 +31,9 @@ public class LoginProfile implements Serializable { private static final long serialVersionUID = 1L; + @SerializedName("foreign_id") + private String foreignId = null; + @SerializedName("id") private String id = null; @@ -91,6 +94,16 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("type") private TypeEnum type = null; + /** + * The ID of the user in the identity provider's service. + * + * @return foreignId + **/ + @ApiModelProperty(example = "fed/user_007", value = "The ID of the user in the identity provider's service.") + public String getForeignId() { + return foreignId; + } + public LoginProfile id(String id) { this.id = id; return this; @@ -101,7 +114,8 @@ public LoginProfile id(String id) { * * @return id **/ - @ApiModelProperty(required = true, value = "ID of the identity provider.") + @ApiModelProperty(example = "01619571f3c00242ac12000600000000", required = true, + value = "ID of the identity provider.") public String getId() { return id; } @@ -115,7 +129,7 @@ public void setId(String id) { * * @return name **/ - @ApiModelProperty(value = "Name of the identity provider.") + @ApiModelProperty(example = "Pelion", value = "Name of the identity provider.") public String getName() { return name; } @@ -125,7 +139,7 @@ public String getName() { * * @return type **/ - @ApiModelProperty(value = "Identity provider type.") + @ApiModelProperty(example = "NATIVE", value = "Identity provider type.") public TypeEnum getType() { return type; } @@ -139,13 +153,13 @@ public boolean equals(java.lang.Object o) { return false; } LoginProfile loginProfile = (LoginProfile) o; - return Objects.equals(this.id, loginProfile.id) && Objects.equals(this.name, loginProfile.name) - && Objects.equals(this.type, loginProfile.type); + return Objects.equals(this.foreignId, loginProfile.foreignId) && Objects.equals(this.id, loginProfile.id) + && Objects.equals(this.name, loginProfile.name) && Objects.equals(this.type, loginProfile.type); } @Override public int hashCode() { - return Objects.hash(id, name, type); + return Objects.hash(foreignId, id, name, type); } @Override @@ -153,6 +167,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LoginProfile {\n"); + sb.append(" foreignId: ").append(toIndentedString(foreignId)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LogsPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LogsPage.java new file mode 100644 index 000000000..1ca35d84e --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/LogsPage.java @@ -0,0 +1,238 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * LogsPage + */ + +public class LogsPage implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = null; + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("order") + private String order = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + public LogsPage after(String after) { + this.after = after; + return this; + } + + /** + * An offset token for current page. + * + * @return after + **/ + @ApiModelProperty(value = "An offset token for current page.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public LogsPage data(List data) { + this.data = data; + return this; + } + + public LogsPage addDataItem(Log dataItem) { + if (this.data == null) { + this.data = new ArrayList(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + **/ + @ApiModelProperty(value = "") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public LogsPage hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates whether more results are available. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", value = "Indicates whether more results are available.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public LogsPage limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Limit applied on number of device log resource objects retrieved in the page (2-1000). minimum: 2 maximum: 1000 + * + * @return limit + **/ + @ApiModelProperty(example = "100", + value = "Limit applied on number of device log resource objects retrieved in the page (2-1000).") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public LogsPage object(String object) { + this.object = object; + return this; + } + + /** + * Always `list`. + * + * @return object + **/ + @ApiModelProperty(example = "list", value = "Always `list`.") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public LogsPage order(String order) { + this.order = order; + return this; + } + + /** + * Entry order based on creation time. + * + * @return order + **/ + @ApiModelProperty(example = "DESC", value = "Entry order based on creation time.") + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + public LogsPage totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * + * @return totalCount + **/ + @ApiModelProperty(example = "1", value = "") + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogsPage logsPage = (LogsPage) o; + return Objects.equals(this.after, logsPage.after) && Objects.equals(this.data, logsPage.data) + && Objects.equals(this.hasMore, logsPage.hasMore) && Objects.equals(this.limit, logsPage.limit) + && Objects.equals(this.object, logsPage.object) && Objects.equals(this.order, logsPage.order) + && Objects.equals(this.totalCount, logsPage.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogsPage {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Metric.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Metric.java index ccd60a9c9..9b6531bfc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Metric.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Metric.java @@ -85,13 +85,12 @@ public Metric bootstrapsFailed(Long bootstrapsFailed) { } /** - * The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight - * Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to - * Machine Server. + * The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M + * client to a state where it can initiate a management session to a new LwM2M server. * * @return bootstrapsFailed **/ - @ApiModelProperty(value = "The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server.") + @ApiModelProperty(value = "The number of failed bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M client to a state where it can initiate a management session to a new LwM2M server.") public Long getBootstrapsFailed() { return bootstrapsFailed; } @@ -106,13 +105,12 @@ public Metric bootstrapsPending(Long bootstrapsPending) { } /** - * The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning a - * Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight - * Machine to Machine Server. + * The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M + * client to a state where it can initiate a management session to a new LwM2M server. * * @return bootstrapsPending **/ - @ApiModelProperty(value = "The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server.") + @ApiModelProperty(value = "The number of pending bootstraps the account has performed. Bootstrap is the process of provisioning an Lw2M2M client to a state where it can initiate a management session to a new LwM2M server.") public Long getBootstrapsPending() { return bootstrapsPending; } @@ -128,12 +126,12 @@ public Metric bootstrapsSuccessful(Long bootstrapsSuccessful) { /** * The number of successful bootstraps the account has performed. Bootstrap is the process of provisioning a - * Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight - * Machine to Machine Server. + * lightweight machine-to-machine (LwM2M) client to a state where it can initiate a management session to a new + * LwM2M Server. * * @return bootstrapsSuccessful **/ - @ApiModelProperty(value = "The number of successful bootstraps the account has performed. Bootstrap is the process of provisioning a Lightweight Machine to Machine Client to a state where it can initiate a management session to a new Lightweight Machine to Machine Server.") + @ApiModelProperty(value = "The number of successful bootstraps the account has performed. Bootstrap is the process of provisioning a lightweight machine-to-machine (LwM2M) client to a state where it can initiate a management session to a new LwM2M Server.") public Long getBootstrapsSuccessful() { return bootstrapsSuccessful; } @@ -148,15 +146,14 @@ public Metric connectRestApiError(Long connectRestApiError) { } /** - * The number of failed [Connect API](/docs/current/service-api-references/device-management-connect.html) requests + * The number of failed [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests * that have been performed using the account. This metric does not consider the response from the device, it * includes only the responses to the HTTP requests used to manage the device. This metric includes only messages - * handled by the Connect service, it does not include any HTTP errors returned by firewall as result of malformed - * messages. + * handled by the Connect service, not any HTTP errors returned by the firewall as a result of incorrect messages. * * @return connectRestApiError **/ - @ApiModelProperty(value = "The number of failed [Connect API](/docs/current/service-api-references/device-management-connect.html) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device. This metric includes only messages handled by the Connect service, it does not include any HTTP errors returned by firewall as result of malformed messages.") + @ApiModelProperty(value = "The number of failed [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device. This metric includes only messages handled by the Connect service, not any HTTP errors returned by the firewall as a result of incorrect messages.") public Long getConnectRestApiError() { return connectRestApiError; } @@ -171,13 +168,13 @@ public Metric connectRestApiSuccess(Long connectRestApiSuccess) { } /** - * The number of successful [Connect API](/docs/current/service-api-references/device-management-connect.html) - * requests that have been performed using the account. This metric does not consider the response from the device, - * it includes only the responses to the HTTP requests used to manage the device. + * The number of successful [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests + * that have been performed using the account. This metric does not consider the response from the device, only the + * responses to the HTTP requests used to manage the device. * * @return connectRestApiSuccess **/ - @ApiModelProperty(value = "The number of successful [Connect API](/docs/current/service-api-references/device-management-connect.html) requests that have been performed using the account. This metric does not consider the response from the device, it includes only the responses to the HTTP requests used to manage the device.") + @ApiModelProperty(value = "The number of successful [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) requests that have been performed using the account. This metric does not consider the response from the device, only the responses to the HTTP requests used to manage the device.") public Long getConnectRestApiSuccess() { return connectRestApiSuccess; } @@ -194,11 +191,11 @@ public Metric deletedRegistrations(Long deletedRegistrations) { /** * The number of deleted registrations (deregistrations) linked to the account. Deregistration is the process of * removing the device registration from the Device Management Connect registry. The deregistration is usually - * initiated by the device. Device Management Connect no longer handles requests for a deregistered device. + * initiated by the device. Device Management Connect no longer handles requests for deregistered devices. * * @return deletedRegistrations **/ - @ApiModelProperty(value = "The number of deleted registrations (deregistrations) linked to the account. Deregistration is the process of removing the device registration from the Device Management Connect registry. The deregistration is usually initiated by the device. Device Management Connect no longer handles requests for a deregistered device.") + @ApiModelProperty(value = "The number of deleted registrations (deregistrations) linked to the account. Deregistration is the process of removing the device registration from the Device Management Connect registry. The deregistration is usually initiated by the device. Device Management Connect no longer handles requests for deregistered devices.") public Long getDeletedRegistrations() { return deletedRegistrations; } @@ -216,11 +213,11 @@ public Metric deviceObservations(Long deviceObservations) { * **(Beta)** The number of notifications received by the Device Management Connect service from the devices linked * to the account. The device pushes notifications to Device Management Connect when you have successfully * subscribed to the device resources using [Connect - * API](/docs/current/service-api-references/device-management-connect.html) endpoints. + * API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. * * @return deviceObservations **/ - @ApiModelProperty(value = "**(Beta)** The number of notifications received by the Device Management Connect service from the devices linked to the account. The device pushes notifications to Device Management Connect when you have successfully subscribed to the device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. ") + @ApiModelProperty(value = "**(Beta)** The number of notifications received by the Device Management Connect service from the devices linked to the account. The device pushes notifications to Device Management Connect when you have successfully subscribed to the device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints.") public Long getDeviceObservations() { return deviceObservations; } @@ -237,12 +234,11 @@ public Metric deviceProxyRequestError(Long deviceProxyRequestError) { /** * **(Beta)** The number of failed proxy requests from the Device Management Connect service to devices linked to * the account. Device Management Connect makes proxy requests to devices when you try to read or write values to - * device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) - * endpoints. + * device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. * * @return deviceProxyRequestError **/ - @ApiModelProperty(value = "**(Beta)** The number of failed proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. ") + @ApiModelProperty(value = "**(Beta)** The number of failed proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints.") public Long getDeviceProxyRequestError() { return deviceProxyRequestError; } @@ -259,12 +255,11 @@ public Metric deviceProxyRequestSuccess(Long deviceProxyRequestSuccess) { /** * **(Beta)** The number of successful proxy requests from the Device Management Connect service to devices linked * to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to - * device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) - * endpoints. + * device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints. * * @return deviceProxyRequestSuccess **/ - @ApiModelProperty(value = "**(Beta)** The number of successful proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. ") + @ApiModelProperty(value = "**(Beta)** The number of successful proxy requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes proxy requests to devices when you try to read or write values to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints.") public Long getDeviceProxyRequestSuccess() { return deviceProxyRequestSuccess; } @@ -281,12 +276,12 @@ public Metric deviceSubscriptionRequestError(Long deviceSubscriptionRequestError /** * **(Beta)** The number of failed subscription requests from the Device Management Connect service to devices * linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe - * to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) + * to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) * endpoints. * * @return deviceSubscriptionRequestError **/ - @ApiModelProperty(value = "**(Beta)** The number of failed subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. ") + @ApiModelProperty(value = "**(Beta)** The number of failed subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints.") public Long getDeviceSubscriptionRequestError() { return deviceSubscriptionRequestError; } @@ -303,12 +298,12 @@ public Metric deviceSubscriptionRequestSuccess(Long deviceSubscriptionRequestSuc /** * **(Beta)** The number of successful subscription requests from the Device Management Connect service to devices * linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe - * to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) + * to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) * endpoints. * * @return deviceSubscriptionRequestSuccess **/ - @ApiModelProperty(value = "**(Beta)** The number of successful subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) endpoints. ") + @ApiModelProperty(value = "**(Beta)** The number of successful subscription requests from the Device Management Connect service to devices linked to the account. Device Management Connect makes subscription requests to devices when you try to subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) endpoints.") public Long getDeviceSubscriptionRequestSuccess() { return deviceSubscriptionRequestSuccess; } @@ -323,13 +318,13 @@ public Metric expiredRegistrations(Long expiredRegistrations) { } /** - * The number of expired registrations linked to the account. Device Management Connect removes the device - * registrations when the devices cannot update their registration before the expiry of the lifetime. Device - * Management Connect no longer handles requests for a device whose registration has expired already. + * The number of expired registrations linked to the account. Device Management Connect removes a registration when + * the device cannot update its registration before lifetime expiry. Device Management Connect no longer handles + * requests for devices with already expired registrations. * * @return expiredRegistrations **/ - @ApiModelProperty(value = "The number of expired registrations linked to the account. Device Management Connect removes the device registrations when the devices cannot update their registration before the expiry of the lifetime. Device Management Connect no longer handles requests for a device whose registration has expired already.") + @ApiModelProperty(value = "The number of expired registrations linked to the account. Device Management Connect removes a registration when the device cannot update its registration before lifetime expiry. Device Management Connect no longer handles requests for devices with already expired registrations.") public Long getExpiredRegistrations() { return expiredRegistrations; } @@ -345,13 +340,13 @@ public Metric fullRegistrations(Long fullRegistrations) { /** * The number of full registrations linked to the account. Full registration is the process of registering a device - * with Device Management Connect by providing its lifetime and capabilities such as the resource structure.The - * registered status of the device does not guarantee that the device is active and accessible from Device - * Management Connect at any point of time. + * with Device Management Connect by providing its lifetime and capabilities, such as resource structure. Device + * registered status does not guarantee that the device is active and accessible from Device Management Connect at + * any point of time. * * @return fullRegistrations **/ - @ApiModelProperty(value = "The number of full registrations linked to the account. Full registration is the process of registering a device with Device Management Connect by providing its lifetime and capabilities such as the resource structure.The registered status of the device does not guarantee that the device is active and accessible from Device Management Connect at any point of time.") + @ApiModelProperty(value = "The number of full registrations linked to the account. Full registration is the process of registering a device with Device Management Connect by providing its lifetime and capabilities, such as resource structure. Device registered status does not guarantee that the device is active and accessible from Device Management Connect at any point of time.") public Long getFullRegistrations() { return fullRegistrations; } @@ -367,13 +362,13 @@ public Metric handshakesSuccessful(Long handshakesSuccessful) { /** * The number of successful TLS handshakes the account has performed. The SSL or TLS handshake enables the SSL or - * TLS client and server to establish the secret keys with which they communicate. A successful TLS handshake is - * required for establishing a connection with Device Management Connect for any operaton such as registration, - * registration update and deregistration. + * TLS client and server to establish secret keys. A successful TLS handshake is required for establishing a + * connection with Device Management Connect for any operation such as registration, registration update, and + * deregistration. * * @return handshakesSuccessful **/ - @ApiModelProperty(value = "The number of successful TLS handshakes the account has performed. The SSL or TLS handshake enables the SSL or TLS client and server to establish the secret keys with which they communicate. A successful TLS handshake is required for establishing a connection with Device Management Connect for any operaton such as registration, registration update and deregistration.") + @ApiModelProperty(value = "The number of successful TLS handshakes the account has performed. The SSL or TLS handshake enables the SSL or TLS client and server to establish secret keys. A successful TLS handshake is required for establishing a connection with Device Management Connect for any operation such as registration, registration update, and deregistration.") public Long getHandshakesSuccessful() { return handshakesSuccessful; } @@ -450,12 +445,12 @@ public Metric transactions(Long transactions) { /** * The number of transaction events from or to devices linked to the account. A transaction is a 512-byte block of * data processed by Device Management. It can be either sent by the device (device --> Device Management) or - * received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, TLS or - * DTLS packet overhead. It only contains the packet payload (full CoAP packet including CoAP headers). + * received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, or TLS + * or DTLS packet overhead. It contains only the packet payload (full CoAP packet including CoAP headers). * * @return transactions **/ - @ApiModelProperty(value = "The number of transaction events from or to devices linked to the account. A transaction is a 512-byte block of data processed by Device Management. It can be either sent by the device (device --> Device Management) or received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, TLS or DTLS packet overhead. It only contains the packet payload (full CoAP packet including CoAP headers).") + @ApiModelProperty(value = "The number of transaction events from or to devices linked to the account. A transaction is a 512-byte block of data processed by Device Management. It can be either sent by the device (device --> Device Management) or received by the device (Device Management --> device). A transaction does not include IP, TCP or UDP, or TLS or DTLS packet overhead. It contains only the packet payload (full CoAP packet including CoAP headers).") public Long getTransactions() { return transactions; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/NotificationEntryList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/NotificationEntryList.java index 182d39dc7..be74fa460 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/NotificationEntryList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/NotificationEntryList.java @@ -150,12 +150,12 @@ public NotificationEntryList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/OIDCClaimMapping.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/OIDCClaimMapping.java index 0a21a41f3..bb5599371 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/OIDCClaimMapping.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/OIDCClaimMapping.java @@ -82,7 +82,7 @@ public OIDCClaimMapping emailVerified(String emailVerified) { * * @return emailVerified **/ - @ApiModelProperty(value = "Custom claim name for 'email_verified'.") + @ApiModelProperty(example = "email_verified", value = "Custom claim name for 'email_verified'.") public String getEmailVerified() { return emailVerified; } @@ -101,7 +101,7 @@ public OIDCClaimMapping familyName(String familyName) { * * @return familyName **/ - @ApiModelProperty(value = "Custom claim name for 'family_name'.") + @ApiModelProperty(example = "family_name", value = "Custom claim name for 'family_name'.") public String getFamilyName() { return familyName; } @@ -120,7 +120,7 @@ public OIDCClaimMapping givenName(String givenName) { * * @return givenName **/ - @ApiModelProperty(value = "Custom claim name for 'given_name'.") + @ApiModelProperty(example = "given_name", value = "Custom claim name for 'given_name'.") public String getGivenName() { return givenName; } @@ -139,7 +139,7 @@ public OIDCClaimMapping name(String name) { * * @return name **/ - @ApiModelProperty(value = "Custom claim name for 'name'.") + @ApiModelProperty(example = "name", value = "Custom claim name for 'name'.") public String getName() { return name; } @@ -158,7 +158,7 @@ public OIDCClaimMapping phoneNumber(String phoneNumber) { * * @return phoneNumber **/ - @ApiModelProperty(value = "Custom claim name for 'phone_number'.") + @ApiModelProperty(example = "phone_number", value = "Custom claim name for 'phone_number'.") public String getPhoneNumber() { return phoneNumber; } @@ -177,7 +177,7 @@ public OIDCClaimMapping sub(String sub) { * * @return sub **/ - @ApiModelProperty(value = "Custom claim name for 'sub'.") + @ApiModelProperty(example = "sub", value = "Custom claim name for 'sub'.") public String getSub() { return sub; } @@ -196,7 +196,7 @@ public OIDCClaimMapping updatedAt(String updatedAt) { * * @return updatedAt **/ - @ApiModelProperty(value = "Custom claim name for 'updated_at'.") + @ApiModelProperty(example = "updated_at", value = "Custom claim name for 'updated_at'.") public String getUpdatedAt() { return updatedAt; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/PelionToDeviceMessagesCounter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/PelionToDeviceMessagesCounter.java new file mode 100644 index 000000000..3a29e723d --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/PelionToDeviceMessagesCounter.java @@ -0,0 +1,136 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * The number of messages from Device Management to the device. + */ +@ApiModel(description = "The number of messages from Device Management to the device.") + +public class PelionToDeviceMessagesCounter implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("proxy_requests") + private Integer proxyRequests = null; + + @SerializedName("subscriptions") + private Integer subscriptions = null; + + @SerializedName("total_count") + private Long totalCount = null; + + public PelionToDeviceMessagesCounter proxyRequests(Integer proxyRequests) { + this.proxyRequests = proxyRequests; + return this; + } + + /** + * Get proxyRequests + * + * @return proxyRequests + **/ + @ApiModelProperty(required = true, value = "") + public Integer getProxyRequests() { + return proxyRequests; + } + + public void setProxyRequests(Integer proxyRequests) { + this.proxyRequests = proxyRequests; + } + + public PelionToDeviceMessagesCounter subscriptions(Integer subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** + * Get subscriptions + * + * @return subscriptions + **/ + @ApiModelProperty(required = true, value = "") + public Integer getSubscriptions() { + return subscriptions; + } + + public void setSubscriptions(Integer subscriptions) { + this.subscriptions = subscriptions; + } + + public PelionToDeviceMessagesCounter totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The number of all outbound requests sent to devices. minimum: 0 + * + * @return totalCount + **/ + @ApiModelProperty(required = true, value = "The number of all outbound requests sent to devices.") + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PelionToDeviceMessagesCounter pelionToDeviceMessagesCounter = (PelionToDeviceMessagesCounter) o; + return Objects.equals(this.proxyRequests, pelionToDeviceMessagesCounter.proxyRequests) + && Objects.equals(this.subscriptions, pelionToDeviceMessagesCounter.subscriptions) + && Objects.equals(this.totalCount, pelionToDeviceMessagesCounter.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(proxyRequests, subscriptions, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PelionToDeviceMessagesCounter {\n"); + + sb.append(" proxyRequests: ").append(toIndentedString(proxyRequests)).append("\n"); + sb.append(" subscriptions: ").append(toIndentedString(subscriptions)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Presubscription.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Presubscription.java index 9187fd475..404703c0b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Presubscription.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Presubscription.java @@ -41,11 +41,11 @@ public Presubscription endpointName(String endpointName) { } /** - * The device ID. + * Device Management device ID. * * @return endpointName **/ - @ApiModelProperty(example = "015f3850a657000000000001001002ab", value = "The device ID.") + @ApiModelProperty(example = "015f3850a657000000000001001002ab", value = "Device Management device ID.") public String getEndpointName() { return endpointName; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/QuotaUsageReport.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/QuotaUsageReport.java index b173ceb4f..906df498f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/QuotaUsageReport.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/QuotaUsageReport.java @@ -56,7 +56,9 @@ public enum TypeEnum { PACKAGE_CREATION("package_creation"), - PACKAGE_TERMINATION("package_termination"); + PACKAGE_TERMINATION("package_termination"), + + PACKAGE_TOKENS_EDIT("package_tokens_edit"); private String value; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/RegisterWebsocketChannel.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/RegisterWebsocketChannel.java index 50a5930cc..c4ad34237 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/RegisterWebsocketChannel.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/RegisterWebsocketChannel.java @@ -25,24 +25,24 @@ public class RegisterWebsocketChannel implements Serializable { private static final long serialVersionUID = 1L; @SerializedName("serialization") - private Object serialization = null; + private SerializationConfigData serialization = null; - public RegisterWebsocketChannel serialization(Object serialization) { + public RegisterWebsocketChannel serialization(SerializationConfigData serialization) { this.serialization = serialization; return this; } /** - * Serialization configuration for a channel + * Get serialization * * @return serialization **/ - @ApiModelProperty(value = "Serialization configuration for a channel") - public Object getSerialization() { + @ApiModelProperty(value = "") + public SerializationConfigData getSerialization() { return serialization; } - public void setSerialization(Object serialization) { + public void setSerialization(SerializationConfigData serialization) { this.serialization = serialization; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportAccountContactInfo.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportAccountContactInfo.java index fcb78dae2..50df95ce5 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportAccountContactInfo.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportAccountContactInfo.java @@ -13,9 +13,14 @@ package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.io.Serializable; /** @@ -32,6 +37,59 @@ public class ReportAccountContactInfo implements Serializable { @SerializedName("address_line2") private String addressLine2 = null; + @SerializedName("alias") + private String alias = null; + + /** + * The business model selected for the account to generate the billing reports. + */ + @JsonAdapter(BusinessModelEnum.Adapter.class) + public enum BusinessModelEnum { + ACTIVE_DEVICE_BUSINESS_MODEL("active_device_business_model"), + + API_CALLS_1_BUSINESS_MODEL("api_calls_1_business_model"); + + private String value; + + BusinessModelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BusinessModelEnum fromValue(String text) { + for (BusinessModelEnum b : BusinessModelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BusinessModelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BusinessModelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BusinessModelEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("business_model") + private BusinessModelEnum businessModel = null; + @SerializedName("city") private String city = null; @@ -44,6 +102,9 @@ public class ReportAccountContactInfo implements Serializable { @SerializedName("country") private String country = null; + @SerializedName("customer_subtenant_id") + private String customerSubtenantId = null; + @SerializedName("email") private String email = null; @@ -97,6 +158,44 @@ public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } + public ReportAccountContactInfo alias(String alias) { + this.alias = alias; + return this; + } + + /** + * Get alias + * + * @return alias + **/ + @ApiModelProperty(value = "") + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public ReportAccountContactInfo businessModel(BusinessModelEnum businessModel) { + this.businessModel = businessModel; + return this; + } + + /** + * The business model selected for the account to generate the billing reports. + * + * @return businessModel + **/ + @ApiModelProperty(value = "The business model selected for the account to generate the billing reports.") + public BusinessModelEnum getBusinessModel() { + return businessModel; + } + + public void setBusinessModel(BusinessModelEnum businessModel) { + this.businessModel = businessModel; + } + public ReportAccountContactInfo city(String city) { this.city = city; return this; @@ -173,6 +272,25 @@ public void setCountry(String country) { this.country = country; } + public ReportAccountContactInfo customerSubtenantId(String customerSubtenantId) { + this.customerSubtenantId = customerSubtenantId; + return this; + } + + /** + * Account tenant ID, valid only for tenants. + * + * @return customerSubtenantId + **/ + @ApiModelProperty(value = "Account tenant ID, valid only for tenants.") + public String getCustomerSubtenantId() { + return customerSubtenantId; + } + + public void setCustomerSubtenantId(String customerSubtenantId) { + this.customerSubtenantId = customerSubtenantId; + } + public ReportAccountContactInfo email(String email) { this.email = email; return this; @@ -279,10 +397,13 @@ public boolean equals(java.lang.Object o) { ReportAccountContactInfo reportAccountContactInfo = (ReportAccountContactInfo) o; return Objects.equals(this.addressLine1, reportAccountContactInfo.addressLine1) && Objects.equals(this.addressLine2, reportAccountContactInfo.addressLine2) + && Objects.equals(this.alias, reportAccountContactInfo.alias) + && Objects.equals(this.businessModel, reportAccountContactInfo.businessModel) && Objects.equals(this.city, reportAccountContactInfo.city) && Objects.equals(this.company, reportAccountContactInfo.company) && Objects.equals(this.contact, reportAccountContactInfo.contact) && Objects.equals(this.country, reportAccountContactInfo.country) + && Objects.equals(this.customerSubtenantId, reportAccountContactInfo.customerSubtenantId) && Objects.equals(this.email, reportAccountContactInfo.email) && Objects.equals(this.id, reportAccountContactInfo.id) && Objects.equals(this.phoneNumber, reportAccountContactInfo.phoneNumber) @@ -292,8 +413,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(addressLine1, addressLine2, city, company, contact, country, email, id, phoneNumber, - postalCode, state); + return Objects.hash(addressLine1, addressLine2, alias, businessModel, city, company, contact, country, + customerSubtenantId, email, id, phoneNumber, postalCode, state); } @Override @@ -303,10 +424,13 @@ public String toString() { sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); + sb.append(" businessModel: ").append(toIndentedString(businessModel)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" company: ").append(toIndentedString(company)).append("\n"); sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" customerSubtenantId: ").append(toIndentedString(customerSubtenantId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportBillingData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportBillingData.java index 5dd76b2b9..7a710f137 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportBillingData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportBillingData.java @@ -26,58 +26,92 @@ public class ReportBillingData implements Serializable { private static final long serialVersionUID = 1L; @SerializedName("active_devices") - private Long activeDevices = null; + private Integer activeDevices = null; + + @SerializedName("device_to_pelion_messages") + private DeviceToPelionMessagesCounter deviceToPelionMessages = null; @SerializedName("firmware_updates") - private Long firmwareUpdates = null; + private Integer firmwareUpdates = null; @SerializedName("generated") private DateTime generated = null; + @SerializedName("pelion_to_device_messages") + private PelionToDeviceMessagesCounter pelionToDeviceMessages = null; + + @SerializedName("pelion_to_webapp_notifications") + private Integer pelionToWebappNotifications = null; + @SerializedName("period_end") private DateTime periodEnd = null; @SerializedName("period_start") private DateTime periodStart = null; + @SerializedName("rest_api_requests_with_api_key_token") + private Integer restApiRequestsWithApiKeyToken = null; + + @SerializedName("rest_api_requests_with_user_token") + private Integer restApiRequestsWithUserToken = null; + @SerializedName("sda_tokens") - private Long sdaTokens = null; + private Integer sdaTokens = null; - public ReportBillingData activeDevices(Long activeDevices) { + public ReportBillingData activeDevices(Integer activeDevices) { this.activeDevices = activeDevices; return this; } /** - * Get activeDevices minimum: 0 + * Get activeDevices * * @return activeDevices **/ @ApiModelProperty(required = true, value = "") - public Long getActiveDevices() { + public Integer getActiveDevices() { return activeDevices; } - public void setActiveDevices(Long activeDevices) { + public void setActiveDevices(Integer activeDevices) { this.activeDevices = activeDevices; } - public ReportBillingData firmwareUpdates(Long firmwareUpdates) { + public ReportBillingData deviceToPelionMessages(DeviceToPelionMessagesCounter deviceToPelionMessages) { + this.deviceToPelionMessages = deviceToPelionMessages; + return this; + } + + /** + * Get deviceToPelionMessages + * + * @return deviceToPelionMessages + **/ + @ApiModelProperty(value = "") + public DeviceToPelionMessagesCounter getDeviceToPelionMessages() { + return deviceToPelionMessages; + } + + public void setDeviceToPelionMessages(DeviceToPelionMessagesCounter deviceToPelionMessages) { + this.deviceToPelionMessages = deviceToPelionMessages; + } + + public ReportBillingData firmwareUpdates(Integer firmwareUpdates) { this.firmwareUpdates = firmwareUpdates; return this; } /** - * Get firmwareUpdates minimum: 0 + * Get firmwareUpdates * * @return firmwareUpdates **/ @ApiModelProperty(required = true, value = "") - public Long getFirmwareUpdates() { + public Integer getFirmwareUpdates() { return firmwareUpdates; } - public void setFirmwareUpdates(Long firmwareUpdates) { + public void setFirmwareUpdates(Integer firmwareUpdates) { this.firmwareUpdates = firmwareUpdates; } @@ -101,6 +135,44 @@ public void setGenerated(DateTime generated) { this.generated = generated; } + public ReportBillingData pelionToDeviceMessages(PelionToDeviceMessagesCounter pelionToDeviceMessages) { + this.pelionToDeviceMessages = pelionToDeviceMessages; + return this; + } + + /** + * Get pelionToDeviceMessages + * + * @return pelionToDeviceMessages + **/ + @ApiModelProperty(value = "") + public PelionToDeviceMessagesCounter getPelionToDeviceMessages() { + return pelionToDeviceMessages; + } + + public void setPelionToDeviceMessages(PelionToDeviceMessagesCounter pelionToDeviceMessages) { + this.pelionToDeviceMessages = pelionToDeviceMessages; + } + + public ReportBillingData pelionToWebappNotifications(Integer pelionToWebappNotifications) { + this.pelionToWebappNotifications = pelionToWebappNotifications; + return this; + } + + /** + * Get pelionToWebappNotifications + * + * @return pelionToWebappNotifications + **/ + @ApiModelProperty(value = "") + public Integer getPelionToWebappNotifications() { + return pelionToWebappNotifications; + } + + public void setPelionToWebappNotifications(Integer pelionToWebappNotifications) { + this.pelionToWebappNotifications = pelionToWebappNotifications; + } + public ReportBillingData periodEnd(DateTime periodEnd) { this.periodEnd = periodEnd; return this; @@ -141,22 +213,60 @@ public void setPeriodStart(DateTime periodStart) { this.periodStart = periodStart; } - public ReportBillingData sdaTokens(Long sdaTokens) { + public ReportBillingData restApiRequestsWithApiKeyToken(Integer restApiRequestsWithApiKeyToken) { + this.restApiRequestsWithApiKeyToken = restApiRequestsWithApiKeyToken; + return this; + } + + /** + * Get restApiRequestsWithApiKeyToken + * + * @return restApiRequestsWithApiKeyToken + **/ + @ApiModelProperty(value = "") + public Integer getRestApiRequestsWithApiKeyToken() { + return restApiRequestsWithApiKeyToken; + } + + public void setRestApiRequestsWithApiKeyToken(Integer restApiRequestsWithApiKeyToken) { + this.restApiRequestsWithApiKeyToken = restApiRequestsWithApiKeyToken; + } + + public ReportBillingData restApiRequestsWithUserToken(Integer restApiRequestsWithUserToken) { + this.restApiRequestsWithUserToken = restApiRequestsWithUserToken; + return this; + } + + /** + * Get restApiRequestsWithUserToken + * + * @return restApiRequestsWithUserToken + **/ + @ApiModelProperty(value = "") + public Integer getRestApiRequestsWithUserToken() { + return restApiRequestsWithUserToken; + } + + public void setRestApiRequestsWithUserToken(Integer restApiRequestsWithUserToken) { + this.restApiRequestsWithUserToken = restApiRequestsWithUserToken; + } + + public ReportBillingData sdaTokens(Integer sdaTokens) { this.sdaTokens = sdaTokens; return this; } /** - * Get sdaTokens minimum: 0 + * Get sdaTokens * * @return sdaTokens **/ @ApiModelProperty(required = true, value = "") - public Long getSdaTokens() { + public Integer getSdaTokens() { return sdaTokens; } - public void setSdaTokens(Long sdaTokens) { + public void setSdaTokens(Integer sdaTokens) { this.sdaTokens = sdaTokens; } @@ -170,16 +280,23 @@ public boolean equals(java.lang.Object o) { } ReportBillingData reportBillingData = (ReportBillingData) o; return Objects.equals(this.activeDevices, reportBillingData.activeDevices) + && Objects.equals(this.deviceToPelionMessages, reportBillingData.deviceToPelionMessages) && Objects.equals(this.firmwareUpdates, reportBillingData.firmwareUpdates) && Objects.equals(this.generated, reportBillingData.generated) + && Objects.equals(this.pelionToDeviceMessages, reportBillingData.pelionToDeviceMessages) + && Objects.equals(this.pelionToWebappNotifications, reportBillingData.pelionToWebappNotifications) && Objects.equals(this.periodEnd, reportBillingData.periodEnd) && Objects.equals(this.periodStart, reportBillingData.periodStart) + && Objects.equals(this.restApiRequestsWithApiKeyToken, reportBillingData.restApiRequestsWithApiKeyToken) + && Objects.equals(this.restApiRequestsWithUserToken, reportBillingData.restApiRequestsWithUserToken) && Objects.equals(this.sdaTokens, reportBillingData.sdaTokens); } @Override public int hashCode() { - return Objects.hash(activeDevices, firmwareUpdates, generated, periodEnd, periodStart, sdaTokens); + return Objects.hash(activeDevices, deviceToPelionMessages, firmwareUpdates, generated, pelionToDeviceMessages, + pelionToWebappNotifications, periodEnd, periodStart, restApiRequestsWithApiKeyToken, + restApiRequestsWithUserToken, sdaTokens); } @Override @@ -188,10 +305,18 @@ public String toString() { sb.append("class ReportBillingData {\n"); sb.append(" activeDevices: ").append(toIndentedString(activeDevices)).append("\n"); + sb.append(" deviceToPelionMessages: ").append(toIndentedString(deviceToPelionMessages)).append("\n"); sb.append(" firmwareUpdates: ").append(toIndentedString(firmwareUpdates)).append("\n"); sb.append(" generated: ").append(toIndentedString(generated)).append("\n"); + sb.append(" pelionToDeviceMessages: ").append(toIndentedString(pelionToDeviceMessages)).append("\n"); + sb.append(" pelionToWebappNotifications: ").append(toIndentedString(pelionToWebappNotifications)) + .append("\n"); sb.append(" periodEnd: ").append(toIndentedString(periodEnd)).append("\n"); sb.append(" periodStart: ").append(toIndentedString(periodStart)).append("\n"); + sb.append(" restApiRequestsWithApiKeyToken: ").append(toIndentedString(restApiRequestsWithApiKeyToken)) + .append("\n"); + sb.append(" restApiRequestsWithUserToken: ").append(toIndentedString(restApiRequestsWithUserToken)) + .append("\n"); sb.append(" sdaTokens: ").append(toIndentedString(sdaTokens)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportResponse.java index 23360225b..2222d940a 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ReportResponse.java @@ -100,7 +100,7 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { private ServicePackageReport servicePackage = null; @SerializedName("subtenants") - private List subtenants = new ArrayList(); + private List subtenants = null; public ReportResponse account(ReportAccountContactInfo account) { this.account = account; @@ -127,12 +127,11 @@ public ReportResponse aggregated(ReportBillingData aggregated) { } /** - * Aggregated report billing data including all subtenant accounts, if any. + * Aggregated report billing data including all tenant accounts, if any. * * @return aggregated **/ - @ApiModelProperty(required = true, - value = "Aggregated report billing data including all subtenant accounts, if any.") + @ApiModelProperty(value = "Aggregated report billing data including all tenant accounts, if any.") public ReportBillingData getAggregated() { return aggregated; } @@ -223,11 +222,11 @@ public ReportResponse servicePackage(ServicePackageReport servicePackage) { } /** - * Report service package. + * Service package report. * * @return servicePackage **/ - @ApiModelProperty(value = "Report service package.") + @ApiModelProperty(value = "Service package report.") public ServicePackageReport getServicePackage() { return servicePackage; } @@ -242,17 +241,19 @@ public ReportResponse subtenants(List subtenants) { } public ReportResponse addSubtenantsItem(SubtenantAccountReport subtenantsItem) { + if (this.subtenants == null) { + this.subtenants = new ArrayList(); + } this.subtenants.add(subtenantsItem); return this; } /** - * List of billing reports for subtenant accounts. Empty list if account does not have any subtenant account. + * List of billing reports for tenant accounts. Empty list if account does not have any tenant account. * * @return subtenants **/ - @ApiModelProperty(required = true, - value = "List of billing reports for subtenant accounts. Empty list if account does not have any subtenant account.") + @ApiModelProperty(value = "List of billing reports for tenant accounts. Empty list if account does not have any tenant account.") public List getSubtenants() { return subtenants; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Resource.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Resource.java index f01946cb6..bf7f7116d 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Resource.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Resource.java @@ -63,14 +63,15 @@ public Resource rt(String rt) { } /** - * Application-specific resource type that describes this resource. It is created by the [client side - * application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable - * name for the resource. Multiple resource types may be included, separated by a space. + * Application-specific resource type that describes this resource, created by the [client + * application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). + * Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a + * space. * * @return rt **/ @ApiModelProperty(example = "light_sensor", - value = "Application-specific resource type that describes this resource. It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space.") + value = "Application-specific resource type that describes this resource, created by the [client application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space.") public String getRt() { return rt; } @@ -85,13 +86,13 @@ public Resource type(String type) { } /** - * The content type of the resource. We recommend you use the **resource types** listed in the [LwM2M - * specification](http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry). + * The content type of the resource. We recommend you use the content types listed in the [LwM2M + * specification](http://www.openmobilealliance.org/wp/omna/lwm2m/lwm2mregistry.html). * * @return type **/ @ApiModelProperty(example = "text/plain", - value = "The content type of the resource. We recommend you use the **resource types** listed in the [LwM2M specification](http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry).") + value = "The content type of the resource. We recommend you use the content types listed in the [LwM2M specification](http://www.openmobilealliance.org/wp/omna/lwm2m/lwm2mregistry.html).") public String getType() { return type; } @@ -106,11 +107,15 @@ public Resource uri(String uri) { } /** - * The resource URL. + * The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for + * example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the + * Device Management resource model, please see the [Device Management + * documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html). * * @return uri **/ - @ApiModelProperty(example = "/sen/light", required = true, value = "The resource URL.") + @ApiModelProperty(example = "/sen/light", required = true, + value = "The resource URL. This can be the path to: - An object; for example, `3303`. - An object instance; for example `3303/0`. - A resource; for example `3303/0/5602`. For more information about the Device Management resource model, please see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html).") public String getUri() { return uri; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourceArray.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourceArray.java new file mode 100644 index 000000000..25137e4a7 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourceArray.java @@ -0,0 +1,61 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import java.util.ArrayList; +import java.io.Serializable; + +/** + * ResourceArray + */ + +public class ResourceArray extends ArrayList implements Serializable { + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourcesData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourcesData.java index b996ccb4e..18cd67483 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourcesData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ResourcesData.java @@ -124,13 +124,14 @@ public ResourcesData rt(String rt) { /** * Application-specific resource type that describes this resource. It is created by the [client side - * application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable - * name for the resource. Multiple resource types may be included, separated by a space. + * application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). + * Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a + * space. * * @return rt **/ @ApiModelProperty(example = "light_sensor", - value = "Application-specific resource type that describes this resource. It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space.") + value = "Application-specific resource type that describes this resource. It is created by the [client side application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). Not meant to be a human-readable name for the resource. Multiple resource types may be included, separated by a space.") public String getRt() { return rt; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigData.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigData.java index 6fdb6609f..a689ae5e7 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigData.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigData.java @@ -18,19 +18,21 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.io.Serializable; /** - * SerializationConfigData + * Serialization configuration for a channel. */ +@ApiModel(description = "Serialization configuration for a channel.") public class SerializationConfigData implements Serializable { private static final long serialVersionUID = 1L; @SerializedName("cfg") - private Object cfg = null; + private SerializationConfigObjectV2 cfg = null; @SerializedName("max_chunk_size") private Integer maxChunkSize = null; @@ -83,22 +85,22 @@ public TypeEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("type") private TypeEnum type = TypeEnum.V2; - public SerializationConfigData cfg(Object cfg) { + public SerializationConfigData cfg(SerializationConfigObjectV2 cfg) { this.cfg = cfg; return this; } /** - * Serialization configuration object according to configuration type. + * Get cfg * * @return cfg **/ - @ApiModelProperty(value = "Serialization configuration object according to configuration type.") - public Object getCfg() { + @ApiModelProperty(value = "") + public SerializationConfigObjectV2 getCfg() { return cfg; } - public void setCfg(Object cfg) { + public void setCfg(SerializationConfigObjectV2 cfg) { this.cfg = cfg; } @@ -112,13 +114,13 @@ public SerializationConfigData maxChunkSize(Integer maxChunkSize) { * very low value for high troughput applications may cause lag in notification delivery, as a new chunk is sent * only after the previous one has been acknowledged. Using a high value is recommended and safe, as chunks are sent * quickly after notifications are received from devices. See [notification sending - * logic](../integrate-web-app/event-notification.html#notification-sending-logic) for more details. minimum: 100 - * maximum: 10000 + * logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) + * for more details. minimum: 100 maximum: 10000 * * @return maxChunkSize **/ @ApiModelProperty(example = "500", - value = "Maximum number of messages in NotificationMessage container delivered in one request. Default is 10000. Using a very low value for high troughput applications may cause lag in notification delivery, as a new chunk is sent only after the previous one has been acknowledged. Using a high value is recommended and safe, as chunks are sent quickly after notifications are received from devices. See [notification sending logic](../integrate-web-app/event-notification.html#notification-sending-logic) for more details.") + value = "Maximum number of messages in NotificationMessage container delivered in one request. Default is 10000. Using a very low value for high troughput applications may cause lag in notification delivery, as a new chunk is sent only after the previous one has been acknowledged. Using a high value is recommended and safe, as chunks are sent quickly after notifications are received from devices. See [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) for more details.") public Integer getMaxChunkSize() { return maxChunkSize; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigObjectV2.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigObjectV2.java index f6533ba57..8b7e859bc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigObjectV2.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SerializationConfigObjectV2.java @@ -14,12 +14,14 @@ import java.util.Objects; import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; /** - * SerializationConfigObjectV2 + * Serialization configuration object according to configuration type. */ +@ApiModel(description = "Serialization configuration object according to configuration type.") public class SerializationConfigObjectV2 implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryItem.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryItem.java index 42ff0dfbc..31b0600db 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryItem.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryItem.java @@ -56,7 +56,9 @@ public enum ReasonEnum { PACKAGE_RENEWAL("package_renewal"), - PACKAGE_TERMINATION("package_termination"); + PACKAGE_TERMINATION("package_termination"), + + PACKAGE_TOKENS_EDIT("package_tokens_edit"); private String value; @@ -188,12 +190,12 @@ public ServicePackageQuotaHistoryItem reservation(ServicePackageQuotaHistoryRese } /** - * Reservation details if reason is `reservation`, `reservation_releasem` or + * Reservation details if reason is `reservation`, `reservation_release` or * `reservation_termination`. * * @return reservation **/ - @ApiModelProperty(value = "Reservation details if reason is `reservation`, `reservation_releasem` or `reservation_termination`.") + @ApiModelProperty(value = "Reservation details if reason is `reservation`, `reservation_release` or `reservation_termination`.") public ServicePackageQuotaHistoryReservation getReservation() { return reservation; } @@ -208,12 +210,12 @@ public ServicePackageQuotaHistoryItem servicePackage(ServicePackageQuotaHistoryS } /** - * Service package details if reason is `package_creation`, `package_renewal` or - * `package_termination`. + * Service package details if reason is `package_creation`, `package_renewal`, + * `package_termination`, or `package_tokens_edit`. * * @return servicePackage **/ - @ApiModelProperty(value = "Service package details if reason is `package_creation`, `package_renewal` or `package_termination`.") + @ApiModelProperty(value = "Service package details if reason is `package_creation`, `package_renewal`, `package_termination`, or `package_tokens_edit`.") public ServicePackageQuotaHistoryServicePackage getServicePackage() { return servicePackage; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryResponse.java index 08ba693ab..2e831bfd8 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageQuotaHistoryResponse.java @@ -93,6 +93,9 @@ public ObjectEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("object") private ObjectEnum object = null; + @SerializedName("order") + private String order = null; + @SerializedName("total_count") private Integer totalCount = null; @@ -164,12 +167,11 @@ public ServicePackageQuotaHistoryResponse limit(Integer limit) { } /** - * Maximum number of quota history entries contained in one paged response. minimum: 2 maximum: 1000 + * Maximum number of quota history entries in one paged response. minimum: 2 maximum: 1000 * * @return limit **/ - @ApiModelProperty(required = true, - value = "Maximum number of quota history entries contained in one paged response.") + @ApiModelProperty(required = true, value = "Maximum number of quota history entries in one paged response.") public Integer getLimit() { return limit; } @@ -197,6 +199,25 @@ public void setObject(ObjectEnum object) { this.object = object; } + public ServicePackageQuotaHistoryResponse order(String order) { + this.order = order; + return this; + } + + /** + * History item record order based on creation time. + * + * @return order + **/ + @ApiModelProperty(required = true, value = "History item record order based on creation time.") + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + public ServicePackageQuotaHistoryResponse totalCount(Integer totalCount) { this.totalCount = totalCount; return this; @@ -230,12 +251,13 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.hasMore, servicePackageQuotaHistoryResponse.hasMore) && Objects.equals(this.limit, servicePackageQuotaHistoryResponse.limit) && Objects.equals(this.object, servicePackageQuotaHistoryResponse.object) + && Objects.equals(this.order, servicePackageQuotaHistoryResponse.order) && Objects.equals(this.totalCount, servicePackageQuotaHistoryResponse.totalCount); } @Override public int hashCode() { - return Objects.hash(after, data, hasMore, limit, object, totalCount); + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); } @Override @@ -248,6 +270,7 @@ public String toString() { sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageReport.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageReport.java index cf6fe24ae..959db5818 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageReport.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/ServicePackageReport.java @@ -29,7 +29,7 @@ public class ServicePackageReport implements Serializable { private static final long serialVersionUID = 1L; @SerializedName("aggregated_quota_usage") - private List aggregatedQuotaUsage = new ArrayList(); + private List aggregatedQuotaUsage = null; @SerializedName("metadata") private ServicePackageMetadata metadata = null; @@ -43,6 +43,9 @@ public ServicePackageReport aggregatedQuotaUsage(List(); + } this.aggregatedQuotaUsage.add(aggregatedQuotaUsageItem); return this; } @@ -52,7 +55,7 @@ public ServicePackageReport addAggregatedQuotaUsageItem(AggregatedQuotaUsageRepo * * @return aggregatedQuotaUsage **/ - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(value = "") public List getAggregatedQuotaUsage() { return aggregatedQuotaUsage; } @@ -71,7 +74,7 @@ public ServicePackageReport metadata(ServicePackageMetadata metadata) { * * @return metadata **/ - @ApiModelProperty(required = true, value = "`Null` if service package has expired.") + @ApiModelProperty(value = "`Null` if service package has expired.") public ServicePackageMetadata getMetadata() { return metadata; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportListResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportListResponse.java new file mode 100644 index 000000000..7127c0427 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportListResponse.java @@ -0,0 +1,291 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * StatisticsReportListResponse + */ + +public class StatisticsReportListResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = null; + + @SerializedName("end") + private DateTime end = null; + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("order") + private String order = null; + + @SerializedName("start") + private DateTime start = null; + + @SerializedName("total_count") + private Integer totalCount = null; + + public StatisticsReportListResponse after(String after) { + this.after = after; + return this; + } + + /** + * An offset token for the current page. + * + * @return after + **/ + @ApiModelProperty(example = "01631667477600000000000100100374", value = "An offset token for the current page.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public StatisticsReportListResponse data(List data) { + this.data = data; + return this; + } + + public StatisticsReportListResponse addDataItem(StatisticsReportResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList(); + } + this.data.add(dataItem); + return this; + } + + /** + * List of manufacturing statistics. + * + * @return data + **/ + @ApiModelProperty(value = "List of manufacturing statistics.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public StatisticsReportListResponse end(DateTime end) { + this.end = end; + return this; + } + + /** + * Get end + * + * @return end + **/ + @ApiModelProperty(example = "2020-03-30T07:30:00.000", value = "") + public DateTime getEnd() { + return end; + } + + public void setEnd(DateTime end) { + this.end = end; + } + + public StatisticsReportListResponse hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates whether additional results are available. + * + * @return hasMore + **/ + @ApiModelProperty(example = "false", value = "Indicates whether additional results are available.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public StatisticsReportListResponse limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The number of results to return (2-1000). Values outside of this range are set to the closest limit. minimum: 2 + * maximum: 1000 + * + * @return limit + **/ + @ApiModelProperty(example = "50", + value = "The number of results to return (2-1000). Values outside of this range are set to the closest limit.") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public StatisticsReportListResponse object(String object) { + this.object = object; + return this; + } + + /** + * The API object type. The object type of this API is \"list\". + * + * @return object + **/ + @ApiModelProperty(example = "list", value = "The API object type. The object type of this API is \"list\".") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public StatisticsReportListResponse order(String order) { + this.order = order; + return this; + } + + /** + * Record order based on record identifier. + * + * @return order + **/ + @ApiModelProperty(example = "DESC", value = "Record order based on record identifier.") + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + public StatisticsReportListResponse start(DateTime start) { + this.start = start; + return this; + } + + /** + * Get start + * + * @return start + **/ + @ApiModelProperty(example = "2020-03-29T07:30:00.000", value = "") + public DateTime getStart() { + return start; + } + + public void setStart(DateTime start) { + this.start = start; + } + + public StatisticsReportListResponse totalCount(Integer totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * + * @return totalCount + **/ + @ApiModelProperty(example = "100", value = "") + public Integer getTotalCount() { + return totalCount; + } + + public void setTotalCount(Integer totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatisticsReportListResponse statisticsReportListResponse = (StatisticsReportListResponse) o; + return Objects.equals(this.after, statisticsReportListResponse.after) + && Objects.equals(this.data, statisticsReportListResponse.data) + && Objects.equals(this.end, statisticsReportListResponse.end) + && Objects.equals(this.hasMore, statisticsReportListResponse.hasMore) + && Objects.equals(this.limit, statisticsReportListResponse.limit) + && Objects.equals(this.object, statisticsReportListResponse.object) + && Objects.equals(this.order, statisticsReportListResponse.order) + && Objects.equals(this.start, statisticsReportListResponse.start) + && Objects.equals(this.totalCount, statisticsReportListResponse.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, end, hasMore, limit, object, order, start, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatisticsReportListResponse {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportResponse.java new file mode 100644 index 000000000..cb4aedd4a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsReportResponse.java @@ -0,0 +1,257 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import java.io.Serializable; + +/** + * StatisticsReportResponse + */ + +public class StatisticsReportResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("avg_provisioning_time_sec") + private BigDecimal avgProvisioningTimeSec = null; + + @SerializedName("device_count") + private Integer deviceCount = null; + + @SerializedName("factory_id") + private Integer factoryId = null; + + @SerializedName("factory_name") + private String factoryName = null; + + @SerializedName("id") + private UUID id = null; + + @SerializedName("max_provisioning_time_sec") + private BigDecimal maxProvisioningTimeSec = null; + + @SerializedName("min_provisioning_time_sec") + private BigDecimal minProvisioningTimeSec = null; + + @SerializedName("workstation") + private String workstation = null; + + public StatisticsReportResponse avgProvisioningTimeSec(BigDecimal avgProvisioningTimeSec) { + this.avgProvisioningTimeSec = avgProvisioningTimeSec; + return this; + } + + /** + * Average provisioning time in seconds. + * + * @return avgProvisioningTimeSec + **/ + @ApiModelProperty(example = "2.5", value = "Average provisioning time in seconds.") + public BigDecimal getAvgProvisioningTimeSec() { + return avgProvisioningTimeSec; + } + + public void setAvgProvisioningTimeSec(BigDecimal avgProvisioningTimeSec) { + this.avgProvisioningTimeSec = avgProvisioningTimeSec; + } + + public StatisticsReportResponse deviceCount(Integer deviceCount) { + this.deviceCount = deviceCount; + return this; + } + + /** + * Number of manufactured devices. + * + * @return deviceCount + **/ + @ApiModelProperty(example = "103", value = "Number of manufactured devices.") + public Integer getDeviceCount() { + return deviceCount; + } + + public void setDeviceCount(Integer deviceCount) { + this.deviceCount = deviceCount; + } + + public StatisticsReportResponse factoryId(Integer factoryId) { + this.factoryId = factoryId; + return this; + } + + /** + * Factory ID. + * + * @return factoryId + **/ + @ApiModelProperty(example = "164", value = "Factory ID.") + public Integer getFactoryId() { + return factoryId; + } + + public void setFactoryId(Integer factoryId) { + this.factoryId = factoryId; + } + + public StatisticsReportResponse factoryName(String factoryName) { + this.factoryName = factoryName; + return this; + } + + /** + * Factory name. + * + * @return factoryName + **/ + @ApiModelProperty(example = "factory 1", value = "Factory name.") + public String getFactoryName() { + return factoryName; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public StatisticsReportResponse id(UUID id) { + this.id = id; + return this; + } + + /** + * Unique row identifier. + * + * @return id + **/ + @ApiModelProperty(example = "01612df56f3b0a580a010fc700000000", value = "Unique row identifier.") + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public StatisticsReportResponse maxProvisioningTimeSec(BigDecimal maxProvisioningTimeSec) { + this.maxProvisioningTimeSec = maxProvisioningTimeSec; + return this; + } + + /** + * Maximum provisioning time in seconds. + * + * @return maxProvisioningTimeSec + **/ + @ApiModelProperty(example = "3.1", value = "Maximum provisioning time in seconds.") + public BigDecimal getMaxProvisioningTimeSec() { + return maxProvisioningTimeSec; + } + + public void setMaxProvisioningTimeSec(BigDecimal maxProvisioningTimeSec) { + this.maxProvisioningTimeSec = maxProvisioningTimeSec; + } + + public StatisticsReportResponse minProvisioningTimeSec(BigDecimal minProvisioningTimeSec) { + this.minProvisioningTimeSec = minProvisioningTimeSec; + return this; + } + + /** + * Minimum provisioning time in seconds. + * + * @return minProvisioningTimeSec + **/ + @ApiModelProperty(example = "2.2", value = "Minimum provisioning time in seconds.") + public BigDecimal getMinProvisioningTimeSec() { + return minProvisioningTimeSec; + } + + public void setMinProvisioningTimeSec(BigDecimal minProvisioningTimeSec) { + this.minProvisioningTimeSec = minProvisioningTimeSec; + } + + public StatisticsReportResponse workstation(String workstation) { + this.workstation = workstation; + return this; + } + + /** + * Workstation. + * + * @return workstation + **/ + @ApiModelProperty(example = "ws_1", value = "Workstation.") + public String getWorkstation() { + return workstation; + } + + public void setWorkstation(String workstation) { + this.workstation = workstation; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatisticsReportResponse statisticsReportResponse = (StatisticsReportResponse) o; + return Objects.equals(this.avgProvisioningTimeSec, statisticsReportResponse.avgProvisioningTimeSec) + && Objects.equals(this.deviceCount, statisticsReportResponse.deviceCount) + && Objects.equals(this.factoryId, statisticsReportResponse.factoryId) + && Objects.equals(this.factoryName, statisticsReportResponse.factoryName) + && Objects.equals(this.id, statisticsReportResponse.id) + && Objects.equals(this.maxProvisioningTimeSec, statisticsReportResponse.maxProvisioningTimeSec) + && Objects.equals(this.minProvisioningTimeSec, statisticsReportResponse.minProvisioningTimeSec) + && Objects.equals(this.workstation, statisticsReportResponse.workstation); + } + + @Override + public int hashCode() { + return Objects.hash(avgProvisioningTimeSec, deviceCount, factoryId, factoryName, id, maxProvisioningTimeSec, + minProvisioningTimeSec, workstation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatisticsReportResponse {\n"); + + sb.append(" avgProvisioningTimeSec: ").append(toIndentedString(avgProvisioningTimeSec)).append("\n"); + sb.append(" deviceCount: ").append(toIndentedString(deviceCount)).append("\n"); + sb.append(" factoryId: ").append(toIndentedString(factoryId)).append("\n"); + sb.append(" factoryName: ").append(toIndentedString(factoryName)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" maxProvisioningTimeSec: ").append(toIndentedString(maxProvisioningTimeSec)).append("\n"); + sb.append(" minProvisioningTimeSec: ").append(toIndentedString(minProvisioningTimeSec)).append("\n"); + sb.append(" workstation: ").append(toIndentedString(workstation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsSeriesRecord.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsSeriesRecord.java new file mode 100644 index 000000000..92d91fb79 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsSeriesRecord.java @@ -0,0 +1,388 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * Statistics view record. + */ +@ApiModel(description = "Statistics view record.") + +public class StatisticsSeriesRecord implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("active_devices") + private Integer activeDevices = null; + + @SerializedName("device_to_pelion_messages") + private DeviceToPelionMessagesCounter deviceToPelionMessages = null; + + @SerializedName("firmware_updates") + private Integer firmwareUpdates = null; + + @SerializedName("id") + private String id = null; + + /** + * Always `billing-statistics`. + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + STATISTICS("billing-statistics"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + @SerializedName("pelion_to_device_messages") + private PelionToDeviceMessagesCounter pelionToDeviceMessages = null; + + @SerializedName("pelion_to_webapp_notifications") + private Integer pelionToWebappNotifications = null; + + @SerializedName("rest_api_requests_with_api_key_token") + private Integer restApiRequestsWithApiKeyToken = null; + + @SerializedName("rest_api_requests_with_user_token") + private Integer restApiRequestsWithUserToken = null; + + @SerializedName("sda_tokens") + private Integer sdaTokens = null; + + @SerializedName("timestamp") + private DateTime timestamp = null; + + public StatisticsSeriesRecord activeDevices(Integer activeDevices) { + this.activeDevices = activeDevices; + return this; + } + + /** + * Get activeDevices + * + * @return activeDevices + **/ + @ApiModelProperty(required = true, value = "") + public Integer getActiveDevices() { + return activeDevices; + } + + public void setActiveDevices(Integer activeDevices) { + this.activeDevices = activeDevices; + } + + public StatisticsSeriesRecord deviceToPelionMessages(DeviceToPelionMessagesCounter deviceToPelionMessages) { + this.deviceToPelionMessages = deviceToPelionMessages; + return this; + } + + /** + * Get deviceToPelionMessages + * + * @return deviceToPelionMessages + **/ + @ApiModelProperty(value = "") + public DeviceToPelionMessagesCounter getDeviceToPelionMessages() { + return deviceToPelionMessages; + } + + public void setDeviceToPelionMessages(DeviceToPelionMessagesCounter deviceToPelionMessages) { + this.deviceToPelionMessages = deviceToPelionMessages; + } + + public StatisticsSeriesRecord firmwareUpdates(Integer firmwareUpdates) { + this.firmwareUpdates = firmwareUpdates; + return this; + } + + /** + * Get firmwareUpdates + * + * @return firmwareUpdates + **/ + @ApiModelProperty(required = true, value = "") + public Integer getFirmwareUpdates() { + return firmwareUpdates; + } + + public void setFirmwareUpdates(Integer firmwareUpdates) { + this.firmwareUpdates = firmwareUpdates; + } + + public StatisticsSeriesRecord id(String id) { + this.id = id; + return this; + } + + /** + * Metric ID. + * + * @return id + **/ + @ApiModelProperty(required = true, value = "Metric ID.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public StatisticsSeriesRecord object(ObjectEnum object) { + this.object = object; + return this; + } + + /** + * Always `billing-statistics`. + * + * @return object + **/ + @ApiModelProperty(required = true, value = "Always `billing-statistics`.") + public ObjectEnum getObject() { + return object; + } + + public void setObject(ObjectEnum object) { + this.object = object; + } + + public StatisticsSeriesRecord pelionToDeviceMessages(PelionToDeviceMessagesCounter pelionToDeviceMessages) { + this.pelionToDeviceMessages = pelionToDeviceMessages; + return this; + } + + /** + * Get pelionToDeviceMessages + * + * @return pelionToDeviceMessages + **/ + @ApiModelProperty(value = "") + public PelionToDeviceMessagesCounter getPelionToDeviceMessages() { + return pelionToDeviceMessages; + } + + public void setPelionToDeviceMessages(PelionToDeviceMessagesCounter pelionToDeviceMessages) { + this.pelionToDeviceMessages = pelionToDeviceMessages; + } + + public StatisticsSeriesRecord pelionToWebappNotifications(Integer pelionToWebappNotifications) { + this.pelionToWebappNotifications = pelionToWebappNotifications; + return this; + } + + /** + * Get pelionToWebappNotifications + * + * @return pelionToWebappNotifications + **/ + @ApiModelProperty(value = "") + public Integer getPelionToWebappNotifications() { + return pelionToWebappNotifications; + } + + public void setPelionToWebappNotifications(Integer pelionToWebappNotifications) { + this.pelionToWebappNotifications = pelionToWebappNotifications; + } + + public StatisticsSeriesRecord restApiRequestsWithApiKeyToken(Integer restApiRequestsWithApiKeyToken) { + this.restApiRequestsWithApiKeyToken = restApiRequestsWithApiKeyToken; + return this; + } + + /** + * Get restApiRequestsWithApiKeyToken + * + * @return restApiRequestsWithApiKeyToken + **/ + @ApiModelProperty(value = "") + public Integer getRestApiRequestsWithApiKeyToken() { + return restApiRequestsWithApiKeyToken; + } + + public void setRestApiRequestsWithApiKeyToken(Integer restApiRequestsWithApiKeyToken) { + this.restApiRequestsWithApiKeyToken = restApiRequestsWithApiKeyToken; + } + + public StatisticsSeriesRecord restApiRequestsWithUserToken(Integer restApiRequestsWithUserToken) { + this.restApiRequestsWithUserToken = restApiRequestsWithUserToken; + return this; + } + + /** + * Get restApiRequestsWithUserToken + * + * @return restApiRequestsWithUserToken + **/ + @ApiModelProperty(value = "") + public Integer getRestApiRequestsWithUserToken() { + return restApiRequestsWithUserToken; + } + + public void setRestApiRequestsWithUserToken(Integer restApiRequestsWithUserToken) { + this.restApiRequestsWithUserToken = restApiRequestsWithUserToken; + } + + public StatisticsSeriesRecord sdaTokens(Integer sdaTokens) { + this.sdaTokens = sdaTokens; + return this; + } + + /** + * Get sdaTokens + * + * @return sdaTokens + **/ + @ApiModelProperty(required = true, value = "") + public Integer getSdaTokens() { + return sdaTokens; + } + + public void setSdaTokens(Integer sdaTokens) { + this.sdaTokens = sdaTokens; + } + + public StatisticsSeriesRecord timestamp(DateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * The start of the interval for which the data is aggregated, in RFC3339 date-time format with millisecond accuracy + * and UTC time zone. Each interval includes data for the time greater than or equal to the timestamp and less than + * the next interval's starting. + * + * @return timestamp + **/ + @ApiModelProperty(required = true, + value = "The start of the interval for which the data is aggregated, in RFC3339 date-time format with millisecond accuracy and UTC time zone. Each interval includes data for the time greater than or equal to the timestamp and less than the next interval's starting.") + public DateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(DateTime timestamp) { + this.timestamp = timestamp; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatisticsSeriesRecord statisticsSeriesRecord = (StatisticsSeriesRecord) o; + return Objects.equals(this.activeDevices, statisticsSeriesRecord.activeDevices) + && Objects.equals(this.deviceToPelionMessages, statisticsSeriesRecord.deviceToPelionMessages) + && Objects.equals(this.firmwareUpdates, statisticsSeriesRecord.firmwareUpdates) + && Objects.equals(this.id, statisticsSeriesRecord.id) + && Objects.equals(this.object, statisticsSeriesRecord.object) + && Objects.equals(this.pelionToDeviceMessages, statisticsSeriesRecord.pelionToDeviceMessages) + && Objects.equals(this.pelionToWebappNotifications, statisticsSeriesRecord.pelionToWebappNotifications) + && Objects.equals(this.restApiRequestsWithApiKeyToken, + statisticsSeriesRecord.restApiRequestsWithApiKeyToken) + && Objects.equals(this.restApiRequestsWithUserToken, statisticsSeriesRecord.restApiRequestsWithUserToken) + && Objects.equals(this.sdaTokens, statisticsSeriesRecord.sdaTokens) + && Objects.equals(this.timestamp, statisticsSeriesRecord.timestamp); + } + + @Override + public int hashCode() { + return Objects.hash(activeDevices, deviceToPelionMessages, firmwareUpdates, id, object, pelionToDeviceMessages, + pelionToWebappNotifications, restApiRequestsWithApiKeyToken, restApiRequestsWithUserToken, + sdaTokens, timestamp); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatisticsSeriesRecord {\n"); + + sb.append(" activeDevices: ").append(toIndentedString(activeDevices)).append("\n"); + sb.append(" deviceToPelionMessages: ").append(toIndentedString(deviceToPelionMessages)).append("\n"); + sb.append(" firmwareUpdates: ").append(toIndentedString(firmwareUpdates)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" pelionToDeviceMessages: ").append(toIndentedString(pelionToDeviceMessages)).append("\n"); + sb.append(" pelionToWebappNotifications: ").append(toIndentedString(pelionToWebappNotifications)) + .append("\n"); + sb.append(" restApiRequestsWithApiKeyToken: ").append(toIndentedString(restApiRequestsWithApiKeyToken)) + .append("\n"); + sb.append(" restApiRequestsWithUserToken: ").append(toIndentedString(restApiRequestsWithUserToken)) + .append("\n"); + sb.append(" sdaTokens: ").append(toIndentedString(sdaTokens)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsViewResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsViewResponse.java new file mode 100644 index 000000000..c0d8a3aef --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/StatisticsViewResponse.java @@ -0,0 +1,291 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * Contains the statistics view of Device Management usage information. + */ +@ApiModel(description = "Contains the statistics view of Device Management usage information.") + +public class StatisticsViewResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("after") + private String after = null; + + @SerializedName("data") + private List data = new ArrayList(); + + @SerializedName("has_more") + private Boolean hasMore = null; + + @SerializedName("limit") + private Integer limit = 50; + + /** + * Always `list`. + */ + @JsonAdapter(ObjectEnum.Adapter.class) + public enum ObjectEnum { + LIST("list"); + + private String value; + + ObjectEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ObjectEnum fromValue(String text) { + for (ObjectEnum b : ObjectEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ObjectEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ObjectEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ObjectEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("object") + private ObjectEnum object = null; + + @SerializedName("order") + private String order = null; + + @SerializedName("total_count") + private Long totalCount = null; + + public StatisticsViewResponse after(String after) { + this.after = after; + return this; + } + + /** + * The ID after which to fetch the statistics view. + * + * @return after + **/ + @ApiModelProperty(value = "The ID after which to fetch the statistics view.") + public String getAfter() { + return after; + } + + public void setAfter(String after) { + this.after = after; + } + + public StatisticsViewResponse data(List data) { + this.data = data; + return this; + } + + public StatisticsViewResponse addDataItem(StatisticsSeriesRecord dataItem) { + this.data.add(dataItem); + return this; + } + + /** + * List of statistics view records. Empty list if no records are available. + * + * @return data + **/ + @ApiModelProperty(required = true, + value = "List of statistics view records. Empty list if no records are available.") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public StatisticsViewResponse hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates whether a new statistics view response is available. + * + * @return hasMore + **/ + @ApiModelProperty(required = true, value = "Indicates whether a new statistics view response is available.") + public Boolean isHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public StatisticsViewResponse limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Maximum number of statistics view records on a page. minimum: 2 maximum: 1000 + * + * @return limit + **/ + @ApiModelProperty(required = true, value = "Maximum number of statistics view records on a page.") + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public StatisticsViewResponse object(ObjectEnum object) { + this.object = object; + return this; + } + + /** + * Always `list`. + * + * @return object + **/ + @ApiModelProperty(required = true, value = "Always `list`.") + public ObjectEnum getObject() { + return object; + } + + public void setObject(ObjectEnum object) { + this.object = object; + } + + public StatisticsViewResponse order(String order) { + this.order = order; + return this; + } + + /** + * Record order. Acceptable values: ASC, DESC. Default: ASC. + * + * @return order + **/ + @ApiModelProperty(required = true, value = "Record order. Acceptable values: ASC, DESC. Default: ASC.") + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + public StatisticsViewResponse totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Sum of all statistics view records to return. Included in the response when you use the query parameter + * include=total_count. minimum: 0 + * + * @return totalCount + **/ + @ApiModelProperty(value = "Sum of all statistics view records to return. Included in the response when you use the query parameter include=total_count.") + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StatisticsViewResponse statisticsViewResponse = (StatisticsViewResponse) o; + return Objects.equals(this.after, statisticsViewResponse.after) + && Objects.equals(this.data, statisticsViewResponse.data) + && Objects.equals(this.hasMore, statisticsViewResponse.hasMore) + && Objects.equals(this.limit, statisticsViewResponse.limit) + && Objects.equals(this.object, statisticsViewResponse.object) + && Objects.equals(this.order, statisticsViewResponse.order) + && Objects.equals(this.totalCount, statisticsViewResponse.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash(after, data, hasMore, limit, object, order, totalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StatisticsViewResponse {\n"); + + sb.append(" after: ").append(toIndentedString(after)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubjectList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubjectList.java index c73d17252..51dfe6bba 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubjectList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubjectList.java @@ -31,6 +31,9 @@ public class SubjectList implements Serializable { @SerializedName("apikeys") private List apikeys = null; + @SerializedName("applications") + private List applications = null; + @SerializedName("users") private List users = null; @@ -61,6 +64,33 @@ public void setApikeys(List apikeys) { this.apikeys = apikeys; } + public SubjectList applications(List applications) { + this.applications = applications; + return this; + } + + public SubjectList addApplicationsItem(String applicationsItem) { + if (this.applications == null) { + this.applications = new ArrayList(); + } + this.applications.add(applicationsItem); + return this; + } + + /** + * An array of applicationIDs. + * + * @return applications + **/ + @ApiModelProperty(value = "An array of applicationIDs.") + public List getApplications() { + return applications; + } + + public void setApplications(List applications) { + this.applications = applications; + } + public SubjectList users(List users) { this.users = users; return this; @@ -97,12 +127,14 @@ public boolean equals(java.lang.Object o) { return false; } SubjectList subjectList = (SubjectList) o; - return Objects.equals(this.apikeys, subjectList.apikeys) && Objects.equals(this.users, subjectList.users); + return Objects.equals(this.apikeys, subjectList.apikeys) + && Objects.equals(this.applications, subjectList.applications) + && Objects.equals(this.users, subjectList.users); } @Override public int hashCode() { - return Objects.hash(apikeys, users); + return Objects.hash(apikeys, applications, users); } @Override @@ -111,6 +143,7 @@ public String toString() { sb.append("class SubjectList {\n"); sb.append(" apikeys: ").append(toIndentedString(apikeys)).append("\n"); + sb.append(" applications: ").append(toIndentedString(applications)).append("\n"); sb.append(" users: ").append(toIndentedString(users)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantAccountReport.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantAccountReport.java index c2b2970fa..755026e1b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantAccountReport.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantAccountReport.java @@ -19,9 +19,9 @@ import java.io.Serializable; /** - * Billing report for subtenant account. + * Billing report for tenant account. */ -@ApiModel(description = "Billing report for subtenant account.") +@ApiModel(description = "Billing report for tenant account.") public class SubtenantAccountReport implements Serializable { private static final long serialVersionUID = 1L; @@ -41,11 +41,11 @@ public SubtenantAccountReport account(SubtenantReportAccountContactInfo account) } /** - * Subtenant account contact information. + * Tenant account contact information. * * @return account **/ - @ApiModelProperty(required = true, value = "Subtenant account contact information.") + @ApiModelProperty(required = true, value = "Tenant account contact information.") public SubtenantReportAccountContactInfo getAccount() { return account; } @@ -79,11 +79,11 @@ public SubtenantAccountReport servicePackage(SubtenantServicePackageReport servi } /** - * Report service package for subtenant account. + * service package report for the tenant. * * @return servicePackage **/ - @ApiModelProperty(value = "Report service package for subtenant account.") + @ApiModelProperty(value = "service package report for the tenant.") public SubtenantServicePackageReport getServicePackage() { return servicePackage; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantReportAccountContactInfo.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantReportAccountContactInfo.java index fa0524943..870f30943 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantReportAccountContactInfo.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SubtenantReportAccountContactInfo.java @@ -13,15 +13,20 @@ package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.io.Serializable; /** - * Subtenant account contact information. + * Tenant account contact information. */ -@ApiModel(description = "Subtenant account contact information.") +@ApiModel(description = "Tenant account contact information.") public class SubtenantReportAccountContactInfo implements Serializable { private static final long serialVersionUID = 1L; @@ -32,6 +37,59 @@ public class SubtenantReportAccountContactInfo implements Serializable { @SerializedName("address_line2") private String addressLine2 = null; + @SerializedName("alias") + private String alias = null; + + /** + * The business model selected for the account to generate the billing reports. + */ + @JsonAdapter(BusinessModelEnum.Adapter.class) + public enum BusinessModelEnum { + ACTIVE_DEVICE_BUSINESS_MODEL("active_device_business_model"), + + API_CALLS_1_BUSINESS_MODEL("api_calls_1_business_model"); + + private String value; + + BusinessModelEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static BusinessModelEnum fromValue(String text) { + for (BusinessModelEnum b : BusinessModelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final BusinessModelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public BusinessModelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return BusinessModelEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("business_model") + private BusinessModelEnum businessModel = null; + @SerializedName("city") private String city = null; @@ -100,6 +158,44 @@ public void setAddressLine2(String addressLine2) { this.addressLine2 = addressLine2; } + public SubtenantReportAccountContactInfo alias(String alias) { + this.alias = alias; + return this; + } + + /** + * Get alias + * + * @return alias + **/ + @ApiModelProperty(value = "") + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public SubtenantReportAccountContactInfo businessModel(BusinessModelEnum businessModel) { + this.businessModel = businessModel; + return this; + } + + /** + * The business model selected for the account to generate the billing reports. + * + * @return businessModel + **/ + @ApiModelProperty(value = "The business model selected for the account to generate the billing reports.") + public BusinessModelEnum getBusinessModel() { + return businessModel; + } + + public void setBusinessModel(BusinessModelEnum businessModel) { + this.businessModel = businessModel; + } + public SubtenantReportAccountContactInfo city(String city) { this.city = city; return this; @@ -182,11 +278,11 @@ public SubtenantReportAccountContactInfo customerSubtenantId(String customerSubt } /** - * Account subtenant ID, if a subtenant. + * Account tenant ID, valid only for tenants. * * @return customerSubtenantId **/ - @ApiModelProperty(required = true, value = "Account subtenant ID, if a subtenant.") + @ApiModelProperty(required = true, value = "Account tenant ID, valid only for tenants.") public String getCustomerSubtenantId() { return customerSubtenantId; } @@ -301,6 +397,8 @@ public boolean equals(java.lang.Object o) { SubtenantReportAccountContactInfo subtenantReportAccountContactInfo = (SubtenantReportAccountContactInfo) o; return Objects.equals(this.addressLine1, subtenantReportAccountContactInfo.addressLine1) && Objects.equals(this.addressLine2, subtenantReportAccountContactInfo.addressLine2) + && Objects.equals(this.alias, subtenantReportAccountContactInfo.alias) + && Objects.equals(this.businessModel, subtenantReportAccountContactInfo.businessModel) && Objects.equals(this.city, subtenantReportAccountContactInfo.city) && Objects.equals(this.company, subtenantReportAccountContactInfo.company) && Objects.equals(this.contact, subtenantReportAccountContactInfo.contact) @@ -315,8 +413,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(addressLine1, addressLine2, city, company, contact, country, customerSubtenantId, email, id, - phoneNumber, postalCode, state); + return Objects.hash(addressLine1, addressLine2, alias, businessModel, city, company, contact, country, + customerSubtenantId, email, id, phoneNumber, postalCode, state); } @Override @@ -326,6 +424,8 @@ public String toString() { sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n"); sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n"); + sb.append(" alias: ").append(toIndentedString(alias)).append("\n"); + sb.append(" businessModel: ").append(toIndentedString(businessModel)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" company: ").append(toIndentedString(company)).append("\n"); sb.append(" contact: ").append(toIndentedString(contact)).append("\n"); diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SuccessfulResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SuccessfulResponse.java index b55da30d2..a4d45e732 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SuccessfulResponse.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/SuccessfulResponse.java @@ -50,11 +50,11 @@ public SuccessfulResponse after(String after) { } /** - * The metric ID included in the request or null. + * The metric ID included in the request, or null. * * @return after **/ - @ApiModelProperty(value = "The metric ID included in the request or null.") + @ApiModelProperty(value = "The metric ID included in the request, or null.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TierHistory.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TierHistory.java new file mode 100644 index 000000000..1c0c4d05a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TierHistory.java @@ -0,0 +1,112 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * TierHistory + */ + +public class TierHistory implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("tier") + private String tier = null; + + @SerializedName("updatedAt") + private DateTime updatedAt = null; + + public TierHistory tier(String tier) { + this.tier = tier; + return this; + } + + /** + * The tier level of the account; `0`: free tier, `1`: commercial account, `2`: + * partner tier. Other values are reserved for the future. + * + * @return tier + **/ + @ApiModelProperty(example = "1", + value = "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.") + public String getTier() { + return tier; + } + + public void setTier(String tier) { + this.tier = tier; + } + + public TierHistory updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last update UTC time RFC3339. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2018-02-14T15:24:14Z", value = "Last update UTC time RFC3339.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TierHistory tierHistory = (TierHistory) o; + return Objects.equals(this.tier, tierHistory.tier) && Objects.equals(this.updatedAt, tierHistory.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(tier, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TierHistory {\n"); + + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenRequest.java new file mode 100644 index 000000000..1fb58c3f4 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenRequest.java @@ -0,0 +1,177 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import java.io.Serializable; + +/** + * TokenRequest + */ + +public class TokenRequest implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("aud") + private List aud = new ArrayList(); + + @SerializedName("cnf") + private String cnf = null; + + @SerializedName("grant_type") + private String grantType = null; + + @SerializedName("scope") + private String scope = null; + + public TokenRequest aud(List aud) { + this.aud = aud; + return this; + } + + public TokenRequest addAudItem(String audItem) { + this.aud.add(audItem); + return this; + } + + /** + * Array of \\<type\\>:\\<identity\\> tuples representing devices for which access is being requested. + * There must be at least one id/ep tuple.<br/> \\<type\\> ::= id|ep <br/> + * \\<identity\\>::=[a-zA-Z0-9+/=- ]+ <br/>\\<audience\\> :== \\<type\\> + * \":\" \\<identity\\> <br/> \\<identity\\> can be up to 60 characters long, and can + * contain spaces. <br/> The audience array can contain up to 50 tuples. If IAM does not authorize even one + * item in the list, Secure Device Access does not authorize the whole request and does not return an access token + * (access denied). + * + * @return aud + **/ + @ApiModelProperty(required = true, + value = "Array of \\:\\ tuples representing devices for which access is being requested. There must be at least one id/ep tuple.
\\ ::= id|ep
\\::=[a-zA-Z0-9+/=- ]+
\\ :== \\ \":\" \\
\\ can be up to 60 characters long, and can contain spaces.
The audience array can contain up to 50 tuples. If IAM does not authorize even one item in the list, Secure Device Access does not authorize the whole request and does not return an access token (access denied).") + public List getAud() { + return aud; + } + + public void setAud(List aud) { + this.aud = aud; + } + + public TokenRequest cnf(String cnf) { + this.cnf = cnf; + return this; + } + + /** + * The Android application proof-of-possession public key. + * + * @return cnf + **/ + @ApiModelProperty(required = true, value = "The Android application proof-of-possession public key.") + public String getCnf() { + return cnf; + } + + public void setCnf(String cnf) { + this.cnf = cnf; + } + + public TokenRequest grantType(String grantType) { + this.grantType = grantType; + return this; + } + + /** + * Hardcoded - can only be \"client_credentials\". + * + * @return grantType + **/ + @ApiModelProperty(required = true, value = "Hardcoded - can only be \"client_credentials\".") + public String getGrantType() { + return grantType; + } + + public void setGrantType(String grantType) { + this.grantType = grantType; + } + + public TokenRequest scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The space-delimited list of operations that user is requesting permission for. The array must contain at least + * one scope item. A scope item can have up to 60 characters. A scope list can hold up to 20 scope items. + * <br/> \\<scope\\>::=[a-zA-Z][a-zA-Z0-9-]* <br/> \\<scope-list\\>::= + * \\<scope\\> | \\<scope\\> \" \" | \\<scope\\> \" \" \\<scope-list\\> + * <br/> The scope being requested must match the action that the Android application eventually performs on + * the IoT device. The device matches the scope in the access token to the action requested in the operation bundle. + * + * @return scope + **/ + @ApiModelProperty(required = true, + value = "The space-delimited list of operations that user is requesting permission for. The array must contain at least one scope item. A scope item can have up to 60 characters. A scope list can hold up to 20 scope items.
\\::=[a-zA-Z][a-zA-Z0-9-]*
\\::= \\ | \\ \" \" | \\ \" \" \\
The scope being requested must match the action that the Android application eventually performs on the IoT device. The device matches the scope in the access token to the action requested in the operation bundle.") + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenRequest tokenRequest = (TokenRequest) o; + return Objects.equals(this.aud, tokenRequest.aud) && Objects.equals(this.cnf, tokenRequest.cnf) + && Objects.equals(this.grantType, tokenRequest.grantType) + && Objects.equals(this.scope, tokenRequest.scope); + } + + @Override + public int hashCode() { + return Objects.hash(aud, cnf, grantType, scope); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenRequest {\n"); + + sb.append(" aud: ").append(toIndentedString(aud)).append("\n"); + sb.append(" cnf: ").append(toIndentedString(cnf)).append("\n"); + sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenResponse.java new file mode 100644 index 000000000..e6b4334d8 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TokenResponse.java @@ -0,0 +1,111 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * TokenResponse + */ + +public class TokenResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("access_token") + private byte[] accessToken = null; + + @SerializedName("granted_until") + private DateTime grantedUntil = null; + + public TokenResponse accessToken(byte[] accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * The generated CWT (CBOR Web Token) access token as a Base64 string. + * + * @return accessToken + **/ + @ApiModelProperty(value = "The generated CWT (CBOR Web Token) access token as a Base64 string.") + public byte[] getAccessToken() { + return accessToken; + } + + public void setAccessToken(byte[] accessToken) { + this.accessToken = accessToken; + } + + public TokenResponse grantedUntil(DateTime grantedUntil) { + this.grantedUntil = grantedUntil; + return this; + } + + /** + * Grant expiration UTC time RFC3339. + * + * @return grantedUntil + **/ + @ApiModelProperty(value = "Grant expiration UTC time RFC3339.") + public DateTime getGrantedUntil() { + return grantedUntil; + } + + public void setGrantedUntil(DateTime grantedUntil) { + this.grantedUntil = grantedUntil; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenResponse tokenResponse = (TokenResponse) o; + return Objects.equals(this.accessToken, tokenResponse.accessToken) + && Objects.equals(this.grantedUntil, tokenResponse.grantedUntil); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, grantedUntil); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenResponse {\n"); + + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" grantedUntil: ").append(toIndentedString(grantedUntil)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustAnchorResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustAnchorResponse.java new file mode 100644 index 000000000..c20d4ff04 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustAnchorResponse.java @@ -0,0 +1,280 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * TrustAnchorResponse + */ + +public class TrustAnchorResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("fingerprint") + private byte[] fingerprint = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("public_key") + private byte[] publicKey = null; + + @SerializedName("public_key_der") + private byte[] publicKeyDer = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + public TrustAnchorResponse createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC time. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Creation UTC time.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public TrustAnchorResponse description(String description) { + this.description = description; + return this; + } + + /** + * The updated notes about the trust anchor. + * + * @return description + **/ + @ApiModelProperty(value = "The updated notes about the trust anchor.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TrustAnchorResponse etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Entity instance signature, 1 or Unix timestamp of last customer update. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "Entity instance signature, 1 or Unix timestamp of last customer update.") + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public TrustAnchorResponse fingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + return this; + } + + /** + * The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key + * as a SHA256 hash in Base64-encoded DER format. + * + * @return fingerprint + **/ + @ApiModelProperty(value = "The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format.") + public byte[] getFingerprint() { + return fingerprint; + } + + public void setFingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + } + + public TrustAnchorResponse id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the entity. + * + * @return id + **/ + @ApiModelProperty(example = "01612df56f3b0a580a010fc700000000", value = "The ID of the entity.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TrustAnchorResponse object(String object) { + this.object = object; + return this; + } + + /** + * The API resource entity + * + * @return object + **/ + @ApiModelProperty(example = "trust-anchor", value = "The API resource entity") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public TrustAnchorResponse publicKey(byte[] publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The trust anchor public key in PEM format. + * + * @return publicKey + **/ + @ApiModelProperty(value = "The trust anchor public key in PEM format.") + public byte[] getPublicKey() { + return publicKey; + } + + public void setPublicKey(byte[] publicKey) { + this.publicKey = publicKey; + } + + public TrustAnchorResponse publicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + return this; + } + + /** + * The generated trust anchor public key in Base64-encoded DER format. + * + * @return publicKeyDer + **/ + @ApiModelProperty(value = "The generated trust anchor public key in Base64-encoded DER format.") + public byte[] getPublicKeyDer() { + return publicKeyDer; + } + + public void setPublicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + } + + public TrustAnchorResponse updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Update UTC time. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Update UTC time.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustAnchorResponse trustAnchorResponse = (TrustAnchorResponse) o; + return Objects.equals(this.createdAt, trustAnchorResponse.createdAt) + && Objects.equals(this.description, trustAnchorResponse.description) + && Objects.equals(this.etag, trustAnchorResponse.etag) + && Objects.equals(this.fingerprint, trustAnchorResponse.fingerprint) + && Objects.equals(this.id, trustAnchorResponse.id) + && Objects.equals(this.object, trustAnchorResponse.object) + && Objects.equals(this.publicKey, trustAnchorResponse.publicKey) + && Objects.equals(this.publicKeyDer, trustAnchorResponse.publicKeyDer) + && Objects.equals(this.updatedAt, trustAnchorResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, description, etag, fingerprint, id, object, publicKey, publicKeyDer, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustAnchorResponse {\n"); + + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" publicKeyDer: ").append(toIndentedString(publicKeyDer)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateReq.java index 9ef5d734a..1204ec1a9 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateReq.java @@ -192,11 +192,11 @@ public TrustedCertificateReq enrollmentMode(Boolean enrollmentMode) { } /** - * Certificate is used in enrollment mode. Default value is false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * * @return enrollmentMode **/ - @ApiModelProperty(value = "Certificate is used in enrollment mode. Default value is false.") + @ApiModelProperty(value = "DEPRECATED: Certificate is used in enrollment mode. Default value is false.") public Boolean isEnrollmentMode() { return enrollmentMode; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateResp.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateResp.java index eceaa106e..6e5d19b49 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateResp.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateResp.java @@ -350,11 +350,12 @@ public TrustedCertificateResp enrollmentMode(Boolean enrollmentMode) { } /** - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * * @return enrollmentMode **/ - @ApiModelProperty(example = "false", value = "If true, signature is not required. Default value false.") + @ApiModelProperty(example = "false", + value = "DEPRECATED: Certificate is used in enrollment mode. Default value is false.") public Boolean isEnrollmentMode() { return enrollmentMode; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateRespList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateRespList.java index f615593f2..3c48646d3 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateRespList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateRespList.java @@ -150,12 +150,12 @@ public TrustedCertificateRespList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateUpdateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateUpdateReq.java index 1961f1b82..d8935dbc5 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateUpdateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/TrustedCertificateUpdateReq.java @@ -44,7 +44,7 @@ public class TrustedCertificateUpdateReq implements Serializable { private String name = null; /** - * Service name where the certificate must be used. + * Service name where the certificate must be used. Service cannot be updated for developer certificates. */ @JsonAdapter(ServiceEnum.Adapter.class) public enum ServiceEnum { @@ -229,11 +229,11 @@ public TrustedCertificateUpdateReq service(ServiceEnum service) { } /** - * Service name where the certificate must be used. + * Service name where the certificate must be used. Service cannot be updated for developer certificates. * * @return service **/ - @ApiModelProperty(value = "Service name where the certificate must be used.") + @ApiModelProperty(value = "Service name where the certificate must be used. Service cannot be updated for developer certificates.") public ServiceEnum getService() { return service; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaign.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaign.java index fe69303b3..a66c0d4da 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaign.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaign.java @@ -479,12 +479,12 @@ public UpdateCampaign deviceFilter(String deviceFilter) { } /** - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. * * @return deviceFilter **/ - @ApiModelProperty(example = "id__eq=00000000000000000000000000000000", - value = "The filter for the devices the campaign is targeting at.") + @ApiModelProperty(example = "state__eq=registered", + value = "The filter for the devices the campaign targets. Refer to this using the filter ID.") public String getDeviceFilter() { return deviceFilter; } @@ -541,7 +541,7 @@ public UpdateCampaign id(String id) { * * @return id **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "The campaign ID.") + @ApiModelProperty(example = "016e83ddc648000000000001001000f5", value = "The campaign ID.") public String getId() { return id; } @@ -579,7 +579,7 @@ public UpdateCampaign object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'update-campaign'.") + @ApiModelProperty(example = "update-campaign", value = "Entity name: always 'update-campaign'.") public String getObject() { return object; } @@ -617,7 +617,7 @@ public UpdateCampaign rootManifestId(String rootManifestId) { * * @return rootManifestId **/ - @ApiModelProperty(example = "00000000000000000000000000000000", + @ApiModelProperty(example = "016e83dce36a00000000000100100102", value = "The ID of the manifest that will be sent to the device as part of the campaign.") public String getRootManifestId() { return rootManifestId; @@ -637,7 +637,7 @@ public UpdateCampaign rootManifestUrl(String rootManifestUrl) { * * @return rootManifestUrl **/ - @ApiModelProperty(example = "http://example.com/00000000000000000000000000000000", + @ApiModelProperty(example = "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", value = "The URL for the manifest that will be sent to the device as part of the campaign.") public String getRootManifestUrl() { return rootManifestUrl; diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignInNinFilter.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignInNinFilter.java index 779c6d877..5317853a3 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignInNinFilter.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignInNinFilter.java @@ -166,7 +166,7 @@ public UpdateCampaignInNinFilter id(String id) { * * @return id **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c3029f6f7000000000001001000c3", value = "") public String getId() { return id; } @@ -204,7 +204,7 @@ public UpdateCampaignInNinFilter rootManifestId(String rootManifestId) { * * @return rootManifestId **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "015c6029f6f9000000000001001000f4", value = "") public String getRootManifestId() { return rootManifestId; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPage.java index 6e391fde8..7cfa4cbff 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPage.java @@ -193,7 +193,7 @@ public UpdateCampaignPage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "Entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPostRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPostRequest.java index 63abc23d2..ad87fda67 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPostRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPostRequest.java @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.math.BigDecimal; +import org.joda.time.DateTime; import java.io.Serializable; /** @@ -103,6 +104,59 @@ public CampaignStrategyEnum read(final JsonReader jsonReader) throws IOException @SerializedName("root_manifest_id") private String rootManifestId = null; + /** + * DEPRECATED: The state of the campaign (use phase instead) + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + DRAFT("draft"), + + SCHEDULED("scheduled"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StateEnum fromValue(String text) { + for (StateEnum b : StateEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StateEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("state") + private StateEnum state = null; + + @SerializedName("when") + private DateTime when = null; + public UpdateCampaignPostRequest approvalRequired(Boolean approvalRequired) { this.approvalRequired = approvalRequired; return this; @@ -206,12 +260,12 @@ public UpdateCampaignPostRequest deviceFilter(String deviceFilter) { } /** - * The filter for the devices the campaign is targeted at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. * * @return deviceFilter **/ - @ApiModelProperty(example = "id__eq=00000000000000000000000000000000", required = true, - value = "The filter for the devices the campaign is targeted at.") + @ApiModelProperty(example = "state__eq=registered", required = true, + value = "The filter for the devices the campaign targets. Refer to this using the filter ID.") public String getDeviceFilter() { return deviceFilter; } @@ -249,7 +303,7 @@ public UpdateCampaignPostRequest rootManifestId(String rootManifestId) { * * @return rootManifestId **/ - @ApiModelProperty(example = "12345678901234567890123456789012", value = "") + @ApiModelProperty(example = "016e83b46477000000000001001001f3", value = "") public String getRootManifestId() { return rootManifestId; } @@ -258,6 +312,45 @@ public void setRootManifestId(String rootManifestId) { this.rootManifestId = rootManifestId; } + public UpdateCampaignPostRequest state(StateEnum state) { + this.state = state; + return this; + } + + /** + * DEPRECATED: The state of the campaign (use phase instead) + * + * @return state + **/ + @ApiModelProperty(value = "DEPRECATED: The state of the campaign (use phase instead)") + public StateEnum getState() { + return state; + } + + public void setState(StateEnum state) { + this.state = state; + } + + public UpdateCampaignPostRequest when(DateTime when) { + this.when = when; + return this; + } + + /** + * The scheduled start time for the update campaign. Not in use. + * + * @return when + **/ + @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", + value = "The scheduled start time for the update campaign. Not in use.") + public DateTime getWhen() { + return when; + } + + public void setWhen(DateTime when) { + this.when = when; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -274,13 +367,15 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.description, updateCampaignPostRequest.description) && Objects.equals(this.deviceFilter, updateCampaignPostRequest.deviceFilter) && Objects.equals(this.name, updateCampaignPostRequest.name) - && Objects.equals(this.rootManifestId, updateCampaignPostRequest.rootManifestId); + && Objects.equals(this.rootManifestId, updateCampaignPostRequest.rootManifestId) + && Objects.equals(this.state, updateCampaignPostRequest.state) + && Objects.equals(this.when, updateCampaignPostRequest.when); } @Override public int hashCode() { return Objects.hash(approvalRequired, autostop, autostopSuccessPercent, campaignStrategy, description, - deviceFilter, name, rootManifestId); + deviceFilter, name, rootManifestId, state, when); } @Override @@ -296,6 +391,8 @@ public String toString() { sb.append(" deviceFilter: ").append(toIndentedString(deviceFilter)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" rootManifestId: ").append(toIndentedString(rootManifestId)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" when: ").append(toIndentedString(when)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPutRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPutRequest.java index 15a57a683..373bbc928 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPutRequest.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateCampaignPutRequest.java @@ -13,9 +13,15 @@ package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.math.BigDecimal; +import org.joda.time.DateTime; import java.io.Serializable; /** @@ -46,6 +52,93 @@ public class UpdateCampaignPutRequest implements Serializable { @SerializedName("root_manifest_id") private String rootManifestId = null; + /** + * DEPRECATED: The state of the campaign (use phase instead). + */ + @JsonAdapter(StateEnum.Adapter.class) + public enum StateEnum { + DRAFT("draft"), + + SCHEDULED("scheduled"), + + ALLOCATINGQUOTA("allocatingquota"), + + ALLOCATEDQUOTA("allocatedquota"), + + QUOTAALLOCATIONFAILED("quotaallocationfailed"), + + CHECKINGMANIFEST("checkingmanifest"), + + CHECKEDMANIFEST("checkedmanifest"), + + DEVICEFETCH("devicefetch"), + + DEVICECOPY("devicecopy"), + + DEVICECHECK("devicecheck"), + + PUBLISHING("publishing"), + + DEPLOYING("deploying"), + + DEPLOYED("deployed"), + + MANIFESTREMOVED("manifestremoved"), + + EXPIRED("expired"), + + STOPPING("stopping"), + + AUTOSTOPPED("autostopped"), + + USERSTOPPED("userstopped"), + + CONFLICT("conflict"); + + private String value; + + StateEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StateEnum fromValue(String text) { + for (StateEnum b : StateEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StateEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StateEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("state") + private StateEnum state = null; + + @SerializedName("when") + private DateTime when = null; + public UpdateCampaignPutRequest approvalRequired(Boolean approvalRequired) { this.approvalRequired = approvalRequired; return this; @@ -113,7 +206,7 @@ public UpdateCampaignPutRequest description(String description) { * * @return description **/ - @ApiModelProperty(example = "", value = "An optional description of the campaign.") + @ApiModelProperty(example = "description", value = "An optional description of the campaign.") public String getDescription() { return description; } @@ -128,12 +221,12 @@ public UpdateCampaignPutRequest deviceFilter(String deviceFilter) { } /** - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. * * @return deviceFilter **/ - @ApiModelProperty(example = "id__eq=00000000000000000000000000000000", - value = "The filter for the devices the campaign is targeting at.") + @ApiModelProperty(example = "state__eq=registered", + value = "The filter for the devices the campaign targets. Refer to this using the filter ID.") public String getDeviceFilter() { return deviceFilter; } @@ -171,7 +264,7 @@ public UpdateCampaignPutRequest rootManifestId(String rootManifestId) { * * @return rootManifestId **/ - @ApiModelProperty(example = "00000000000000000000000000000000", value = "") + @ApiModelProperty(example = "016e83dce36a00000000000100100201", value = "") public String getRootManifestId() { return rootManifestId; } @@ -180,6 +273,45 @@ public void setRootManifestId(String rootManifestId) { this.rootManifestId = rootManifestId; } + public UpdateCampaignPutRequest state(StateEnum state) { + this.state = state; + return this; + } + + /** + * DEPRECATED: The state of the campaign (use phase instead). + * + * @return state + **/ + @ApiModelProperty(value = "DEPRECATED: The state of the campaign (use phase instead).") + public StateEnum getState() { + return state; + } + + public void setState(StateEnum state) { + this.state = state; + } + + public UpdateCampaignPutRequest when(DateTime when) { + this.when = when; + return this; + } + + /** + * The scheduled start time for the update campaign. Not in use. + * + * @return when + **/ + @ApiModelProperty(example = "2017-05-22T12:37:55.576563Z", + value = "The scheduled start time for the update campaign. Not in use.") + public DateTime getWhen() { + return when; + } + + public void setWhen(DateTime when) { + this.when = when; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -195,13 +327,15 @@ public boolean equals(java.lang.Object o) { && Objects.equals(this.description, updateCampaignPutRequest.description) && Objects.equals(this.deviceFilter, updateCampaignPutRequest.deviceFilter) && Objects.equals(this.name, updateCampaignPutRequest.name) - && Objects.equals(this.rootManifestId, updateCampaignPutRequest.rootManifestId); + && Objects.equals(this.rootManifestId, updateCampaignPutRequest.rootManifestId) + && Objects.equals(this.state, updateCampaignPutRequest.state) + && Objects.equals(this.when, updateCampaignPutRequest.when); } @Override public int hashCode() { return Objects.hash(approvalRequired, autostop, autostopSuccessPercent, description, deviceFilter, name, - rootManifestId); + rootManifestId, state, when); } @Override @@ -216,6 +350,8 @@ public String toString() { sb.append(" deviceFilter: ").append(toIndentedString(deviceFilter)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" rootManifestId: ").append(toIndentedString(rootManifestId)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" when: ").append(toIndentedString(when)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorRequest.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorRequest.java new file mode 100644 index 000000000..a2199eda5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorRequest.java @@ -0,0 +1,86 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; + +/** + * UpdateTrustAnchorRequest + */ + +public class UpdateTrustAnchorRequest implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("description") + private String description = null; + + public UpdateTrustAnchorRequest description(String description) { + this.description = description; + return this; + } + + /** + * The new description for the trust anchor. + * + * @return description + **/ + @ApiModelProperty(required = true, value = "The new description for the trust anchor.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTrustAnchorRequest updateTrustAnchorRequest = (UpdateTrustAnchorRequest) o; + return Objects.equals(this.description, updateTrustAnchorRequest.description); + } + + @Override + public int hashCode() { + return Objects.hash(description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTrustAnchorRequest {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorResponse.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorResponse.java new file mode 100644 index 000000000..b67a36c2a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UpdateTrustAnchorResponse.java @@ -0,0 +1,280 @@ +/* + * Pelion Device Management API + * Pelion Device Management API build from the publicly defined API definitions. + * + * OpenAPI spec version: 3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; +import java.io.Serializable; + +/** + * UpdateTrustAnchorResponse + */ + +public class UpdateTrustAnchorResponse implements Serializable { + private static final long serialVersionUID = 1L; + + @SerializedName("created_at") + private DateTime createdAt = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("etag") + private String etag = null; + + @SerializedName("fingerprint") + private byte[] fingerprint = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("object") + private String object = null; + + @SerializedName("public_key") + private byte[] publicKey = null; + + @SerializedName("public_key_der") + private byte[] publicKeyDer = null; + + @SerializedName("updated_at") + private DateTime updatedAt = null; + + public UpdateTrustAnchorResponse createdAt(DateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation UTC time. + * + * @return createdAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Creation UTC time.") + public DateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(DateTime createdAt) { + this.createdAt = createdAt; + } + + public UpdateTrustAnchorResponse description(String description) { + this.description = description; + return this; + } + + /** + * The updated notes about the trust anchor. + * + * @return description + **/ + @ApiModelProperty(value = "The updated notes about the trust anchor.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public UpdateTrustAnchorResponse etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Entity instance signature, 1 or Unix timestamp of last customer update. + * + * @return etag + **/ + @ApiModelProperty(example = "1", value = "Entity instance signature, 1 or Unix timestamp of last customer update.") + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public UpdateTrustAnchorResponse fingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + return this; + } + + /** + * The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key + * as a SHA256 hash in Base64-encoded DER format. + * + * @return fingerprint + **/ + @ApiModelProperty(value = "The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' followed by the trust anchor public key as a SHA256 hash in Base64-encoded DER format.") + public byte[] getFingerprint() { + return fingerprint; + } + + public void setFingerprint(byte[] fingerprint) { + this.fingerprint = fingerprint; + } + + public UpdateTrustAnchorResponse id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the entity. + * + * @return id + **/ + @ApiModelProperty(example = "01612df56f3b0a580a010fc700000000", value = "The ID of the entity.") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UpdateTrustAnchorResponse object(String object) { + this.object = object; + return this; + } + + /** + * The API resource entity + * + * @return object + **/ + @ApiModelProperty(example = "trust-anchor", value = "The API resource entity") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public UpdateTrustAnchorResponse publicKey(byte[] publicKey) { + this.publicKey = publicKey; + return this; + } + + /** + * The trust anchor public key in PEM format. + * + * @return publicKey + **/ + @ApiModelProperty(value = "The trust anchor public key in PEM format.") + public byte[] getPublicKey() { + return publicKey; + } + + public void setPublicKey(byte[] publicKey) { + this.publicKey = publicKey; + } + + public UpdateTrustAnchorResponse publicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + return this; + } + + /** + * The generated trust anchor public key in Base64-encoded DER format. + * + * @return publicKeyDer + **/ + @ApiModelProperty(value = "The generated trust anchor public key in Base64-encoded DER format.") + public byte[] getPublicKeyDer() { + return publicKeyDer; + } + + public void setPublicKeyDer(byte[] publicKeyDer) { + this.publicKeyDer = publicKeyDer; + } + + public UpdateTrustAnchorResponse updatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Update UTC time. + * + * @return updatedAt + **/ + @ApiModelProperty(example = "2017-01-01T00:00:00Z", value = "Update UTC time.") + public DateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTrustAnchorResponse updateTrustAnchorResponse = (UpdateTrustAnchorResponse) o; + return Objects.equals(this.createdAt, updateTrustAnchorResponse.createdAt) + && Objects.equals(this.description, updateTrustAnchorResponse.description) + && Objects.equals(this.etag, updateTrustAnchorResponse.etag) + && Objects.equals(this.fingerprint, updateTrustAnchorResponse.fingerprint) + && Objects.equals(this.id, updateTrustAnchorResponse.id) + && Objects.equals(this.object, updateTrustAnchorResponse.object) + && Objects.equals(this.publicKey, updateTrustAnchorResponse.publicKey) + && Objects.equals(this.publicKeyDer, updateTrustAnchorResponse.publicKeyDer) + && Objects.equals(this.updatedAt, updateTrustAnchorResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, description, etag, fingerprint, id, object, publicKey, publicKeyDer, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTrustAnchorResponse {\n"); + + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" publicKeyDer: ").append(toIndentedString(publicKeyDer)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadChunkInfoPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadChunkInfoPage.java index 1a2f482cb..a2085f5a2 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadChunkInfoPage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadChunkInfoPage.java @@ -193,7 +193,7 @@ public UploadChunkInfoPage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "Entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadJobPage.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadJobPage.java index 8ad30305c..5f140526f 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadJobPage.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UploadJobPage.java @@ -193,7 +193,7 @@ public UploadJobPage object(String object) { * * @return object **/ - @ApiModelProperty(value = "Entity name: always 'list'.") + @ApiModelProperty(example = "list", value = "Entity name: always 'list'.") public String getObject() { return object; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInfoRespList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInfoRespList.java index c125aacaa..1f7f92f33 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInfoRespList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInfoRespList.java @@ -150,12 +150,12 @@ public UserInfoRespList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInvitationRespList.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInvitationRespList.java index 62cfe81d0..17e4451c5 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInvitationRespList.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserInvitationRespList.java @@ -150,12 +150,12 @@ public UserInvitationRespList after(String after) { } /** - * The entity ID to fetch after the given one. + * The entity ID to retrieve after the given one. * * @return after **/ @ApiModelProperty(example = "01619571f3c00242ac12000600000000", - value = "The entity ID to fetch after the given one.") + value = "The entity ID to retrieve after the given one.") public String getAfter() { return after; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserUpdateReq.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserUpdateReq.java index 5ac337d21..c0428e35c 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserUpdateReq.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/UserUpdateReq.java @@ -250,11 +250,12 @@ public UserUpdateReq isTotpEnabled(Boolean isTotpEnabled) { } /** - * A flag indicating whether mandatory two-factor authentication (TOTP) is enabled. + * A flag indicating whether two-factor authentication (TOTP) is enabled. An account administrator can disable it, + * but cannot enable it for other users. * * @return isTotpEnabled **/ - @ApiModelProperty(value = "A flag indicating whether mandatory two-factor authentication (TOTP) is enabled.") + @ApiModelProperty(value = "A flag indicating whether two-factor authentication (TOTP) is enabled. An account administrator can disable it, but cannot enable it for other users.") public Boolean isIsTotpEnabled() { return isTotpEnabled; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Webhook.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Webhook.java index 5189faeba..c197418bc 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Webhook.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/Webhook.java @@ -30,7 +30,7 @@ public class Webhook implements Serializable { private Map headers = null; @SerializedName("serialization") - private Object serialization = null; + private SerializationConfigData serialization = null; @SerializedName("url") private String url = null; @@ -63,22 +63,22 @@ public void setHeaders(Map headers) { this.headers = headers; } - public Webhook serialization(Object serialization) { + public Webhook serialization(SerializationConfigData serialization) { this.serialization = serialization; return this; } /** - * Serialization configuration for a channel. + * Get serialization * * @return serialization **/ - @ApiModelProperty(value = "Serialization configuration for a channel.") - public Object getSerialization() { + @ApiModelProperty(value = "") + public SerializationConfigData getSerialization() { return serialization; } - public void setSerialization(Object serialization) { + public void setSerialization(SerializationConfigData serialization) { this.serialization = serialization; } diff --git a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/WebsocketChannel.java b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/WebsocketChannel.java index eda61b4be..d6e02314b 100644 --- a/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/WebsocketChannel.java +++ b/backends/pelioncloud_devicemanagement/src/main/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/model/WebsocketChannel.java @@ -33,17 +33,20 @@ public class WebsocketChannel implements Serializable { private Integer queueSize = null; @SerializedName("serialization") - private Object serialization = null; + private SerializationConfigData serialization = null; /** - * Channel status is 'connected' when the channel has an active WebSocket bound to it. The state is - * 'disconnected' when either the channel or the WebSocket bound to it is closed. + * Channel status is 'connected' when the channel has an active WebSocket bound to it. The status is + * 'disconnected' when either the channel or the WebSocket bound to it is closed and 'unknown' when + * the server cannot determine it. */ @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { CONNECTED("connected"), - DISCONNECTED("disconnected"); + DISCONNECTED("disconnected"), + + UNKNOWN("unknown"); private String value; @@ -92,11 +95,13 @@ public WebsocketChannel queueSize(Integer queueSize) { } /** - * Number of events in the channel's event queue waiting to be delivered. + * Number of events in the channel's event queue waiting to be delivered. If the server cannot determine the + * queue size the value will be set to `-1`. * * @return queueSize **/ - @ApiModelProperty(example = "0", value = "Number of events in the channel's event queue waiting to be delivered.") + @ApiModelProperty(example = "0", + value = "Number of events in the channel's event queue waiting to be delivered. If the server cannot determine the queue size the value will be set to `-1`.") public Integer getQueueSize() { return queueSize; } @@ -105,22 +110,22 @@ public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public WebsocketChannel serialization(Object serialization) { + public WebsocketChannel serialization(SerializationConfigData serialization) { this.serialization = serialization; return this; } /** - * Serialization configuration for a channel. + * Get serialization * * @return serialization **/ - @ApiModelProperty(value = "Serialization configuration for a channel.") - public Object getSerialization() { + @ApiModelProperty(value = "") + public SerializationConfigData getSerialization() { return serialization; } - public void setSerialization(Object serialization) { + public void setSerialization(SerializationConfigData serialization) { this.serialization = serialization; } @@ -130,13 +135,14 @@ public WebsocketChannel status(StatusEnum status) { } /** - * Channel status is 'connected' when the channel has an active WebSocket bound to it. The state is - * 'disconnected' when either the channel or the WebSocket bound to it is closed. + * Channel status is 'connected' when the channel has an active WebSocket bound to it. The status is + * 'disconnected' when either the channel or the WebSocket bound to it is closed and 'unknown' when + * the server cannot determine it. * * @return status **/ @ApiModelProperty(example = "disconnected", - value = "Channel status is 'connected' when the channel has an active WebSocket bound to it. The state is 'disconnected' when either the channel or the WebSocket bound to it is closed.") + value = "Channel status is 'connected' when the channel has an active WebSocket bound to it. The status is 'disconnected' when either the channel or the WebSocket bound to it is closed and 'unknown' when the server cannot determine it.") public StatusEnum getStatus() { return status; } diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApiTest.java new file mode 100644 index 000000000..449edb023 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountAccessKeysApiTest.java @@ -0,0 +1,53 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for AccountAccessKeysApi + */ +public class AccountAccessKeysApiTest { + + private AccountAccessKeysApi api; + + @Before + public void setup() { + api = new ApiClient().createService(AccountAccessKeysApi.class); + } + + /** + * Get access key. + * + * Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys/{access_key_id} \\ + * -H 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAccessKeyTest() { + String accessKeyId = null; + // AccessKey response = api.getAccessKey(accessKeyId); + + // TODO: test validations + } + + /** + * Get all access keys. + * + * Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAllAccessKeysTest() { + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + String applicationIdEq = null; + // AccessKeyList response = api.getAllAccessKeys(limit, after, order, include, statusEq, applicationIdEq); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApiTest.java index 27f2960fb..324a74cf5 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApiKeysApiTest.java @@ -24,9 +24,9 @@ public void setup() { /** * Add API key to a list of groups. * - * Add API key to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -42,9 +42,9 @@ public void addApiKeyToGroupsTest() { /** * Add API key to a list of groups. * - * Add API key to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -61,8 +61,8 @@ public void addApiKeyToListedGroupsTest() { * Add API key to a list of groups. * * Add API key to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -79,7 +79,7 @@ public void addMyApiKeyToGroupsTest() { * * Add API key to groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -96,7 +96,8 @@ public void addMyApiKeyToListedGroupsTest() { * * Create a new API key. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' ``` + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' + * ``` */ @Test public void createApiKeyTest() { @@ -110,8 +111,8 @@ public void createApiKeyTest() { * Delete API key. * * Delete the API key. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void deleteApiKeyTest() { @@ -124,8 +125,8 @@ public void deleteApiKeyTest() { /** * Get all API keys. * - * Retrieve API keys in an array, optionally filtered by the owner. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys \\ -H 'Authorization: Bearer <api_key>' + * Retrieve an array of API keys, optionally filtered by the owner. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/api-keys \\ -H 'Authorization: Bearer <access_key>' * ``` */ @Test @@ -142,11 +143,11 @@ public void getAllApiKeysTest() { } /** - * Get API key details. + * Get API key. * - * Retrieve API key details. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Retrieve details of an API key. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getApiKeyTest() { @@ -157,11 +158,12 @@ public void getApiKeyTest() { } /** - * Get groups of the API key. + * Get policy groups of an API key. * - * Retrieve groups associated with the API key. **Example:** ``` curl -X GET + * Retrieve an array of policy groups associated with an API key. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getGroupsOfApikeyTest() { @@ -176,11 +178,11 @@ public void getGroupsOfApikeyTest() { } /** - * Get groups of the API key. + * Get policy groups of the current API key. * - * Retrieve groups associated with the API key. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Retrieve an array of policy groups associated with the current API key. **Example:** ``` curl -X + * GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getGroupsOfMyApiKeyTest() { @@ -194,10 +196,10 @@ public void getGroupsOfMyApiKeyTest() { } /** - * Get API key details. + * Get current API key. * - * Retrieve API key details. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' + * Retrieve details of current API key. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' * ``` */ @Test @@ -210,9 +212,9 @@ public void getMyApiKeyTest() { /** * Remove API key from groups. * - * Remove API key from groups. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -228,9 +230,9 @@ public void removeApiKeyFromGroupsTest() { /** * Remove API key from groups. * - * Remove API key from groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -248,7 +250,7 @@ public void removeApiKeyFromListedGroupsTest() { * * Remove API key from groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -264,8 +266,8 @@ public void removeMyApiKeyFromListedGroupsTest() { * Remove API key from groups. * * Remove API key from groups. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -282,7 +284,7 @@ public void removeMyApiKeyListedGroupsTest() { * * Reset the secret key of the API key. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void resetSecretTest() { @@ -297,9 +299,9 @@ public void resetSecretTest() { * Update API key details. * * Update API key details. **Example:** `curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * \"TestApiKey25\"}' ``` */ @Test public void updateApiKeyTest() { @@ -314,7 +316,7 @@ public void updateApiKeyTest() { * Update API key details. * * Update API key details. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <api_key>' \\ -H + * https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\ -H 'Authorization: Bearer <access_key>' \\ -H * 'content-type: application/json' \\ -d '{\"name\": \"TestApiKey25\"}' * ``` */ diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApiTest.java new file mode 100644 index 000000000..4e2d816b5 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountApplicationsApiTest.java @@ -0,0 +1,253 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Application; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupIdList; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for AccountApplicationsApi + */ +public class AccountApplicationsApiTest { + + private AccountApplicationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(AccountApplicationsApi.class); + } + + /** + * Add application to a list of groups. + * + * Add application to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + */ + @Test + public void addApplicationToGroupsTest() { + String applicationId = null; + GroupIdList body = null; + // Void response = api.addApplicationToGroups(applicationId, body); + + // TODO: test validations + } + + /** + * Create a new application. + * + * Create a new application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications -d '{\"name\": + * \"MyApplication1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H + * 'content-type: application/json' ``` + */ + @Test + public void createApplicationTest() { + Application body = null; + // Application response = api.createApplication(body); + + // TODO: test validations + } + + /** + * Create a new applicationaccess key. + * + * Create a new access key for the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys -d '{\"name\": + * \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json' ``` + */ + @Test + public void createApplicationAccessKeyTest() { + String applicationId = null; + AccessKey body = null; + // AccessKey response = api.createApplicationAccessKey(applicationId, body); + + // TODO: test validations + } + + /** + * Delete application. + * + * Delete the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteApplicationTest() { + String applicationId = null; + // Void response = api.deleteApplication(applicationId); + + // TODO: test validations + } + + /** + * Delete access key associated with the application. + * + * Delete the access key associated with the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteApplicationAccessKeyTest() { + String applicationId = null; + String accessKeyId = null; + // Void response = api.deleteApplicationAccessKey(applicationId, accessKeyId); + + // TODO: test validations + } + + /** + * Get all access keys associated with the application. + * + * Retrieve an array of access keys associated with the application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getAllApplicationAccessKeysTest() { + String applicationId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + // AccessKeyList response = api.getAllApplicationAccessKeys(applicationId, limit, after, order, include, + // statusEq); + + // TODO: test validations + } + + /** + * Get all applications. + * + * Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAllApplicationsTest() { + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + // ApplicationList response = api.getAllApplications(limit, after, order, include, statusEq); + + // TODO: test validations + } + + /** + * Get application. + * + * Retrieve details of an application. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} + * \\ -H 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getApplicationTest() { + String applicationId = null; + // Application response = api.getApplication(applicationId); + + // TODO: test validations + } + + /** + * Get access key. + * + * Retrieve details of an access key associated with the application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getApplicationAccessKeyTest() { + String applicationId = null; + String accessKeyId = null; + // AccessKey response = api.getApplicationAccessKey(applicationId, accessKeyId); + + // TODO: test validations + } + + /** + * Get policy groups of an application. + * + * Retrieve an array of policy groups associated with an application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getGroupsOfApplicationTest() { + String applicationId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + // GroupSummaryList response = api.getGroupsOfApplication(applicationId, limit, after, order, include); + + // TODO: test validations + } + + /** + * Remove application from groups. + * + * Remove application from groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + */ + @Test + public void removeApplicationFromGroupsTest() { + String applicationId = null; + GroupIdList body = null; + // Void response = api.removeApplicationFromGroups(applicationId, body); + + // TODO: test validations + } + + /** + * Update applicationdetails. + * + * Update application details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * \"TestApplication25\"}' ``` + */ + @Test + public void updateApplicationTest() { + String applicationId = null; + Application body = null; + // ApiKeyInfoResp response = api.updateApplication(applicationId, body); + + // TODO: test validations + } + + /** + * Update access key details. + * + * Update access key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestAccessKey\"}' ``` + */ + @Test + public void updateApplicationAccessKeyTest() { + String applicationId = null; + String accessKeyId = null; + AccessKey body = null; + // AccessKey response = api.updateApplicationAccessKey(applicationId, accessKeyId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApiTest.java index 081262427..3a1f2e1af 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEmailNotificationLogsApiTest.java @@ -17,9 +17,9 @@ public void setup() { } /** - * Get notification events for an account. + * Get logs of email notifications. * - * Retrieve notifications for an account. + * Retrieve an array of email notification logs. */ @Test public void getNofificationEntriesTest() { @@ -30,4 +30,17 @@ public void getNofificationEntriesTest() { // TODO: test validations } + + /** + * Get an email notification. + * + * Retrieve an email notification log entry. + */ + @Test + public void getNofificationEntryTest() { + String notificationId = null; + // NotificationEntry response = api.getNofificationEntry(notificationId); + + // TODO: test validations + } } diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApiTest.java new file mode 100644 index 000000000..d707f5617 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountEntitlementLimitationsApiTest.java @@ -0,0 +1,44 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for AccountEntitlementLimitationsApi + */ +public class AccountEntitlementLimitationsApiTest { + + private AccountEntitlementLimitationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(AccountEntitlementLimitationsApi.class); + } + + /** + * Get an entitlement limitation. + * + * Retrieve an entitlement limitation. + */ + @Test + public void getAccountLimitationTest() { + String limitationId = null; + // AccountLimitation response = api.getAccountLimitation(limitationId); + + // TODO: test validations + } + + /** + * Get entitlement limitations. + * + * Retrieve an array of entitlement limitations. + */ + @Test + public void getAccountLimitationsTest() { + String inheritedEq = null; + // AccountLimitationList response = api.getAccountLimitations(inheritedEq); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApiTest.java index b4c0ddfe2..1fe62d587 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountIdentityProvidersApiTest.java @@ -22,7 +22,7 @@ public void setup() { /** * Create a new identity provider. * - * Create a new identity provider. + * Create a new identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void createIdentityProviderTest() { @@ -36,7 +36,7 @@ public void createIdentityProviderTest() { /** * Delete an identity provider by ID. * - * Delete an identity provider by ID. + * Delete an identity provider by ID. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void deleteIdentityProviderTest() { @@ -49,7 +49,7 @@ public void deleteIdentityProviderTest() { /** * Delete the service provider certificate. * - * Delete a service provider certificate. + * Delete a service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void deleteSpCertificateTest() { @@ -62,7 +62,8 @@ public void deleteSpCertificateTest() { /** * Generate a new service provider certificate. * - * Generate a new service provider certificate. + * Generate a new service provider certificate. <b>Note:</b> This endpoint is restricted to + * administrators. */ @Test public void generateSpCertificateTest() { @@ -76,7 +77,7 @@ public void generateSpCertificateTest() { /** * Get all identity providers. * - * Retrieve identity providers in an array. + * Retrieve an array of identity providers. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void getAllIdentityProvidersTest() { @@ -90,9 +91,9 @@ public void getAllIdentityProvidersTest() { } /** - * Get identity provider by ID. + * Get identity provider. * - * Retrieve by ID. + * Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void getIdentityProviderTest() { @@ -105,7 +106,7 @@ public void getIdentityProviderTest() { /** * Refreshes the OIDC signing keys. * - * Refreshes an OIDC IdP's signing keys. + * Refreshes an OIDC IdP's signing keys. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void refreshJwksTest() { @@ -118,7 +119,7 @@ public void refreshJwksTest() { /** * Update an existing identity provider. * - * Update an existing identity provider. + * Update an existing identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void updateIdentityProviderTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApiTest.java index 2669f8eb0..7afcf1617 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountPolicyGroupsApiTest.java @@ -24,7 +24,9 @@ public void setup() { * * Add API keys to the group. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` */ @Test public void addApiKeysToGroupTest() { @@ -39,8 +41,10 @@ public void addApiKeysToGroupTest() { * Add API Keys to the group. * * Add API keys to the group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` */ @Test public void addListedApiKeysToGroupTest() { @@ -51,12 +55,34 @@ public void addListedApiKeysToGroupTest() { // TODO: test validations } + /** + * Add applications to the group. + * + * Add applications to the group. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` + */ + @Test + public void addListedApplicationsToGroupTest() { + String groupId = null; + SubjectList body = null; + // GroupSummary response = api.addListedApplicationsToGroup(groupId, body); + + // TODO: test validations + } + /** * Add users to the group. * - * Add users to the group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Add users to the group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` */ @Test public void addListedUsersToGroup_Test() { @@ -70,9 +96,10 @@ public void addListedUsersToGroup_Test() { /** * Add members to a group. * - * Add users and API keys to a group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": + * Add users and API keys to a group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` */ @@ -88,9 +115,12 @@ public void addSubjectsToGroupTest() { /** * Add users to the group. * - * Add users to the group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Add users to the group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` */ @Test public void addUsersToGroup_Test() { @@ -104,10 +134,10 @@ public void addUsersToGroup_Test() { /** * Create a new group. * - * Create a new group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}' - * ``` + * Create a new group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' -d '{\"name\": + * \"MyGroup1\"}' ``` */ @Test public void createGroupTest() { @@ -120,9 +150,9 @@ public void createGroupTest() { /** * Delete a group. * - * Delete a group. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Delete a group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void deleteGroupTest() { @@ -133,10 +163,10 @@ public void deleteGroupTest() { } /** - * Get all group information. + * Get policy groups. * - * Retrieve all group information. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <api_key>' + * Retrieve an array of policy groups. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups \\ -H 'Authorization: Bearer <access_key>' * ``` */ @Test @@ -152,11 +182,11 @@ public void getAllGroupsTest() { } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * - * Manage policy groups. **Example:** ``` curl -X GET + * Retrieve an array of API keys associated with a policy group. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getApiKeysOfGroupTest() { @@ -171,11 +201,30 @@ public void getApiKeysOfGroupTest() { } /** - * Get group information. + * Get the applications of a policy group. + * + * Retrieve an array of applications associated with a policy group. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getApplicationsOfGroupTest() { + String groupId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + // ApplicationList response = api.getApplicationsOfGroup(groupId, limit, after, order, include); + + // TODO: test validations + } + + /** + * Get a policy group. * - * Retrieve general information about a group. **Example:** ``` curl -X GET + * Retrieve a policy group. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getGroupSummaryTest() { @@ -186,11 +235,12 @@ public void getGroupSummaryTest() { } /** - * Get users of a group. + * Get users of a policy group. * - * Retrieve users of a group with details. **Example:** ``` curl -X GET + * Retrieve an array of users associated with a policy group. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getUsersOfGroupTest() { @@ -213,8 +263,8 @@ public void getUsersOfGroupTest() { * * Remove API keys from groups. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` */ @Test @@ -231,8 +281,8 @@ public void removeApiKeysFromGroupTest() { * * Remove API keys from groups. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"apikeys\" : + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` */ @Test @@ -244,13 +294,33 @@ public void removeListedApiKeysFromGroupTest() { // TODO: test validations } + /** + * Remove applications from a group. + * + * Remove applications from groups. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' + * ``` + */ + @Test + public void removeListedApplicationsFromGroupTest() { + String groupId = null; + SubjectList body = null; + // GroupSummary response = api.removeListedApplicationsFromGroup(groupId, body); + + // TODO: test validations + } + /** * Remove users from a group. * - * Manage policy groups. **Example:** ``` curl -X POST + * Remove users from a policy group. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{ \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` */ @Test @@ -265,10 +335,11 @@ public void removeListedUsersFromGroupTest() { /** * Remove users from a group. * - * Manage policy groups. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d - * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * Manage policy groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"users\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"] }' * ``` */ @Test @@ -283,10 +354,10 @@ public void removeUsersFromGroupTest() { /** * Update the group name. * - * Update a group name. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": - * \"TestGroup2\"}' ``` + * Update a group name. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestGroup2\"}' ``` */ @Test public void updateGroupNameTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApiTest.java index fe26666e4..1b78022e0 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountProfileApiTest.java @@ -18,11 +18,11 @@ public void setup() { } /** - * Get account info. + * Get account information. * - * Retrieve detailed information about the account. **Example:** ``` curl -X GET + * Retrieve information about the account. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getMyAccountInfoTest() { @@ -36,10 +36,10 @@ public void getMyAccountInfoTest() { /** * Updates attributes of the account. * - * Update the account. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' \\ -d '{\"phone_number\": \"12345678\"}' - * ``` + * Update the account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"phone_number\": \"12345678\"}' ``` */ @Test public void updateMyAccountTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApiTest.java index 88a648b0a..67cce491b 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUserInvitationsApiTest.java @@ -20,10 +20,10 @@ public void setup() { /** * Create a user invitation. * - * Invite a new or existing user. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <api_key>' \\ - * -H 'content-type: application/json' \\ -d {\"email\": \"myemail@company.com\"} - * ``` + * Invite a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"email\": \"myemail@company.com\"} ``` */ @Test public void createInvitationTest() { @@ -36,9 +36,10 @@ public void createInvitationTest() { /** * Delete a user invitation. * - * Delete an active user invitation sent to a new or existing user. **Example:** ``` curl -X DELETE + * Delete an active user invitation sent to a new or existing user. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void deleteInvitationTest() { @@ -49,10 +50,11 @@ public void deleteInvitationTest() { } /** - * Get the details of all user invitations. + * Get user invitations. * - * Retrieve details for all the active user invitations. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <api_key>' + * Retrieve an array of active user invitations sent by email. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/user-invitations \\ -H 'Authorization: Bearer <access_key>' * ``` */ @Test @@ -69,9 +71,10 @@ public void getAllInvitationsTest() { /** * Details of a user invitation. * - * Retrieve the details of an active user invitation. **Example:** ``` curl -X GET + * Retrieve the details of an active user invitation. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getInvitationTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApiTest.java index 897a658e3..b72d508b0 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/AccountUsersApiTest.java @@ -24,9 +24,9 @@ public void setup() { /** * Add user to a list of groups. * - * Add user to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -42,9 +42,9 @@ public void addUserToGroupsTest() { /** * Add user to a list of groups. * - * Add user to groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -60,11 +60,11 @@ public void addUserToListedGroupsTest() { /** * Create a new user. * - * Create or invite a new user to the account. Only email address is used; other attributes are set in the second - * step. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": - * \"myemail@company.com\"} ``` + * Create or invite a new user to the account. The invited user has to accept the invitation by clicking the link in + * the invitation email. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"email\": \"myemail@company.com\"} ``` */ @Test public void createUserTest() { @@ -78,9 +78,9 @@ public void createUserTest() { /** * Delete a user. * - * Delete a user. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Delete a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void deleteUserTest() { @@ -91,11 +91,11 @@ public void deleteUserTest() { } /** - * Get the details of all users. + * Get users. * - * Retrieve the details of all users. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/users \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getAllUsersTest() { @@ -115,11 +115,12 @@ public void getAllUsersTest() { } /** - * Get groups of the user. + * Get policy groups for a user. * - * Retrieve groups of the user. **Example:** ``` curl -X GET + * Retrieve an array of policy groups associated with a user. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getGroupsOfUserTest() { @@ -134,31 +135,31 @@ public void getGroupsOfUserTest() { } /** - * Details of the current user. + * Details of a user. * - * Retrieve the details of the logged-in user. + * Retrieve the details of a user. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test - public void getMyUserTest() { - String scratchCodes = null; - String properties = null; - String include = null; - // UserInfoResp response = api.getMyUser(scratchCodes, properties, include); + public void getUserTest() { + String userId = null; + // UserInfoResp response = api.getUser(userId); // TODO: test validations } /** - * Details of a user. + * Remove user from the account. * - * Retrieve the details of a user. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' - * ``` + * Remove user from the account. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/remove \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test - public void getUserTest() { + public void removeUserFromAccountTest() { String userId = null; - // UserInfoResp response = api.getUser(userId); + // Void response = api.removeUserFromAccount(userId); // TODO: test validations } @@ -166,9 +167,9 @@ public void getUserTest() { /** * Remove user from groups. * - * Remove user from groups. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -184,9 +185,9 @@ public void removeUserFromGroupsTest() { /** * Remove user from groups. * - * Remove user from groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -202,25 +203,10 @@ public void removeUserFromListedGroupsTest() { /** * Update user details. * - * Update user details. **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/me - * \\ -H 'Authorization: Bearer <token>' \\ -H 'content-type: application/json' \\ -d - * '{\"full_name\": \"fullname\"}' ``` - */ - @Test - public void updateMyUserTest() { - UserUpdateReq body = null; - // UserInfoResp response = api.updateMyUser(body); - - // TODO: test validations - } - - /** - * Update user details. - * - * Update user details **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: Bearer <api_key>' \\ - * -H 'content-type: application/json' \\ -d '{\"username\": \"myusername\"}' - * ``` + * Update user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": + * \"myusername\"}' ``` */ @Test public void updateUserTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApiTest.java new file mode 100644 index 000000000..e50baed82 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataNotificationsApiTest.java @@ -0,0 +1,268 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Webhook; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceDataNotificationsApi + */ +public class DeviceDataNotificationsApiTest { + + private DeviceDataNotificationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceDataNotificationsApi.class); + } + + /** + * Open the websocket. + * + * A websocket channel can have only one active connection at a time. If a websocket connection for a channel exists + * and a new connection to the same channel is made, the connection is accepted and the older connection is closed. + * A websocket client library should be used when connecting to this endpoint. Once the socket has been opened, the + * server may close it with one of the following status codes. <table> <thead> <tr> + * <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> + * <td><b>1000</b></td> <td>Socket closed normally by the client, or by the server + * when the channel is deleted with a REST call.</td> </tr> <tr> + * <td><b>1001</b></td> <td>Going away. Set when another socket opens on the used + * channel.</td> </tr> <tr> <td><b>1006</b></td> <td>Abnormal + * closure. The client should reconnect after receiving this status code. A short reconnect delay is + * recommended.</td> </tr> <tr> <td><b>1008</b></td> <td>Policy + * violation. Set if the access key is lost or invalidated after a successful WebSocket handshake.</td> + * </tr> <tr> <td><b>1011</b></td> <td>Unexpected condition. The socket is + * closed with this status in an attempt to open a socket to a nonexistent channel (without a prior PUT request). + * This code is also used to indicate a closing socket for any other unexpected condition in the server.</td> + * </tr> <tr> <td><b>1012</b></td> <td>Service restart. Set when the + * server restarts for update, maintenance, and so on. The client should reconnect after receiving this status code. + * A short reconnect delay is recommended.</td> </tr> </tbody> </table> **Expected client + * behaviour:** If the connection is closed with code 1006 or 1012, the client should try to reconnect to maintain + * the notification flow. The client might disconnect several times in a relatively short period, for example, + * during service updates. This is normal. The desired client behavior is to reconnect after each disconnect. + * **Example:** The example is meant only for testing. For production devices, use a WebSocket client library. + * Websocat (https://github.com/vi/websocat) is a command-line client for WebSockets, like netcat or cURL. The + * example command opens a new WebSocket, waits for any data sent to the socket from the server, and prints it to + * `stdout`. ``` websocat + * wss://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect \\ -H + * \"Sec-WebSocket-Protocol:wss,pelion_ak_<access_key>\" ``` + */ + @Test + public void connectWebsocketTest() { + String connection = null; + String upgrade = null; + String origin = null; + Integer secWebSocketVersion = null; + String secWebSocketKey = null; + String secWebSocketProtocol = null; + // Void response = api.connectWebsocket(connection, upgrade, origin, secWebSocketVersion, secWebSocketKey, + // secWebSocketProtocol); + + // TODO: test validations + } + + /** + * Delete notification Long Poll channel. + * + * Delete a notification Long Poll channel. This is required to change the channel from Long Poll to another type. + * Do not make a GET `/v2/notification/pull` call for two minutes after deleting the channel, because it + * can implicitly recreate the pull channel. You can also have some random responses with payload or 410 GONE with + * \"CHANNEL_DELETED\" as a payload or 200/204 until the old channel is purged. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteLongPollChannelTest() { + // Void response = api.deleteLongPollChannel(); + + // TODO: test validations + } + + /** + * Delete websocket channel. + * + * Delete a notification websocket channel bound to the application. This is required to change the channel from + * websocket to another type. Deleting the websocket channel also removes the channel's notification queue. Any + * unsent notifications are lost when the channel is deleted. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deleteWebsocketTest() { + // Void response = api.deleteWebsocket(); + + // TODO: test validations + } + + /** + * Delete callback URL. + * + * Deletes the callback URL. Deleting the callback URL also removes the channel's notification queue. Any unsent + * notifications are lost when the channel is deleted. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deregisterWebhookTest() { + // Void response = api.deregisterWebhook(); + + // TODO: test validations + } + + /** + * Get channel metadata. + * + * Get channel delivery mechanism. **Example:** curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/channel \\ -H 'Authorization: Bearer + * <access_key>' + */ + @Test + public void getChannelMetadataTest() { + // ChannelMetadata response = api.getChannelMetadata(); + + // TODO: test validations + } + + /** + * Check callback URL. + * + * Shows the current callback URL if it exists. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getWebhookTest() { + // Webhook response = api.getWebhook(); + + // TODO: test validations + } + + /** + * Get websocket channel information. + * + * Returns 200 with websocket connection status, if websocket channel exists. **Note**: The current version does not + * yet have the capability to determine the channel status and will always return status 'unknown' and queue + * size '-1'. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getWebsocketTest() { + // WebsocketChannel response = api.getWebsocket(); + + // TODO: test validations + } + + /** + * Get notifications using Long Poll + * + * In this case, notifications are delivered through HTTP long poll requests. The HTTP request is kept open until + * one or more event notifications are delivered to the client, or the request times out (response code 204). In + * both cases, the client should open a new polling connection after the previous one closes. Only a single long + * polling connection per application can be ongoing at any given time. We recommend using a persistent connection + * (Connection keep-alive header in the request) to avoid excess TLS handshakes. The pull channel is implicitly + * created by the first GET call to `/v2/notification/pull`. It refreshes on each GET call. If the channel + * is not polled for a long time (10 minutes), it expires and is deleted. This means that no notifications will stay + * in the queue between polls. A channel can be also be deleted explicitly with a DELETE call. **Note:** If you + * cannot have a public-facing callback URL, for example, when developing on your local machine, you can use long + * polling to check for new messages. However, **long polling is deprecated** and will likely be replaced in the + * future. It is meant only for experimentation, not commercial use. The proper method to receive notifications is a + * **notification callback**. There can only be one notification channel per application in Device Management + * Connect. If a notification channel of other type already exists for the application, delete it before creating a + * long poll notification channel. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/notification/pull \\ -H 'Authorization: Bearer <access_key>' + * ``` + */ + @Test + public void longPollNotificationsTest() { + // NotificationMessage response = api.longPollNotifications(); + + // TODO: test validations + } + + /** + * Register a callback URL. + * + * Register a URL to which the server delivers notifications of changes to the subscribed resource. To push + * notifications, you must first place subscriptions. The maximum length of the URL, header keys, and values, all + * combined, is 400 characters. Notifications are delivered as PUT requests to the HTTP server, which the client + * defines with a subscription server message. The given URL must be accessible, and respond to the PUT request with + * a response code of 200 or 204. Device Management Connect tests the callback URL with an empty JSON payload + * `{}` when the URL is registered. Callback implementation does not support URL redirection. For more + * information on notification messages, see [NotificationMessage](#NotificationMessage). **Optional headers in a + * callback message:** You can set optional headers to a callback in a **Webhook** object. Device Management Connect + * includes the header and key pairs in the notification messages send them to callback URL. The callback URLs and + * headers are application-specific. One possible use for additional headers is checking the origin of a PUT + * request, as well as distinguishing the application to which the notification belongs. **Note**: Only one callback + * URL for each application can be active. If you register a new URL while another one is active, it replaces the + * active one. There can be only one notification channel at a time for each application. If another type of channel + * is already present, you need to delete it before setting the callback URL. **Expiration of a callback URL:** A + * callback can expire when Device Management cannot deliver a notification due to a connection timeout or error + * response (4xx or 5xx). After each delivery failure, Device Management sets an exponential back-off time and makes + * a retry attempt after that. The first retry delay is 1 second, then 2s, 4s, 8s, up to a maximum delay of two + * minutes. The retry delay is applied when the response is received, or in case of timeout, after the timeout + * expires. The request timeout is 20 seconds; in the case of timeout, the first retry happens 20 + 1 seconds after + * the first delivery attempt, then 20 + 2 seconds, and so on. The callback URL is removed if all retries fail + * within 24 hours. More about [notification sending + * logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) + * in the Device Management documentation. **Supported callback URL protocols:** Currently, only HTTP and HTTPS + * protocols are supported. **HTTPS callback URLs:** When delivering a notification to an HTTPS-based callback URL, + * Device Management Connect identifies itself with a valid client certificate. The certificate is signed by a + * trusted certificate authority (GlobalSign), with a Common Name (CN) set to + * `notifications.mbedcloud.com`. **Configuration options:** The event notification channel provides + * configurations options defined in [Serialization config](#SerializationConfigObjectV2). **Example:** This example + * command shows how to set your callback URL. It also sets an optional header authorization. When Device Management + * Connect calls your callback URL, the call contains the authorization header with the defined value. + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"url\": \"{callback-url}\", \"headers\": {\"authorization\": + * \"f4b93d6e-4652-4874-82e4-41a3ced0cd56\"}, \"serialization\": {\"type\": + * \"v2\", \"max_chunk_size\": \"100\", \"cfg\": + * {\"deregistrations_as_object\": \"true\", \"include_uid\": \"true\", + * \"include_timestamp\": \"true\", \"include_original_ep\": \"true\" } } + * }' ``` + */ + @Test + public void registerWebhookTest() { + Webhook webhook = null; + // Void response = api.registerWebhook(webhook); + + // TODO: test validations + } + + /** + * Register a websocket channel. + * + * Register (or update) a channel using websocket connection to deliver notifications. The websocket channel should + * be opened by client using `/v2/notification/websocket-connect` endpoint. To get notifications pushed, + * you must place subscriptions. For more information on notification messages, see + * [NotificationMessage](#NotificationMessage). A websocket channel can have only one active websocket connection at + * a time. If a websocket connection for a channel exists and a new connection to the same channel is made, the + * connection is accepted and the older connection is closed. **Note**: Only one websocket channel for each + * application can be active at a time. If you register a new websocket channel while another one is active, it + * replaces the previously active one. If another type of channel is already present, you need to delete it before + * registering a websocket channel. **Note**: The current version does not yet have the capability to determine the + * channel status and will always return status 'unknown' and queue size '-1'. **Expiration of a + * websocket:** A websocket channel is expired if the channel does not have an opened websocket connection for a + * 24-hour period. Channel expiration means the channel is deleted and any undelivered notifications stored in its + * internal queue is removed. As long as the channel has an opened websocket connection or time between successive + * websocket connections is less than 24 hours, the channel is considered active, notifications are stored in its + * internal queue and delivered when a websocket connection is active. A channel can be also deleted explicitly with + * a DELETE call. More about [notification sending + * logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic). + * **Configuration options:** The event notification channel provides configurations options defined in + * [Serialization config](#SerializationConfigObjectV2) **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/notification/websocket \\ -H 'Authorization: Bearer + * <access_key>' \\ -d '{ \"serialization\": {\"type\": \"v2\", + * \"max_chunk_size\": \"100\", \"cfg\": {\"deregistrations_as_object\": + * \"true\", \"include_uid\": \"true\", \"include_timestamp\": + * \"true\", \"include_original_ep\": \"true\" } } } ``` + */ + @Test + public void registerWebsocketTest() { + // RegisterWebsocketChannel response = api.registerWebsocket(); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApiTest.java new file mode 100644 index 000000000..93d2730c0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataRequestsApiTest.java @@ -0,0 +1,85 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceRequest; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceDataRequestsApi + */ +public class DeviceDataRequestsApiTest { + + private DeviceDataRequestsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceDataRequestsApi.class); + } + + /** + * Send an asynchronous request to read, write or post to a device resource. + * + * This API provides an interface to call CoAP (Constrained Application Protocol) methods on a device and send + * commands to device resources. As part of the request body, you must specify the CoAP method you want to call on + * the device: - Use the GET method to read resource values. For example, to read the value of resource + * `/3200/0/5501`, use: ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v2/device-requests/{device_id}?async-id={async-response-id} \\ -H + * 'Authorization: Bearer {access_key}' \\ -H 'content-type: application/json' \\ -d + * '{\"method\": \"GET\", \"uri\": \"/3200/0/5501\"}' + * ``` > For `GET` methods, the API may fetch values from an internal cache, instead of + * contacting the device. > If the value is not in the cache, the read command goes all the way to the device. - + * Use the PUT method to write [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) or + * resource values for a resource. Example payload to write a notification rule: ``` { + * \"method\": \"PUT\", \"uri\": + * \"/5/0/1?lt=10&gt=60&pmax=120\" } ``` - Example payload to write + * a value to resource `/5/0/1`: ``` { \"method\": \"PUT\", + * \"uri\": \"/5/0/1?k1=v1&k2=v2\", \"accept\": + * \"text/plain\", \"content-type\": \"text/plain\", \"payload-b64\": + * \"dmFsdWUxCg==\" } ``` - Use the POST method to execute or create a resource + * on a LWM2M supporting device. When you create a resource, `uri` must refer to an object, and + * `payload-b64` must be in LWM2M TLV format for example: ``` { \"method\": + * \"POST\", \"uri\": \"/123\", \"content-type\": + * \"application/vnd.oma.lwm2m+tlv\", \"payload-b64\": \"BwHFAnZhbHVl\" } + * ``` - Use the POST method to execute resource on a LWM2M supporting device. Example payload to + * execute LWM2M resource `/123/1/1`: ``` { \"method\": \"POST\", + * \"uri\": \"/123/1/1\" } ``` - Device Management sends responses through the + * currently configured notification channel as `AsyncIDResponse`. Example `AsyncIDResponse` + * delivered through the notification channel: ``` { \"async-responses\": [ { + * \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 200, + * \"payload\": \"dmFsdWUxCg==\", \"ct\": \"text/plain\", + * \"max-age\": 600 } ] } ``` ``` { \"async-responses\": [ { + * \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 504, + * \"error\": \"TIMEOUT\" } ] } ``` > If it cannot reach the device at the + * time of the request, Device Management puts the requests in a queue. **Queueing behavior** If Device Management + * does not reach the device, or the device fails to respond, the server queues the request and retries the + * delivery, for the period of time defined by `expiry-seconds`, the next time the device contacts the + * server. The queue is limited to 20 requests per device. If the queue is full, subsequent messages will be + * rejected until some of the existing messages are delivered or expired. Device Management delivers requests from + * the queue in the order of insertion, one at a time, and not concurrently. Delivery attempts follow + * protocol-specific retransmission logic. There can be multiple transmissions, depending on the protocol. For CoAP, + * the retransmissions have an exponential backoff of 2, 4, 8, 16, and up to 64 seconds, taking in total over two + * minutes. If the device does not respond within this two-minute period, the delivery fails, Device Management + * performs one retry and then puts the request back into the queue until the retry count reaches its limit. Device + * Management attempts to redeliver the request when the device next contacts the server. When Device Management + * reaches the `retry` or `expiry-seconds` limit, the server discards the request and sends an + * error in `AsyncIDResponse`. For example: - Retries could be exhausted if the device periodically + * contacts the server and receives the request from the queue, but then fails to respond to the server. - The + * device may lose its network connectivity, and the requests in the queue may expire and get discarded before the + * device regains connectivity. When Device Management delivers the request to the device, the status code in + * `AsyncIDResponse` is *2xx* or *4xx*, based on the device's response. If Device Management could not + * deliver the request, the server generates a status code of *429* or *5xx*. + */ + @Test + public void createAsyncRequestTest() { + String deviceId = null; + String asyncId = null; + DeviceRequest body = null; + Integer retry = null; + Integer expirySeconds = null; + // Void response = api.createAsyncRequest(deviceId, asyncId, body, retry, expirySeconds); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApiTest.java new file mode 100644 index 000000000..47eb3c962 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataResourcesApiTest.java @@ -0,0 +1,138 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceDataResourcesApi + */ +public class DeviceDataResourcesApiTest { + + private DeviceDataResourcesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceDataResourcesApi.class); + } + + /** + * (DEPRECATED) Delete a resource path. + * + * (DEPRECATED) A request to delete a resource path must be handled by both Device Management Client and Device + * Management Connect. All resource APIs are asynchronous. These APIs respond only if the device is on and connected + * to Device Management Connect, and there is an active notification channel. **Example:** ``` curl + * -X DELETE https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void deleteResourcePathTest() { + String deviceId = null; + String resourcePath = null; + Boolean noResp = null; + // AsyncID response = api.deleteResourcePath(deviceId, resourcePath, noResp); + + // TODO: test validations + } + + /** + * (DEPRECATED) Execute a function on a Resource or create new Object instance. + * + * (DEPRECATED) [Execute a + * function](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html#the-execute-operation) + * on an existing resource and create a new Object instance on the device. The resource path does not have to exist; + * you can set it with the call. The maximum length of the resource path is 255 characters. All resource APIs are + * asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there + * is an active notification channel. Supported content types depend on the device and its resource. Device + * Management translates HTTP to the equivalent CoAP content type. **Example:** This example resets the min and max + * values of the [temperature sensor](http://www.openmobilealliance.org/tech/profiles/lwm2m/3303.xml) instance 0 by + * executing Resource 5605 'Reset Min and Max Measured Values'. ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3303/0/5605 \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void executeOrCreateResourceTest() { + String deviceId = null; + String resourcePath = null; + String resourceFunction = null; + Boolean noResp = null; + // AsyncID response = api.executeOrCreateResource(deviceId, resourcePath, resourceFunction, noResp); + + // TODO: test validations + } + + /** + * List the resources on a device. + * + * Retrieves information about the resource structure for a device from Device Management. This call does not reach + * the device. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getEndpointResourcesTest() { + String deviceId = null; + // ResourceArray response = api.getEndpointResources(deviceId); + + // TODO: test validations + } + + /** + * (DEPRECATED) Read from a resource. + * + * (DEPRECATED) Requests the resource value either from the device or cache. If the value is not in the cache, the + * request goes all the way to the device. When the response is available, an `AsyncIDResponse` JSON + * object is received in the notification channel. The resource values can also be in cache based on + * `max_age` defined by the device. The value found from the cache is returned immediately in the + * response. The preferred way to get resource values is to use the **subscribe** and **callback** methods. All + * resource APIs are asynchronous. These APIs only respond if the device is on and connected to Device Management. + * See also how [resource + * caching](https://developer.pelion.com/docs/device-management/current/connecting/device-guidelines.html#resource-cache) + * works. Please see the [Lightweight Machine to Machine Technical + * specification](http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf) + * for more information. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getResourceValueTest() { + String deviceId = null; + String resourcePath = null; + Boolean cacheOnly = null; + Boolean noResp = null; + // Void response = api.getResourceValue(deviceId, resourcePath, cacheOnly, noResp); + + // TODO: test validations + } + + /** + * (DEPRECATED) Write to a Resource or use write-attributes (notification rules) for a Resource. + * + * (DEPRECATED) With this API, you can [write a new value to existing + * Resources](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) or + * use the **write** attribute to set [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) for the + * Resources. The notification rules only work on the device client side and may not be supported by all clients. + * This API can also be used to transfer files to the device. Device Management Connect LwM2M server implements + * Option 1 from RFC7959. The maximum block size is 1024 bytes. Note block size versus transferred file size in + * low-quality networks. The customer application needs to know what type of file is transferred (for example, TXT) + * and the customer can encrypt the payload. The maximum payload size is 1048576 bytes. All resource APIs are + * asynchronous. These APIs respond only if the device is on and connected to Device Management Connect, and there + * is an active notification channel. Supported content types depend on the device and its resource. Device + * Management translates HTTP to equivalent CoAP content type. **Example:** This example sets the alarm on a buzzer. + * The command writes the [Buzzer](http://www.openmobilealliance.org/tech/profiles/lwm2m/3338.xml) instance 0, + * \"On/Off\" boolean resource to '1'. ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3338/0/5850 \\ -H \"content-type: + * text/plain\" \\ -H 'Authorization: Bearer <access_key>' \\ -d '1' ``` + */ + @Test + public void updateResourceValueTest() { + String deviceId = null; + String resourcePath = null; + String resourceValue = null; + Boolean noResp = null; + // AsyncID response = api.updateResourceValue(deviceId, resourcePath, resourceValue, noResp); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApiTest.java new file mode 100644 index 000000000..4a1964f05 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDataSubscriptionsApiTest.java @@ -0,0 +1,172 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.PresubscriptionArray; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceDataSubscriptionsApi + */ +public class DeviceDataSubscriptionsApiTest { + + private DeviceDataSubscriptionsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceDataSubscriptionsApi.class); + } + + /** + * Subscribe to a resource to receive updates about resource changes. + * + * Subscribe to a resource to receive updated resource content, periodically or based on a more sophisticated + * solution-dependent logic. To place dynamic observation rules for individual object instances and resources and + * define when the device sends observations, set [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + * **Note:** Device Management removes all manual subscriptions during a full device registration, at which point + * applications must re-subscribe. To avoid this, use `/subscriptions` to set a pre-subscription. You can + * subscribe to resources, objects and object instances. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` **Important:** You must also call a + * [`/notification/callback`](https://developer.pelion.com/docs/device-management-api/notifications/) + * method for Device Management Connect to push resource change notifications. + */ + @Test + public void addResourceSubscriptionTest() { + String deviceId = null; + String resourcePath = null; + // Void response = api.addResourceSubscription(deviceId, resourcePath); + + // TODO: test validations + } + + /** + * Read the subscription status for a specific resource. + * + * Check whether you are subscribed to receive resource content updates for a specific resource. + */ + @Test + public void checkResourceSubscriptionTest() { + String deviceId = null; + String resourcePath = null; + // Void response = api.checkResourceSubscription(deviceId, resourcePath); + + // TODO: test validations + } + + /** + * Delete all subscriptions on a device. + * + * Delete all resource subscriptions in a single device. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deleteEndpointSubscriptionsTest() { + String deviceId = null; + // Void response = api.deleteEndpointSubscriptions(deviceId); + + // TODO: test validations + } + + /** + * Remove pre-subscriptions. + * + * Remove pre-subscriptions. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' + * ``` + */ + @Test + public void deletePreSubscriptionsTest() { + // Void response = api.deletePreSubscriptions(); + + // TODO: test validations + } + + /** + * Remove a subscription. + * + * Remove an existing subscription to a resource. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deleteResourceSubscriptionTest() { + String deviceId = null; + String resourcePath = null; + // Void response = api.deleteResourceSubscription(deviceId, resourcePath); + + // TODO: test validations + } + + /** + * View all subscriptions on a device. + * + * Retrieve a list of all subscribed resources on a single device. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getEndpointSubscriptionsTest() { + String deviceId = null; + // String response = api.getEndpointSubscriptions(deviceId); + + // TODO: test validations + } + + /** + * View pre-subscriptions. + * + * Retrieve pre-subscription data. The server returns a JSON structure. If there are no pre-subscribed resources, + * the server returns an empty array. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' + * ``` + */ + @Test + public void getPreSubscriptionsTest() { + // PresubscriptionArray response = api.getPreSubscriptions(); + + // TODO: test validations + } + + /** + * Set pre-subscriptions. + * + * A pre-subscription is a set of rules you define to subscribe to specific resources automatically when certain + * devices register or does a register update. You can set subscription rules based on the endpoint ID (optionally + * having an `*` character at the end), endpoint type, a list of resources, or expressions with an + * `*` character at the end. When a device that meets the subscription rules registered, Device Management + * Connect automatically sends subscription requests to the device for the resources you specify. To remove the + * pre-subscription data, put an empty array as a rule. To place dynamic observation rules for individual object + * instances and resources and define when the device sends observations, set [notification + * rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + * **Note:** The subscription is bound to the application you are using. To get notifications of the resource value + * changes, you need to create an [event notification + * channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html) + * with an access key of the same application. **Example request:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v2/subscriptions \\ -H 'Authorization: Bearer <access_key>' \\ + * -H 'content-type: application/json' \\ -d '[ { \"endpoint-name\": \"node-001\", + * \"resource-path\": [\"/dev\"] }, { \"endpoint-type\": \"Light\", + * \"resource-path\": [\"/sen/_*\"] }, { \"endpoint-name\": \"node*\" }, { + * \"endpoint-type\": \"Sensor\" }, { \"resource-path\": + * [\"/dev/temp\",\"/dev/hum\"] } ]' ``` - Subscribe to `/dev` + * resource of endpoint named `node-001`. - Subscribe to `Light` type of endpoints and their + * resources prefixed with `/sen/`. - Subscribe to all observable resources of endpoint names prefixed + * with `node`. - Subscribe to all observable resources of `Sensor` type endpoints. - Subscribe + * to `/dev/temp` and `/dev/hum` resources of all endpoints. **Limits**: - The maximum length of + * the endpoint name and endpoint type is 64 characters. - The maximum length of the resource path is 128 + * characters. - You can subscribe to 256 separate resource paths. - The maximum number of pre-subscription entries + * is 1024. **Note**: To save bandwidth and avoid unnecessary traffic, use resource path patterns to limit the + * matching resources in the presubscription data. This prevents your web application from receiving unwanted + * resource notifications. See [Subscribe only to what you + * need](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + */ + @Test + public void updatePreSubscriptionsTest() { + PresubscriptionArray presubscription = null; + // Void response = api.updatePreSubscriptions(presubscription); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApiTest.java new file mode 100644 index 000000000..1511d300b --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDeviceQueriesApiTest.java @@ -0,0 +1,112 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.joda.time.DateTime; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceQueryPostPutRequest; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceDirectoryDeviceQueriesApi + */ +public class DeviceDirectoryDeviceQueriesApiTest { + + private DeviceDirectoryDeviceQueriesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceDirectoryDeviceQueriesApi.class); + } + + /** + * Create a device query. + * + * Create a new device query. + */ + @Test + public void deviceQueryCreateTest() { + DeviceQueryPostPutRequest device = null; + // DeviceQuery response = api.deviceQueryCreate(device); + + // TODO: test validations + } + + /** + * Delete a device query. + * + * Delete a device query. + */ + @Test + public void deviceQueryDestroyTest() { + String queryId = null; + // Void response = api.deviceQueryDestroy(queryId); + + // TODO: test validations + } + + /** + * List device queries. + * + * List all device queries. + */ + @Test + public void deviceQueryListTest() { + Integer limit = null; + String order = null; + String after = null; + String include = null; + String filter = null; + String createdAtIn = null; + String createdAtNin = null; + DateTime createdAtLte = null; + DateTime createdAtGte = null; + String idEq = null; + String idNeq = null; + String idIn = null; + String idNin = null; + String nameEq = null; + String nameNeq = null; + String nameIn = null; + String nameNin = null; + String queryEq = null; + String queryNeq = null; + String queryIn = null; + String queryNin = null; + String updatedAtIn = null; + String updatedAtNin = null; + DateTime updatedAtLte = null; + DateTime updatedAtGte = null; + // DeviceQueryPage response = api.deviceQueryList(limit, order, after, include, filter, createdAtIn, + // createdAtNin, createdAtLte, createdAtGte, idEq, idNeq, idIn, idNin, nameEq, nameNeq, nameIn, nameNin, + // queryEq, queryNeq, queryIn, queryNin, updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte); + + // TODO: test validations + } + + /** + * Retrieve a device query. + * + * Retrieve a specific device query. + */ + @Test + public void deviceQueryRetrieveTest() { + String queryId = null; + // DeviceQuery response = api.deviceQueryRetrieve(queryId); + + // TODO: test validations + } + + /** + * Update a device query. + * + * Update a specifc device query. + */ + @Test + public void deviceQueryUpdateTest() { + String queryId = null; + DeviceQueryPostPutRequest body = null; + // DeviceQuery response = api.deviceQueryUpdate(queryId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApiTest.java index 09ec5de8e..29cee498f 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryDevicesApiTest.java @@ -23,7 +23,8 @@ public void setup() { /** * Create a device. * - * Create a new device. + * Create a new device in Device Management. Usually you do not need to create a device this way, as it is + * automatically created when it bootstraps or connects to Device Management. */ @Test public void deviceCreateTest() { @@ -37,7 +38,7 @@ public void deviceCreateTest() { * Delete a device. * * Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a - * production certicate returns a 400 response. + * production certificate returns a 400 response. */ @Test public void deviceDestroyTest() { @@ -50,8 +51,11 @@ public void deviceDestroyTest() { /** * List all devices. * - * List all devices. **Example:** Following example filters devices according to state field and returns only - * devices in 'registered' state: ``` curl -X GET + * List all devices enrolled to Device Management for the account. The URL length must be fewer than 4096 + * characters. Requests that exceed this limit, such as those including too many query parameters in a filter, fail + * with a bad request response. devices with too long list of query parameters, the request is deemed as bad + * request. **Example:** Following example filters devices according to state field and returns only devices in + * 'registered' state: ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\ -H 'Authorization: Bearer * <API key>' ``` */ @@ -60,6 +64,7 @@ public void deviceListTest() { Integer limit = null; String order = null; String after = null; + String filter = null; String include = null; String lifecycleStatusEq = null; String lifecycleStatusNeq = null; @@ -179,6 +184,10 @@ public void deviceListTest() { String nameNeq = null; String nameIn = null; String nameNin = null; + String netIdEq = null; + String netIdNeq = null; + String netIdIn = null; + String netIdNin = null; String serialNumberEq = null; String serialNumberNeq = null; String serialNumberIn = null; @@ -195,8 +204,8 @@ public void deviceListTest() { String vendorIdNeq = null; String vendorIdIn = null; String vendorIdNin = null; - // DevicePage response = api.deviceList(limit, order, after, include, lifecycleStatusEq, lifecycleStatusNeq, - // lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, + // DevicePage response = api.deviceList(limit, order, after, filter, include, lifecycleStatusEq, + // lifecycleStatusNeq, lifecycleStatusIn, lifecycleStatusNin, operatorSuspendedEq, operatorSuspendedNeq, // lastOperatorSuspendedCategoryEq, lastOperatorSuspendedCategoryNeq, lastOperatorSuspendedCategoryIn, // lastOperatorSuspendedCategoryNin, lastOperatorSuspendedUpdatedAtIn, lastOperatorSuspendedUpdatedAtNin, // lastOperatorSuspendedUpdatedAtLte, lastOperatorSuspendedUpdatedAtGte, systemSuspendedEq, systemSuspendedNeq, @@ -218,9 +227,9 @@ public void deviceListTest() { // hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, // manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, // manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, - // mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, - // serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, - // updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); + // mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, + // serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, + // updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); // TODO: test validations } @@ -228,10 +237,13 @@ public void deviceListTest() { /** * Get a device. * - * Retrieve information about a specific device. **Example:** Following example must be updated with the - * device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/<device_ID> \\ -H 'Authorization: Bearer - * <API key>' ``` + * Retrieve information about a specific device. This API returns + * [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). If you want to see the + * structure of resources in the device or the actual resource values, use the [Connect + * API](https://developer.pelion.com/docs/device-management-api/connect/). **Example:** Following example must be + * updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\" + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/<device_ID> \\ -H + * 'Authorization: Bearer <API key>' ``` */ @Test public void deviceRetrieveTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApiTest.java index 67e8ccf10..425258aba 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryEventsApiTest.java @@ -20,12 +20,15 @@ public void setup() { /** * List all device events. * - * List all device events for an account. **Example:** Following example gets device-events limiting returned - * results to max 5 events ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\ -H 'Authorization: Bearer <API - * key>' ``` or to get events for certain device filter based on device_id: ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=<device_id> \\ -H - * 'Authorization: Bearer <API key>' ``` + * List all or a filtered list of device events for the account. Device events are events significant to operation + * or lifetime, such as creation, firmware update, and suspension. To see statistics for device connectivity and + * usage, use the [Statistics API](https://developer.pelion.com/docs/device-management-api/connect-statistics/). + * **Example:** Following example gets device-events limiting returned results to max 5 events ``` + * curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\ -H 'Authorization: Bearer + * <API key>' ``` or to get events for certain device filter based on device_id: + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=<device_id> \\ -H 'Authorization: + * Bearer <API key>' ``` */ @Test public void deviceEventListTest() { @@ -67,8 +70,9 @@ public void deviceEventListTest() { /** * Retrieve a device event. * - * Retrieve a specific device event. **Example:** To fetch a specific event you can use the 'id' field form - * the '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4' ``` curl -X + * \"Retrieve a specific device event. See '/v3/device-events/' for information on device events, and + * how to get the device_event_id.\" **Example:** To fetch a specific event you can use the 'id' field + * from '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4' ``` curl -X * GET https://api.us-east-1.mbedcloud.com/v3/device-events/<device_event_id> \\ -H 'Authorization: Bearer * <API key>' ``` */ @@ -83,7 +87,7 @@ public void deviceEventRetrieveTest() { /** * DEPRECATED: List all device events. * - * DEPRECATED: List all device events. Use `/v3/device-events/` instead. + * DEPRECATED: This API is replaced with `/v3/device-events/`. */ @Test public void deviceLogListTest() { @@ -127,7 +131,8 @@ public void deviceLogListTest() { /** * DEPRECATED: Retrieve a device event. * - * Retrieve device event (deprecated, use /v3/device-events/{device_event_id}/ instead). + * DEPRECATED: This API is replaced by `/v3/device-events/` and + * `/v3/device-events/{device_event_id}/`. */ @Test public void deviceLogRetrieveTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApiTest.java index b8ee0aa57..879f8a55a 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryGroupsApiTest.java @@ -37,7 +37,7 @@ public void groupCreateTest() { /** * Delete a group. * - * Delete a group. + * Delete a group. This deletes the group, but not the devices in the group. */ @Test public void groupDeleteTest() { @@ -92,7 +92,7 @@ public void groupListTest() { /** * Add a device to a group. * - * Add one device to a group. + * Add one device to a group. A device can be in multiple groups. */ @Test public void groupMembersAddTest() { @@ -120,7 +120,7 @@ public void groupMembersRemoveTest() { /** * Get a page of devices. * - * Get a page of devices. + * Get a page of devices in a specified group. */ @Test public void groupMembersRetrieveTest() { @@ -247,6 +247,10 @@ public void groupMembersRetrieveTest() { String nameNeq = null; String nameIn = null; String nameNin = null; + String netIdEq = null; + String netIdNeq = null; + String netIdIn = null; + String netIdNin = null; String serialNumberEq = null; String serialNumberNeq = null; String serialNumberIn = null; @@ -286,9 +290,9 @@ public void groupMembersRetrieveTest() { // hostGatewayEq, hostGatewayNeq, hostGatewayIn, hostGatewayNin, idEq, idNeq, idIn, idNin, manifestEq, // manifestNeq, manifestIn, manifestNin, manifestTimestampIn, manifestTimestampNin, manifestTimestampLte, // manifestTimestampGte, mechanismEq, mechanismNeq, mechanismIn, mechanismNin, mechanismUrlEq, mechanismUrlNeq, - // mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, serialNumberEq, serialNumberNeq, - // serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, updatedAtIn, updatedAtNin, - // updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); + // mechanismUrlIn, mechanismUrlNin, nameEq, nameNeq, nameIn, nameNin, netIdEq, netIdNeq, netIdIn, netIdNin, + // serialNumberEq, serialNumberNeq, serialNumberIn, serialNumberNin, stateEq, stateNeq, stateIn, stateNin, + // updatedAtIn, updatedAtNin, updatedAtLte, updatedAtGte, vendorIdEq, vendorIdNeq, vendorIdIn, vendorIdNin); // TODO: test validations } @@ -296,7 +300,9 @@ public void groupMembersRetrieveTest() { /** * Get a group. * - * Get a group. + * Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) info what + * contains info of the group, for example, name and updated date. To list the devices in the group, use + * '/v3/device-groups/{device-group-id}/devices/'. */ @Test public void groupRetrieveTest() { @@ -309,7 +315,7 @@ public void groupRetrieveTest() { /** * Modify the attributes of a group. * - * Modify the attributes of a group. + * Modify the attributes of a group, such as the description. */ @Test public void groupUpdateTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApiTest.java index 458277282..a5d64eb57 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceDirectoryLifecycleApiTest.java @@ -23,9 +23,9 @@ public void setup() { * List all device block categories * * List all device block categories. A block category is a short description of why a device was suspended or - * returned to service. **Example:** Get all defined categories of why device is blocked from the device management - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H - * 'Authorization: Bearer <API key>' ``` + * returned to service. **Example:** Get all defined device suspension categories: ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/device-block-categories \\ -H 'Authorization: Bearer <API + * key>' ``` */ @Test public void blockCategoriesListTest() { @@ -64,11 +64,17 @@ public void blockCategoriesRetrieveTest() { /** * Return a device to service. * - * Returning a device to service restores connectivity to the device. All API functionality is restored. - * **Example:** Following example enables device to connect again to Pelion Device Management. Note that the - * category must match the reason why device was suspended. This device was reported stolen but was now found. - * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ + * [Returning a device to + * service](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#using-the-api-suspending-and-resuming-devices) + * allows the device to connect to Device Management again. The connection is established according to the + * device's reconnection logic. The device reports a [registration + * event](https://developer.pelion.com/docs/device-management-api/connect/) through a [notification + * channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). + * The default reconnection logic is a progressive back-off for 2, 4, 8, or 16 seconds, up to one week. All API + * functionality is restored. **Example:** The following example enables a device to reconnect to Pelion Device + * Management. The category must match the reason device was suspended. This device was reported stolen, but was + * found: ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/resume \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ * \"category\": \"lost_or_stolen\", \"description\": \"Was found, was not stolen * but miss placed\"}' ``` */ @@ -84,15 +90,21 @@ public void deviceResumeTest() { /** * Suspend a device. * - * Suspending a device prevents it from connecting to Device Management. If a device is currently connected, it will - * be disconnected. Some API operations will fail while a device is suspended. ***Example:* Following example - * suspends a device with category \"Lost or stolen\". You can see available categories with - * '/v3/device-block-categories/'. ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"category\": - * \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer contacted via phone and - * reported device being stolen. Specific time of the theft was not know. Device last used in May/2019\"}' - * ``` + * [Suspending a + * device](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#suspending-and-resuming-devices) + * prevents it from connecting to Device Management. If a device is currently connected, it disconnects and shows as + * deregistered. You can also receive [deregistration + * events](https://developer.pelion.com/docs/device-management-api/connect/) in [notification + * channels](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). + * API operations needing device transactions fail while a device is suspended. Example use case to use suspending + * is that device is reported lost or stolen. You can block the device to connect and this way prevent device to + * cause unreliable data to your system. ***Example:* The following example suspends a device with category + * \"Lost or stolen\". You can see available categories with '/v3/device-block-categories/'. + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/<device_id>/suspend \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ + * \"category\": \"lost_or_stolen\", \"description\": \"EXAMPLE: Customer + * contacted via phone and reported device being stolen. Specific time of the theft was not know. Device last used + * in May/2019\"}' ``` */ @Test public void deviceSuspendTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApiTest.java new file mode 100644 index 000000000..4a7a2b3eb --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceEchoApiTest.java @@ -0,0 +1,57 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceEchoApi + */ +public class DeviceEchoApiTest { + + private DeviceEchoApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceEchoApi.class); + } + + /** + * Delete the Device Echo object. + * + * Calling this API removes your application data and device from the Device Echo service. You can still find the + * device using 'GET /v3/devices/{id}' from the Device Directory API. For privacy reasons, you might need to + * delete device data that contains personal information about the device owner or user. Private information is + * stored by the application; Pelion Device Management Client does not provide or store any private data. **Note:** + * If the device is able to connect, its data will reappear in Echo the next time the device sends that information + * to the service. To ensure data is permanently removed, suspend the device first by calling 'POST + * /v3/devices/{id}/suspend'. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deleteDeviceEchoObjectTest() { + String deviceId = null; + // Void response = api.deleteDeviceEchoObject(deviceId); + + // TODO: test validations + } + + /** + * Get the Device Echo object. + * + * Retrieve the Device Echo object, which represents the last known state of the device. The state includes the + * resources and their reported values with the desired state of the device. Auto-observable and subscribed + * resources are stored as the reported state of the device. To change the desired state, issue write commands with + * `/v2/device-requests/{device-id}`. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getDeviceEchoObjectTest() { + String deviceId = null; + // EchoDevice response = api.getDeviceEchoObject(deviceId); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApiTest.java new file mode 100644 index 000000000..465060aa9 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceOwnershipEnrollmentsApiTest.java @@ -0,0 +1,234 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EnrollmentId; +import java.io.File; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for DeviceOwnershipEnrollmentsApi + */ +public class DeviceOwnershipEnrollmentsApiTest { + + private DeviceOwnershipEnrollmentsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(DeviceOwnershipEnrollmentsApi.class); + } + + /** + * Bulk upload. + * + * With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs. **Example:** + * ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -F + * 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads ``` **To ensure your CSV + * file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated + * values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid + * enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty + * lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a + * line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode + * U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid + * enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed + * and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid + * enrollment file:** ``` \"Examples of valid identites, notes\" + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is + * ignored. A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , + * Whitespace is trimmed before validation. + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , + * Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** + * ``` + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * First line is ignored. + * A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid + * version identifier. + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short + * identity. \"\", Empty quotation marks are an invalid identity \" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", + * Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** + * ``` \"Examples of blank lines that are ignored\" ,, , This is also considered a blank + * line. ``` + */ + @Test + public void createBulkDeviceEnrollmentTest() { + File enrollmentIdentities = null; + // BulkResponse response = api.createBulkDeviceEnrollment(enrollmentIdentities); + + // TODO: test validations + } + + /** + * Create a single enrollment. + * + * When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account. + * <br> **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' + * \\ -H 'content-type: application/json' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments \\ -d + * '{\"enrollment_identity\": + * \"A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5\"}' + * ``` + */ + @Test + public void createDeviceEnrollmentTest() { + EnrollmentId enrollmentIdentity = null; + // EnrollmentIdentity response = api.createDeviceEnrollment(enrollmentIdentity); + + // TODO: test validations + } + + /** + * Bulk delete. + * + * With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to delete. + * **Example:** ``` curl -X POST \\ -H 'Authorization: Bearer <access_key>' \\ -F + * 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes ``` **To ensure your CSV + * file is valid:** 1. The first line of the file (header) is ignored. 1. Each line can contain comma-separated + * values, where the first value is the Enrollment ID. Everything after the first comma is ignored. 1. Valid + * enrollments begin with A followed by a - and 95 characters (examples below). 1. One enrollment ID per line. Empty + * lines are ignored. 1. Trailing comma at the end of the line is optional. 1. Lines are terminated with either a + * line feed \\n, a carriage return \\r, or both \\r\\n. 1. Leading and trailing whitespace characters (Unicode + * U+0000 - U+0020) are removed from the identity before validation. 1. Empty identities are ignored. 1. Valid + * enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed + * and will cause validation to fail. Empty quotation marks are also invalid. 1. Use UTF-8 encoding. **A valid + * enrollment file:** ``` \"Examples of valid identites, notes\" + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12 + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is + * ignored, A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , + * Whitespace is trimmed before validation. + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , + * Whitespace around quotation marks is also trimmed. ``` **A file containing invalid identities:** + * ``` + * \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", + * First line is ignored. + * A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid + * version identifier. + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23, Too-short + * identity. \"\", Empty quotation marks are an invalid identity. \" + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", + * Whitespace inside quotation marks is not trimmed, causing an error. ``` **An empty file:** + * ``` \"Examples of blank lines that are ignored.\" ,, , This is also considered to a + * blank line. ``` + */ + @Test + public void deleteBulkDeviceEnrollmentTest() { + File enrollmentIdentities = null; + // BulkResponse response = api.deleteBulkDeviceEnrollment(enrollmentIdentities); + + // TODO: test validations + } + + /** + * Delete an enrollment by ID. + * + * To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to + * delete the enrollment and factory reset the device. For more information, see [Transferring ownership using + * First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). + * <br> **Example:** ``` curl -X DELETE \\ -H 'Authorization: Bearer + * <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + */ + @Test + public void deleteDeviceEnrollmentTest() { + String id = null; + // Void response = api.deleteDeviceEnrollment(id); + + // TODO: test validations + } + + /** + * Get bulk upload entity. + * + * Provides information on bulk upload for the given ID, for example, bulk status and number of processed enrollment + * identities. Provides links to bulk upload reports as well. **Report file format:** The report files have a header + * line, and the values are separated by commas. Delimit lines with a line break (CRLF). Make sure the report file + * is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). An example of + * a full report file: ``` + * \"entity__id\",\"entity__created_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * ``` An example of an error report file: ``` + * \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ``` + */ + @Test + public void getBulkDeviceEnrollmentTest() { + String id = null; + // BulkResponse response = api.getBulkDeviceEnrollment(id); + + // TODO: test validations + } + + /** + * Get bulk delete entity. + * + * Provides information on bulk delete for the given ID, for example, bulk status and the number of processed + * enrollment identities. Provides links to bulk delete reports as well. **Report file format:** The report files + * have a header line and the value are separated by commas. The lines are delimited by a line break (CRLF). Make + * sure the report file is compliant with IETF Informal CSV common format [RFC + * 4180](https://tools.ietf.org/html/rfc4180). An example of a full report file: ``` + * \"entity__id\",\"entity__deleted_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\" + * ``` An example of an error report file: ``` + * \"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\" + * \"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" + * \"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment + * identity is already claimed in the mbed Cloud.\",\"\" ``` **Example:** + * ``` curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} ``` + */ + @Test + public void getBulkDeviceEnrollmentDeleteTest() { + String id = null; + // BulkResponse response = api.getBulkDeviceEnrollmentDelete(id); + + // TODO: test validations + } + + /** + * Get details of an single enrollment by ID. + * + * Check detailed enrollment info, for example, date of claim or expiration date. **Example:** ``` + * curl -X GET \\ -H 'Authorization: Bearer <access_key>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` + */ + @Test + public void getDeviceEnrollmentTest() { + String id = null; + // EnrollmentIdentity response = api.getDeviceEnrollment(id); + + // TODO: test validations + } + + /** + * Get a list of enrollments per account. + * + * Provides a list of pending and claimed enrollments. **Example:** ``` curl -X GET \\ -H + * 'Authorization: Bearer <access_key>' \\ https://api.us-east-1.mbedcloud.com/v3/device-enrollments + * ``` With query parameters: ``` curl -X GET \\ -H 'Authorization: Bearer + * <access_key>' \\ 'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10' + * ``` + */ + @Test + public void getDeviceEnrollmentsTest() { + Integer limit = null; + String after = null; + String order = null; + String include = null; + // EnrollmentIdentities response = api.getDeviceEnrollments(limit, after, order, include); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApiTest.java index e9373c58d..132cba638 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceSecurityDeviceCertificateRenewalsApiTest.java @@ -22,7 +22,7 @@ public void setup() { * * Get a certificate enrollment by ID. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getCertificateEnrollmentTest() { @@ -37,9 +37,9 @@ public void getCertificateEnrollmentTest() { * * Get certificate enrollments list, optionally filtered. **Examples:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\ -H 'Authorization: Bearer - * <api_key>' ``` ``` curl -X GET + * <access_key>' ``` ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 - * \\ -H 'Authorization: Bearer <api_key>' ``` + * \\ -H 'Authorization: Bearer <access_key>' ``` */ @Test public void getCertificateEnrollmentsTest() { @@ -69,7 +69,7 @@ public void getCertificateEnrollmentsTest() { * * Request a certificate renewal. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew - * \\ -H 'Authorization: Bearer <api_key>' \\ -H 'content-length: 0' ``` + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-length: 0' ``` */ @Test public void requestCertificateRenewalTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApiTest.java index 515680ba5..980922b63 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateCampaignsApiTest.java @@ -23,8 +23,8 @@ public void setup() { * Archive a campaign. * * Archive a campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignArchiveTest() { @@ -37,13 +37,13 @@ public void updateCampaignArchiveTest() { /** * Create a campaign * - * Create an update campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: <valid access token>' - * \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": + * Create an update campaign. To include a filter for targeted devices, refer to the filter using + * `<filter_id>` in the message body. <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: Bearer <api_key>' \\ + * -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"campaign_strategy\": * \"one-shot\", \"description\": \"Campaign is for ...\", - * \"device_filter\": \"id__eq=123400000000000000000000000ae45\", \"name\": - * \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' - * ``` + * \"device_filter\": \"<filter_id>\", \"name\": \"campaign\", + * \"root_manifest_id\": \"56780000000000a5b70000000000bd98\" }' ``` */ @Test public void updateCampaignCreateTest() { @@ -57,8 +57,8 @@ public void updateCampaignCreateTest() { * Delete a campaign * * Delete an update campaign. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignDestroyTest() { @@ -72,8 +72,8 @@ public void updateCampaignDestroyTest() { * Get a list of events grouped by summary * * Get a list of events grouped by summary. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types + * \\ -H 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignEventTypesListTest() { @@ -87,10 +87,10 @@ public void updateCampaignEventTypesListTest() { /** * Get an event type for a campaign * - * Get the count for a specific event type; for example, succeeded, failed, or skipped. <br> **Usage - * example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * Get the count for a specific event type, for example, succeeded, failed or skipped. <br> **Usage example:** + * ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 + * \\ -H 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignEventTypesRetrieveTest() { @@ -106,8 +106,8 @@ public void updateCampaignEventTypesRetrieveTest() { * List all campaigns * * Get update campaigns for devices specified by a filter. <br> **Usage example:** ``` curl -X - * GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: <valid access - * token>' ``` + * GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\ -H 'Authorization: Bearer <api_key>' + * ``` */ @Test public void updateCampaignListTest() { @@ -175,8 +175,8 @@ public void updateCampaignListTest() { * List all campaign device metadata * * Get metadata for all devices in a campaign. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata + * \\ -H 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignMetadataListTest() { @@ -195,8 +195,8 @@ public void updateCampaignMetadataListTest() { * Get a campaign device metadata * * Get update campaign metadata for a specific device. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 + * \\ -H 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignMetadataRetrieveTest() { @@ -211,11 +211,11 @@ public void updateCampaignMetadataRetrieveTest() { * Get campaign metrics * * Get - * [information](https://www.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) + * [information](https://developer.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) * for a campaign based on **SUCCESS**, **FAIL**, or **SKIPPED** criteria for each device. <br> **Usage * example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/metrics \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123467f9012ab567890120000789012/metrics \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignMetricsTest() { @@ -229,8 +229,8 @@ public void updateCampaignMetricsTest() { * Get a campaign. * * Get an update campaign. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignRetrieveTest() { @@ -244,8 +244,8 @@ public void updateCampaignRetrieveTest() { * Start a campaign. * * Start a campaign. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignStartTest() { @@ -260,8 +260,8 @@ public void updateCampaignStartTest() { * * Get a list of statistics for a campaign, including the number of devices reporting specific event codes. * <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignStatisticsListTest() { @@ -276,8 +276,8 @@ public void updateCampaignStatisticsListTest() { * * Get the count of successfully updated, skipped, and failed devices. <br> **Usage example:** * ``` curl - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignStatisticsRetrieveTest() { @@ -292,10 +292,10 @@ public void updateCampaignStatisticsRetrieveTest() { * Stop a campaign. * * Stop a campaign. Stopping is a process that requires the campaign go through several - * [phases](../updating-firmware/running-update-campaigns.html#stopping). <br> **Usage example:** - * ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop \\ -H - * 'Authorization: <valid access token>' ``` + * [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html). + * <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void updateCampaignStopTest() { @@ -309,11 +309,11 @@ public void updateCampaignStopTest() { * Modify a campaign * * Modify an update campaign. <br> **Usage example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' \\ d '{ \"description\": \"Campaign is for - * ...\", \"device_filter\": \"id__eq=123400000000000000000000000ae45\", - * \"name\": \"campaign\", \"root_manifest_id\": - * \"5678000000000000000000000000bd98\", }' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' \\ d '{ \"description\": \"Campaign is for + * ...\", \"device_filter\": \"123400000000000000000000000ae45\", \"name\": + * \"campaign\", \"root_manifest_id\": \"5678000000000000000000000000bd98\", }' + * ``` */ @Test public void updateCampaignUpdateTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApiTest.java index c7c4cccef..705769f0f 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareImagesApiTest.java @@ -23,9 +23,12 @@ public void setup() { /** * Create an image * - * Create a firmware image. <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' - * \\ -H 'Content-Type: multipart/form-data' \\ -F + * Create a firmware image. <BR/> **Note:** Only use this API for images smaller than 100 MB. For larger + * images, [upload in + * chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). + * <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' \\ + * -H 'Content-Type: multipart/form-data' \\ -F * 'datafile=@myimage.bin;type=application/octet-stream' -F 'description=bla bla' \\ * -F 'name=My Linux Image' ``` */ @@ -43,8 +46,8 @@ public void firmwareImageCreateTest() { * Delete an image * * Delete a firmware image. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: - * <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \\ -H 'Authorization: + * Bearer <api_key>' ``` */ @Test public void firmwareImageDestroyTest() { @@ -58,7 +61,7 @@ public void firmwareImageDestroyTest() { * List all images * * List all firmware images. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: <valid access token>' + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \\ -H 'Authorization: Bearer <api_key>' * ``` */ @Test @@ -114,8 +117,8 @@ public void firmwareImageListTest() { * Get an image. * * Retrieve a firmware image. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\ -H 'Authorization: - * <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \\ -H 'Authorization: + * Bearer <api_key>' ``` */ @Test public void firmwareImageRetrieveTest() { @@ -128,14 +131,12 @@ public void firmwareImageRetrieveTest() { /** * Append a chunk to an upload job * - * Append a chunk to an upload job. To finish a job, upload a zero-length chunk. <br> **Usage example:** - * ``` curl -X POST + * Append a chunk to an upload job. To finish a job, upload a zero-length chunk. <BR/> **Note:** Chunk size + * must be between 5MB and 100MB, the last chunk can be less than 5MB; the maximum number of chunks is limited to + * 10,000. <br> **Usage example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H - * 'Authorization: <valid access token>' \\ -H 'Content-MD5: - * Q2h1Y2sgSW51ZwDIAXR5IQ==' \\ -H 'Content-Type: binary/octet-stream' \\ -H - * 'Content-Length: 999' \\ -d '{ - * \"IGh0dHBzOi8vYXBpLnVzLWVhc3QtMS5tYmVkY2xvdWQuY29tLy92My9maXJtd2FyZS1pbWFnZXMvdXBsb2FkLWpvYnMve3VwbG9hZF9qb2JfaWR9W5rcw==\" - * }' ``` + * 'Authorization: Bearer <api_key>' \\ -H 'Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ==' + * \\ -H 'Content-Type: binary/octet-stream' \\ --data-binary '@chunkfile.bin' ``` */ @Test public void uploadJobChunkCreateTest() { @@ -153,7 +154,7 @@ public void uploadJobChunkCreateTest() { * * List all metadata for uploaded chunks. <br> **Usage example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` */ @Test public void uploadJobChunkListTest() { @@ -198,7 +199,7 @@ public void uploadJobChunkListTest() { * * Get metadata about a chunk. <br> **Usage example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 - * \\ -H 'Authorization: <valid access token>' ``` + * \\ -H 'Authorization: Bearer <api_key>' ``` */ @Test public void uploadJobChunkRetreiveTest() { @@ -213,10 +214,10 @@ public void uploadJobChunkRetreiveTest() { * Create a new upload job. * * Create a new upload job <br> **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access - * token>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ \"name\": - * \"New Linux update\", \"description\": \"New Linux update for my devices\" }' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer + * <api_key>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"name\": \"New Linux update\", \"description\": \"New Linux update for my + * devices\" }' ``` */ @Test public void uploadJobCreateTest() { @@ -231,7 +232,7 @@ public void uploadJobCreateTest() { * * Delete an upload job. <br> **Usage example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` */ @Test public void uploadJobDeleteTest() { @@ -245,8 +246,8 @@ public void uploadJobDeleteTest() { * Get all upload jobs * * Get all upload jobs. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: <valid access - * token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \\ -H 'Authorization: Bearer + * <api_key>' ``` */ @Test public void uploadJobListTest() { @@ -294,7 +295,7 @@ public void uploadJobListTest() { * * Get an upload job. <br> **Usage example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * 'Authorization: Bearer <api_key>' ``` */ @Test public void uploadJobRetrieveTest() { @@ -309,9 +310,8 @@ public void uploadJobRetrieveTest() { * * Update an upload job. <br> **Usage example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' \\ -d '{ \"name\": \"New Linux - * update\", \"description\": \"New Linux update for my class XX devices\" }' - * ``` + * 'Authorization: Bearer <api_key>' \\ -d '{ \"name\": \"New Linux update\", + * \"description\": \"New Linux update for my class XX devices\" }' ``` */ @Test public void uploadJobUpdateTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApiTest.java index a0a70ae47..61fa4fa96 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/DeviceUpdateFirmwareManifestsApiTest.java @@ -23,7 +23,7 @@ public void setup() { * * Upload a firmware manifest. The API enforces a maximum manifest size of 2KB. <br> **Usage example:** * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H - * 'Authorization: <valid access token>' \\ -H 'Content-Type: multipart/form-data' \\ -F + * 'Authorization: Bearer <api_key>' \\ -H 'Content-Type: multipart/form-data' \\ -F * 'datafile=@myimage.bin;type=application/octet-stream' \\ -F 'description=bla bla' * \\ -F 'key_table=@myKeyTable.proto;type=' \\ -F 'name=My Manifest' * ``` @@ -31,10 +31,10 @@ public void setup() { @Test public void firmwareManifestCreateTest() { File datafile = null; + String name = null; String description = null; File keyTable = null; - String name = null; - // FirmwareManifest response = api.firmwareManifestCreate(datafile, description, keyTable, name); + // FirmwareManifest response = api.firmwareManifestCreate(datafile, name, description, keyTable); // TODO: test validations } @@ -43,8 +43,8 @@ public void firmwareManifestCreateTest() { * Delete a manifest * * Delete a firmware manifest. <br> **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void firmwareManifestDestroyTest() { @@ -58,8 +58,8 @@ public void firmwareManifestDestroyTest() { * List all firmware manifests. * * List all firmware manifests. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: <valid access - * token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\ -H 'Authorization: Bearer <api_key>' + * ``` */ @Test public void firmwareManifestListTest() { @@ -118,8 +118,8 @@ public void firmwareManifestListTest() { * Get a manifest * * Retrieve a firmware manifest. <br> **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\ -H - * 'Authorization: <valid access token>' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \\ -H + * 'Authorization: Bearer <api_key>' ``` */ @Test public void firmwareManifestRetrieveTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApiTest.java new file mode 100644 index 000000000..ab56fde79 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/EdgeProxyApiTest.java @@ -0,0 +1,40 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for EdgeProxyApi + */ +public class EdgeProxyApiTest { + + private EdgeProxyApi api; + + @Before + public void setup() { + api = new ApiClient().createService(EdgeProxyApi.class); + } + + /** + * Establish a tunnel connection to connected devices. + * + * This WebSocket-based API for clients establishes connections to services on connected gateways. <br> + * Establish WebSocket connections to the edge-proxy service. After you establish a Websocket connection, the Edge + * proxy sends data between cloud- and gateway-based services. <br> All communication is byte-based. + */ + @Test + public void communicateWithGatewayBasedServicesTest() { + String connection = null; + String upgrade = null; + Integer secWebSocketVersion = null; + byte[] secWebSocketKey = null; + String id = null; + String address = null; + String origin = null; + // Void response = api.communicateWithGatewayBasedServices(connection, upgrade, secWebSocketVersion, + // secWebSocketKey, id, address, origin); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApiTest.java new file mode 100644 index 000000000..80827743d --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/FactoryManufacturingStatisticsApiTest.java @@ -0,0 +1,35 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.joda.time.DateTime; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for FactoryManufacturingStatisticsApi + */ +public class FactoryManufacturingStatisticsApiTest { + + private FactoryManufacturingStatisticsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(FactoryManufacturingStatisticsApi.class); + } + + /** + * Retrieve provisioning statistics for devices in your factories. + * + * Get manufacturing statistics report. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/manufacturing/statistics?start=2020-06-23T21:00:00.000Z&end=2020-07-01T20:59:59.999Z + * --header 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void manufacturingStatisticsReportTest() { + DateTime start = null; + DateTime end = null; + // StatisticsReportListResponse response = api.manufacturingStatisticsReport(start, end); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApiTest.java new file mode 100644 index 000000000..7cf4de667 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayLogsPublicApiApiTest.java @@ -0,0 +1,86 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.joda.time.DateTime; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for GatewayLogsPublicApiApi + */ +public class GatewayLogsPublicApiApiTest { + + private GatewayLogsPublicApiApi api; + + @Before + public void setup() { + api = new ApiClient().createService(GatewayLogsPublicApiApi.class); + } + + /** + * Retrieve a device log by ID. + * + * Retrieve a device log from a device by log ID. **Example usage:** ``` curl -X GET \\ -H + * 'Authorization: Bearer <valid access token>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-logs/(device_log_id) ``` + */ + @Test + public void getDeviceLogBasedOnLogIDTest() { + String deviceLogId = null; + // Log response = api.getDeviceLogBasedOnLogID(deviceLogId); + + // TODO: test validations + } + + /** + * List all device logs based on filters + * + * List logs for all devices based on a combination of filters. **Example usage:** ``` curl -X GET \\ + * -H 'Authorization: Bearer <valid access token>' \\ + * https://api.us-east-1.mbedcloud.com/v3/device-logs ``` + */ + @Test + public void listGatewayDeviceLogsTest() { + String deviceIdIn = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + DateTime timestampLte = null; + DateTime timestampGte = null; + String appNameEq = null; + String typeEq = null; + String messageEq = null; + String levelGte = null; + // LogsPage response = api.listGatewayDeviceLogs(deviceIdIn, limit, after, order, include, timestampLte, + // timestampGte, appNameEq, typeEq, messageEq, levelGte); + + // TODO: test validations + } + + /** + * Return the logs for a specific device. + * + * Retrieve logs for a given device based on a combination of filters. **Example usage:** ``` curl -X + * GET \\ -H 'Authorization: Bearer <valid access token>' \\ + * https://api.us-east-1.mbedcloud.com/v3/devices/{device_id}/logs ``` + */ + @Test + public void listSingleGatewayDeviceLogsTest() { + String deviceId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + DateTime timestampLte = null; + DateTime timestampGte = null; + String appNameEq = null; + String typeEq = null; + String messageEq = null; + String levelGte = null; + // LogsPage response = api.listSingleGatewayDeviceLogs(deviceId, limit, after, order, include, timestampLte, + // timestampGte, appNameEq, typeEq, messageEq, levelGte); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApiTest.java new file mode 100644 index 000000000..d08ea82d1 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/GatewayTerminalPublicApiApiTest.java @@ -0,0 +1,73 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for GatewayTerminalPublicApiApi + */ +public class GatewayTerminalPublicApiApiTest { + + private GatewayTerminalPublicApiApi api; + + @Before + public void setup() { + api = new ApiClient().createService(GatewayTerminalPublicApiApi.class); + } + + /** + * Establish a console session + * + * This WebSocket-based API establishes a console session with a gateway device. <br> Use this endpoint to + * establish a WebSocket connection to the device console. Once the connection is in place, you can use the protocol + * below to exchange messages related to the console session. You must provide the api key as bearer token to + * authenticate the request. All messages sent between the server and the client are contained inside a message + * envelope. The envelope contains a type field describing what format the payload is in and how to interpret the + * message: ```json { \"type\": [string], \"payload\": [any], + * \"sessionID\": [string] } ``` <br> ## Message types and payload formats | Message + * Type | Payload Format | Description | |:------------- |:------------- |:------------- | | **resize** | + * `ResizePayload` | Can be sent by the client to the server to notify the device that the console window + * size has changed. | | **input** | `string` | Sent from the client to the server when keyboard input is + * provided to the console. stdin | | **output** | `string` | Sent from the server to the client when + * console output is produced. stdout + stderr | ### `ResizePayload` ```json { + * \"width\": [integer], // number of columns \"height\": [integer] // number of rows } + * ``` | Field Name | Format | Description | |:------------- |:------------- |:------------- | | + * width | integer | The width of the console window in columns. | | height | integer | The height of the console + * window in rows. | <br> ## Protocol Sequence Diagram The diagram shows how messages are passed between the + * client and the server after initiating a console session: ``` Client Pelion Cloud + * (/v3/devices/{id}/console) Device | | | | | | |-----------------[Input]------------------>| | | + * |-----------------[Input]------------------>| | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | |-----------------[Input]------------------>| | | + * |-----------------[Input]------------------>| | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | | | | |-----------------[Resize]----------------->| | | + * |-----------------[Resize]----------------->| | | | | |<----------------[Output]------------------| + * |<----------------[Output]------------------| | | | | | | | | | | Input is always forwarded from the client to + * the console session on the relevant device to be passed to the stdin stream. The client does not need to provide + * a session ID for input messages. Ouptut is forwarded from the device console session's stdout and stderr + * streams to the client. Resize messages are forwarded from the client to the console session on the device. + * ``` <br> If the console session is terminated by the device disconnecting, the WebSocket + * connection is closed. <br> All communication is text-based. <br> ## Errors and Close Codes - If you + * send binary data instead of text data over the websocket connection, the socket closes with code 1003. - If you + * send text data that is not valid JSON, the socket closes with code 1002 and error message 'Data could not be + * parsed as JSON'. - If you send text data that is valid JSON but does not follow a valid message schema, the + * socket closes with code 1002 and error message 'Object format invalid'. - If you try to establish a + * console session with a device that is not prepared for console, the socket closes with code 1011 and error + * message 'The device console is not working'. - If your client fails to respond to ping messages from the + * server with a matching pong message, the server disconnects the client, assuming the connection has timed out. + */ + @Test + public void establishGatewayDeviceConsoleSessionTest() { + String id = null; + String connection = null; + String upgrade = null; + Integer secWebSocketVersion = null; + byte[] secWebSocketKey = null; + String secWebSocketProtocol = null; + String origin = null; + // Void response = api.establishGatewayDeviceConsoleSession(id, connection, upgrade, secWebSocketVersion, + // secWebSocketKey, secWebSocketProtocol, origin); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApiTest.java new file mode 100644 index 000000000..3ba956f1a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/ManufacturingFactoryConfiguratorUtilityFcuApiTest.java @@ -0,0 +1,61 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for ManufacturingFactoryConfiguratorUtilityFcuApi + */ +public class ManufacturingFactoryConfiguratorUtilityFcuApiTest { + + private ManufacturingFactoryConfiguratorUtilityFcuApi api; + + @Before + public void setup() { + api = new ApiClient().createService(ManufacturingFactoryConfiguratorUtilityFcuApi.class); + } + + /** + * Download the Factory Configurator Utility archive. + * + * Downloads the Factory Configurator Utility (FCU) archive .zip file for the account ID associated with the access + * token. <br> **Example:** <br> ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void downloadFactoryToolTest() { + // Void response = api.downloadFactoryTool(); + + // TODO: test validations + } + + /** + * Download information about the Factory Configurator Utility archive. + * + * Returns information about the Factory Configurator Utility (FCU) archive. <br> **Example:** <br> + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/inf \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void getFactoryToolInfoTest() { + // ArchiveInfoResponse response = api.getFactoryToolInfo(); + + // TODO: test validations + } + + /** + * Download Factory Configurator Utility release notes. + * + * Downloads the Factory Configurator Utility (FCU) release notes. <br> **Example:** <br> + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getFactoryToolReleaseNotesTest() { + // Void response = api.getFactoryToolReleaseNotes(); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApiTest.java new file mode 100644 index 000000000..e68944b8e --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuerConfigurationsApiTest.java @@ -0,0 +1,133 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerConfigRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CreateCertificateIssuerConfig; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityCertificateIssuerConfigurationsApi + */ +public class SecurityAndIdentityCertificateIssuerConfigurationsApiTest { + + private SecurityAndIdentityCertificateIssuerConfigurationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityCertificateIssuerConfigurationsApi.class); + } + + /** + * Create certificate issuer configuration. + * + * Configure the certificate issuer to use when creating device custom certificates. <br> **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"reference\": \"customer.dlms\", + * \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\" }' ``` + */ + @Test + public void createCertificateIssuerConfigTest() { + CreateCertificateIssuerConfig createCertificateIssuerConfig = null; + // CertificateIssuerConfigResponse response = api.createCertificateIssuerConfig(createCertificateIssuerConfig); + + // TODO: test validations + } + + /** + * Delete certificate issuer configuration. + * + * Delete certificate issuer configuration. You can only delete custom certificate configurations. + */ + @Test + public void deleteCertificateIssuerConfigByIDTest() { + String certificateIssuerConfigurationId = null; + // Void response = api.deleteCertificateIssuerConfigByID(certificateIssuerConfigurationId); + + // TODO: test validations + } + + /** + * Get certificate issuer configuration. + * + * Provides the configured certificate issuer used when creating device certificates for LwM2M. + */ + @Test + public void getCertificateIssuerConfigTest() { + // CertificateIssuerConfigResponse response = api.getCertificateIssuerConfig(); + + // TODO: test validations + } + + /** + * Get certificate issuer configuration. + * + * Provides the configured certificate issuer. + */ + @Test + public void getCertificateIssuerConfigByIDTest() { + String certificateIssuerConfigurationId = null; + // CertificateIssuerConfigResponse response = + // api.getCertificateIssuerConfigByID(certificateIssuerConfigurationId); + + // TODO: test validations + } + + /** + * Get certificate issuer configurations. + * + * Get certificate issuer configurations, optionally filtered by reference. <br> **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ ``` <br> ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ ``` **Note:** This endpoint does not implement + * pagination, and therefore ignores list control parameters such as `limit` or `after`. + */ + @Test + public void getCertificateIssuerConfigsTest() { + Integer limit = null; + String order = null; + String after = null; + String include = null; + String referenceEq = null; + // CertificateIssuerConfigListResponse response = api.getCertificateIssuerConfigs(limit, order, after, include, + // referenceEq); + + // TODO: test validations + } + + /** + * Update certificate issuer configuration. + * + * Configure the certificate issuer used when creating device certificates for LwM2M. <br> **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations/lwm2m \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"certificate_issuer_id\": + * \"01621a36719d507b9d48a91b00000000\" }' ``` + */ + @Test + public void updateCertificateIssuerConfigTest() { + CertificateIssuerConfigRequest certificateIssuerConfigRequest = null; + // CertificateIssuerConfigResponse response = api.updateCertificateIssuerConfig(certificateIssuerConfigRequest); + + // TODO: test validations + } + + /** + * Update certificate issuer configuration. + * + * Update certificate issuer configuration. + */ + @Test + public void updateCertificateIssuerConfigByIDTest() { + CertificateIssuerConfigRequest certificateIssuerConfigRequest = null; + String certificateIssuerConfigurationId = null; + // CertificateIssuerConfigResponse response = + // api.updateCertificateIssuerConfigByID(certificateIssuerConfigRequest, certificateIssuerConfigurationId); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApiTest.java new file mode 100644 index 000000000..6c3cf7e20 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificateIssuersApiTest.java @@ -0,0 +1,131 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateIssuerUpdateRequest; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityCertificateIssuersApi + */ +public class SecurityAndIdentityCertificateIssuersApiTest { + + private SecurityAndIdentityCertificateIssuersApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityCertificateIssuersApi.class); + } + + /** + * Create certificate issuer. + * + * Create a certificate issuer. <br> The maximum number of issuers is limited to 20 per account. <br> + * You can create multiple certificate issuers of the same type, provided they have different names. This allows + * verification of the certificate issuer configuration before activation. <br> **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"issuer_type\": \"GLOBAL_SIGN\", + * \"name\": \"GS Issuer\", \"description\": \"Sample GlobalSign certificate + * issuer\", \"issuer_attributes\": null, \"issuer_credentials\": { \"api_key\": + * \"e510e289e6cd8947\", \"api_secret\": \"a477a8393d17a55ecb2ba6a61f58feb84770b621\", + * \"client_certificate\": \"-----BEGIN + * CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END + * CERTIFICATE-----\", \"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: + * 4,ENCRYPTED\\nDEK-Info: + * DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END + * RSA PRIVATE KEY-----\", \"passphrase\": \"helloworld\" } }' ``` + */ + @Test + public void createCertificateIssuerTest() { + CertificateIssuerRequest certificateIssuerRequest = null; + // CertificateIssuerInfo response = api.createCertificateIssuer(certificateIssuerRequest); + + // TODO: test validations + } + + /** + * Delete certificate issuer. + * + * Delete a certificate issuer by ID. <br> **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 \\ -H + * 'Authorization: Bearer <access_key>' \\ ``` + */ + @Test + public void deleteCertificateIssuerTest() { + String certificateIssuerId = null; + // Void response = api.deleteCertificateIssuer(certificateIssuerId); + + // TODO: test validations + } + + /** + * Get certificate issuer by ID. + * + * + */ + @Test + public void getCertificateIssuerTest() { + String certificateIssuerId = null; + // CertificateIssuerInfo response = api.getCertificateIssuer(certificateIssuerId); + + // TODO: test validations + } + + /** + * Get certificate issuers list. + * + * **Note:** This endpoint does not use pagination, and therefore ignores list control parameters such as + * `limit` or `after`. + */ + @Test + public void getCertificateIssuersTest() { + Integer limit = null; + String order = null; + String after = null; + String include = null; + // CertificateIssuerInfoListResponse response = api.getCertificateIssuers(limit, order, after, include); + + // TODO: test validations + } + + /** + * Update certificate issuer. + * + * Update a certificate issuer. <br> **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"description\": \"Sample GlobalSign + * certificate issuer - updated.\", \"name\": \"GlobalSign Issuer\" }' + * ``` + */ + @Test + public void updateCertificateIssuerTest() { + String certificateIssuerId = null; + CertificateIssuerUpdateRequest certificateIssuerUpdateRequest = null; + // CertificateIssuerInfo response = api.updateCertificateIssuer(certificateIssuerId, + // certificateIssuerUpdateRequest); + + // TODO: test validations + } + + /** + * Verify certificate issuer. + * + * Validates the certificate issuer by sending a signing request for a test certificate. This should be done before + * the configuration is made active. <br> **Note:** The API requests the 3rd party CA to sign a test + * certificate. For some 3rd party CAs, this operation may use the account quota. <br> **Example:** + * ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ ``` + */ + @Test + public void verifyCertificateIssuerTest() { + String certificateIssuerId = null; + // CertificateIssuerVerifyResponse response = api.verifyCertificateIssuer(certificateIssuerId); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApiTest.java new file mode 100644 index 000000000..f7ccb5176 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityCertificatesApiTest.java @@ -0,0 +1,117 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateUpdateReq; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityCertificatesApi + */ +public class SecurityAndIdentityCertificatesApiTest { + + private SecurityAndIdentityCertificatesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityCertificatesApi.class); + } + + /** + * Upload a new trusted certificate. + * + * Upload new trusted certificates. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"name\": \"myCert1\", \"description\": \"very important cert\", + * \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"} + * ``` + */ + @Test + public void addCertificateTest() { + TrustedCertificateReq body = null; + // TrustedCertificateResp response = api.addCertificate(body); + + // TODO: test validations + } + + /** + * Delete a trusted certificate by ID. + * + * Delete a trusted certificate. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void deleteCertificateTest() { + String certId = null; + // Void response = api.deleteCertificate(certId); + + // TODO: test validations + } + + /** + * Get all trusted certificates. + * + * Retrieve an array of trusted certificates. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getAllCertificatesTest() { + Integer limit = null; + String after = null; + String order = null; + String include = null; + String nameEq = null; + String serviceEq = null; + Integer expireEq = null; + Integer deviceExecutionModeEq = null; + Integer deviceExecutionModeNeq = null; + String ownerEq = null; + Boolean enrollmentModeEq = null; + String statusEq = null; + String issuerLike = null; + String subjectLike = null; + String certificateFingerprintEq = null; + Boolean validEq = null; + // TrustedCertificateRespList response = api.getAllCertificates(limit, after, order, include, nameEq, serviceEq, + // expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, statusEq, issuerLike, + // subjectLike, certificateFingerprintEq, validEq); + + // TODO: test validations + } + + /** + * Get a trusted certificate. + * + * Retrieve a trusted certificate. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getCertificateTest() { + String certId = null; + // TrustedCertificateResp response = api.getCertificate(certId); + + // TODO: test validations + } + + /** + * Update trusted certificate. + * + * Update existing trusted certificates. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"description\": + * \"very important cert\"} ``` + */ + @Test + public void updateCertificateTest() { + String certId = null; + TrustedCertificateUpdateReq body = null; + // TrustedCertificateResp response = api.updateCertificate(certId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApiTest.java new file mode 100644 index 000000000..34d914062 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityDeveloperClassCertificatesApiTest.java @@ -0,0 +1,55 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeveloperCertificateRequestData; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityDeveloperClassCertificatesApi + */ +public class SecurityAndIdentityDeveloperClassCertificatesApiTest { + + private SecurityAndIdentityDeveloperClassCertificatesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityDeveloperClassCertificatesApi.class); + } + + /** + * Create a new developer certificate to connect to the bootstrap server. + * + * Create a developer certificate (a certificate that can be flashed to multiple devices to connect to the bootstrap + * server). **Note:** The number of developer certificates allowed per account is limited. Please see [Setting up a + * Certificate + * Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). + * **Example:** ``` curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \\ -H + * \"Authorization: Bearer <access_key>\" \\ -H \"content-type: application/json\" \\ -d { + * \"name\": \"<certificate_name>\", \"description\": + * \"<certificate_description>\" } ``` + */ + @Test + public void createDeveloperCertificateTest() { + DeveloperCertificateRequestData body = null; + // DeveloperCertificateResponseData response = api.createDeveloperCertificate(body); + + // TODO: test validations + } + + /** + * Fetch an existing developer certificate to connect to the bootstrap server. + * + * Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to + * bootstrap server). **Example:** ``` curl -X GET + * http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\ -H \"Authorization: + * Bearer <access_key>\" ``` + */ + @Test + public void getDeveloperCertificateTest() { + String developerCertificateId = null; + // DeveloperCertificateResponseData response = api.getDeveloperCertificate(developerCertificateId); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApiTest.java new file mode 100644 index 000000000..620aca8ce --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityPreSharedKeysApiTest.java @@ -0,0 +1,84 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.PreSharedKey; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityPreSharedKeysApi + */ +public class SecurityAndIdentityPreSharedKeysApiTest { + + private SecurityAndIdentityPreSharedKeysApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityPreSharedKeysApi.class); + } + + /** + * Remove a PSK. + * + * Remove a PSK. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H \"Authorization: Bearer + * <access_key>\" ``` + */ + @Test + public void deletePreSharedKeyTest() { + String endpointName = null; + // Void response = api.deletePreSharedKey(endpointName); + + // TODO: test validations + } + + /** + * Get a PSK. + * + * Check if a PSK for an endpoint exists or not. The response does not contain the secret itself. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\ -H + * \"Authorization: Bearer <access_key>\" ``` + */ + @Test + public void getPreSharedKeyTest() { + String endpointName = null; + // PreSharedKeyWithoutSecret response = api.getPreSharedKey(endpointName); + + // TODO: test validations + } + + /** + * List PSKs. + * + * Retrieve pre-shared keys (PSKs) with pagination. Default page size of 50 entries. **Example:** ``` + * curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H \"Authorization: Bearer + * <access_key>\" ``` + */ + @Test + public void listPreSharedKeysTest() { + Integer limit = null; + String after = null; + // ListOfPreSharedKeysWithoutSecret response = api.listPreSharedKeys(limit, after); + + // TODO: test validations + } + + /** + * Upload a PSK to Pelion Device Management. + * + * Upload a PSK for an endpoint to allow it to bootstrap. The existing key cannot be overwritten, but needs to be + * deleted first in the case of re-setting a PSK for an endpoint. **Note**: The PSK APIs are available only to + * accounts that have this feature enabled. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\ -H \"Authorization: Bearer + * <access_key>\" \\ -H \"content-type: application/json\" \\ -d '{ + * \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": + * \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }' ``` + */ + @Test + public void uploadPreSharedKeyTest() { + PreSharedKey body = null; + // Void response = api.uploadPreSharedKey(body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApiTest.java new file mode 100644 index 000000000..d6b130a3a --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentitySecureDeviceAccessApiTest.java @@ -0,0 +1,112 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CreateTrustAnchorRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TokenRequest; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.UpdateTrustAnchorRequest; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentitySecureDeviceAccessApi + */ +public class SecurityAndIdentitySecureDeviceAccessApiTest { + + private SecurityAndIdentitySecureDeviceAccessApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentitySecureDeviceAccessApi.class); + } + + /** + * Get an access token to use with a device. + * + * Generate a signed CWT (CBOR Web Token). The SDA Android SDK uses this API to gain access to perform actions on + * the devices specified in the audience (aud). <br> Authorized for roles: Service, ServiceAdministrator + * <br> **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/ace-auth/token + * \\ -H 'Authorization: <valid JWT>' \\ -H 'content-type: + * application/json;charset=UTF-8' \\ -d '{ \"grant_type\":\"client_credentials\", + * \"aud\":[\"id:f90b1017e52f4c70ad92684e802c9249\",\"ep:dev1\"], + * \"scope\":\"turn-led-on\", \"cnf\":\"-----BEGIN PUBLIC + * KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ...XwIDAQAB-----END PUBLIC KEY-----\" }' ``` + */ + @Test + public void createAceAuthTokenTest() { + TokenRequest body = null; + // TokenResponse response = api.createAceAuthToken(body); + + // TODO: test validations + } + + /** + * Create a new trust anchor for the account. + * + * Create a trust anchor key pair and return the public key and creation time. Each account can have one trust + * anchor only. This API fails if a trust anchor already exists for the account. <br> Authorized for roles: + * Service, ServiceAdministrator <br> **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H 'Authorization: <valid JWT>' \\ -H + * 'content-type: application/json;charset=UTF-8' \\ -d '{ \"description\": \"Trust + * anchor for room lighting controller.\" }' ``` + */ + @Test + public void createTrustAnchorTest() { + CreateTrustAnchorRequest body = null; + // CreateTrustAnchorResponse response = api.createTrustAnchor(body); + + // TODO: test validations + } + + /** + * Delete a trust anchor. + * + * Delete the specified trust anchor. Unrecoverable. <br> Authorized for roles: Service, ServiceAdministrator + * <br> **Usage example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: + * <valid JWT>' \\ ``` + */ + @Test + public void deleteTrustAnchorTest() { + String trustAnchorId = null; + // Void response = api.deleteTrustAnchor(trustAnchorId); + + // TODO: test validations + } + + /** + * Get the account's trust anchor used to sign the access token. + * + * Get all trust anchors that match the account ID specified in the JWT. <br> Authorized for roles: Service, + * ServiceAdministrator <br> **Usage example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\ -H 'Authorization: <valid JWT>' + * ``` + */ + @Test + public void getTrustAnchorsTest() { + Integer limit = null; + String order = null; + String after = null; + String include = null; + // GetTrustAnchorsResponse response = api.getTrustAnchors(limit, order, after, include); + + // TODO: test validations + } + + /** + * Update trust anchor attributes (description). + * + * Updates a trust anchor description attribute. <br> Authorized for roles: Service, ServiceAdministrator + * <br> **Usage example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 \\ -H 'Authorization: + * <valid JWT>' \\ -H 'content-type: application/json;charset=UTF-8' \\ -d '{ + * \"description\": \"Trust anchor for ambient light module\" }' ``` + */ + @Test + public void updateTrustAnchorTest() { + String trustAnchorId = null; + UpdateTrustAnchorRequest body = null; + // UpdateTrustAnchorResponse response = api.updateTrustAnchor(trustAnchorId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApiTest.java new file mode 100644 index 000000000..31fbb5fc1 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/SecurityAndIdentityServerCredentialsApiTest.java @@ -0,0 +1,60 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for SecurityAndIdentityServerCredentialsApi + */ +public class SecurityAndIdentityServerCredentialsApiTest { + + private SecurityAndIdentityServerCredentialsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(SecurityAndIdentityServerCredentialsApi.class); + } + + /** + * Fetch all (Bootstrap and LwM2M) server credentials. + * + * Return all (bootstrap and LwM2M) server credentials for client to connect to bootstrap or LwM2M server. + * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials \\ -H + * \"Authorization: Bearer <access_key>\" ``` + */ + @Test + public void getAllServerCredentialsTest() { + // AllServerCredentialsResponseData response = api.getAllServerCredentials(); + + // TODO: test validations + } + + /** + * Fetch bootstrap server credentials. + * + * Return bootstrap server credentials for client to connect to bootstrap server. **Example:** ``` + * curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \\ -H \"Authorization: Bearer + * <access_key>\" ``` + */ + @Test + public void getBootstrapServerCredentialsTest() { + // ServerCredentialsResponseData response = api.getBootstrapServerCredentials(); + + // TODO: test validations + } + + /** + * Fetch LwM2M server credentials. + * + * Return LwM2M server credentials for client to connect to LwM2M server. **Example:** ``` curl -X + * GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \\ -H \"Authorization: Bearer + * <access_key>\" ``` + */ + @Test + public void getL2M2MServerCredentialsTest() { + // ServerCredentialsResponseData response = api.getL2M2MServerCredentials(); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApiTest.java new file mode 100644 index 000000000..96f1698f4 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccessKeysApiTest.java @@ -0,0 +1,58 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for TenantAccountsAccessKeysApi + */ +public class TenantAccountsAccessKeysApiTest { + + private TenantAccountsAccessKeysApi api; + + @Before + public void setup() { + api = new ApiClient().createService(TenantAccountsAccessKeysApi.class); + } + + /** + * Get access key. + * + * Retrieve details of an access key. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys/{access_key_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAccountAccessKeyTest() { + String accountId = null; + String accessKeyId = null; + // AccessKey response = api.getAccountAccessKey(accountId, accessKeyId); + + // TODO: test validations + } + + /** + * Get all access keys. + * + * Retrieve an array of access keys. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getAllAccountAccessKeysTest() { + String accountId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + String applicationIdEq = null; + // AccessKeyList response = api.getAllAccountAccessKeys(accountId, limit, after, order, include, statusEq, + // applicationIdEq); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApiTest.java index f839f785a..d6f9bca6d 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsAccountsApiTest.java @@ -21,30 +21,31 @@ public void setup() { /** * Create a new account. * - * Create a new account. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <api_key>' \\ -H - * 'content-type: application/json' \\ -d '{\"display_name\": \"MyAccount1\", - * \"admin_name\": \"accountAdmin1\", \"email\": - * \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", - * \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", - * \"city\": \"Cambridge\", \"contact\": \"J. Doe\", \"company\": - * \"Arm\"}' ``` + * Create a new account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"display_name\": + * \"MyAccount1\", \"aliases\": [ \"my-account\" ], \"admin_name\": + * \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\", + * \"country\": \"United Kingdom\", \"end_market\": \"Smart City\", + * \"address_line1\": \"110 Fulbourn Rd\", \"city\": \"Cambridge\", + * \"contact\": \"J. Doe\", \"company\": \"Arm\"}' ``` */ @Test public void createAccountTest() { AccountCreationReq body = null; String action = null; - // AccountInfo response = api.createAccount(body, action); + // AccountCreationResp response = api.createAccount(body, action); // TODO: test validations } /** - * Get account info. + * Get account information. * - * Retrieve detailed information about an account. **Example:** ``` curl -X GET + * Retrieve detailed information about an account. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getAccountInfoTest() { @@ -59,9 +60,10 @@ public void getAccountInfoTest() { /** * Get all accounts. * - * Returns an array of account objects, optionally filtered by status and tier level. **Example:** - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Retrieve an array of tenant accounts, optionally filtered by status and tier level. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts \\ -H 'Authorization: Bearer <access_key>' + * ``` */ @Test public void getAllAccountsTest() { @@ -87,10 +89,10 @@ public void getAllAccountsTest() { /** * Update attributes of an existing account. * - * Update an account. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"phone_number\": - * \"12345678\"}' ``` + * Update an account. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"phone_number\": \"12345678\"}' ``` */ @Test public void updateAccountTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApiTest.java index 8b12337fd..8983026f7 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApiKeysApiTest.java @@ -24,9 +24,10 @@ public void setup() { /** * Add API key to a list of groups. * - * Add API key to groups. **Example:** ``` curl -X POST + * Add API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -43,9 +44,10 @@ public void addAccountApiKeyToGroupsTest() { /** * Add API key to a list of groups. * - * Add an API key to groups. **Example:** ``` curl -X POST + * Add an API key to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -63,10 +65,10 @@ public void addAccountApiKeyToListedGroupsTest() { * Create a new API key. * * Create a new API key. There is no default value for the owner ID, and it must be from the same account where the - * new API key is created. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": - * \"MyKey1\"}' ``` + * new API key is created. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"MyKey1\"}' ``` */ @Test public void createAccountApiKeyTest() { @@ -80,9 +82,10 @@ public void createAccountApiKeyTest() { /** * Delete the API key. * - * Delete an API key. **Example:** ``` curl -X DELETE + * Delete an API key. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void deleteAccountApiKeyTest() { @@ -96,9 +99,10 @@ public void deleteAccountApiKeyTest() { /** * Get API key details. * - * Retrieve API key details. **Example:** ``` curl -X GET + * Retrieve details of an API key. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAccountApiKeyTest() { @@ -112,9 +116,10 @@ public void getAccountApiKeyTest() { /** * Get all API keys. * - * Retrieve API keys in an array, optionally filtered by the owner. **Example:** ``` curl -X GET + * Retrieve an array of API keys, optionally filtered by the owner. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getAllAccountApiKeysTest() { @@ -132,11 +137,12 @@ public void getAllAccountApiKeysTest() { } /** - * Get groups associated with the API key. + * Get policy groups of an API key. * - * Retrieve groups associated with the API key. **Example:** ``` curl -X GET + * Retrieve an array of policy groups associated with an API key. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getGroupsOfAccountApikeyTest() { @@ -154,9 +160,10 @@ public void getGroupsOfAccountApikeyTest() { /** * Remove API key from groups. * - * Remove API key from groups. **Example:** ``` curl -X DELETE + * Remove API key from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -173,9 +180,10 @@ public void removeAccountApiKeyFromGroupsTest() { /** * Remove API key from groups. * - * Remove an API key from groups. **Example:** ``` curl -X POST + * Remove an API key from groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -192,9 +200,10 @@ public void removeAccountApiKeyFromListedGroupsTest() { /** * Reset the secret key. * - * Reset the secret key of the API key. **Example:** ``` curl -X POST + * Reset the secret key of the API key. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void resetAccountApiKeySecretTest() { @@ -209,10 +218,10 @@ public void resetAccountApiKeySecretTest() { /** * Update API key details. * - * Update API key details. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": - * \"TestApiKey25\"}' ``` + * Update API key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestApiKey25\"}' ``` */ @Test public void updateAccountApiKeyTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApiTest.java new file mode 100644 index 000000000..321e90ce0 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsApplicationsApiTest.java @@ -0,0 +1,271 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccessKey; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.Application; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupIdList; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for TenantAccountsApplicationsApi + */ +public class TenantAccountsApplicationsApiTest { + + private TenantAccountsApplicationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(TenantAccountsApplicationsApi.class); + } + + /** + * Add application to a list of groups. + * + * Add application to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + */ + @Test + public void addAccountApplicationToGroupsTest() { + String accountId = null; + String applicationId = null; + GroupIdList body = null; + // Void response = api.addAccountApplicationToGroups(accountId, applicationId, body); + + // TODO: test validations + } + + /** + * Create a new application. + * + * Create a new application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications -d + * '{\"name\": \"MyApplication1\"}' \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' ``` + */ + @Test + public void createAccountApplicationTest() { + String accountId = null; + Application body = null; + // Application response = api.createAccountApplication(accountId, body); + + // TODO: test validations + } + + /** + * Create a new application access key. + * + * Create a new access key for the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys -d + * '{\"name\": \"MyKey1\"}' \\ -H 'Authorization: Bearer <access_key>' \\ + * -H 'content-type: application/json' ``` + */ + @Test + public void createAccountApplicationAccessKeyTest() { + String accountId = null; + String applicationId = null; + AccessKey body = null; + // AccessKey response = api.createAccountApplicationAccessKey(accountId, applicationId, body); + + // TODO: test validations + } + + /** + * Delete application. + * + * Delete the application. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteAccountApplicationTest() { + String accountId = null; + String applicationId = null; + // Void response = api.deleteAccountApplication(accountId, applicationId); + + // TODO: test validations + } + + /** + * Delete access key associated with the application. + * + * Delete the access key associated with the application. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteAccountApplicationAccessKeyTest() { + String accountId = null; + String applicationId = null; + String accessKeyId = null; + // Void response = api.deleteAccountApplicationAccessKey(accountId, applicationId, accessKeyId); + + // TODO: test validations + } + + /** + * Get application. + * + * Retrieve details of an application. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAccountApplicationTest() { + String accountId = null; + String applicationId = null; + // Application response = api.getAccountApplication(accountId, applicationId); + + // TODO: test validations + } + + /** + * Get access key. + * + * Retrieve details of an access key associated with the application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAccountApplicationAccessKeyTest() { + String accountId = null; + String applicationId = null; + String accessKeyId = null; + // AccessKey response = api.getAccountApplicationAccessKey(accountId, applicationId, accessKeyId); + + // TODO: test validations + } + + /** + * Get all access keys associated with the application. + * + * Retrieve an array of access keys associated with the application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAllAccountApplicationAccessKeysTest() { + String accountId = null; + String applicationId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + // AccessKeyList response = api.getAllAccountApplicationAccessKeys(accountId, applicationId, limit, after, + // order, include, statusEq); + + // TODO: test validations + } + + /** + * Get all applications. + * + * Retrieve an array of applications. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications \\ -H 'Authorization: Bearer + * <access_key>' ``` + */ + @Test + public void getAllAccountApplicationsTest() { + String accountId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + String statusEq = null; + // ApplicationList response = api.getAllAccountApplications(accountId, limit, after, order, include, statusEq); + + // TODO: test validations + } + + /** + * Get policy groups of an application. + * + * Retrieve an array of policy groups associated with an application. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getGroupsOfAccountApplicationTest() { + String accountId = null; + String applicationId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + // GroupSummaryList response = api.getGroupsOfAccountApplication(accountId, applicationId, limit, after, order, + // include); + + // TODO: test validations + } + + /** + * Remove application from groups. + * + * Remove application from groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' + * ``` + */ + @Test + public void removeAccountApplicationFromGroupsTest() { + String accountId = null; + String applicationId = null; + GroupIdList body = null; + // Void response = api.removeAccountApplicationFromGroups(accountId, applicationId, body); + + // TODO: test validations + } + + /** + * Update application details. + * + * Update application details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \\ + * -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestApplication25\"}' ``` + */ + @Test + public void updateAccountApplicationTest() { + String accountId = null; + String applicationId = null; + Application body = null; + // ApiKeyInfoResp response = api.updateAccountApplication(accountId, applicationId, body); + + // TODO: test validations + } + + /** + * Update access key details. + * + * Update access key details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * `curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"TestAccessKey\"}' ``` + */ + @Test + public void updateAccountApplicationAccessKeyTest() { + String accountId = null; + String applicationId = null; + String accessKeyId = null; + AccessKey body = null; + // AccessKey response = api.updateAccountApplicationAccessKey(accountId, applicationId, accessKeyId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApiTest.java index fbebb6cd5..7cc8d6759 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEmailNotificationLogsApiTest.java @@ -17,9 +17,10 @@ public void setup() { } /** - * Get the notification events of an account. + * Get email notifications. * - * Retrieve notifications. + * Retrieve an array of email notification logs. <b>Note:</b> This endpoint is restricted to + * administrators. */ @Test public void getAccountNofificationEntriesTest() { @@ -31,4 +32,19 @@ public void getAccountNofificationEntriesTest() { // TODO: test validations } + + /** + * Get an email notification. + * + * Retrieve an email notifications log entry. <b>Note:</b> This endpoint is restricted to + * administrators. + */ + @Test + public void getAccountNofificationEntryTest() { + String accountId = null; + String notificationId = null; + // NotificationEntry response = api.getAccountNofificationEntry(accountId, notificationId); + + // TODO: test validations + } } diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApiTest.java new file mode 100644 index 000000000..7be656f38 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsEntitlementLimitationsApiTest.java @@ -0,0 +1,47 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for TenantAccountsEntitlementLimitationsApi + */ +public class TenantAccountsEntitlementLimitationsApiTest { + + private TenantAccountsEntitlementLimitationsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(TenantAccountsEntitlementLimitationsApi.class); + } + + /** + * Get an entitlement limitation. + * + * Retrieve an entitlement limitation. <b>Note:</b> This endpoint is restricted to administrators. + */ + @Test + public void aggregatorGetAccountLimitationTest() { + String accountId = null; + String limitationId = null; + // AccountLimitation response = api.aggregatorGetAccountLimitation(accountId, limitationId); + + // TODO: test validations + } + + /** + * Get entitlement limitations. + * + * Retrieve an array of entitlement limitations. <b>Note:</b> This endpoint is restricted to + * administrators. + */ + @Test + public void aggregatorGetAccountLimitationsTest() { + String accountId = null; + String inheritedEq = null; + // AccountLimitationList response = api.aggregatorGetAccountLimitations(accountId, inheritedEq); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApiTest.java index 51856514a..36f539971 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsIdentityProvidersApiTest.java @@ -22,7 +22,7 @@ public void setup() { /** * Create a new identity provider. * - * Create a new identity provider. + * Create a new identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void createAccountIdentityProviderTest() { @@ -37,7 +37,7 @@ public void createAccountIdentityProviderTest() { /** * Delete an identity provider by ID. * - * Delete an identity provider by ID. + * Delete an identity provider by ID. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void deleteAccountIdentityProviderTest() { @@ -51,7 +51,7 @@ public void deleteAccountIdentityProviderTest() { /** * Delete the service provider certificate. * - * Delete a service provider certificate. + * Delete a service provider certificate. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void deleteAccountSpCertificateTest() { @@ -65,7 +65,8 @@ public void deleteAccountSpCertificateTest() { /** * Generate a new service provider certificate. * - * Generate a new service provider certificate. + * Generate a new service provider certificate. <b>Note:</b> This endpoint is restricted to + * administrators. */ @Test public void generateAccountSpCertificateTest() { @@ -78,9 +79,9 @@ public void generateAccountSpCertificateTest() { } /** - * Retrieve identity provider by ID. + * Get an identity provider. * - * Manage identity providers of a tenant account. + * Retrieve an identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void getAccountIdentityProviderTest() { @@ -94,7 +95,7 @@ public void getAccountIdentityProviderTest() { /** * Get all identity providers. * - * Retrieve identity providers in an array. + * Retrieve an array of identity providers. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void getAllAccountIdentityProvidersTest() { @@ -109,9 +110,9 @@ public void getAllAccountIdentityProvidersTest() { } /** - * Refreshes the OIDC signing keys. + * Refresh the OIDC signing keys. * - * Refreshes an OIDC IdP's signing keys. + * Refresh an OIDC IdP's signing keys. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void refreshAccountJwksTest() { @@ -125,7 +126,7 @@ public void refreshAccountJwksTest() { /** * Update an existing identity provider. * - * Update an existing identity provider. + * Update an existing identity provider. <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void updateAccountIdentityProviderTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApiTest.java index 47c400f1e..17a09bbea 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsPolicyGroupsApiTest.java @@ -22,16 +22,17 @@ public void setup() { /** * Add API keys to Account group. * - * Add API keys to account groups. **Example:** ``` curl -X POST + * Add API keys to account groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void addApiKeysToAccountGroupTest() { String accountId = null; String groupId = null; SubjectList body = null; - // ApiKeyInfoRespList response = api.addApiKeysToAccountGroup(accountId, groupId, body); + // GroupSummary response = api.addApiKeysToAccountGroup(accountId, groupId, body); // TODO: test validations } @@ -39,16 +40,40 @@ public void addApiKeysToAccountGroupTest() { /** * Add API keys to account group. * - * Add API keys to account groups. **Example:** ``` curl -X POST + * Add API keys to account groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"apikeys\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` */ @Test public void addListedApiKeysToAccountGroupTest() { String accountId = null; String groupId = null; SubjectList body = null; - // ApiKeyInfoRespList response = api.addListedApiKeysToAccountGroup(accountId, groupId, body); + // GroupSummary response = api.addListedApiKeysToAccountGroup(accountId, groupId, body); + + // TODO: test validations + } + + /** + * Add applications to account group. + * + * Add applications to account groups. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` + */ + @Test + public void addListedApplicationsToAccountGroupTest() { + String accountId = null; + String groupId = null; + SubjectList body = null; + // GroupSummary response = api.addListedApplicationsToAccountGroup(accountId, groupId, body); // TODO: test validations } @@ -56,16 +81,17 @@ public void addListedApiKeysToAccountGroupTest() { /** * Add users to account group. * - * Add users to account group. **Example:** ``` curl -X POST + * Add users to account group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void addListedUsersToAccountGroupTest() { String accountId = null; String groupId = null; SubjectList body = null; - // ApiKeyInfoRespList response = api.addListedUsersToAccountGroup(accountId, groupId, body); + // GroupSummary response = api.addListedUsersToAccountGroup(accountId, groupId, body); // TODO: test validations } @@ -73,9 +99,10 @@ public void addListedUsersToAccountGroupTest() { /** * Add members to a group. * - * Add users and API keys to groups. **Example:** ``` curl -X POST + * Add users and API keys to groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` */ @@ -92,16 +119,17 @@ public void addSubjectsToAccountGroupTest() { /** * Add users to account group. * - * Add users to account group. **Example:** ``` curl -X POST + * Add users to account group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void addUsersToAccountGroupTest() { String accountId = null; String groupId = null; SubjectList body = null; - // ApiKeyInfoRespList response = api.addUsersToAccountGroup(accountId, groupId, body); + // GroupSummary response = api.addUsersToAccountGroup(accountId, groupId, body); // TODO: test validations } @@ -109,10 +137,10 @@ public void addUsersToAccountGroupTest() { /** * Create a new group. * - * Create a new group. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": - * \"MyGroup1\"}' ``` + * Create a new group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"name\": \"MyGroup1\"}' ``` */ @Test public void createAccountGroupTest() { @@ -126,9 +154,10 @@ public void createAccountGroupTest() { /** * Delete a group. * - * Delete a group. **Example:** ``` curl -X DELETE + * Delete a group. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void deleteAccountGroupTest() { @@ -140,11 +169,12 @@ public void deleteAccountGroupTest() { } /** - * Get group information. + * Get policy group. * - * Retrieve general information about the group. **Example:** ``` curl -X GET + * Retrieve policy group details. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAccountGroupSummaryTest() { @@ -156,11 +186,12 @@ public void getAccountGroupSummaryTest() { } /** - * Get all group information. + * Get policy groups. * - * Retrieve all group information. **Example:** ``` curl -X GET + * Retrieve an array of policy groups. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getAllAccountGroupsTest() { @@ -176,11 +207,12 @@ public void getAllAccountGroupsTest() { } /** - * Get API keys of a group. + * Get API keys in a group. * - * List the API keys of the group with details. **Example:** ``` curl -X GET + * Retrieve an array of API keys associated with a policy group. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getApiKeysOfAccountGroupTest() { @@ -196,11 +228,33 @@ public void getApiKeysOfAccountGroupTest() { } /** - * Get users of a group. + * Get applications in a group. * - * List a group's users, with details. **Example:** ``` curl -X GET + * Retrieve an array of applications associated with a policy group. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getApplicationsOfAccountGroupTest() { + String accountId = null; + String groupId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + // ApplicationList response = api.getApplicationsOfAccountGroup(accountId, groupId, limit, after, order, + // include); + + // TODO: test validations + } + + /** + * Get users in a policy group. + * + * Retrieve an array of users associated with a policy group. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getUsersOfAccountGroupTest() { @@ -222,9 +276,10 @@ public void getUsersOfAccountGroupTest() { /** * Remove API keys from a group. * - * Remove API keys from groups. **Example:** ``` curl -X DELETE + * Remove API keys from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"apikeys\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -242,9 +297,10 @@ public void removeApiKeysFromAccountGroupTest() { /** * Remove API keys from a group. * - * Remove API keys from groups. **Example:** ``` curl -X POST + * Remove API keys from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"apikeys\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -259,12 +315,33 @@ public void removeListedApiKeysFromAccountGroupTest() { // TODO: test validations } + /** + * Remove applications from a group. + * + * Remove applications from groups. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"applications\": + * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' + * ``` + */ + @Test + public void removeListedApplicationsFromAccountGroupTest() { + String accountId = null; + String groupId = null; + SubjectList body = null; + // GroupSummary response = api.removeListedApplicationsFromAccountGroup(accountId, groupId, body); + + // TODO: test validations + } + /** * Remove users from a group. * - * Remove users from groups. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Remove users from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -282,9 +359,10 @@ public void removeListedUsersFromAccountGroupTest() { /** * Remove users from a group. * - * Remove users from groups. **Example:** ``` curl -X DELETE + * Remove users from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '{\"users\": * [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]}' * ``` @@ -302,9 +380,10 @@ public void removeUsersFromAccountGroupTest() { /** * Update the group name. * - * Update a group name. **Example:** ``` curl -X PUT + * Update a group name. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{\"name\": * \"TestGroup2\"}' ``` */ @Test diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApiTest.java index 22726800c..10728dcd4 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUserInvitationsApiTest.java @@ -20,9 +20,10 @@ public void setup() { /** * Create a user invitation. * - * Invite a new or existing user. **Example:** ``` curl -X POST + * Invite a new or existing user. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": * \"myemail@company.com\"} ``` */ @Test @@ -37,9 +38,10 @@ public void createAccountInvitationTest() { /** * Delete a user invitation. * - * Delete an active user invitation sent to a new or existing user. **Example:** ``` curl -X DELETE + * Delete an active user invitation sent to a new or existing user. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void deleteAccountInvitationTest() { @@ -53,9 +55,10 @@ public void deleteAccountInvitationTest() { /** * Details of a user invitation. * - * Retrieve details of an active user invitation sent for a new or existing user. **Example:** ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Retrieve details of an active user invitation sent for a new or existing user. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountInvitationTest() { @@ -67,11 +70,12 @@ public void getAccountInvitationTest() { } /** - * Get the details of all user invitations. + * Get user invitations. * - * Retrieve details of all active user invitations sent for new or existing users. **Example:** ``` - * curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Retrieve an array of active user invitations. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getAllAccountInvitationsTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApiTest.java index cf161882c..4167e0235 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantAccountsUsersApiTest.java @@ -24,9 +24,10 @@ public void setup() { /** * Add user to a list of groups. * - * Add user to groups. **Example:** ``` curl -X POST + * Add user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -43,9 +44,10 @@ public void addAccountUserToGroupsTest() { /** * Add user to a list of groups. * - * Add a user to groups. **Example:** ``` curl -X POST + * Add a user to groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -63,9 +65,9 @@ public void addAccountUserToListedGroupsTest() { * Create a new user. * * Create or invite a new user to the account. Only email address is used; other attributes are set in the second - * step. **Example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": + * step. <b>Note:</b> This endpoint is restricted to administrators. **Example:** ``` + * curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ -d {\"email\": * \"myemail@company.com\"} ``` */ @Test @@ -81,9 +83,9 @@ public void createAccountUserTest() { /** * Delete a user. * - * Delete a user. **Example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Delete a user. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ + * -H 'Authorization: Bearer <access_key>' ``` */ @Test public void deleteAccountUserTest() { @@ -97,9 +99,9 @@ public void deleteAccountUserTest() { /** * Details of the user. * - * Retrieve user details. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Retrieve user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountUserTest() { @@ -111,11 +113,11 @@ public void getAccountUserTest() { } /** - * Get the details of all users. + * Get users. * - * Retrieve details of all users. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H 'Authorization: Bearer - * <api_key>' ``` + * Retrieve an array of users. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAllAccountUsersTest() { @@ -136,11 +138,12 @@ public void getAllAccountUsersTest() { } /** - * Get user's groups. + * Get policy groups for a user. * - * Retrieve user's groups. **Example:** ``` curl -X GET + * Retrieve an array of policy groups associated with a user. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getGroupsOfAccountUserTest() { @@ -155,12 +158,30 @@ public void getGroupsOfAccountUserTest() { // TODO: test validations } + /** + * Remove user from the account. + * + * Remove user from the account. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/remove \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void removeAccountUserFromAccountTest() { + String accountId = null; + String userId = null; + // Void response = api.removeAccountUserFromAccount(accountId, userId); + + // TODO: test validations + } + /** * Remove user from groups. * - * Remove user from groups. **Example:** ``` curl -X DELETE + * Remove user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -177,9 +198,10 @@ public void removeAccountUserFromGroupsTest() { /** * Remove user from groups. * - * Remove a user from groups. **Example:** ``` curl -X POST + * Remove a user from groups. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d * '[\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"]' * ``` */ @@ -196,10 +218,10 @@ public void removeAccountUserFromListedGroupsTest() { /** * Update user details. * - * Update user details. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{\"username\": - * \"myusername\"}' ``` + * Update user details. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{\"username\": \"myusername\"}' ``` */ @Test public void updateAccountUserTest() { @@ -214,9 +236,10 @@ public void updateAccountUserTest() { /** * Validate the user email. * - * Validate user email. **Example:** ``` curl -X POST + * Validate user email. <b>Note:</b> This endpoint is restricted to administrators. **Example:** + * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void validateAccountUserEmailTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApiTest.java new file mode 100644 index 000000000..8f021465e --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantSecurityAndIdentityCertificatesApiTest.java @@ -0,0 +1,126 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateUpdateReq; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for TenantSecurityAndIdentityCertificatesApi + */ +public class TenantSecurityAndIdentityCertificatesApiTest { + + private TenantSecurityAndIdentityCertificatesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(TenantSecurityAndIdentityCertificatesApi.class); + } + + /** + * Upload new trusted certificate. + * + * Upload new trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d {\"name\": + * \"myCert1\", \"description\": \"very important cert\", \"certificate\": + * \"certificate_data\", \"service\": \"lwm2m\"} ``` + */ + @Test + public void addAccountCertificateTest() { + String accountId = null; + TrustedCertificateReq body = null; + // TrustedCertificateResp response = api.addAccountCertificate(accountId, body); + + // TODO: test validations + } + + /** + * Delete a trusted certificate by ID. + * + * Delete a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void deleteAccountCertificateTest() { + String accountId = null; + String certId = null; + // Void response = api.deleteAccountCertificate(accountId, certId); + + // TODO: test validations + } + + /** + * Get a trusted certificate. + * + * Retrieve a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getAccountCertificateTest() { + String accountId = null; + String certId = null; + // TrustedCertificateResp response = api.getAccountCertificate(accountId, certId); + + // TODO: test validations + } + + /** + * Get trusted certificates. + * + * Retrieve an array of trusted certificates. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void getAllAccountCertificatesTest() { + String accountId = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + String nameEq = null; + String serviceEq = null; + Integer expireEq = null; + Integer deviceExecutionModeEq = null; + Integer deviceExecutionModeNeq = null; + String ownerEq = null; + Boolean enrollmentModeEq = null; + String statusEq = null; + String issuerLike = null; + String subjectLike = null; + String certificateFingerprintEq = null; + Boolean validEq = null; + // TrustedCertificateRespList response = api.getAllAccountCertificates(accountId, limit, after, order, include, + // nameEq, serviceEq, expireEq, deviceExecutionModeEq, deviceExecutionModeNeq, ownerEq, enrollmentModeEq, + // statusEq, issuerLike, subjectLike, certificateFingerprintEq, validEq); + + // TODO: test validations + } + + /** + * Update trusted certificate. + * + * Update a trusted certificate. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * {\"description\": \"very important cert\"} ``` + */ + @Test + public void updateAccountCertificateTest() { + String accountId = null; + String certId = null; + TrustedCertificateUpdateReq body = null; + // TrustedCertificateResp response = api.updateAccountCertificate(accountId, certId, body); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApiTest.java index 86ebdd555..82bbc50e2 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationColorsApiTest.java @@ -2,6 +2,7 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColor; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorUpdate; import org.junit.Before; import org.junit.Test; @@ -22,15 +23,16 @@ public void setup() { /** * Updates an array of dark theme branding colors. * - * Update an array of dark theme branding colors of a tenant account. **Example:** ``` curl -X PUT + * Update an array of dark theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": * \"primary\", \"color\": \"#f3f93e\" }]' ``` */ @Test public void bulkSetAccountDarkColorsTest() { String accountId = null; - List body = null; + List body = null; // Void response = api.bulkSetAccountDarkColors(accountId, body); // TODO: test validations @@ -39,15 +41,16 @@ public void bulkSetAccountDarkColorsTest() { /** * Updates an array of light theme branding colors. * - * Update an array of light theme branding colors of a tenant account. **Example:** ``` curl -X PUT + * Update an array of light theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * Bearer <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": * \"primary\", \"color\": \"purple\" }]' ``` */ @Test public void bulkSetAccountLightColorsTest() { String accountId = null; - List body = null; + List body = null; // Void response = api.bulkSetAccountLightColors(accountId, body); // TODO: test validations @@ -56,9 +59,10 @@ public void bulkSetAccountLightColorsTest() { /** * Delete all colors. * - * Delete account branding colors for all themes. **Example usage:** `curl -X DELETE + * Delete account branding colors for all themes. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountColorsTest() { @@ -71,9 +75,10 @@ public void deleteAllAccountColorsTest() { /** * Delete colors in the dark theme. * - * Delete account dark theme branding colors. **Example usage:** `curl -X DELETE + * Delete account dark theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountDarkColorsTest() { @@ -86,9 +91,10 @@ public void deleteAllAccountDarkColorsTest() { /** * Delete colors in the light theme. * - * Delete account light theme branding colors. **Example usage:** `curl -X DELETE + * Delete account light theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountLightColorsTest() { @@ -101,9 +107,10 @@ public void deleteAllAccountLightColorsTest() { /** * Get dark theme branding color. * - * Retrieve the requested dark theme branding color. **Example:** ``` curl -X GET + * Retrieve the requested dark theme branding color. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountDarkColorTest() { @@ -117,9 +124,10 @@ public void getAccountDarkColorTest() { /** * Get dark theme branding colors. * - * Retrieve dark theme branding colors for an account. **Example:** ``` curl -X GET + * Retrieve dark theme branding colors for an account. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAccountDarkColorsTest() { @@ -132,9 +140,10 @@ public void getAccountDarkColorsTest() { /** * Get light theme branding color. * - * Retrieve the requested light theme branding color. **Example:** ``` curl -X GET + * Retrieve the requested light theme branding color. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountLightColorTest() { @@ -148,9 +157,10 @@ public void getAccountLightColorTest() { /** * Get light theme branding colors. * - * Retrieve light theme branding colors for an account. **Example:** ``` curl -X GET + * Retrieve light theme branding colors for an account. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAccountLightColorsTest() { @@ -163,9 +173,10 @@ public void getAccountLightColorsTest() { /** * Reset branding color to default. * - * Resets the branding color of a tenant account to its dark theme default. **Example:** ``` curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Resets the branding color to its dark theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void resetAccountDarkColorTest() { @@ -179,9 +190,10 @@ public void resetAccountDarkColorTest() { /** * Reset branding color to default. * - * Resets the branding color of a tenant account to its light theme default. **Example:** ``` curl -X - * DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * Resets the branding color to its light theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\ -H + * 'Authorization: Bearer <access_key>' ``` */ @Test public void resetAccountLightColorTest() { @@ -195,9 +207,10 @@ public void resetAccountLightColorTest() { /** * Updates a dark theme branding color. * - * Update a dark theme branding color of a tenant account. **Example:** ``` curl -X PUT + * Update a dark theme branding color. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ * \"color\": \"#f3f93e\" }' ``` */ @Test @@ -213,9 +226,10 @@ public void setAccountDarkColorTest() { /** * Updates light theme branding color. * - * Update a light theme branding color of a tenant account. **Example:** ``` curl -X PUT + * Update a light theme branding color. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: application/json' \\ -d '{ + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d '{ * \"color\": \"purple\" }' ``` */ @Test diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApiTest.java index ca1a6a19b..fff94d500 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/TenantUserInterfaceConfigurationImagesApiTest.java @@ -20,9 +20,10 @@ public void setup() { /** * Revert an image to dark theme default. * - * Revert an account branding image to dark theme default. **Example:** ``` curl -X POST + * Revert an account branding image to dark theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void clearAccountDarkImageTest() { @@ -36,9 +37,10 @@ public void clearAccountDarkImageTest() { /** * Revert an image to light theme default. * - * Revert an account branding image to light theme default. **Example:** ```curl -X POST + * Revert an account branding image to light theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ```curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void clearAccountLightImageTest() { @@ -52,9 +54,10 @@ public void clearAccountLightImageTest() { /** * Delete images in the dark theme. * - * Delete account dark theme branding images. **Example usage:** `curl -X DELETE + * Delete account dark theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountDarkImagesTest() { @@ -67,9 +70,10 @@ public void deleteAllAccountDarkImagesTest() { /** * Delete all images. * - * Delete account branding images for all themes. **Example usage:** `curl -X DELETE + * Delete account branding images for all themes. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountImagesTest() { @@ -82,9 +86,10 @@ public void deleteAllAccountImagesTest() { /** * Delete images in the light theme. * - * Delete account light theme branding images. **Example usage:** `curl -X DELETE + * Delete account light theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light -H 'Authorization: Bearer - * API_KEY'` + * <access_key>'` */ @Test public void deleteAllAccountLightImagesTest() { @@ -97,9 +102,10 @@ public void deleteAllAccountLightImagesTest() { /** * Get metadata of a dark theme image. * - * Retrieve metadata of one account dark theme branding image. **Example:** ``` curl -X GET + * Retrieve metadata of one account dark theme branding image. <b>Note:</b> This endpoint is restricted + * to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountDarkImageDataTest() { @@ -113,9 +119,10 @@ public void getAccountDarkImageDataTest() { /** * Get metadata of a light theme image. * - * Retrieve metadata for one account light theme branding image. **Example:** ``` curl -X GET + * Retrieve metadata for one account light theme branding image. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\ -H - * 'Authorization: Bearer <api_key>' ``` + * 'Authorization: Bearer <access_key>' ``` */ @Test public void getAccountLightImageDataTest() { @@ -129,9 +136,10 @@ public void getAccountLightImageDataTest() { /** * Get metadata of all dark theme images. * - * Retrieve the metadata of all dark theme branding images. **Example:** ``` curl -X GET + * Retrieve the metadata of all dark theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAllAccountDarkImageDataTest() { @@ -144,9 +152,10 @@ public void getAllAccountDarkImageDataTest() { /** * Get metadata of all light theme images. * - * Retrieve the metadata of all light theme branding images. **Example:** ``` curl -X GET + * Retrieve the metadata of all light theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\ -H 'Authorization: - * Bearer <api_key>' ``` + * Bearer <access_key>' ``` */ @Test public void getAllAccountLightImageDataTest() { @@ -159,9 +168,10 @@ public void getAllAccountLightImageDataTest() { /** * Upload a dark theme image. * - * Upload a new account dark theme branding image in PNG or JPEG format. **Example:** ``` curl -X - * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H - * 'Authorization: Bearer <api_key>' -H 'content-type: image/png' --data-binary + * Upload a new account dark theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \\ -H + * 'Authorization: Bearer <access_key>' -H 'content-type: image/png' --data-binary * '@myimage.png' ``` */ @Test @@ -177,7 +187,8 @@ public void uploadAccountDarkImageTest() { /** * Upload a dark theme image. * - * Upload a new account dark theme branding image as form data in PNG or JPEG format. + * Upload a new account dark theme branding image as form data in PNG or JPEG format. <b>Note:</b> This + * endpoint is restricted to administrators. */ @Test public void uploadAccountDarkImageMultipartTest() { @@ -192,9 +203,10 @@ public void uploadAccountDarkImageMultipartTest() { /** * Upload a light theme image. * - * Upload a new account light theme branding image in PNG or JPEG format. **Example:** ``` curl -X - * POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H - * 'Authorization: Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary + * Upload a new account light theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \\ -H + * 'Authorization: Bearer <access_key>' \\ -H 'content-type: image/png' --data-binary * '@myimage.png' ``` */ @Test @@ -210,7 +222,8 @@ public void uploadAccountLightImageTest() { /** * Upload a light theme image. * - * Upload a new account branding image as form data in PNG or JPEG format. + * Upload a new account branding image as form data in PNG or JPEG format. <b>Note:</b> This endpoint is + * restricted to administrators. */ @Test public void uploadAccountLightImageMultipartTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApiTest.java new file mode 100644 index 000000000..8d01eb09c --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageBillingReportsApiTest.java @@ -0,0 +1,105 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for UsageBillingReportsApi + */ +public class UsageBillingReportsApiTest { + + private UsageBillingReportsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(UsageBillingReportsApi.class); + } + + /** + * Get billing report. + * + * Fetch the billing report generated for the currently authenticated commercial account. The billing reports for + * tenant accounts are also included in their aggregator's billing report response. The response contains below + * additional counters when the account's business model is set to `API calls` by the account + * administrator. - rest_api_requests_with_user_token - rest_api_requests_with_api_key_token - + * pelion_to_webapp_notifications - device_to_pelion_messages - pelion_to_device_messages **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07 \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getBillingReportTest() { + String month = null; + // ReportResponse response = api.getBillingReport(month); + + // TODO: test validations + } + + /** + * Get raw billing data of the active devices for the month. + * + * Fetch raw billing data for active devices for the currently authenticated commercial account. This is + * supplementary data for the billing report. The raw billing data of the active devices for tenant accounts are + * included in their aggregator's raw billing data of the active devices. The endpoint returns the URL to + * download the gzipped CSV file. The first line is the header providing information on active devices, for example, + * the ID of an active device. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/billing-report-active-devices?month=2018-07 \\ -H 'Authorization: + * Bearer <access_key>' ``` + */ + @Test + public void getBillingReportActiveDevicesTest() { + String month = null; + // BillingReportRawDataResponse response = api.getBillingReportActiveDevices(month); + + // TODO: test validations + } + + /** + * Get raw billing data of the firmware updates for the month. + * + * Fetch raw billing data for firmware updates for the currently authenticated commercial account. This is + * supplementary data for the billing report. The raw billing data of the firmware updates for tenant accounts are + * also included in their aggregator's raw billing data of the firmware updates. The endpoint returns the URL to + * download the gzipped CSV file. The first line is the header providing information on the firmware updates, for + * example, the ID of a firmware update. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/billing-report-firmware-updates?month=2018-07 \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getBillingReportFirmwareUpdatesTest() { + String month = null; + // BillingReportRawDataResponse response = api.getBillingReportFirmwareUpdates(month); + + // TODO: test validations + } + + /** + * Service package quota. + * + * Get the available firmware update quota for the current authenticated commercial account. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getServicePackageQuotaTest() { + // ServicePackageQuota response = api.getServicePackageQuota(); + + // TODO: test validations + } + + /** + * Get all service packages. + * + * Get information for all service packages for the current authenticated commercial account. The response is + * returned in descending order by service package created timestamp: first the pending service package, then the + * active service package, then the previous service packages. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/service-packages \\ -H 'Authorization: Bearer <access_key>' + * ``` + */ + @Test + public void getServicePackagesTest() { + // ServicePackagesResponse response = api.getServicePackages(); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApiTest.java new file mode 100644 index 000000000..e10d5e797 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServiceMetricsApiTest.java @@ -0,0 +1,39 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.joda.time.LocalDate; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for UsageServiceMetricsApi + */ +public class UsageServiceMetricsApiTest { + + private UsageServiceMetricsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(UsageServiceMetricsApi.class); + } + + /** + * Provides account-specific statistics for other cloud services. + * + * Get account-specific statistics. + */ + @Test + public void getMetricsTest() { + String include = null; + String interval = null; + LocalDate start = null; + LocalDate end = null; + String period = null; + Integer limit = null; + String after = null; + String order = null; + // SuccessfulResponse response = api.getMetrics(include, interval, start, end, period, limit, after, order); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApiTest.java new file mode 100644 index 000000000..49fcc6e15 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageServicePackagesApiTest.java @@ -0,0 +1,36 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for UsageServicePackagesApi + */ +public class UsageServicePackagesApiTest { + + private UsageServicePackagesApi api; + + @Before + public void setup() { + api = new ApiClient().createService(UsageServicePackagesApi.class); + } + + /** + * Service package quota history. + * + * Get your quota usage history. This API is available only for commercial accounts. Aggregator accounts can see + * their own and tenant quota usage data. Data is in ascending order based on creation time. **Example:** + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota-history \\ -H + * 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getServicePackageQuotaHistoryTest() { + Integer limit = null; + String after = null; + String order = null; + // ServicePackageQuotaHistoryResponse response = api.getServicePackageQuotaHistory(limit, after, order); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApiTest.java new file mode 100644 index 000000000..8fdd08169 --- /dev/null +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UsageStatisticsApiTest.java @@ -0,0 +1,50 @@ +package com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api; + +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; +import org.joda.time.DateTime; +import org.junit.Before; +import org.junit.Test; + +/** + * API tests for UsageStatisticsApi + */ +public class UsageStatisticsApiTest { + + private UsageStatisticsApi api; + + @Before + public void setup() { + api = new ApiClient().createService(UsageStatisticsApi.class); + } + + /** + * Get statistics view of Device Management usage. + * + * Fetch the statistics view of Device Management usage in time series for the currently authenticated commercial + * account. The response contains the additional counters below, if the account business model is set to `API + * calls` by the account administrator: - device_to_pelion_messages - pelion_to_device_messages - + * pelion_to_webapp_notifications - rest_api_requests_with_api_key_token - rest_api_requests_with_user_token The + * return data is retrieved during a defined time window and grouped by defined interval. The time window for data + * retrieval is defined as a range, that can be either absolute (for instance, using timestamps) or relative + * (referring to the 'period' parameter). Range start is inclusive, while range end is exclusive. The + * specified range must be equal to or greater than the specified interval. Returned data does not include any + * tenant usage. **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/billing-statistics?start=2019-11-01T00:00:00.000Z&end=2019-12-01T00:00:00.000Z&interval=1d + * \\ -H 'Authorization: Bearer <access_key>' ``` + */ + @Test + public void getStatisticsViewTest() { + String interval = null; + DateTime start = null; + DateTime end = null; + String period = null; + Integer limit = null; + String after = null; + String order = null; + String include = null; + // StatisticsViewResponse response = api.getStatisticsView(interval, start, end, period, limit, after, order, + // include); + + // TODO: test validations + } +} diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApiTest.java index 60dabe240..08ac7dc91 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationColorsApiTest.java @@ -2,6 +2,7 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.ApiClient; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColor; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorUpdate; import org.junit.Before; import org.junit.Test; @@ -22,14 +23,15 @@ public void setup() { /** * Updates an array of dark theme branding colors. * - * Update an array of dark theme branding colors. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' - * \\ -H 'content-type: application/json' \\ '[{ \"reference\": \"primary\", - * \"color\": \"#f3f93e\" }]' ``` + * Update an array of dark theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * \"primary\", \"color\": \"#f3f93e\" }]' ``` */ @Test public void bulkSetDarkColorsTest() { - List body = null; + List body = null; // Void response = api.bulkSetDarkColors(body); // TODO: test validations @@ -38,14 +40,15 @@ public void bulkSetDarkColorsTest() { /** * Updates an array of light theme branding colors. * - * Update an array of light theme branding colors. **Example:** ``` curl -X PUT + * Update an array of light theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": + * <access_key>' \\ -H 'content-type: application/json' \\ '[{ \"reference\": * \"primary\", \"color\": \"purple\" }]' ``` */ @Test public void bulkSetLightColorsTest() { - List body = null; + List body = null; // Void response = api.bulkSetLightColors(body); // TODO: test validations @@ -54,8 +57,9 @@ public void bulkSetLightColorsTest() { /** * Delete all colors. * - * Delete account branding colors for all themes. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-colors -H 'Authorization: Bearer API_KEY'` + * Delete account branding colors for all themes. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors -H + * 'Authorization: Bearer <access_key>'` */ @Test public void deleteAllColorsTest() { @@ -67,8 +71,10 @@ public void deleteAllColorsTest() { /** * Delete colors in the dark theme. * - * Delete account dark theme branding colors. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer API_KEY'` + * Delete account dark theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark -H 'Authorization: Bearer + * <access_key>'` */ @Test public void deleteAllDarkColorsTest() { @@ -80,8 +86,10 @@ public void deleteAllDarkColorsTest() { /** * Delete colors in the light theme. * - * Delete account light theme branding colors. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer API_KEY'` + * Delete account light theme branding colors. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light -H 'Authorization: Bearer + * <access_key>'` */ @Test public void deleteAllLightColorsTest() { @@ -95,7 +103,7 @@ public void deleteAllLightColorsTest() { * * Retrieve the requested dark theme branding color. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getDarkColorTest() { @@ -109,8 +117,8 @@ public void getDarkColorTest() { * Get dark theme branding colors. * * Retrieve the dark theme branding colors. **Example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer <api_key>' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getDarkColorsTest() { @@ -124,7 +132,7 @@ public void getDarkColorsTest() { * * Retrieve the requested light theme branding color. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getLightColorTest() { @@ -139,7 +147,7 @@ public void getLightColorTest() { * * Retrieve the light theme branding colors. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getLightColorsTest() { @@ -151,9 +159,10 @@ public void getLightColorsTest() { /** * Reset branding color to default. * - * Resets the branding color to its dark theme default. **Example:** ``` curl -X DELETE + * Resets the branding color to its dark theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void resetDarkColorTest() { @@ -166,9 +175,10 @@ public void resetDarkColorTest() { /** * Reset branding color to default. * - * Resets the branding color to its light theme default. **Example:** ``` curl -X DELETE + * Resets the branding color to its light theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void resetLightColorTest() { @@ -181,10 +191,10 @@ public void resetLightColorTest() { /** * Updates a dark theme branding color. * - * Update a dark theme branding color. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": - * \"#f3f93e\" }' ``` + * Update a dark theme branding color. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{ \"color\": \"#f3f93e\" }' ``` */ @Test public void setDarkColorTest() { @@ -198,10 +208,10 @@ public void setDarkColorTest() { /** * Updates light theme branding color. * - * Update light theme branding color. **Example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\ -H 'Authorization: Bearer - * <api_key>' \\ -H 'content-type: application/json' \\ -d '{ \"color\": - * \"purple\" }' ``` + * Update light theme branding color. <b>Note:</b> This endpoint is restricted to administrators. + * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary + * \\ -H 'Authorization: Bearer <access_key>' \\ -H 'content-type: application/json' \\ -d + * '{ \"color\": \"purple\" }' ``` */ @Test public void setLightColorTest() { diff --git a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApiTest.java b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApiTest.java index c7ed288f6..c288b66f5 100644 --- a/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApiTest.java +++ b/backends/pelioncloud_devicemanagement/src/test/java/com/arm/mbed/cloud/sdk/lowlevel/pelionclouddevicemanagement/api/UserInterfaceConfigurationImagesApiTest.java @@ -20,9 +20,10 @@ public void setup() { /** * Revert an image to dark theme default. * - * Revert an account branding image to dark theme default. **Example:** ``` curl -X POST + * Revert an account branding image to dark theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void clearDarkImageTest() { @@ -35,9 +36,10 @@ public void clearDarkImageTest() { /** * Revert an image to light theme default. * - * Revert an account branding image to light theme default. **Example:** ``` curl -X POST + * Revert an account branding image to light theme default. <b>Note:</b> This endpoint is restricted to + * administrators. **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void clearLightImageTest() { @@ -50,8 +52,10 @@ public void clearLightImageTest() { /** * Delete images in the dark theme. * - * Delete account dark theme branding images. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer API_KEY'` + * Delete account dark theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark -H 'Authorization: Bearer + * <access_key>'` */ @Test public void deleteAllDarkImagesTest() { @@ -63,8 +67,9 @@ public void deleteAllDarkImagesTest() { /** * Delete all images. * - * Delete account branding images for all themes. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-images -H 'Authorization: Bearer API_KEY'` + * Delete account branding images for all themes. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images -H + * 'Authorization: Bearer <access_key>'` */ @Test public void deleteAllImagesTest() { @@ -76,8 +81,10 @@ public void deleteAllImagesTest() { /** * Delete images in the light theme. * - * Delete account light theme branding images. **Example usage:** `curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer API_KEY'` + * Delete account light theme branding images. <b>Note:</b> This endpoint is restricted to + * administrators. **Example usage:** `curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/branding-images/light -H 'Authorization: Bearer + * <access_key>'` */ @Test public void deleteAllLightImagesTest() { @@ -90,8 +97,8 @@ public void deleteAllLightImagesTest() { * Get metadata of all dark theme images. * * Retrieve metadata for all dark theme branding images. **Example:** `curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\ -H 'Authorization: Bearer <api_key>' - * ``` + * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\ -H 'Authorization: Bearer + * <access_key>' ``` */ @Test public void getAllDarkImageDataTest() { @@ -105,7 +112,7 @@ public void getAllDarkImageDataTest() { * * Retrieve the metadata of all light theme branding images. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getAllLightImageDataTest() { @@ -119,7 +126,7 @@ public void getAllLightImageDataTest() { * * Retrieve metadata for one account dark theme branding image. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getDarkImageDataTest() { @@ -134,7 +141,7 @@ public void getDarkImageDataTest() { * * Retrieve metadata for one account light theme branding image. **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\ -H 'Authorization: Bearer - * <api_key>' ``` + * <access_key>' ``` */ @Test public void getLightImageDataTest() { @@ -147,9 +154,10 @@ public void getLightImageDataTest() { /** * Upload a dark theme image. * - * Upload a new account branding image in the dark theme in PNG or JPEG format. **Example:** ``` curl - * -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' + * Upload a new account branding image in the dark theme in PNG or JPEG format. <b>Note:</b> This + * endpoint is restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' * ``` */ @Test @@ -165,6 +173,7 @@ public void uploadDarkImageTest() { * Upload a dark theme image. * * Upload a new account branding image as form data in the dark theme in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void uploadDarkImageMultipartTest() { @@ -178,9 +187,10 @@ public void uploadDarkImageMultipartTest() { /** * Upload a light theme image. * - * Upload a new account light theme branding image in PNG or JPEG format. **Example:** ``` curl -X - * POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \\ -H 'Authorization: - * Bearer <api_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' + * Upload a new account light theme branding image in PNG or JPEG format. <b>Note:</b> This endpoint is + * restricted to administrators. **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \\ -H 'Authorization: Bearer + * <access_key>' \\ -H 'content-type: image/png' --data-binary '@myimage.png' * ``` */ @Test @@ -196,6 +206,7 @@ public void uploadLightImageTest() { * Upload a light theme image. * * Upload a new account branding image as form data in the light theme in PNG or JPEG format. + * <b>Note:</b> This endpoint is restricted to administrators. */ @Test public void uploadLightImageMultipartTest() { diff --git a/build.gradle b/build.gradle index af3043e92..c9b438329 100644 --- a/build.gradle +++ b/build.gradle @@ -177,6 +177,10 @@ allprojects { println 'Compiler args for compiling '+ project.name +' : ' + options.compilerArgs } } + + tasks.withType(Javadoc) { + options.encoding = "UTF-8" + } def eclipseConfigFile=new File("$rootProject.projectDir/config/eclipse/formatter.xml").canonicalPath spotless { diff --git a/config/pelion/pelion_dm_public_openapi.yaml b/config/pelion/pelion_dm_public_openapi.yaml index 300c6e804..ad1c3b601 100644 --- a/config/pelion/pelion_dm_public_openapi.yaml +++ b/config/pelion/pelion_dm_public_openapi.yaml @@ -1,4 +1,148 @@ definitions: + AccessKey: + description: Represents an application in Device Management. + properties: + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + type: string + application_id: + description: The ID of the application. + example: 01705c6383f6c85b76f92f4e00000000 + pattern: '[a-f0-9]{32}' + readOnly: true + type: string + created_at: + description: Creation UTC time RFC3339. + example: '2020-02-13T09:35:20Z' + format: date-time + readOnly: true + type: string + description: + description: The description of the access key. + example: Access key to control the warp drive + maxLength: 500 + type: string + etag: + description: API resource entity version. + example: '1' + readOnly: true + type: string + expiration: + description: 'Expiration time of the access key, as UTC time RFC3339. + + Expiration makes the access key inoperative and the status will be EXPIRED. + + The client using the expired access key is no longer able to use the REST + API. + + The access key expiration does not invalidate existing configurations meaning + that subscribed events will continue to flow on existing channels.' + format: date-time + type: string + id: + description: The ID of the access key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + type: string + key: + description: The access key. The full key including the secret part is visible + in the response for create only + example: ak_2MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + readOnly: true + type: string + last_used_at: + description: The time of the latest access key usage. + example: '2020-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + name: + description: The display name for the access key. + example: Access key warp + maxLength: 100 + type: string + object: + description: 'Entity name: always ''access-key''' + enum: + - access-key + readOnly: true + type: string + status: + description: 'The status of the access key. + + ACTIVE means that the access key is operational. + + INACTIVE means that the access key is not operational and it prevents the + clients to use the REST API. Inactivating the access key does not invalidate + existing configurations meaning that subscribed events will continue to + flow on existing channels. + + The EXPIRED status is not allowed to be set directly, it is derived from + the expiration attribute.' + enum: + - ACTIVE + - INACTIVE + - EXPIRED + example: ACTIVE + type: string + updated_at: + description: Last update UTC time RFC3339. + example: '2020-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + required: + - name + type: object + AccessKeyList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + data: + description: A list of entities. + items: + $ref: '#/definitions/AccessKey' + type: array + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return, or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list + type: string + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC + type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object AccountCreationReq: description: Represents an account creation request. properties: @@ -39,7 +183,8 @@ definitions: type: string x-nullable: true aliases: - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -56,7 +201,8 @@ definitions: type: string x-nullable: true company: - description: The name of the company. Required for commercial accounts only. + description: The name of the company used in billing. Required for commercial + accounts only. example: ARM Holdings Plc maxLength: 100 type: string @@ -88,7 +234,7 @@ definitions: type: string x-nullable: true display_name: - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -125,7 +271,7 @@ definitions: required: - end_market type: object - AccountInfo: + AccountCreationResp: description: Represents an account in requests and responses. properties: address_line1: @@ -167,6 +313,11 @@ definitions: example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT readOnly: true type: string + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-09-01T00:00:00+00:00' + issued_at: '2020-09-01T00:00:00+00:00' + links: [] x-nullable: true admin_name: description: The username of the admin user created for this account. Present @@ -182,7 +333,8 @@ definitions: type: string x-nullable: true aliases: - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -202,7 +354,7 @@ definitions: type: string x-nullable: true company: - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -241,7 +393,7 @@ definitions: type: string x-nullable: true display_name: - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -293,11 +445,10 @@ definitions: limits: additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -407,6 +558,11 @@ definitions: account, `2`: partner tier. Other values are reserved for the future.' example: '1' type: string + tier_history: + description: Tier history for this account. + items: + $ref: '#/definitions/TierHistory' + type: array updated_at: description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -417,270 +573,142 @@ definitions: example: '2018-02-14T15:24:14Z' format: date-time type: string - required: - - end_market - - etag - - id - - object - - status - - tier type: object - AccountInfoList: + AccountInfo: + description: Represents an account in requests and responses. properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + address_line1: + description: Postal address line 1. + example: 110 Fulbourn Rd + maxLength: 100 type: string - data: - description: A list of entities. + x-nullable: true + address_line2: + description: Postal address line 2. + example: ' ' + maxLength: 100 + type: string + x-nullable: true + aliases: + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. items: - $ref: '#/definitions/AccountInfo' + pattern: '[\w\-._]{8,100}' + type: string + maxItems: 10 type: array - has_more: - description: Flag indicating whether there are more results. - example: false - type: boolean - limit: - description: The number of results to return (2-1000), or equal to `total_count`. - example: 50 - format: int32 - type: integer - object: - description: 'Entity name: always `list`.' - enum: - - list + business_model: + $ref: '#/definitions/BusinessModel' + business_model_history: + description: Business model history for this account. + items: + $ref: '#/definitions/BusinessModelHistory' + type: array + city: + description: The city part of the postal address. + example: Cambridge + maxLength: 100 type: string - order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC + x-nullable: true + company: + description: The name of the company used in billing. + example: ARM Holdings Plc + maxLength: 100 type: string - total_count: - description: The total number of records, if requested. - example: 20 - format: int32 - type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - AccountLimitation: - description: This object represents an account limitation. - properties: - billing_period: - description: Billing period of the account limitation. - format: int32 - type: integer + x-nullable: true + contact: + description: The name of the contact person for this account. + example: J. Doe + maxLength: 100 + type: string + x-nullable: true + contract_number: + description: Contract number of the customer. + example: 1NX25_0001 + type: string + x-nullable: true + country: + description: The country part of the postal address. + example: United Kingdom + maxLength: 100 + type: string + x-nullable: true created_at: description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time type: string - description: - description: Description of the account limitation. - readOnly: true + custom_fields: + additionalProperties: + type: string + description: Account's custom properties as key-value pairs. + type: object + x-nullable: true + customer_number: + description: Customer number of the customer. + example: 1NC25_0001 + type: string + x-nullable: true + display_name: + description: The display name for the tenant account. + example: ARM + maxLength: 100 + type: string + x-nullable: true + email: + description: The company email address for this account. + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + x-nullable: true + end_market: + description: Account end market. + example: IT type: string etag: description: API resource entity version. example: '1' type: string - id: - description: Entity ID. - example: 01619571d01d0242ac12000600000000 - type: string - inherited: - description: Flag indicating whether this limitation is inherited. - readOnly: true - type: boolean - inherited_from: - description: Indicates where this limit is inherited from. - readOnly: true - type: string - inherited_type: - description: Indicates the type of the entity where the limitation is inherited - from. - readOnly: true - type: string - limit: - description: The value of the limit. - format: int32 - type: integer - name: - description: Name of the account limitation. - type: string - object: - description: 'Entity name: always ''limitation''' - enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image - type: string - quota: - description: Quota of the account limitation. - format: int32 - type: integer - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - type: object - AccountLimitationList: - properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - type: string - data: - description: A list of entities. - items: - $ref: '#/definitions/AccountLimitation' - type: array - has_more: - description: Flag indicating whether there is more results. - example: false - type: boolean - limit: - description: 'The number of results to return, (range: 2-1000), or equals - to `total_count`' - example: 50 - format: int32 - type: integer - object: - description: 'Entity name: always ''list''' - enum: - - list - type: string - order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC - type: string - total_count: - description: The total number or records, if requested. It might be returned - also for small lists. - example: 20 - format: int32 - type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - AccountUpdateReq: - description: Represents an account creation request. - properties: - address_line1: - description: Postal address line 1. Required for commercial accounts only. - example: 110 Fulbourn Rd - maxLength: 100 - type: string - x-nullable: true - address_line2: - description: Postal address line 2. - example: ' ' - maxLength: 100 - type: string - x-nullable: true - aliases: - description: An array of aliases. - items: - pattern: '[\w\-._]{8,100}' - type: string - maxItems: 10 - type: array - x-nullable: true - city: - description: The city part of the postal address. Required for commercial - accounts only. - example: Cambridge - maxLength: 100 - type: string - x-nullable: true - company: - description: The name of the company. Required for commercial accounts only. - example: ARM Holdings Plc - maxLength: 100 - type: string - x-nullable: true - contact: - description: The name of the contact person for this account. Required for - commercial accounts only. - example: J. Doe - maxLength: 100 - type: string - x-nullable: true - country: - description: The country part of the postal address. Required for commercial - accounts only. - example: United Kingdom - maxLength: 100 - type: string - x-nullable: true - custom_fields: - additionalProperties: - type: string - description: Account's custom properties as key-value pairs. - maxItems: 10 - type: object - x-nullable: true - display_name: - description: The display name for the account. - example: ARM - maxLength: 100 - type: string - x-nullable: true - email: - description: The company email address for this account. Required for commercial - accounts only. - example: info@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - end_market: - description: The end market for this account. - example: IT - maxLength: 100 + expiration: + description: Expiration time of the account, as UTC time RFC3339. + format: date-time type: string x-nullable: true expiration_warning_threshold: - description: Indicates how many days before account expiration a notification + description: Indicates how many days (1-180) before account expiration a notification email is sent. + example: '180' maximum: 180 minimum: 1 type: integer x-nullable: true + id: + description: Account ID. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string idle_timeout: - description: Reference token expiration time in minutes. + description: The reference token expiration time, in minutes, for this account. + example: '30' maximum: 120 minimum: 1 type: integer x-nullable: true + limitations: + description: List of account limitation objects. + items: + $ref: '#/definitions/AccountLimitation' + type: array + limits: + additionalProperties: + type: string + description: 'DEPRECATED: Replaced by the limitations parameter.' + type: object + x-deprecation: + comment: Replaced by the limitations parameter. + end_of_life_at: '2020-08-27T12:03:58+00:00' + issued_at: '2019-08-27T12:03:58+00:00' + x-nullable: true mfa_status: description: The enforcement status of multi-factor authentication, either `enforced` or `optional`. @@ -696,9 +724,24 @@ definitions: type: string type: array x-nullable: true + object: + description: 'Entity name: always `account`.' + enum: + - account + type: string + parent_account: + $ref: '#/definitions/ParentAccountInfo' + description: Contact details of the parent account. + x-nullable: true + parent_id: + description: The ID of the parent account, if any. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true password_policy: $ref: '#/definitions/PasswordPolicy' - description: Password policy for this account. + description: The password policy for this account. x-nullable: true password_recovery_expiration: description: Indicates for how many minutes a password recovery email is valid. @@ -706,434 +749,260 @@ definitions: maximum: 45 minimum: 1 type: integer - x-nullable: true phone_number: - description: The phone number of a representative of the company. + description: The phone number of a company representative. example: +44 (1223) 400 400 maxLength: 100 type: string x-nullable: true + policies: + description: List of policies if requested. + items: + $ref: '#/definitions/FeaturePolicy' + type: array + x-nullable: true postal_code: description: The postal code part of the postal address. example: CB1 9NJ maxLength: 100 type: string x-nullable: true - state: - description: The state part of the postal address. - example: ' ' - maxLength: 100 + reason: + description: A note with the reason for account status update. + example: Subscription paid. type: string x-nullable: true - type: object - AccountUpdateRootReq: - description: Represents an account update request. - properties: - address_line1: - description: Postal address line 1. Required for commercial accounts only. - example: 110 Fulbourn Rd - maxLength: 100 + reference_note: + description: A reference note for updating the status of the account. + example: ARM-INT-0001 type: string x-nullable: true - address_line2: - description: Postal address line 2. + sales_contact: + description: Email address of the sales contact. + example: sales@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + x-nullable: true + state: + description: The state part of the postal address. example: ' ' maxLength: 100 type: string x-nullable: true - aliases: - description: An array of aliases. + status: + description: The status of the account. + enum: + - ENROLLING + - ACTIVE + - RESTRICTED + - SUSPENDED + example: ACTIVE + type: string + sub_accounts: + description: List of sub accounts. Not available for developer users. items: - pattern: '[\w\-._]{8,100}' - type: string - maxItems: 10 + $ref: '#/definitions/AccountInfo' type: array x-nullable: true - business_model: - $ref: '#/definitions/BusinessModel' - city: - description: The city part of the postal address. Required for commercial - accounts only. - example: Cambridge - maxLength: 100 - type: string - x-nullable: true - company: - description: The name of the company. Required for commercial accounts only. - example: ARM Holdings Plc - maxLength: 100 - type: string - x-nullable: true - contact: - description: The name of the contact person for this account. Required for - commercial accounts only. - example: J. Doe - maxLength: 100 - type: string - x-nullable: true - contract_number: - description: Contract number of the customer. - type: string - x-nullable: true - country: - description: The country part of the postal address. Required for commercial - accounts only. - example: United Kingdom - maxLength: 100 - type: string - x-nullable: true - custom_fields: - additionalProperties: - type: string - description: Account's custom properties as key-value pairs. - maxItems: 10 - type: object - x-nullable: true - customer_number: - description: Customer number of the customer. - type: string - x-nullable: true - display_name: - description: The display name for the account. - example: ARM - maxLength: 100 - type: string - x-nullable: true - email: - description: The company email address for this account. Required for commercial - accounts only. - example: info@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - end_market: - description: The end market for this account. - example: IT - maxLength: 100 + template_id: + description: Account template ID. + example: 01619571e7160242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string x-nullable: true - expiration_warning_threshold: - description: Indicates how many days before account expiration a notification - email is sent. - maximum: 180 - minimum: 1 - type: integer - x-nullable: true - idle_timeout: - description: The reference token expiration time in minutes for this account. - Between 1 and 120 minutes. - maximum: 120 - minimum: 1 - type: integer - x-nullable: true - mfa_status: - description: The enforcement status of setting up the multi-factor authentication. - 'Enforced' means that setting up the MFA is required after login. 'Optional' - means that the MFA is not required. - enum: - - enforced - - optional + tier: + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' type: string - x-nullable: true - notification_emails: - description: A list of notification email addresses. + tier_history: + description: Tier history for this account. items: - pattern: ^(?=.{3,254}$).+\@.+ - type: string + $ref: '#/definitions/TierHistory' type: array - x-nullable: true - password_policy: - $ref: '#/definitions/PasswordPolicy' - description: Password policy for this account. - x-nullable: true - password_recovery_expiration: - description: Indicates for how many minutes a password recovery email is valid. - format: int32 - maximum: 45 - minimum: 1 - type: integer - x-nullable: true - phone_number: - description: The phone number of a representative of the company. - example: +44 (1223) 400 400 - maxLength: 100 - type: string - x-nullable: true - postal_code: - description: The postal code part of the postal address. - example: CB1 9NJ - maxLength: 100 - type: string - x-nullable: true - sales_contact: - description: Email address of the sales contact. - pattern: ^(?=.{3,254}$).+\@.+ + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string - x-nullable: true - state: - description: The state part of the postal address. - example: ' ' - maxLength: 100 + upgraded_at: + description: Time when upgraded to commercial account in UTC format RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string - x-nullable: true + required: + - end_market + - etag + - id + - object + - status + - tier type: object - ActiveServicePackage: - description: An active service package. + AccountInfoList: properties: - created: - description: Service package creation time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time - type: string - expires: - description: Service package expiration time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - firmware_update_count: - description: Size of firmware update quota of this service package. + data: + description: A list of entities. + items: + $ref: '#/definitions/AccountInfo' + type: array + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return (2-1000), or equal to `total_count`. + example: 50 format: int32 type: integer - grace_period: - description: Indicates whether the service package is in its grace period. - type: boolean - id: - description: ID of this service package. - type: string - modified: - description: Service package latest modified time in RFC3339 date-time with - millisecond accuracy and UTC time zone. - format: date-time - type: string - next_id: - description: Next service package ID if this service package has a pending - renewal, or null. - type: string - previous_id: - description: Previous service package ID or null. + object: + description: 'Entity name: always `list`.' + enum: + - list type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer required: - - id - - created - - modified - - start_time - - expires - - firmware_update_count - - grace_period + - data + - has_more + - limit + - object + - total_count type: object - ActiveSession: - description: Represents an active user session. + AccountLimitation: + description: This object represents an account limitation. properties: - account_id: - description: The UUID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string + billing_period: + description: Billing period of the account limitation. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer created_at: description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - ip_address: - description: IP address of the client. - example: 127.0.0.1 + description: + description: Description of the account limitation. + readOnly: true type: string - login_time: - description: The login time of the user. - example: '2018-02-14T17:52:07Z' - format: date-time + etag: + description: API resource entity version. + example: '1' + readOnly: true type: string - object: - description: 'Entity name: always ''user-session''' - enum: - - user-session + id: + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - reference_token: - description: The reference token. - example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk - type: string - user_agent: - description: User Agent header from the login request. - example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 - (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36 - type: string - required: - - account_id - - ip_address - - login_time - - object - - reference_token - - user_agent - type: object - AggregatedQuotaUsageReport: - description: Aggregated quota usage entry. - properties: - account_id: - type: string - amount: - description: Amount of quota usage entry. Negative if quota consumption. - format: int64 - type: integer - campaign_name: - description: 'Campaign name of quota usage entry. - - Null if quota usage entry type is not `reservation` or `reservation release`.' - type: string - time: - description: Added time of quota usage entry in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time - type: string - type: - description: Type of quota usage entry. - enum: - - reservation - - reservation_release - - reservation_termination - - package_renewal - - package_creation - - package_termination - type: string - required: - - account_id - - amount - - type - - time - type: object - AllServerCredentialsResponseData: - properties: - bootstrap: - $ref: '#/definitions/CredentialsResponseData' - lwm2m: - $ref: '#/definitions/CredentialsResponseData' - type: object - ApiKeyInfoReq: - description: Represents an API key in requests towards Device Management. - properties: - groups: - description: A list of group IDs this API key belongs to. - items: - type: string - type: array - name: - description: The display name for the API key. - maxLength: 100 - type: string - owner: - description: The owner of this API key. + inherited: + description: Flag indicating whether this limitation is inherited. + readOnly: true + type: boolean + inherited_from: + description: Indicates where this limit is inherited from. + readOnly: true type: string - status: - description: The status of the API key. + inherited_type: + description: Indicates the type of the entity where the limitation is inherited + from. enum: - - ACTIVE - - INACTIVE - type: string - required: - - name - type: object - ApiKeyInfoResp: - description: Represents an API key in Device Management. - properties: - account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' - format: date-time - type: string - creation_time: - description: The timestamp of the API key creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - type: integer - etag: - description: API resource entity version. - example: '1' - type: string - groups: - description: A list of group IDs this API key belongs to. - items: - type: string - type: array - id: - description: The ID of the API key. - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - key: - description: The API key. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + - account + - template + - tier_template + readOnly: true type: string - last_login_time: - description: The timestamp of the latest API key usage, in milliseconds. - example: 1518630727688 + inherited_value: + description: Used as default value if parent entity has this limitation defined. + If parent entity does not have such a limitation, the value is null. + properties: + billing_period: + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + limit: + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + quota: + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object + limit: + description: The value of the limit. + example: 25 format: int64 type: integer name: - description: The display name for the API key. - example: API key gorgon - maxLength: 100 + description: Name of the account limitation. + example: iam_limit_user_count type: string object: - description: 'Entity name: always ''api-key''' - enum: - - api-key - type: string - owner: - description: The owner of this API key, who is the creator by default. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - status: - description: The status of the API key. + description: 'Entity name: always ''limitation''' enum: - - ACTIVE - - INACTIVE - example: ACTIVE + - limitation + readOnly: true type: string + quota: + description: Quota of the account limitation. + example: 0 + format: int64 + type: integer updated_at: description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string - required: - - etag - - id - - key - - name - - object type: object - ApiKeyInfoRespList: + AccountLimitationList: properties: after: - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' type: string data: description: A list of entities. items: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/AccountLimitation' type: array has_more: - description: Flag indicating whether there are more results. + description: Flag indicating whether there is more results. example: false type: boolean limit: - description: The number of results to return, or equal to `total_count`. + description: 'The number of results to return, (range: 2-1000), or equals + to `total_count`' example: 50 format: int32 type: integer object: - description: 'Entity name: always `list`.' + description: 'Entity name: always ''list''' enum: - list type: string @@ -1145,7 +1014,8 @@ definitions: - DESC type: string total_count: - description: The total number of records, if requested. + description: The total number or records, if requested. It might be returned + also for small lists. example: 20 format: int32 type: integer @@ -1156,1911 +1026,2039 @@ definitions: - object - total_count type: object - ApiKeyUpdateReq: - description: Represents an API key in requests towards Device Management. + AccountResponse: + description: This object represents an account in responses. properties: - groups: - description: A list of group IDs this API key belongs to. + alias: + description: Alias of the account. + example: cust-314159 + readOnly: true + type: string + display_name: + description: The display name for the account. + example: Customer 3.14159 + readOnly: true + type: string + id: + description: The UUID of the account. + example: 01619571e2e90242ac12000600000000 + readOnly: true + type: string + login_profiles: + description: A list of login profiles for the user in the account. items: - type: string + $ref: '#/definitions/LoginProfile' type: array - name: - description: The display name for the API key. - maxLength: 100 - type: string - owner: - description: The owner of this API key. + x-nullable: true + parent_id: + description: The UUID of the parent account, if it has any. + example: 01619571f3c00242ac12000600000000 + readOnly: true type: string status: - description: The status of the API key. + description: The status of the account. enum: + - ENROLLING - ACTIVE - - INACTIVE + - RESTRICTED + - SUSPENDED + example: ACTIVE + readOnly: true type: string - required: - - name type: object - AsyncID: + AccountResponseList: properties: - async-response-id: - description: Asynchronous response unique ID. - example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e + after: + description: The entity ID to fetch after the given one. + example: 01619571f3c00242ac12000600000000 + readOnly: true type: string - type: object - AsyncIDResponse: - properties: - ct: - description: The content type. - example: text/plain + data: + description: A list of entities. + items: + $ref: '#/definitions/AccountResponse' + readOnly: true + type: array + has_more: + description: Flag indicating whether there is more results. + example: false + readOnly: true + type: boolean + limit: + description: 'The number of results to return, (range: 2-1000), or equals + to `total_count`' + example: 50 + format: int32 + readOnly: true + type: integer + object: + description: 'Entity name: always ''list''' + enum: + - list + readOnly: true type: string - error: - description: 'An optional error message describing the error. Please refer - to status listing above. - - ' - example: TIMEOUT - type: string - id: - description: The unique ID of the asynchronous response. - example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e - type: string - max-age: - description: Determines how long this value stays valid in the cache, in seconds. - 0 means that the value is not stored in the cache. - example: 60 - type: string - payload: - description: Requested data, base64 encoded. - example: My4zMQ== + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC + readOnly: true type: string - status: - description: "\nStates whether sending a command to the device succeeded or\ - \ failed.\n\n\n \n \n \n \n\ - \ \n \n \n \n \n\ - \ \n \n \n \n\ - \ \n \n\ - \ \n \n \n\ - \ \n \n \n \n \n\ - \ \n \n \n \n \n \n \ - \ \n \n \n \n\ - \ \n \n\ - \ \n \n \n \n \n \n\ - \ \n \n \n
CodeDescription
200Operation succeeded. The playload contains result of the operation\ - \ from the device.
404Endpoint does not have requested resource.
412Precondition failed and\ - \ operation was not executed. Device responded with 4.12 CoAP response code.
413Request entity\ - \ is too large and could not be delivered to the device.
415Endpoint does not support\ - \ media type.
429Expired request was removed from queue (REQUEST_EXPIRED), device\ - \ requested deregistration (DEVICE_REMOVED_REGISTRATION), or device was\ - \ suspended (DEVICE_BLOCKED).
502Request to the device failed and retry count exceeded. Last retry\ - \ failed to establish TCP or TLS connection to endpoint.
503Request to the device failed\ - \ and retry count exceeded. Last retry failed because endpoint is currently\ - \ unavailable (NOT_CONNECTED).
504Request to the device failed and retry count exceeded. Last retry\ - \ failed, as device did not respond in the time of protocol-specific retransmission\ - \ logic (TIMEOUT).
\n" - example: 200 + total_count: + description: The total number or records, if requested. It might be returned + also for small lists. + example: 5 + format: int32 + readOnly: true type: integer type: object - BadRequestErrorResponse: - description: 400 Bad request response. + AccountUpdateReq: + description: Represents an account creation request. properties: - code: - description: Response code. Always set to 400. - enum: - - 400 - type: integer - fields: + address_line1: + description: Postal address line 1. Required for commercial accounts only. + example: 110 Fulbourn Rd + maxLength: 100 + type: string + x-nullable: true + address_line2: + description: Postal address line 2. + example: ' ' + maxLength: 100 + type: string + x-nullable: true + aliases: + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. items: - $ref: '#/definitions/BadRequestErrorResponseField' + pattern: '[\w\-._]{8,100}' + type: string + maxItems: 10 type: array - message: - description: A human-readable message with detailed info. + x-nullable: true + city: + description: The city part of the postal address. Required for commercial + accounts only. + example: Cambridge + maxLength: 100 type: string - object: - description: Always set to `error`. - enum: - - error + x-nullable: true + company: + description: The name of the company used in billing. Required for commercial + accounts only. + example: ARM Holdings Plc + maxLength: 100 type: string - request_id: - description: Request ID. + x-nullable: true + contact: + description: The name of the contact person for this account. Required for + commercial accounts only. + example: J. Doe + maxLength: 100 type: string - type: - description: Error type. Always set to `validation_error`. - enum: - - validation_error + x-nullable: true + country: + description: The country part of the postal address. Required for commercial + accounts only. + example: United Kingdom + maxLength: 100 type: string - required: - - object - - message - - request_id - - type - - code - - fields - type: object - BadRequestErrorResponseField: - description: Single field that failed validation. - properties: - message: - description: A human-readable message with detailed validation error. + x-nullable: true + custom_fields: + additionalProperties: + type: string + description: Account's custom properties as key-value pairs. + maxItems: 10 + type: object + x-nullable: true + display_name: + description: The display name for the tenant account. + example: ARM + maxLength: 100 type: string - name: - description: Name of the field that failed validation. If name is set to `body,` - then the validation failed on request body. + x-nullable: true + email: + description: The company email address for this account. Required for commercial + accounts only. + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ type: string - required: - - name - - message - type: object - BillingReportRawDataResponse: - description: The response includes the URL to download raw billing data. - properties: - filename: - description: The filename of the raw billing data file to download. Contains - file extensions. + x-nullable: true + end_market: + description: The end market for this account. + example: IT + maxLength: 100 type: string - object: - description: API Resource name. + x-nullable: true + expiration_warning_threshold: + description: Indicates how many days before account expiration a notification + email is sent. + maximum: 180 + minimum: 1 + type: integer + x-nullable: true + idle_timeout: + description: Reference token expiration time in minutes. + maximum: 120 + minimum: 1 + type: integer + x-nullable: true + mfa_status: + description: The enforcement status of multi-factor authentication, either + `enforced` or `optional`. + enum: + - enforced + - optional type: string - url: - description: The URL to download raw billing data. + x-nullable: true + notification_emails: + description: A list of notification email addresses. + items: + pattern: ^(?=.{3,254}$).+\@.+ + type: string + type: array + x-nullable: true + password_policy: + $ref: '#/definitions/PasswordPolicy' + description: Password policy for this account. + x-nullable: true + password_recovery_expiration: + description: Indicates for how many minutes a password recovery email is valid. + format: int32 + maximum: 45 + minimum: 1 + type: integer + x-nullable: true + phone_number: + description: The phone number of a representative of the company. + example: +44 (1223) 400 400 + maxLength: 100 type: string - required: - - object - - url - - filename + x-nullable: true + postal_code: + description: The postal code part of the postal address. + example: CB1 9NJ + maxLength: 100 + type: string + x-nullable: true + state: + description: The state part of the postal address. + example: ' ' + maxLength: 100 + type: string + x-nullable: true type: object - BlackListedDeviceData: + AccountUpdateRootReq: + description: Represents an account update request. properties: - account_id: - description: account id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + address_line1: + description: Postal address line 1. Required for commercial accounts only. + example: 110 Fulbourn Rd + maxLength: 100 type: string - created_at: - description: date on which the failed bootstrap was attempted on - example: '2000-01-23T04:56:07.000+00:00' - format: date-time + x-nullable: true + address_line2: + description: Postal address line 2. + example: ' ' + maxLength: 100 type: string - endpoint_name: - description: endpoint name - example: Endpoint_1234 + x-nullable: true + aliases: + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. + items: + pattern: '[\w\-._]{8,100}' + type: string + maxItems: 10 + type: array + x-nullable: true + business_model: + $ref: '#/definitions/BusinessModel' + city: + description: The city part of the postal address. Required for commercial + accounts only. + example: Cambridge + maxLength: 100 type: string - id: - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' + x-nullable: true + company: + description: The name of the company used in billing. Required for commercial + accounts only. + example: ARM Holdings Plc + maxLength: 100 type: string - object: - enum: - - denied_device + x-nullable: true + contact: + description: The name of the contact person for this account. Required for + commercial accounts only. + example: J. Doe + maxLength: 100 type: string - trusted_certificate_id: - description: Trusted certificate id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + x-nullable: true + contract_number: + description: Contract number of the customer. An administrator can set this + property on tenant accounts only. type: string - required: - - id - - account_id - - endpoint_name - - trusted_certificate_id - - created_at - - object - BrandingColor: - properties: - color: - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' + x-nullable: true + country: + description: The country part of the postal address. Required for commercial + accounts only. + example: United Kingdom + maxLength: 100 type: string x-nullable: true - object: - description: 'Entity name: always ''branding_color''' - enum: - - branding_color - readOnly: true + custom_fields: + additionalProperties: + type: string + description: Account's custom properties as key-value pairs. + maxItems: 10 + type: object + x-nullable: true + customer_number: + description: Customer number of the customer. An administrator can set this + property on tenant accounts only. type: string - reference: - description: Color name. - enum: &id020 - - error_color - - primary - - secondary - - success_color - - warning_color - - canvas_background - - canvas_background_font_color - - workspace_background - - workspace_background_font_color - - info_color - - info_font_color - - primary_font_color - - secondary_font_color - - error_font_color - - success_font_color - - warning_font_color + x-nullable: true + display_name: + description: The display name for the tenant account. + example: ARM + maxLength: 100 type: string - updated_at: - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + x-nullable: true + email: + description: The company email address for this account. Required for commercial + accounts only. + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ type: string - type: object - BrandingColorList: - properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + x-nullable: true + end_market: + description: The end market for this account. + example: IT + maxLength: 100 type: string - data: - description: A list of entities. - items: - $ref: '#/definitions/BrandingColor' - type: array - has_more: - description: Flag indicating whether there are more results. - example: false - type: boolean - limit: - description: The number of results to return, or equal to `total_count`. - example: 50 - format: int32 + x-nullable: true + expiration_warning_threshold: + description: Indicates how many days before account expiration a notification + email is sent. + maximum: 180 + minimum: 1 type: integer - object: - description: 'Entity name: always `list`.' - enum: - - list - type: string - order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' + x-nullable: true + idle_timeout: + description: The reference token expiration time in minutes for this account. + Between 1 and 120 minutes. + maximum: 120 + minimum: 1 + type: integer + x-nullable: true + mfa_status: + description: The enforcement status of setting up the multi-factor authentication. + 'Enforced' means that setting up the MFA is required after login. 'Optional' + means that the MFA is not required. enum: - - ASC - - DESC + - enforced + - optional type: string - total_count: - description: The total number of records, if requested. - example: 20 + x-nullable: true + notification_emails: + description: A list of notification email addresses. + items: + pattern: ^(?=.{3,254}$).+\@.+ + type: string + type: array + x-nullable: true + password_policy: + $ref: '#/definitions/PasswordPolicy' + description: Password policy for this account. + x-nullable: true + password_recovery_expiration: + description: Indicates for how many minutes a password recovery email is valid. format: int32 + maximum: 45 + minimum: 1 type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - BrandingImage: - properties: - object: - description: 'Entity name: always ''branding_image''' - enum: - - branding_image - readOnly: true + x-nullable: true + phone_number: + description: The phone number of a representative of the company. + example: +44 (1223) 400 400 + maxLength: 100 type: string - reference: - description: Name of the image. - enum: &id021 - - brand_logo_portrait - - brand_logo_square - - brand_logo_landscape - - brand_logo_email - - desktop_background_landscape - - desktop_background_square - - desktop_background_portrait - - carousel_image_portrait_0 - - carousel_image_portrait_1 - - carousel_image_portrait_2 - - carousel_image_portrait_3 - - carousel_image_portrait_4 - - carousel_image_portrait_5 - - carousel_image_portrait_6 - - carousel_image_portrait_7 - - carousel_image_portrait_8 - - carousel_image_portrait_9 - - carousel_image_square_0 - - carousel_image_square_1 - - carousel_image_square_2 - - carousel_image_square_3 - - carousel_image_square_4 - - carousel_image_square_5 - - carousel_image_square_6 - - carousel_image_square_7 - - carousel_image_square_8 - - carousel_image_square_9 - - carousel_image_landscape_0 - - carousel_image_landscape_1 - - carousel_image_landscape_2 - - carousel_image_landscape_3 - - carousel_image_landscape_4 - - carousel_image_landscape_5 - - carousel_image_landscape_6 - - carousel_image_landscape_7 - - carousel_image_landscape_8 - - carousel_image_landscape_9 + x-nullable: true + postal_code: + description: The postal code part of the postal address. + example: CB1 9NJ + maxLength: 100 type: string - static_uri: - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true + x-nullable: true + sales_contact: + description: Email address of the sales contact. + pattern: ^(?=.{3,254}$).+\@.+ type: string - updated_at: - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + x-nullable: true + state: + description: The state part of the postal address. + example: ' ' + maxLength: 100 type: string + x-nullable: true type: object - BrandingImageList: + ActiveDevicesCounter: + description: Active device count is the total number of unique active devices + connected to Device Management. A device is considered active when it has registered + at least once over a billing period. + format: int64 + minimum: 0 + type: integer + ActiveServicePackage: + description: An active service package. properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + created: + description: Service package creation time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - data: - description: A list of entities. - items: - $ref: '#/definitions/BrandingImage' - type: array - has_more: - description: Flag indicating whether there are more results. - example: false - type: boolean - limit: - description: The number of results to return, or equal to `total_count`. - example: 50 + expires: + description: Service package expiration time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time + type: string + firmware_update_count: + description: Size of firmware update quota of this service package. format: int32 type: integer - object: - description: 'Entity name: always `list`.' - enum: - - list + grace_period: + description: Indicates whether the service package is in its grace period. + type: boolean + id: + description: ID of this service package. type: string - order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC + modified: + description: Service package latest modified time in RFC3339 date-time with + millisecond accuracy and UTC time zone. + format: date-time + type: string + next_id: + description: Next service package ID if this service package has a pending + renewal, or null. + type: string + previous_id: + description: Previous service package ID or null. + type: string + start_time: + description: Service package start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - total_count: - description: The total number of records, if requested. - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit - - object - - total_count + - id + - created + - modified + - start_time + - expires + - firmware_update_count + - grace_period type: object - BulkResponse: + ActiveSession: + description: Represents an active user session. properties: account_id: - description: ID - example: 00005a4e027f0a580a01081c00000000 + description: The UUID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - completed_at: - description: 'The time the bulk creation task was completed. - - Null when creating bulk upload or delete.' + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string - created_at: - description: The time of receiving the bulk creation task. + ip_address: + description: IP address of the client. + example: 127.0.0.1 + type: string + login_time: + description: The login time of the user. + example: '2018-02-14T17:52:07Z' format: date-time type: string - errors_count: - description: The number of enrollment identities with failed processing. - example: 0 - type: integer - errors_report_file: - description: 'Link to error report file. - - Null when creating bulk upload or delete.' - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv + object: + description: 'Entity name: always ''user-session''' + enum: + - user-session type: string - etag: - description: etag - example: '1' - pattern: '[A-Za-z0-9]{0,256}' + reference_token: + description: The reference token. + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk type: string - full_report_file: - description: 'Link to full report file. + user_agent: + description: User Agent header from the login request. + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36 + type: string + required: + - account_id + - ip_address + - login_time + - object + - reference_token + - user_agent + type: object + AggregatedQuotaUsageReport: + description: Aggregated quota usage entry. + properties: + account_id: + type: string + amount: + description: Amount of quota usage entry. Negative if quota consumption. + format: int64 + type: integer + campaign_name: + description: 'Campaign name of quota usage entry. - Null when creating bulk upload or delete.' - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv + Null if quota usage entry type is not `reservation` or `reservation release`.' type: string - id: - description: Bulk ID - pattern: ^[A-Za-z0-9]{32} + time: + description: Added time of quota usage entry in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - object: + type: + description: Type of quota usage entry. enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + - reservation + - reservation_release + - reservation_termination + - package_renewal + - package_creation + - package_termination + - package_tokens_edit type: string - processed_count: - description: The number of enrollment identities processed until now. - example: 0 - type: integer - status: - default: new - description: The state of the process is 'new' at the time of creation. If - creation is still in progress, the state shows as 'processing'. When the - request is fully processed, the state changes to 'completed'. - enum: - - new - - processing - - completed - example: new - total_count: - description: Total number of enrollment identities found in the input CSV. - example: 10 - type: integer required: - - object - - id - - etag - - created_at - account_id - - status - - total_count - - processed_count - - errors_count - - completet_at - - full_report_file - - errors_report_file + - amount + - type + - time type: object - BusinessModel: - default: active_device_business_model - description: Business model for this account. Manageable by the root admin only. - enum: - - active_device_business_model - - api_calls_1_business_model - example: api_calls_1_business_model - type: string - BusinessModelHistory: + AllServerCredentialsResponseData: properties: - business_model: - $ref: '#/definitions/BusinessModel' - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string + bootstrap: + $ref: '#/definitions/CredentialsResponseData' + lwm2m: + $ref: '#/definitions/CredentialsResponseData' type: object - CampaignDeviceMetadata: + ApiKeyInfoReq: + description: Represents an API key in requests towards Device Management. properties: - campaign: - description: The device's campaign ID. - example: 015bf72fccda00000000000100100280 + groups: + description: 'A list of group IDs this API key belongs to. + + Adding an API key to the ''Administrators'' group is restricted to administrators.' + items: + type: string + type: array + name: + description: The display name for the API key. + maxLength: 100 type: string - created_at: &id013 - description: The time the entity was created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + owner: + description: The owner of this API key. Only an administrator can set the + owner of an API key. type: string - deployment_state: - description: The state of the update campaign on the device. + status: + description: The status of the API key. Only an administrator can set the + status of an API key. enum: - - pending - - updated_connector_channel - - failed_connector_channel_update - - deployed - - manifestremoved - - deregistered + - ACTIVE + - INACTIVE type: string - description: - description: Description. - example: a description - maxLength: 2000 + required: + - name + type: object + ApiKeyInfoResp: + description: Represents an API key in Device Management. + properties: + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - device_id: - description: The device ID. - example: 015c2fec9bba0000000000010010036f + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time type: string - etag: &id014 + creation_time: + description: The timestamp of the API key creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + etag: description: API resource entity version. - example: '2017-05-22T12:37:58.753425Z' + example: '1' type: string + groups: + description: A list of group IDs this API key belongs to. + items: + type: string + type: array id: - description: The metadata record ID. - example: 015c3029f6f7000000000001001000c3 - type: string - mechanism: - description: How the firmware is delivered (connector or direct). - example: connector + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - mechanism_url: - description: The Device Management Connect URL. + key: + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 type: string + last_login_time: + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + type: integer name: - default: default_object_name - description: The record name. - maxLength: 128 + description: The display name for the API key. + example: API key gorgon + maxLength: 100 type: string object: - description: 'The entity name: always ''update-campaign-device-metadata''.' + description: 'Entity name: always ''api-key''' + enum: + - api-key type: string - updated_at: &id015 - description: The time the entity was updated. - example: '2017-05-22T12:37:55.576563Z' + owner: + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + status: + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' format: date-time type: string + required: + - etag + - id + - key + - name + - object type: object - CampaignDeviceMetadataPage: + ApiKeyInfoRespList: properties: after: - description: The entity ID to fetch after the given one. - example: 'null' + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string data: description: A list of entities. items: - $ref: '#/definitions/CampaignDeviceMetadata' + $ref: '#/definitions/ApiKeyInfoResp' type: array has_more: - description: A flag indicating whether there are more results. - example: 'false' + description: Flag indicating whether there are more results. + example: false type: boolean limit: - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. - example: '50' - maximum: 1000 - minimum: 2 + description: The number of results to return, or equal to `total_count`. + example: 50 + format: int32 type: integer object: - description: 'The entity name: always ''list''.' + description: 'Entity name: always `list`.' + enum: + - list type: string order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' enum: - ASC - DESC - example: ASC type: string total_count: - description: The total number or records, if requested. It may be returned - also for small lists. - example: '1' + description: The total number of records, if requested. + example: 20 + format: int32 type: integer + required: + - data + - has_more + - limit + - object + - total_count type: object - CampaignMetrics: + ApiKeyUpdateReq: + description: Represents an API key in requests towards Device Management. properties: - created_at: - description: The time the metrics were created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + groups: + description: A list of group IDs this API key belongs to. Only an administrator + can update the group membership of an API key. + items: + type: string + type: array + name: + description: The display name for the API key. + maxLength: 100 type: string - failed_count: - description: Running total of devices that could not be updated. - example: '0' - format: int32 - type: integer - object: - description: 'Entity name: always ''update-campaign-metrics''.' + owner: + description: The owner of this API key. Only an administrator can update the + owner of an API key. + type: string + status: + description: The status of the API key. Only the owner of the API key or an + administrator can update the status of an API key. + enum: + - ACTIVE + - INACTIVE type: string - pending_count: - description: Running total of devices that have yet to receive an update or - are applying an update. - example: '5' - format: int32 - type: integer - skipped_count: - description: Running total of devices that were skipped. - example: '5' - format: int32 - type: integer - success_count: - description: Running total of successfully updated devices. - example: '90' - format: int32 - type: integer - total_count: - description: Number of devices in the campaign. - example: '100' - format: int32 - type: integer type: object - CertificateEnrollment: + Application: + description: Represents an application in Device Management. properties: - certificate_name: - description: The certificate name. - example: customer.dlms - maxLength: 50 + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true type: string created_at: description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + example: '2020-02-18T09:16:40Z' format: date-time + readOnly: true type: string - device_id: - description: The device ID. - example: 01625daa23230a580a0100bd00000000 - type: string - enroll_result: - description: The result of certificate enrollment request. - enum: - - success - - failure - example: success - type: string - enroll_result_detail: - description: Additional information in case of failure. - example: The device is currently processing too many certificate renewals. - type: string - enroll_status: - description: The status of certificate enrollment request. - enum: - - new - - completed + description: + description: The description of the application. + example: Application to control the warp drive + maxLength: 500 type: string etag: - description: Entity instance signature. + description: API resource entity version. example: '1' + readOnly: true type: string + groups: + description: A list of group IDs this application belongs to. + items: + example: 01705c6383f6c85b76f92f4e00000000 + type: string + type: array id: - description: The certificate enrollment ID. - example: 01612df56f3b0a580a010fc700000000 + description: The ID of the application. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + type: string + last_used_at: + description: The time of the latest application usage. + example: '2020-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + name: + description: The display name for the application. + example: Application warp + maxLength: 100 type: string object: + description: 'Entity name: always ''application''' enum: - - certificate-enrollment + - application + readOnly: true + type: string + status: + description: The status of the application. When admin sets the application + as inactive all related data and configurations are cleared from the system. + If application is activated again, client must open new channels and set + new subscriptions to start receiving events again. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE type: string updated_at: - description: Update UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + description: Last update UTC time RFC3339. + example: '2020-02-19T11:54:32Z' format: date-time + readOnly: true type: string required: - - created_at - - etag - - id - - device_id - - certificate_name + - name type: object - CertificateEnrollmentListResponse: + ApplicationList: properties: after: - description: The entity ID to fetch after the given one. - example: 01625daa23230a580a0100bd00000000 + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string data: - description: List of certificate enrollments. + description: A list of entities. items: - $ref: '#/definitions/CertificateEnrollment' + $ref: '#/definitions/Application' type: array has_more: description: Flag indicating whether there are more results. + example: false type: boolean limit: - description: The number of results to return. + description: The number of results to return, or equal to `total_count`. + example: 50 format: int32 type: integer object: - description: Describes the type of objects in the list. + description: 'Entity name: always `list`.' enum: - list type: string order: - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' enum: - ASC - DESC type: string total_count: - description: The total number of records. + description: The total number of records, if requested. + example: 20 format: int32 type: integer + required: + - data + - has_more + - limit + - object + - total_count type: object - CertificateGenerationReq: - description: Generate a new service provider certificate. + ArchiveInfoResponse: + description: This object represents the response for the archive info request. properties: - algorithm: - description: The algorithm and its key size used for generating the certificate. - Defaults to RSA2048. - enum: - - RSA2048 - - RSA3072 - - EC224 - - EC256 - - EC384 - - EC521 - - ECDSA224 - - ECDSA256 - - ECDSA384 - - ECDSA521 - type: string - validity: - description: Validity for the certificate in days. - format: int32 + download_size_bytes: + description: The size of the archive file in bytes. + example: 2402668 type: integer - type: object - CertificateIssuerConfigListResponse: - properties: - after: &id001 - description: An offset token for current page. - example: '01631667477600000000000100100374' + download_url: + description: URL to download the Factory Configurator Utility archive. + example: https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip type: string - data: - description: List of certificate issuers. - items: - $ref: '#/definitions/CertificateIssuerConfigResponse' - type: array - has_more: &id002 - description: Are there more results available. - example: false - type: boolean - limit: &id003 - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. - example: 50 - maximum: 1000 - minimum: 2 - type: integer - object: &id004 - description: The type of this API object is a `list`. - example: list + license_type: + description: The license agreement type required for downloading Factory Configurator + Utility. + example: fcu type: string - order: &id005 - description: The creation time based order of the entries. - example: DESC + license_version: + description: The license agreement version required for downloading Factory + Configurator Utility. + example: '1.0' type: string - total_count: &id006 - example: 1 - format: integer - type: integer + release_notes_url: + description: URL to the Factory Configurator Utility release notes. + example: https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes + type: string + version: + description: The Factory Configurator Utility version. + example: 1.2.9.500 + type: string + required: + - download_size_bytes + - version + - download_url + - release_notes_url type: object - CertificateIssuerConfigRequest: + AsyncID: properties: - certificate_issuer_id: - description: 'Certificate issuer ID. - - For LwM2M, may be null if Device Management internal certificate issuer - is used.' - example: 01648415a2a30242ac18000500000000 + async-response-id: + description: Asynchronous response unique ID. + example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e type: string - x-nullable: true type: object - CertificateIssuerConfigResponse: + AsyncIDResponse: properties: - certificate_issuer_id: - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. - - ' - example: 01648415a2a30242ac18000500000000 - type: string - x-nullable: true - created_at: - description: Created UTC time RFC3339. - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - etag: - description: Entity instance signature. - example: '1' + ct: + description: The content type. + example: text/plain type: string - id: - description: 'The ID of the certificate issuer configuration. + error: + description: 'An optional error message describing the error. Please refer + to status listing above. ' - example: 01648415a2a30242ac18000500000000 + example: TIMEOUT type: string - is_custom: - example: true - type: boolean - object: - enum: - - certificate-issuer-configuration + id: + description: The unique ID of the asynchronous response. + example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e type: string - reference: - description: The certificate name to which the certificate issuer configuration - applies. - example: customer.dlms + max-age: + description: Determines how long this value stays valid in the cache, in seconds. + 0 means that the value is not stored in the cache. + example: 60 type: string - updated_at: - description: Updated UTC time RFC3339. - example: '2017-02-01T00:00:00Z' - format: date-time + payload: + description: Requested data, base64 encoded. + example: My4zMQ== type: string + status: + description: "\nStates whether sending a command to the device succeeded or\ + \ failed.\n\n\n \n \n \n \n\ + \ \n \n \n \n \n\ + \ \n \n \n \n\ + \ \n\ + \ \n \n \n \n \n \n\ + \ \n \n \n \n \n \n \ + \ \n \n \n \n \n \n\ + \ \n \n \n \n \n\ + \ \n\ + \ \n \n \n \n\ + \ \n \n \n \n \n \n
CodeDescription
200Operation succeeded. The payload contains result of the operation\ + \ from the device.
400The device rejected the request, possibly because it does not\ + \ support the request method.\n See how the supported methods are\n\ + \ [configured for the device resources](https://developer.pelion.com/docs/device-management/current/resources/index.html).
404The device replied\ + \ that it does not have the requested resource.
412Precondition failed and the operation\ + \ was not executed. The device responded with 4.12 CoAP\n response\ + \ code. The device may reject a subscription request with this response\ + \ code.
413Request\ + \ entity is too large and could not be delivered to the device.
415The device does\ + \ not support the media type in the request.
429An expired request was removed from\ + \ queue (REQUEST_EXPIRED),\n the device requested deregistration (DEVICE_REMOVED_REGISTRATION),\n\ + \ or the device was suspended (DEVICE_BLOCKED). The request was never\ + \ delivered to the device.
502The request to the device failed and the retry count was exceeded.\n\ + \ The last retry failed to establish TCP or TLS connection to the device.
503The request to\ + \ the device failed and the retry count was exceeded.\n The last retry\ + \ failed because the device is currently unavailable (NOT_CONNECTED).
504The request to\ + \ the device failed and the retry count was exceeded.\n The last retry\ + \ failed because the device did not respond in time according to the protocol-specific\n\ + \ retransmission logic (TIMEOUT).
\n" + example: 200 + type: integer type: object - CertificateIssuerInfo: + AudienceItem: + description: Audience item, device ID or endpoint name. + pattern: ^ep:[a-zA-Z0-9 -]{1,57}$|^id:[0-9a-fA-F]{32}$ + type: string + BadRequestErrorResponse: + description: 400 Bad request response. properties: - created_at: - description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - description: - description: General description for the certificate issuer. - example: GlobalSign sample issuer - maxLength: 100 - type: string - x-nullable: true - etag: - description: Entity instance signature. - example: '1' - type: string - id: - description: The ID of the certificate issuer. - example: 01234567890ABCDEF01234567890ABCDEF + code: + description: Response code. Always set to 400. + enum: + - 400 + type: integer + fields: + items: + $ref: '#/definitions/BadRequestErrorResponseField' + type: array + message: + description: A human-readable message with detailed info. type: string - issuer_attributes: - additionalProperties: &id007 - type: string - description: 'General attributes for connecting the certificate issuer. - - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - - ' - example: &id008 {} - type: object - issuer_type: - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" + object: + description: Always set to `error`. enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN + - error type: string - name: - description: Certificate issuer name, unique per account. - example: GS Issuer - maxLength: 50 + request_id: + description: Request ID. type: string - object: + type: + description: Error type. Always set to `validation_error`. enum: - - certificate-issuer + - validation_error type: string required: - - issuer_type + - object + - message + - request_id + - type + - code + - fields type: object - CertificateIssuerInfoListResponse: + BadRequestErrorResponseField: + description: Single field that failed validation. properties: - after: *id001 - data: - description: List of certificate issuers. - items: - $ref: '#/definitions/CertificateIssuerInfo' - type: array - has_more: *id002 - limit: *id003 - object: *id004 - order: *id005 - total_count: *id006 + message: + description: A human-readable message with detailed validation error. + type: string + name: + description: Name of the field that failed validation. If name is set to `body,` + then the validation failed on request body. + type: string + required: + - name + - message type: object - CertificateIssuerRequest: - example: - description: Sample GlobalSign certificate issuer. - issuer_attributes: null - issuer_credentials: - api_key: e510e289e6cd8947 - api_secret: a477a8393d17a55ecb2ba6a61f58feb84770b621 - client_certificate: '"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END - CERTIFICATE-----" - - ' - passphrase: helloworld - private_key: '"-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: - DES-EDE3-CBC,CCAC26A4133947CB\n\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\n-----END - RSA PRIVATE KEY-----"' - issuer_type: GLOBAL_SIGN - name: GS Issuer + BillingReportRawDataResponse: + description: The response includes the URL to download raw billing data. properties: - description: - description: General description of the certificate issuer. - maxLength: 100 + filename: + description: The filename of the raw billing data file to download. Contains + file extensions. type: string - x-nullable: true - issuer_attributes: - additionalProperties: *id007 - description: 'General attributes for connecting the certificate issuer. - - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - - ' - example: *id008 - type: object - issuer_credentials: - additionalProperties: &id009 - type: string - description: 'The credentials required for connecting to the certificate issuer. - - When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. - - ' - example: &id010 {} - type: object - issuer_type: - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" - enum: - - GLOBAL_SIGN - - CFSSL_AUTH + object: + description: API Resource name. type: string - name: - description: Certificate issuer name, unique per account. - maxLength: 50 + url: + description: The URL to download raw billing data. type: string required: - - name - - issuer_type - - issuer_credentials + - object + - url + - filename type: object - CertificateIssuerUpdateRequest: - example: - description: Sample GlobalSign certificate issuer - updated. - name: GlobalSign Issuer + BootstrapRequestsCounter: + description: The number of bootstrap requests received from devices. + format: int64 + minimum: 0 + type: integer + BootstrapsCounter: + description: The total number of successful bootstrap operations in the requested + time. + format: int64 + minimum: 0 + type: integer + BrandingColor: properties: - description: - description: General description of the certificate issuer. - maxLength: 100 + color: + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' type: string x-nullable: true - issuer_attributes: - additionalProperties: *id007 - description: 'General attributes for connecting the certificate issuer. - - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - - ' - example: *id008 - type: object - issuer_credentials: - additionalProperties: *id009 - description: 'The credentials required for connecting to the certificate issuer. - - When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. - - ' - example: *id010 - type: object - name: - description: Certificate issuer name. - maxLength: 50 + object: + description: 'Entity name: always ''branding_color''' + enum: + - branding_color + readOnly: true + type: string + reference: + description: Color name. + enum: &id001 + - error_color + - primary + - secondary + - success_color + - warning_color + - canvas_background + - canvas_background_font_color + - workspace_background + - workspace_background_font_color + - info_color + - info_font_color + - primary_font_color + - secondary_font_color + - error_font_color + - success_font_color + - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color + type: string + updated_at: + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true type: string type: object - CertificateIssuerVerifyResponse: + BrandingColorList: properties: - message: - description: 'Provides details in case of failure. - - ' - example: message describing the verification failure + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - successful: - description: 'Indicates whether the certificate issuer was verified successfully. - - ' + data: + description: A list of entities. + items: + $ref: '#/definitions/BrandingColor' + type: array + has_more: + description: Flag indicating whether there are more results. example: false type: boolean - type: object - CfsslAttributes: - description: 'Describes the attributes required to connect to the CFSSL server. - - ' - properties: - cfssl_label: - description: 'The label that is used by CFSSL when creating the certificate. - - ' - type: string - cfssl_profile: - description: 'The profile that is configured on the CFSSL server and is used - by CFSSL when creating the certificate. - - ' - type: string - host_url: - description: 'The URL to connect to the CFSSL server. - - ' - type: string - required: - - host_url - type: object - CfsslAuthCredentials: - description: 'Describes the credentials required when using CFSSL authenticated - signing. - - ' - properties: - hmac_hex_key: - description: 'The key that is used to compute the HMAC of the request using - the HMAC-SHA-256 algorithm. - - Must contain an even number of hexadecimal characters. - - ' - example: 0010203ABCD708EF - maxLength: 64 - pattern: ^([a-fA-F0-9][a-fA-F0-9]){1,32}$ + limit: + description: The number of results to return, or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list type: string - required: - - hmac_hex_key - type: object - ChannelMetadata: - properties: - delivery_mechanism: - description: Channel delivery mechanism. + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' enum: - - CALLBACK - - LONG_POLLING - - WEB_SOCKET - example: CALLBACK + - ASC + - DESC type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count type: object - CreateCertificateIssuerConfig: + BrandingColorUpdate: properties: - certificate_issuer_id: - description: 'The ID of the certificate issuer. - - ' - example: 01648415a2a30242ac18000500000000 - maxLength: 32 + color: + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' type: string x-nullable: true reference: - description: 'The certificate name, as created in the factory, to which the - certificate issuer configuration applies. - - The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP. - - ' - example: customer.dlms - maxLength: 100 - pattern: (?!mbed\.)[\w-_.]{1,100} + description: Color name. + enum: *id001 type: string required: - reference - - certificate_issuer_id type: object - CredentialsResponseData: + BrandingImage: properties: - certificate: - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. + object: + description: 'Entity name: always ''branding_image''' + enum: + - branding_image + readOnly: true type: string - url: - description: Server URI that the client connects to. + reference: + description: Name of the image. + enum: &id026 + - brand_logo_portrait + - brand_logo_square + - brand_logo_landscape + - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square + - desktop_background_landscape + - desktop_background_square + - desktop_background_portrait + - carousel_image_portrait_0 + - carousel_image_portrait_1 + - carousel_image_portrait_2 + - carousel_image_portrait_3 + - carousel_image_portrait_4 + - carousel_image_portrait_5 + - carousel_image_portrait_6 + - carousel_image_portrait_7 + - carousel_image_portrait_8 + - carousel_image_portrait_9 + - carousel_image_square_0 + - carousel_image_square_1 + - carousel_image_square_2 + - carousel_image_square_3 + - carousel_image_square_4 + - carousel_image_square_5 + - carousel_image_square_6 + - carousel_image_square_7 + - carousel_image_square_8 + - carousel_image_square_9 + - carousel_image_landscape_0 + - carousel_image_landscape_1 + - carousel_image_landscape_2 + - carousel_image_landscape_3 + - carousel_image_landscape_4 + - carousel_image_landscape_5 + - carousel_image_landscape_6 + - carousel_image_landscape_7 + - carousel_image_landscape_8 + - carousel_image_landscape_9 + type: string + static_uri: + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string + updated_at: + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true type: string type: object - DenialAttemptsResponse: + BrandingImageList: properties: after: - description: An offset token for current page. + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string data: + description: A list of entities. items: - $ref: '#/definitions/BlackListedDeviceData' + $ref: '#/definitions/BrandingImage' type: array has_more: - description: Are there more results available. + description: Flag indicating whether there are more results. example: false type: boolean limit: - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. + description: The number of results to return, or equal to `total_count`. example: 50 - maximum: 1000 - minimum: 2 + format: int32 type: integer object: - description: The type of this API object is a "list". - example: list + description: 'Entity name: always `list`.' + enum: + - list type: string order: - description: The creation time based order of the entries. + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' enum: - ASC - DESC - example: DESC type: string total_count: - example: 1 - format: integer + description: The total number of records, if requested. + example: 20 + format: int32 type: integer required: - - object - data + - has_more + - limit + - object + - total_count type: object - DeveloperCertificateRequestData: - properties: - description: - description: Description for the developer certificate. Maximum 500 characters. - Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). - maxLength: 500 - type: string - x-nullable: true - name: - description: Name of the developer certificate. Must be unique. Maximum 100 - characters. Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). - maxLength: 100 - type: string - required: - - name - type: object - DeveloperCertificateResponseData: + BulkResponse: properties: account_id: - description: Account to which the developer certificate belongs. + description: ID + example: 00005a4e027f0a580a01081c00000000 + type: string + completed_at: + description: 'The time the bulk creation task was completed. + + Null when creating bulk upload or delete.' + format: date-time type: string created_at: - description: Creation UTC time RFC3339. + description: The time of receiving the bulk creation task. format: date-time type: string - description: - description: Description for the developer certificate. + errors_count: + description: The number of enrollment identities with failed processing. + example: 0 + type: integer + errors_report_file: + description: 'Link to error report file. + + Null when creating bulk upload or delete.' + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv type: string x-nullable: true - developer_certificate: - description: PEM-format X.509 developer certificate. - type: string - developer_private_key: - description: PEM-format developer private key associated with the certificate. - type: string etag: - description: API resource entity version. + description: etag + example: '1' + pattern: '[A-Za-z0-9]{0,256}' type: string - id: - description: ID that uniquely identifies the developer certificate. + full_report_file: + description: 'Link to full report file. + + Null when creating bulk upload or delete.' + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv type: string - name: - description: Name of the developer certificate. + x-nullable: true + id: + description: Bulk ID + pattern: ^[A-Za-z0-9]{32} type: string object: - description: 'Entity name: always `trusted-cert`.' + enum: + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - security_file_content: - description: Content of the `security.c` file flashed to the device to provide - security credentials. + processed_count: + description: The number of enrollment identities processed until now. + example: 0 + type: integer + status: + default: new + description: The state of the process is 'new' at the time of creation. If + creation is still in progress, the state shows as 'processing'. When the + request is fully processed, the state changes to 'completed'. + enum: + - new + - processing + - completed + example: new + total_count: + description: Total number of enrollment identities found in the input CSV. + example: 10 + type: integer + required: + - object + - id + - etag + - created_at + - account_id + - status + - total_count + - processed_count + - errors_count + - completet_at + - full_report_file + - errors_report_file + type: object + BusinessModel: + default: active_device_business_model + description: Business model for this account. Manageable by the root admin only. + enum: + - active_device_business_model + - api_calls_1_business_model + example: api_calls_1_business_model + type: string + BusinessModelHistory: + properties: + business_model: + $ref: '#/definitions/BusinessModel' + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string type: object - DeviceBlockCategory: + CampaignDeviceMetadata: properties: + campaign: + description: The device's campaign ID. + example: 015bf72fccda00000000000100100280 + type: string + created_at: &id014 + description: The time the entity was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + deployment_state: + description: The state of the update campaign on the device. + enum: + - pending + - updated_connector_channel + - failed_connector_channel_update + - deployed + - manifestremoved + - deregistered + type: string description: - example: Suspended for maintenance. + description: Description. + example: a description + maxLength: 2000 type: string - object: - description: 'Entity name: always ''device-block-category''.' - example: device-block-category + device_id: + description: The device ID. + example: 015c2fec9bba0000000000010010036f type: string - reference: - example: maintenance + etag: &id015 + description: API resource entity version. + example: '2017-05-22T12:37:58.753425Z' type: string - updated_at: + id: + description: The metadata record ID. + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' + type: string + mechanism: + description: How the firmware is delivered (connector or direct). + example: connector + type: string + mechanism_url: + description: The Device Management Connect URL. + type: string + name: + default: default_object_name + description: The record name. + maxLength: 128 + type: string + object: + description: 'The entity name: always ''update-campaign-device-metadata''.' + example: update-campaign-device-metadata + type: string + updated_at: &id016 + description: The time the entity was updated. + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object - DeviceBlockCategoryPage: + CampaignDeviceMetadataPage: properties: after: - description: An offset token for current page. + description: The entity ID to fetch after the given one. + example: 'null' type: string data: + description: A list of entities. items: - $ref: '#/definitions/DeviceBlockCategory' + $ref: '#/definitions/CampaignDeviceMetadata' type: array has_more: - description: More results are available. - example: false + description: A flag indicating whether there are more results. + example: 'false' type: boolean limit: - description: How many objects to retrieve in the page (2-1000). Limit values - outside of this range are set to the closest limit. - example: 50 + description: How many objects to retrieve in the page. The minimum limit is + 2 and the maximum is 1000. Limit values outside of this range are set to + the closest limit. + example: '50' maximum: 1000 minimum: 2 type: integer object: - description: The type of this API object is 'list'. + description: 'The entity name: always ''list''.' example: list type: string order: - description: Order of entries based on creation time. - example: DESC + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC type: string total_count: - example: 1 - format: integer + description: The total number or records, if requested. It may be returned + also for small lists. + example: '1' type: integer type: object - DeviceData: + CampaignMetrics: properties: - account_id: - description: The ID of the associated account. - example: '00000000000000000000000000000000' - type: string - auto_update: - description: 'DEPRECATED: Mark this device for automatic firmware update.' - type: boolean - bootstrap_expiration_date: - description: The expiration date of the certificate used to connect to bootstrap - server. - format: date - type: string - x-nullable: true - bootstrapped_timestamp: - description: The timestamp of the device's most recent bootstrap process. + created_at: + description: The time the metrics were created. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - ca_id: - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 + failed_count: + description: Running total of devices that could not be updated. + example: '0' + format: int32 + type: integer + object: + description: 'Entity name: always ''update-campaign-metrics''.' + example: update-campaign-metrics type: string - connector_expiration_date: - description: The expiration date of the certificate used to connect to LwM2M - server. - format: date + pending_count: + description: Running total of devices that have yet to receive an update or + are applying an update. + example: '5' + format: int32 + type: integer + skipped_count: + description: Running total of devices that were skipped. + example: '5' + format: int32 + type: integer + success_count: + description: Running total of successfully updated devices. + example: '90' + format: int32 + type: integer + total_count: + description: Number of devices in the campaign. + example: '100' + format: int32 + type: integer + type: object + CertificateEnrollment: + properties: + certificate_name: + description: The certificate name. + example: customer.dlms + maxLength: 50 type: string - x-nullable: true created_at: - description: The timestamp of when the device was created in the device directory. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - description: Up to five custom key-value attributes. Note that keys cannot - begin with a number. Both keys and values are limited to 128 characters. - Updating this field replaces existing contents. - example: - key: value - maxProperties: 5 - type: object - deployed_state: - description: 'DEPRECATED: The state of the device''s deployment.' - enum: - - development - - production + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time type: string - deployment: - description: 'DEPRECATED: The last deployment used on the device.' - example: '' + device_id: + description: The device ID. + example: 01625daa23230a580a0100bd00000000 type: string - description: - description: The description of the device. - example: description - maxLength: 2000 + enroll_result: + description: The result of certificate enrollment request. + enum: + - success + - failure + example: success type: string - device_class: - description: An ID representing the model and hardware revision of the device. - example: '' - maxLength: 32 + enroll_result_detail: + description: Additional information in case of failure. + example: The device is currently processing too many certificate renewals. type: string - device_execution_mode: &id011 - default: 0 - description: "The execution mode from the certificate of the device. Defaults\ - \ to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified\ - \ execution mode (default if host_gateway invalid or not set). The device\ - \ firmware uses a certificate that is not identified as a developer or production\ - \ certificate.\n - 1 - Development device. The device firmware uses a developer\ - \ certificate to communicate with Device Management.\n - 5 - Production\ - \ device. The device firmware uses a factory-generated certificate to communicate\ - \ with Device Management." + enroll_status: + description: The status of certificate enrollment request. enum: - - 0 - - 1 - - 5 - example: 0 - type: integer - device_key: - description: The fingerprint of the device certificate. - example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 - maxLength: 512 + - new + - completed type: string - endpoint_name: - description: The endpoint name given to the device. - example: 00000000-0000-0000-0000-000000000000 - readOnly: true + etag: + description: Entity instance signature. + example: '1' type: string - endpoint_type: - description: The endpoint type of the device. For example, the device is a - gateway. - example: '' - maxLength: 64 + id: + description: The certificate enrollment ID. + example: 01612df56f3b0a580a010fc700000000 type: string - enrolment_list_timestamp: - description: The claim date/time. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + object: + enum: + - certificate-enrollment type: string - etag: - description: The entity instance signature. - example: '2017-05-22T12:37:55.576563Z' + updated_at: + description: Update UTC time RFC3339. + example: '2017-01-01T00:00:00Z' format: date-time type: string - firmware_checksum: - description: The SHA256 checksum of the current firmware image. - example: '0000000000000000000000000000000000000000000000000000000000000000' + required: + - created_at + - etag + - id + - device_id + - certificate_name + type: object + CertificateEnrollmentListResponse: + properties: + after: + description: The entity ID to fetch after the given one. + example: 01625daa23230a580a0100bd00000000 type: string - groups: - description: An array containing an ID of each group this device belongs to. + data: + description: List of certificate enrollments. items: - example: '00000000000000000000000000000000' - type: string + $ref: '#/definitions/CertificateEnrollment' type: array - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' + has_more: + description: Flag indicating whether there are more results. + type: boolean + limit: + description: The number of results to return. + format: int32 + type: integer + object: + description: Describes the type of objects in the list. + enum: + - list type: string - id: - description: The ID of the device. The device ID is used across all Device - Management APIs. - example: '00000000000000000000000000000000' + order: + description: 'Record order based on creation time. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC type: string - issuer_fingerprint: &id012 - description: SHA256 fingerprint of the certificate used to validate the signature - of the device certificate. - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' + total_count: + description: The total number of records. + format: int32 + type: integer + type: object + CertificateGenerationReq: + description: Generate a new service provider certificate. + properties: + algorithm: + description: The algorithm and its key size used for generating the certificate. + Defaults to RSA2048. + enum: + - RSA2048 + - RSA3072 + - EC224 + - EC256 + - EC384 + - EC521 + - ECDSA224 + - ECDSA256 + - ECDSA384 + - ECDSA521 type: string - x-nullable: true - last_operator_suspended_category: - description: The reference of the block category. - example: maintenance - pattern: '[a-f0-9_]{32}' + validity: + description: Validity for the certificate in days. + format: int32 + type: integer + type: object + CertificateIssuerConfigListResponse: + properties: + after: &id002 + description: An offset token for current page. + example: '01631667477600000000000100100374' type: string - last_operator_suspended_description: - description: The most recent description why the device was suspended or returned - to service. - example: Suspended for maintenance. - maxLength: 2000 + data: + description: List of certificate issuers. + items: + $ref: '#/definitions/CertificateIssuerConfigResponse' + type: array + has_more: &id003 + description: More results are available. + example: false + type: boolean + limit: &id004 + description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. + example: 50 + maximum: 1000 + minimum: 2 + type: integer + object: &id005 + description: The type of this API object is `list`. + example: list type: string - last_operator_suspended_updated_at: - description: The timestamp of the most recent suspension activity. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + order: &id006 + description: Record order based on creation time. + example: DESC type: string - last_system_suspended_category: - description: The reference of the block category. - example: maintenance - pattern: '[a-f0-9_]{32}' + total_count: &id007 + example: 1 + format: integer + type: integer + type: object + CertificateIssuerConfigRequest: + properties: + certificate_issuer_id: + description: 'Certificate issuer ID. + + For LwM2M, may be null if Device Management internal certificate issuer + is used.' + example: 01648415a2a30242ac18000500000000 type: string - last_system_suspended_description: - description: The most recent description of why the device was blocked or - unblocked by the system. - example: A certificate in the device's certificate chain was blacklisted by - the system. - maxLength: 2000 + x-nullable: true + type: object + CertificateIssuerConfigResponse: + properties: + certificate_issuer_id: + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + example: 01648415a2a30242ac18000500000000 type: string - last_system_suspended_updated_at: - description: The timestamp of the most recent system block activity. - example: '2017-05-22T12:37:55.576563Z' + x-nullable: true + created_at: + description: Created UTC time RFC3339. + example: '2017-01-01T00:00:00Z' format: date-time type: string - lifecycle_status: - description: The lifecycle status of the device. - enum: - - enabled - - blocked - example: enabled + etag: + description: Entity instance signature. + example: '1' type: string - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' + id: + description: Certificate issuer ID. configuration. + example: 01648415a2a30242ac18000500000000 type: string - manifest_timestamp: - description: The timestamp of the current manifest version. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - mechanism: - description: The ID of the channel used to communicate with the device. - enum: - - connector - - direct - type: string - mechanism_url: - description: The address of the connector to use. - example: '' - type: string - name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 - type: string - object: - description: The API resource entity. - example: device - type: string - operator_suspended: - description: Is the device suspended by the operator? + is_custom: + example: true type: boolean - serial_number: - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 - type: string - state: - description: The current state of the device. + object: enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - certificate-issuer-configuration + type: string + reference: + description: The certificate name to which the certificate issuer configuration + applies. + example: customer.dlms type: string - system_suspended: - description: Is the device suspended by the system? - type: boolean updated_at: - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' + description: Updated UTC time RFC3339. + example: '2017-02-01T00:00:00Z' format: date-time type: string - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 - type: string - DeviceDataPostRequest: + type: object + CertificateIssuerInfo: properties: - auto_update: - description: 'DEPRECATED: Mark this device for automatic firmware update.' - type: boolean - bootstrap_expiration_date: - description: The expiration date of the certificate used to connect to bootstrap - server. - example: '2017-05-22' - format: date + created_at: + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + description: + description: General description for the certificate issuer. + example: GlobalSign sample issuer + maxLength: 100 type: string x-nullable: true - ca_id: - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 + etag: + description: Entity instance signature. + example: '1' type: string - connector_expiration_date: - description: The expiration date of the certificate used to connect to the - LwM2M server. - example: '2017-05-22' - format: date + id: + description: Certificate issuer ID. + example: 01234567890ABCDEF01234567890ABCDEF type: string - x-nullable: true - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* + issuer_attributes: + additionalProperties: &id008 type: string - description: Up to five custom key-value attributes. Note that keys cannot - begin with a number. Both keys and values are limited to 128 characters. - Updating this field replaces existing contents. - example: - key: value - maxProperties: 5 + description: 'General attributes for connecting the certificate issuer. + + When the issuer_type is GLOBAL_SIGN, the value is empty. + + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' + example: &id009 {} type: object - deployment: - description: 'DEPRECATED: The last deployment used on the device.' - example: '' - type: string - description: - description: The description of the device. - example: '' - maxLength: 2000 - type: string - device_class: - description: An ID representing the model and hardware revision of the device. - maxLength: 32 - type: string - device_execution_mode: *id011 - device_key: - description: The fingerprint of the device certificate. - example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 - maxLength: 512 - type: string - endpoint_name: - description: The endpoint name given to the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 64 - type: string - endpoint_type: - description: The endpoint type of the device. For example, the device is a - gateway. - example: '' - maxLength: 64 - type: string - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' - type: string - issuer_fingerprint: *id012 - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' - type: string - mechanism: - description: The ID of the channel used to communicate with the device. + issuer_type: + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are\ + \ issued by GlobalSign service. You must provide your own GlobalSign account\ + \ credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ + \ signing service.\n You must provide your own CFSSL host_url and credentials." enum: - - connector - - direct - type: string - mechanism_url: - description: The address of the connector to use. - example: '' + - GLOBAL_SIGN + - CFSSL_AUTH + example: GLOBAL_SIGN type: string name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 - type: string - serial_number: - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 64 + description: Certificate issuer name, unique per account. + example: GS Issuer + maxLength: 50 type: string - state: - description: The current state of the device. + object: enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered - type: string - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 255 + - certificate-issuer type: string - DeviceDataPutRequest: + required: + - issuer_type + type: object + CertificateIssuerInfoListResponse: properties: - auto_update: - description: 'DEPRECATED: Mark this device for automatic firmware update.' - type: boolean - ca_id: - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 + after: *id002 + data: + description: List of certificate issuers. + items: + $ref: '#/definitions/CertificateIssuerInfo' + type: array + has_more: *id003 + limit: *id004 + object: *id005 + order: *id006 + total_count: *id007 + type: object + CertificateIssuerRequest: + example: + description: Sample GlobalSign certificate issuer. + issuer_attributes: null + issuer_credentials: + api_key: e510e289e6cd8947 + api_secret: a477a8393d17a55ecb2ba6a61f58feb84770b621 + client_certificate: '"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END + CERTIFICATE-----" + + ' + passphrase: helloworld + private_key: '"-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: + DES-EDE3-CBC,CCAC26A4133947CB\n\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\n-----END + RSA PRIVATE KEY-----"' + issuer_type: GLOBAL_SIGN + name: GS Issuer + properties: + description: + description: General description of the certificate issuer. + maxLength: 100 type: string - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* + x-nullable: true + issuer_attributes: + additionalProperties: *id008 + description: 'General attributes for connecting the certificate issuer. + + When the issuer_type is GLOBAL_SIGN, the value is empty. + + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' + example: *id009 + type: object + issuer_credentials: + additionalProperties: &id010 type: string - description: Up to five custom key-value attributes. Note that keys cannot - begin with a number. Both keys and values are limited to 128 characters. - Updating this field replaces existing contents. - example: - key: value - maxProperties: 5 + description: 'The credentials required to connect to the certificate issuer. + + When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. + + When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.' + example: &id011 {} type: object - description: - description: The description of the device. - example: '' - maxLength: 2000 + issuer_type: + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are\ + \ issued by GlobalSign service. You must provide your own GlobalSign account\ + \ credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ + \ signing service.\n You must provide your own CFSSL host_url and credentials." + enum: + - GLOBAL_SIGN + - CFSSL_AUTH type: string - device_key: - description: The fingerprint of the device certificate. - example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 - maxLength: 512 + name: + description: Certificate issuer name, unique per account. + maxLength: 50 type: string - endpoint_name: - description: The endpoint name given to the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 64 - readOnly: true - type: string - endpoint_type: - description: The endpoint type of the device. For example, the device is a - gateway. - example: '' - maxLength: 64 - type: string - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' + required: + - name + - issuer_type + - issuer_credentials + type: object + CertificateIssuerUpdateRequest: + example: + description: Sample GlobalSign certificate issuer - updated. + name: GlobalSign Issuer + properties: + description: + description: General description of the certificate issuer. + maxLength: 100 type: string + x-nullable: true + issuer_attributes: + additionalProperties: *id008 + description: 'General attributes for connecting the certificate issuer. + + When the issuer_type is GLOBAL_SIGN, the value is empty. + + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' + example: *id009 + type: object + issuer_credentials: + additionalProperties: *id010 + description: 'The credentials required to connect to the certificate issuer. + + When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. + + When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.' + example: *id011 + type: object name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + description: Certificate issuer name. + maxLength: 50 type: string - DeviceEqNeqFilter: + type: object + CertificateIssuerVerifyResponse: properties: - account_id: + message: + description: Provides details in case of failure. + example: Message describing the verification failure type: string - auto_update: + successful: + description: Indicates whether the certificate issuer was verified successfully. + example: false type: boolean - bootstrap_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + type: object + CfsslAttributes: + description: Describes the attributes required to connect to the CFSSL server. + properties: + cfssl_label: + description: The label that is used by CFSSL when creating the certificate. type: string - bootstrapped_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + cfssl_profile: + description: The profile that is configured on the CFSSL server and used by + CFSSL when creating the certificate. type: string - ca_id: + host_url: + description: The URL to connect to the CFSSL server. + example: http://my.cfssl.service:5555 type: string - connector_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + required: + - host_url + type: object + CfsslAuthCredentials: + description: Describes the credentials required when using CFSSL authenticated + signing. + properties: + hmac_hex_key: + description: 'The key that is used to compute the HMAC of the request using + the HMAC-SHA-256 algorithm. + + Must contain an even number of hexadecimal characters.' + example: 0010203ABCD708EF + maxLength: 64 + pattern: ^([a-fA-F0-9][a-fA-F0-9]){1,32}$ type: string - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + required: + - hmac_hex_key + type: object + ChannelMetadata: + properties: + delivery_mechanism: + description: Channel delivery mechanism. + enum: + - CALLBACK + - LONG_POLLING + - WEB_SOCKET + example: CALLBACK type: string - custom_attributes: - additionalProperties: - type: string - type: object - deployed_state: + type: object + CreateCertificateIssuerConfig: + properties: + certificate_issuer_id: + description: Certificate issuer ID. + example: 01648415a2a30242ac18000500000000 + maxLength: 32 type: string - deployment: + x-nullable: true + reference: + description: 'The certificate name, as created in the factory, to which the + certificate issuer configuration applies. + + The following names are reserved and cannot be configured: LwM2M, BOOTSTRAP.' + example: customer.dlms + maxLength: 100 + pattern: (?!mbed\.)[\w-_.]{1,100} type: string + required: + - reference + - certificate_issuer_id + type: object + CreateTrustAnchorRequest: + properties: description: + description: The description of the new trust anchor key pair. + format: Free text + maxLength: 256 + minLength: 1 type: string - device_class: - type: string - device_execution_mode: - type: integer - device_key: - type: string - endpoint_name: - type: string - endpoint_type: - type: string - enrolment_list_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - etag: - example: '2017-05-22T12:37:55.576563Z' + required: + - description + type: object + CreateTrustAnchorResponse: + properties: + created_at: &id017 + description: Creation UTC time. + example: '2017-01-01T00:00:00Z' format: date-time type: string - firmware_checksum: + description: + description: Notes about the trust anchor. + format: free text + maxLength: 256 + minLength: 1 type: string - host_gateway: + etag: &id018 + description: Entity instance signature, 1 or Unix timestamp of last customer + update. + example: '1' type: string - id: + fingerprint: + description: The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' + followed by the trust anchor public key as a SHA256 hash in Base64-encoded + DER format. + format: byte type: string - manifest: + id: &id019 + description: The ID of the entity. + example: 01612df56f3b0a580a010fc700000000 + pattern: '[A-Fa-f0-9]{32}' type: string - manifest_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + object: &id020 + description: The API resource entity + example: trust-anchor type: string - mechanism: + public_key: + description: The generated trust anchor public key in PEM format. + format: byte type: string - mechanism_url: + public_key_der: + description: The generated trust anchor public key in Base64-encoded DER format. + format: byte type: string - name: + updated_at: &id021 + description: Update UTC time. + example: '2017-01-01T00:00:00Z' + format: date-time type: string - serial_number: + type: object + CredentialsResponseData: + properties: + certificate: + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. type: string - state: + url: + description: Server URI that the client connects to. type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + type: object + DeveloperCertificateRequestData: + properties: + description: + description: Description for the developer certificate. Maximum 500 characters. + Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). + maxLength: 500 type: string - vendor_id: + x-nullable: true + name: + description: Name of the developer certificate. Must be unique. Maximum 100 + characters. Please see [TrustedCertificateReq](https://developer.pelion.com/docs/device-management-api/account-management/). + maxLength: 100 type: string + required: + - name type: object - DeviceEventData: + DeveloperCertificateResponseData: properties: - changes: - additionalProperties: - type: object - example: {} - type: object - x-deprecation: - comment: This field is not used. - end_of_life_at: '2020-01-15T14:55:20+00:00' - issued_at: '2019-01-15T14:55:20+00:00' - links: [] - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + account_id: + description: Account to which the developer certificate belongs. type: string - data: - additionalProperties: - type: string - description: Additional data relevant to the event. - example: - campaign_id: '00000000000000000000000000000000' - type: object - date_time: - example: '2017-05-22T12:37:55.576563Z' + created_at: + description: Creation UTC time RFC3339. format: date-time type: string description: - example: Device record created + description: Description for the developer certificate. type: string - device_id: - example: '00000000000000000000000000000000' + x-nullable: true + developer_certificate: + description: PEM-format X.509 developer certificate. + type: string + developer_private_key: + description: PEM-format developer private key associated with the certificate. type: string etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: API resource entity version. type: string - event_type: - description: Event code - example: UPD2_100 - maxLength: 100 + id: + description: ID that uniquely identifies the developer certificate. type: string - event_type_category: - description: Category code which groups the event type by a summary category. - example: FAIL_MANIFEST_REJECTED + name: + description: Name of the developer certificate. type: string - event_type_description: - description: Generic description of the event. - example: FAIL + object: + description: 'Entity name: always `trusted-cert`.' type: string - id: - example: '00000000000000000000000000000000' + security_file_content: + description: Content of the `security.c` file flashed to the device to provide + security credentials. + type: string + type: object + DeviceBlockCategory: + properties: + description: + example: Suspended for maintenance. type: string object: - description: The API resource entity. - example: device-event + description: 'Entity name: always ''device-block-category''.' + example: device-block-category type: string - state_change: - type: boolean - required: - - date_time - - id - DeviceEventEqNeqFilter: - properties: - date_time: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - description: - type: string - device_id: - type: string - event_type: - type: string - id: - type: string - state_change: - type: boolean - DeviceEventGteLteFilter: - properties: - date_time: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - DeviceEventInNinFilter: - properties: - date_time: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - description: - type: string - device_id: - type: string - event_type: - type: string - id: - type: string - state_change: - type: boolean - DeviceEventPage: - properties: - after: - example: null - type: string - data: - example: '[]' - items: - $ref: '#/definitions/DeviceEventData' - type: array - has_more: - example: false - type: boolean - limit: - example: 1000 - type: integer - object: - example: list - type: string - order: - example: DESC - type: string - total_count: - example: 1 - type: integer - DeviceGroup: - properties: - created_at: - description: The time the campaign was created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - custom_attributes: &id023 - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - description: Up to ten custom key-value attributes. Keys cannot begin with - a number. Both key and value are limited to 128 characters. Updating this - field replaces existing contents. - example: - key: value - maxProperties: 10 - type: object - description: &id024 - description: The description of the group. - example: Devices on the factory floor. - maxLength: 2000 - type: string - devices_count: - description: The number of devices in this group. - example: 10 - type: integer - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - id: - description: The group ID. - example: 015c3029f6f7000000000001001000c3 - type: string - name: &id025 - description: Name of the group. - example: My devices - maxLength: 128 - type: string - object: - description: 'Entity name: always `device-group`.' - example: device-group + reference: + example: maintenance type: string updated_at: - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object - DeviceGroupManipulation: - properties: - device_id: - example: '00000000000000000000000000000000' - type: string - required: - - device_id - type: object - DeviceGroupPage: + DeviceBlockCategoryPage: properties: after: description: An offset token for current page. - example: '01631667477600000000000100100374' type: string data: items: - $ref: '#/definitions/DeviceGroup' + $ref: '#/definitions/DeviceBlockCategory' type: array has_more: description: More results are available. @@ -3078,7 +3076,7 @@ definitions: example: list type: string order: - description: Record order based on creation time. + description: Order of entries based on creation time. example: DESC type: string total_count: @@ -3086,819 +3084,837 @@ definitions: format: integer type: integer type: object - DeviceGteLteFilter: - properties: - bootstrap_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - bootstrapped_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - connector_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - enrolment_list_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - manifest_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - type: object - DeviceInNinFilter: + DeviceData: properties: account_id: + description: The ID of the associated account. + example: '00000000000000000000000000000000' type: string auto_update: + description: 'DEPRECATED: Mark this device for automatic firmware update.' type: boolean bootstrap_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: The expiration date of the certificate used to connect to bootstrap + server. + format: date type: string + x-nullable: true bootstrapped_timestamp: + description: The timestamp of the device's most recent bootstrap process. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string ca_id: + description: The certificate issuer's ID. + example: '00000000000000000000000000000000' + maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: The expiration date of the certificate used to connect to LwM2M + server. + format: date type: string + x-nullable: true created_at: + description: The timestamp of when the device was created in the device directory. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string custom_attributes: additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* type: string + description: Up to five custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 5 type: object deployed_state: + description: 'DEPRECATED: The state of the device''s deployment.' + enum: + - development + - production type: string deployment: + description: 'DEPRECATED: The last deployment used on the device.' + example: '' type: string description: + description: The description of the device. + example: Temperature measuring device + maxLength: 2000 type: string device_class: + description: An ID representing the model and hardware revision of the device. + example: '' + maxLength: 32 type: string - device_execution_mode: + device_execution_mode: &id012 + default: 0 + description: "The execution mode from the certificate of the device. Defaults\ + \ to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified\ + \ execution mode (default if host_gateway invalid or not set). The device\ + \ firmware uses a certificate that is not identified as a developer or production\ + \ certificate.\n - 1 - Development device. The device firmware uses a developer\ + \ certificate to communicate with Device Management.\n - 5 - Production\ + \ device. The device firmware uses a factory-generated certificate to communicate\ + \ with Device Management." + enum: + - 0 + - 1 + - 5 + example: 0 type: integer device_key: + description: The fingerprint of the device certificate. + example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + maxLength: 512 type: string endpoint_name: + description: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. + example: 00000000-0000-0000-0000-000000000000 + readOnly: true type: string endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 type: string enrolment_list_timestamp: + description: The claim date/time. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string etag: + description: The entity instance signature. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string firmware_checksum: + description: The SHA256 checksum of the current firmware image. + example: '0000000000000000000000000000000000000000000000000000000000000000' type: string + groups: + description: An array containing an ID of each group this device belongs to. + items: + example: '00000000000000000000000000000000' + type: string + type: array host_gateway: + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. + example: '' type: string id: + description: The ID of the device. The device ID is used across all Device + Management APIs. + example: '00000000000000000000000000000000' type: string - manifest: - type: string - manifest_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + issuer_fingerprint: &id013 + description: SHA256 fingerprint of the certificate used to validate the signature + of the device certificate. + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + pattern: '[A-Fa-f0-9]{64}' type: string - mechanism: + x-nullable: true + last_operator_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' type: string - mechanism_url: + last_operator_suspended_description: + description: The most recent description why the device was suspended or returned + to service. + example: Suspended for maintenance. + maxLength: 2000 type: string - name: + last_operator_suspended_updated_at: + description: The timestamp of the most recent suspension activity. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - serial_number: + last_system_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' type: string - state: + last_system_suspended_description: + description: The most recent description of why the device was blocked or + unblocked by the system. + example: A certificate in the device's certificate chain was blacklisted by + the system. + maxLength: 2000 type: string - updated_at: + last_system_suspended_updated_at: + description: The timestamp of the most recent system block activity. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - vendor_id: - type: string - type: object - DevicePage: - properties: - after: - description: An offset token for current page. - example: '01631667477600000000000100100374' - type: string - data: - items: - $ref: '#/definitions/DeviceData' - type: array - has_more: - description: Are there more results available. - example: false - type: boolean - limit: - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. - example: 50 - maximum: 1000 - minimum: 2 - type: integer - object: - description: The type of this API object is a "list". - example: list + lifecycle_status: + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' + enum: + - enabled + - blocked + example: enabled type: string - order: - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - example: DESC + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' type: string - total_count: - example: 1 - format: integer - type: integer - DeviceQuery: - properties: - created_at: - description: The timestamp of when the device was created in Device Directory. + manifest_timestamp: + description: The timestamp of the current manifest version. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - etag: - description: The entity instance signature. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + mechanism: + description: 'NOT USED: The ID of the channel used to communicate with the + device.' + enum: + - connector + - direct type: string - id: - description: The ID of the query. - example: '00000000000000000000000000000000' + mechanism_url: + description: 'NOT USED: The address of the connector to use.' + example: '' type: string name: - description: The name of the query. - example: '00000000000000000000000000000000' + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 128 + type: string + net_id: + default: '' + description: Private network identifier. Used to group nodes connected to + a specific border router. + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 type: string object: description: The API resource entity. - example: device-query + example: device type: string - query: - description: The device query. - example: id=00000000000000000000000000000000 + operator_suspended: + description: Device has been suspended by operator. + type: boolean + serial_number: + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. + example: 00000000-0000-0000-0000-000000000000 + type: string + state: + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This + state is set only while bootstrapping is in progress. For example, an external + CA gives an error, and the device tries to bootstrap again after few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. [Device + commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' + enum: + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string + system_suspended: + description: Is the device suspended by the system? + type: boolean updated_at: - description: The time the object was updated. + description: The time this data object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - required: - - created_at - - etag - - id - - name - - object - - query - - updated_at - DeviceQueryEqNeqFilter: + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + DeviceDataPostRequest: properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + auto_update: + description: 'DEPRECATED: Mark this device for automatic firmware update.' + type: boolean + bootstrap_expiration_date: + description: The expiration date of the certificate used to connect to bootstrap + server. + example: '2017-05-22' + format: date type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + x-nullable: true + ca_id: + description: The certificate issuer's ID. + example: '00000000000000000000000000000000' + maxLength: 500 type: string - id: + connector_expiration_date: + description: The expiration date of the certificate used to connect to the + LwM2M server. + example: '2017-05-22' + format: date type: string - name: + x-nullable: true + custom_attributes: + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + description: Up to five custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 5 + type: object + deployment: + description: 'DEPRECATED: The last deployment used on the device.' + example: '' type: string - query: + description: + description: The description of the device. + example: '' + maxLength: 2000 type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + device_class: + description: An ID representing the model and hardware revision of the device. + maxLength: 32 type: string - DeviceQueryGteLteFilter: - properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + device_execution_mode: *id012 + device_key: + description: The fingerprint of the device certificate. + example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + maxLength: 512 type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + endpoint_name: + description: The endpoint name given to the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 64 type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 type: string - DeviceQueryInNinFilter: - properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + host_gateway: + description: The ID of the host gateway, if appropriate. + example: '' type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + issuer_fingerprint: *id013 + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' type: string - id: + mechanism: + description: The ID of the channel used to communicate with the device. + enum: + - connector + - direct type: string - name: + mechanism_url: + description: The address of the connector to use. + example: '' type: string - query: + name: + description: The name of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 128 type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + serial_number: + description: The serial number of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 64 type: string - DeviceQueryPage: - properties: - after: - example: null + state: + description: The current state of the device. + enum: + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string - data: - example: '[]' - items: - $ref: '#/definitions/DeviceQuery' - type: array - has_more: - example: false + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + DeviceDataPutRequest: + properties: + auto_update: + description: 'DEPRECATED: Mark this device for automatic firmware update.' type: boolean - limit: - example: 1000 - format: integer - type: integer - object: - example: list + ca_id: + description: 'The certificate issuer''s ID. WARNING: This value comes from + the device, and should not be changed via the API.' + example: '00000000000000000000000000000000' + maxLength: 500 type: string - order: - example: DESC + custom_attributes: + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + description: Up to five custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 5 + type: object + description: + description: The description of the device. + example: '' + maxLength: 2000 type: string - total_count: - example: 1 - format: integer - type: integer - required: - - limit - - order - - object - - has_more - - total_count - - data - DeviceQueryPatchRequest: - properties: - name: - description: The name of the query. - maxLength: 200 + device_key: + description: 'The fingerprint of the device certificate. WARNING: This value + comes from the device, and should not be changed via the API.' + example: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 + maxLength: 512 type: string - query: - description: The device query. - maxLength: 1000 + endpoint_name: + description: 'The endpoint name given to the device. WARNING: This value comes + from the device, and should not be changed via the API.' + example: 00000000-0000-0000-0000-000000000000 + maxLength: 64 + readOnly: true type: string - DeviceQueryPostPutRequest: - properties: - name: - description: The name of the query. - maxLength: 200 + endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 type: string - query: - description: The device query. - maxLength: 1000 + host_gateway: + description: The ID of the host gateway, if appropriate. + example: '' type: string - required: - - name - - query - DeviceRequest: + name: + description: The name of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 128 + type: string + DeviceEqNeqFilter: properties: - accept: - description: The content type of an accepted response. - example: text/plain + account_id: type: string - content-type: - description: The content type of the payload. - example: text/plain + auto_update: + type: boolean + bootstrap_expiration_date: + example: '2017-05-22' + format: date type: string - method: - description: The CoAP request method. Allowed values are GET, POST, PUT and - DELETE. - example: GET + bootstrapped_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - payload-b64: - description: The base64 encoded payload to send to the device. - example: dmFsdWUxCg== + ca_id: type: string - uri: - description: The URI path of the requested resource. - example: /5/0/1 + component_attributes: + additionalProperties: + type: string + type: object + connector_expiration_date: + example: '2017-05-22' + format: date type: string - required: - - method - - uri - type: object - EndpointData: - properties: - ep: - description: Unique Device Management device ID. - example: 015f3850a657000000000001001002ab + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - ept: - description: Endpoint type. - example: Light + custom_attributes: + additionalProperties: + type: string + type: object + deployed_state: type: string - original-ep: - description: If device registration is initiated with a self-provided endpoint - name, Device Management provides a new device ID for subsequent use. The - new platform-provided Device ID is forwarded as the 'ep' property and the - original self-provided one as the optional 'original-ep' property in a registration - notification. The name and ID can then be mapped accordingly. Device Management - saves the original endpoint name in the Device Directory for future device - registrations so you don't need to do mapping again. - example: my-device-123 + deployment: type: string - q: - description: Queue mode (default value is false). - example: false - type: boolean - resources: - items: - $ref: '#/definitions/ResourcesData' - type: array - type: object - EnrollmentId: - properties: - enrollment_identity: - description: Enrollment identity. - example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 - pattern: ^A-[A-Za-z0-9:]{95}$ + description: type: string - required: - - enrollment_identity - type: object - EnrollmentIdentities: - properties: - after: - description: ID - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + device_class: type: string - data: - items: - $ref: '#/definitions/EnrollmentIdentity' - type: array - has_more: - example: true - type: boolean - limit: - description: Range 2-1000, or default. - example: 50 - maximum: 1000 - minimum: 2 + device_execution_mode: type: integer - object: - enum: - - list - example: list + device_key: type: string - order: - default: ASC - enum: - - ASC - - DESC - example: ASC + endpoint_name: type: string - total_count: - example: 100 - format: int32 - minimum: 1 - type: integer - required: - - object - - limit - - after - - order - - has_more - - total_count - - data - type: object - EnrollmentIdentity: - properties: - account_id: - description: ID - example: 00005a4e027f0a580a01081c00000000 + endpoint_type: type: string - claimed_at: - description: The time the device was claimed. + enrolment_list_timestamp: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - created_at: - description: The time of the enrollment identity creation. + etag: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - enrolled_device_id: - description: The ID of the device in the Device Directory once it is registered. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + firmware_checksum: type: string - enrollment_identity: - description: Enrollment identity. - example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 - pattern: ^A-[A-Za-z0-9:]{95}$ + host_gateway: type: string - etag: - example: 7642xfaxz - pattern: '[A-Za-z0-9]{1,256}' + id: type: string - expires_at: - description: The enrollment claim expiration time. If the device does not - connect to Device Management before expiration, the claim is removed without - separate notice. + manifest: + type: string + manifest_timestamp: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - id: - description: Enrollment identity. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + mechanism: type: string - object: - enum: - - enrollment - example: enrollment + mechanism_url: type: string - required: - - object - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id - type: object - ErrorObjectResponse: - properties: - code: - description: Error code. Correlates with response status code. - format: int32 - type: integer - fields: - description: A list of request fields that failed validation. - items: - $ref: '#/definitions/FieldMessageEntry' - type: array - message: - description: Error message. + name: type: string - object: - description: 'Entity name: `error`.' + serial_number: type: string - request_id: - description: Request ID from JWT. + state: type: string - type: - description: Error type. + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + vendor_id: type: string - required: - - code - - fields - - message - - object - - request_id - - type type: object - ErrorResponse: + DeviceEventData: properties: - code: - description: HTTP response code - example: 400 - format: int32 - type: integer - fields: - description: Request fields which failed validation. - items: - properties: - message: - description: Message describing the error condition. - type: string - name: - description: Name of the field which caused the error. - type: string - required: - - name - - message + changes: + additionalProperties: type: object - type: array - message: - description: A human readable informative explanation - example: Validation error + example: {} + type: object + x-deprecation: + comment: This field is not used. + end_of_life_at: '2020-01-15T14:55:20+00:00' + issued_at: '2019-01-15T14:55:20+00:00' + links: [] + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - object: - description: Entity name, always `error`. - enum: - - error + data: + additionalProperties: + type: string + description: Additional data relevant to the event. + example: + campaign_id: '00000000000000000000000000000000' + type: object + date_time: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - request_id: - description: ID of the request. - example: 0161991d63150242ac12000600000000 + description: + example: Device record created type: string - type: - description: Error type used to categorise the error. - example: validation_error + device_id: + example: '00000000000000000000000000000000' type: string - required: - - code - - message - - object - - request_id - - type - type: object - EventType: - properties: - campaign_id: - description: ID of the associated campaign. + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + event_type: + description: Event code + example: UPD2_100 + maxLength: 100 + type: string + event_type_category: + description: Category code that groups the event type by a summary category. + example: FAIL_MANIFEST_REJECTED + type: string + event_type_description: + description: Generic description of the event. + example: FAIL + type: string + id: example: '00000000000000000000000000000000' type: string - count: - example: 10 - type: integer - created_at: + object: + description: The API resource entity. + example: device-event + type: string + state_change: + type: boolean + required: + - date_time + - id + DeviceEventEqNeqFilter: + properties: + date_time: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string description: - example: Update error, nonspecific network error + type: string + device_id: type: string event_type: - example: UPD4_FAIL_101 type: string id: - example: upd_fail_101 type: string - object: - description: 'Entity name: always ''event-type''.' + state_change: + type: boolean + DeviceEventGteLteFilter: + properties: + date_time: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - summary_status: - example: FAIL + DeviceEventInNinFilter: + properties: + date_time: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - summary_status_id: - example: fail + description: type: string - type: object - EventTypeList: + device_id: + type: string + event_type: + type: string + id: + type: string + state_change: + type: boolean + DeviceEventPage: properties: after: - description: The entity ID to fetch after the given one. - example: 'null' + example: null type: string data: + example: '[]' items: - $ref: '#/definitions/EventType' + $ref: '#/definitions/DeviceEventData' type: array has_more: - description: A flag indicating whether there are more results. - example: 'false' + example: false type: boolean limit: - description: 'The number of results to return, (range: 2-1000), or equals - to total_count.' - example: '50' + example: 1000 type: integer object: - description: 'The entity name: always ''list''.' example: list type: string order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - enum: - - ASC - - DESC - example: ASC + example: DESC type: string total_count: - description: The total number or records, if requested. It may be returned - also for small lists. - example: '1' + example: 1 type: integer - type: object - EventTypeSummary: + DeviceGroup: properties: - campaign_id: - description: ID of the associated campaign. - example: '00000000000000000000000000000000' - type: string - count: - example: 10 - type: integer created_at: + description: The time the group was created. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - id: - description: ID of the event type description. - enum: - - fail - - success - - info - - skipped - example: fail - type: string - object: - description: 'Entity name: always ''summary_status''.' - type: string - summary_status: - description: The event type description. - enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - example: FAIL + custom_attributes: &id028 + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + description: Up to ten custom key-value attributes. Keys cannot begin with + a number. Both key and value are limited to 128 characters. Updating this + field replaces existing contents. + example: + key: value + maxProperties: 10 + type: object + description: &id029 + description: The description of the group. + example: Devices on the factory floor. + maxLength: 1024 + type: string + devices_count: + description: The number of devices in this group. + example: 10 + type: integer + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + id: + description: The group ID. + example: 015c3029f6f7000000000001001000c3 + type: string + name: &id030 + description: Name of the group. + example: My devices + maxLength: 128 + type: string + object: + description: 'Entity name: always `device-group`.' + example: device-group + type: string + updated_at: + description: The time this object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string type: object - EventTypeSummaryList: + DeviceGroupManipulation: + properties: + device_id: + example: '00000000000000000000000000000000' + type: string + required: + - device_id + type: object + DeviceGroupPage: properties: after: - description: The entity ID to fetch after the given one. - example: 'null' + description: An offset token for current page. + example: '01631667477600000000000100100374' type: string data: items: - $ref: '#/definitions/EventTypeSummary' + $ref: '#/definitions/DeviceGroup' type: array has_more: - description: A flag indicating whether there are more results. - example: 'false' + description: More results are available. + example: false type: boolean limit: - description: 'The number of results to return, (range: 2-1000), or equals - to total_count.' - example: '50' + description: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. + example: 50 + maximum: 1000 + minimum: 2 type: integer object: - description: 'The entity name: always ''list''.' + description: The type of this API object is 'list'. + example: list type: string order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - enum: - - ASC - - DESC - example: ASC + description: Record order based on creation time. + example: DESC type: string total_count: - description: The total number or records, if requested. It may be returned - also for small lists. - example: '1' + example: 1 + format: integer type: integer type: object - FeaturePolicy: - description: Represents a feature policy. Either the feature or the resource must - be specified. + DeviceGteLteFilter: properties: - action: - description: Comma-separated list of actions, empty string represents all - actions. - example: GET - type: string - allow: - description: True or false controlling whether an action is allowed or not. - example: true - type: boolean - feature: - description: Feature name corresponding to this policy. - example: update-campaigns + bootstrap_expiration_date: + example: '2017-05-22' + format: date type: string - inherited: - description: Flag indicating whether this feature is inherited or overwritten - specifically. - example: false - readOnly: true - type: boolean - inherited_from: - description: An ID indicating where this policy is inherited from. - example: 016ada3ec2d46665bf66e32e00000000 - pattern: '[a-f0-9]{32}' - readOnly: true + bootstrapped_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - inherited_type: - description: Indicates the type of entity this policy is inherited from. - enum: - - account - - template - - tier_template - example: account - readOnly: true + connector_expiration_date: + example: '2017-05-22' + format: date type: string - resource: - description: Resource that is protected by this policy. - example: /v3/update-campaign + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - type: object - Field: - properties: - message: - description: Message describing the erroneous situation. + enrolment_list_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - name: - description: Name of the erroneous field. + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - required: - - message - - name - type: object - FieldMessageEntry: - properties: - field: - description: Field name. + manifest_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - message: - description: Error message related to the field. + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string type: object - FirmwareImage: + DeviceInNinFilter: properties: - created_at: *id013 - datafile: - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 - type: string - datafile_checksum: - description: The checksum (sha256) generated for the datafile. - example: '0000000000000000000000000000000000000000000000000000000000000000' + account_id: type: string - datafile_size: - description: The size of the datafile in bytes. - format: int64 - type: integer - description: - description: The description of the object. - example: a description - maxLength: 2000 + auto_update: + type: boolean + bootstrap_expiration_date: + example: '2017-05-22' + format: date type: string - etag: *id014 - id: - description: The firmware image ID. - example: '00000000000000000000000000000000' + bootstrapped_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - name: - description: The firmware image name. - maxLength: 128 + ca_id: type: string - object: - description: 'Entity name: always ''firmware-image''.' + component_attributes: + additionalProperties: + type: string + type: object + connector_expiration_date: + example: '2017-05-22' + format: date type: string - updated_at: *id015 - FirmwareImageEqNeqFilter: - properties: created_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: + custom_attributes: + additionalProperties: + type: string + type: object + deployed_state: type: string - datafile_checksum: + deployment: type: string - datafile_size: - type: integer description: type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + device_class: type: string - id: + device_execution_mode: + type: integer + device_key: type: string - name: + endpoint_name: type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + endpoint_type: type: string - FirmwareImageGteLteFilter: - properties: - created_at: + enrolment_list_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -3906,122 +3922,117 @@ definitions: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - FirmwareImageInNinFilter: - properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + firmware_checksum: type: string - datafile: + host_gateway: type: string - datafile_checksum: + id: type: string - datafile_size: - type: integer - description: + manifest: type: string - etag: + manifest_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - id: + mechanism: type: string - name: + mechanism_url: + type: string + name: + type: string + serial_number: + type: string + state: type: string updated_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareImagePage: + vendor_id: + type: string + type: object + DevicePage: properties: after: - example: null + description: An offset token for current page. + example: '01631667477600000000000100100374' type: string data: items: - $ref: '#/definitions/FirmwareImage' + $ref: '#/definitions/DeviceData' type: array has_more: + description: Are there more results available. + example: false type: boolean limit: - format: int32 + description: How many objects to retrieve in the page. The minimum limit is + 2 and the maximum is 1000. Limit values outside of this range are set to + the closest limit. + example: 50 + maximum: 1000 + minimum: 2 type: integer object: - description: 'Entity name: always ''list''.' + description: The type of this API object is a "list". + example: list type: string order: description: The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`. - enum: - - ASC - - DESC - example: ASC + example: DESC type: string total_count: - format: int32 + example: 1 + format: integer type: integer - FirmwareManifest: + DeviceQuery: properties: - created_at: *id013 - datafile: - description: The URL of the firmware manifest binary - example: http://example.com/12345678901234567890123456789012 - type: string - datafile_size: - description: The size of the datafile in bytes - format: int64 - type: integer - description: - description: The description of the firmware manifest. - example: '' - maxLength: 2000 + created_at: + description: The timestamp of when the query was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - device_class: - description: The class of the device. - example: 00000000-0000-0000-0000-000000000000 + etag: + description: The entity instance signature. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - etag: *id014 id: - description: The firmware manifest ID. - example: '12345678901234567890123456789012' - type: string - key_table: - description: The key table of pre-shared keys for devices. - example: http://example.com - format: uri + description: The ID of the query. + example: 015c30671894000000000001001001e9 type: string name: - description: The name of the object. - example: default_object_name - maxLength: 128 + description: The name of the query. + example: example-stored-device-query type: string object: - description: 'Entity name: always ''firmware-manifest''.' + description: The API resource entity. + example: device-query type: string - timestamp: - description: The firmware manifest version as a timestamp. + query: + description: The device query. + example: id=0158d38771f70000000000010010038c + type: string + updated_at: + description: The time the object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - updated_at: *id015 - FirmwareManifestEqNeqFilter: + required: + - created_at + - etag + - id + - name + - object + - query + - updated_at + DeviceQueryEqNeqFilter: properties: created_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: - type: string - datafile_size: - type: integer - description: - type: string - device_class: - type: string etag: example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -4030,15 +4041,13 @@ definitions: type: string name: type: string - timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + query: type: string updated_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareManifestGteLteFilter: + DeviceQueryGteLteFilter: properties: created_at: example: '2017-05-22T12:37:55.576563Z' @@ -4048,28 +4057,16 @@ definitions: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string updated_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareManifestInNinFilter: + DeviceQueryInNinFilter: properties: created_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: - type: string - datafile_size: - type: integer - description: - type: string - device_class: - type: string etag: example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -4078,1171 +4075,1039 @@ definitions: type: string name: type: string - timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + query: type: string updated_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareManifestPage: + DeviceQueryPage: properties: after: example: null type: string data: + example: '[]' items: - $ref: '#/definitions/FirmwareManifest' + $ref: '#/definitions/DeviceQuery' type: array has_more: + example: false type: boolean limit: - format: int32 + example: 1000 + format: integer type: integer object: - description: 'Entity name: always ''list''.' + example: list type: string order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - enum: - - ASC - - DESC - example: ASC + example: DESC type: string total_count: - format: int32 + example: 1 + format: integer type: integer - ForbiddenErrorResponse: - description: 403 Forbidden. + required: + - limit + - order + - object + - has_more + - total_count + - data + DeviceQueryPatchRequest: properties: - code: - description: Response code. Always set to 403. - enum: - - 403 - type: integer - message: - description: A human-readable message with detailed info. + name: + description: The name of the query. + maxLength: 200 type: string - object: - description: Always set to `error`. - enum: - - error + query: + description: The device query. + maxLength: 1000 type: string - request_id: - description: Request ID + DeviceQueryPostPutRequest: + properties: + name: + description: The name of the query. + maxLength: 200 type: string - type: - description: Error type. Always set to `forbidden`. - enum: - - forbidden + query: + description: The device query to store. A query is made of key/value pairs + separated by ampersands (`&`). The key defines the field name to filter + by when applying the query. Refer to the endpoint documentation before applying + a filter, as supported fields vary between endpoints. + maxLength: 1000 type: string required: - - object - - message - - request_id - - type - - code - type: object - GlobalSignCredentials: - description: 'Describes the credentials required to connect to the GlobalSign - account. - - The values should be taken from GlobalSign support upon account creation. - - ' + - name + - query + DeviceRequest: properties: - api_key: - description: 'Unique ID for API client (provided by GlobalSign). - - ' - example: e510e289e6cd8947 - maxLength: 1000 + accept: + description: The content type of an accepted response. + example: text/plain type: string - api_secret: - description: 'API Secret matching the API key (provided by GlobalSign). - - ' - example: a477a8393d17a55ecb2ba6a61f58feb84770b621 - format: password - maxLength: 250 + content-type: + description: The content type of the payload. + example: text/plain type: string - client_certificate: - description: 'The client certificate provided by GlobalSign to allow HTTPS - connection over TLS/SSL. - - The certificate wraps a public key that matches a private key provided by - the customer. - - The certificate must be in PEM format. - - ' - example: '"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END - CERTIFICATE-----"' - maxLength: 3000 + method: + description: The CoAP request method. Allowed values are GET, POST, PUT and + DELETE. + example: GET type: string - passphrase: - description: 'The passphrase to decrypt the private key in case it is encrypted. - - Empty if the private key is not encrypted. - - ' - example: helloworld - format: password - maxLength: 1000 + payload-b64: + description: The base64 encoded payload to send to the device. + example: dmFsdWUxCg== type: string - private_key: - description: 'The private key that matches the client certificate to allow - HTTPS connection over TLS/SSL. - - The private key may be encrypted using a symmetric encryption key derived - from a passphrase. - - The private key must be in PEM format. - - ' - example: '"-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: - DES-EDE3-CBC,CCAC26A4133947CB\n\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\n-----END - RSA PRIVATE KEY-----"' - maxLength: 3000 + uri: + description: The URI path of the requested resource. + example: /5/0/1 type: string required: - - api_key - - api_secret - - client_certificate - - private_key - type: object - GroupCreationInfo: - description: This object is used when creating new groups. + - method + - uri + type: object + DeviceToPelionMessagesCounter: + description: The number of messages from the device to Device Management. properties: - members: - $ref: '#/definitions/SubjectList' - description: The members of the group as arrays of user and API key IDs. - name: - description: The group name. - maxLength: 100 - type: string + bootstrap_requests: + $ref: '#/definitions/BootstrapRequestsCounter' + est_requests: + $ref: '#/definitions/EstRequestsCounter' + observations: + $ref: '#/definitions/ObservationsCounter' + proxy_responses: + $ref: '#/definitions/ProxyResponsesCounter' + registration_deletes: + $ref: '#/definitions/RegistrationDeletesCounter' + registration_updates: + $ref: '#/definitions/RegistrationUpdatesCounter' + registrations: + $ref: '#/definitions/RegistrationsCounter' + total_count: + description: The number of all inbound requests from devices to Device Management. + format: int64 + minimum: 0 + type: integer required: - - name + - total_count + - registrations + - registration_updates + - registration_deletes + - observations + - est_requests + - proxy_responses + - bootstrap_requests type: object - GroupIdList: - items: - type: string - type: array - GroupSummary: - description: This object contains basic information about groups. + EchoDevice: + description: The Device Echo object representing the device. properties: - account_id: - description: The ID of the account this group belongs to. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - apikey_count: - description: The number of API keys in this group. - example: 0 - format: int32 - type: integer created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' + description: Response creation UTC time. + example: 2020-10-20 10:30:55.123000+00:00 format: date-time type: string - etag: - description: API resource entity version. - example: '1' + device_id: + description: The device ID. + example: 015f3850a657000000000001001002ab type: string - id: - description: The ID of the group. - example: 01619571dec00242ac12000600000000 - pattern: '[a-f0-9]{32}' + endpoint_name: + description: The endpoint name. + example: Sensor3222454 type: string - name: - description: The name of the group. - example: Administrators - maxLength: 100 + last_desired_at: + description: The last time a write command was initiated on a resource. + example: 2019-10-20 10:30:55.123000+00:00 + format: date-time + type: string + last_reported_at: + description: The last time any resource's reported value was updated. + example: 2019-10-20 10:30:55.123000+00:00 + format: date-time type: string object: - description: 'Entity name: always `group`.' - enum: - - group + description: API Resource name + example: device-echo type: string + resources: + description: The list of device resources stored in Device Echo. + items: + $ref: '#/definitions/EchoResource' + type: array updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' + description: The time of last registration event of a Device Echo object. + example: 2019-10-20 10:30:55.123000+00:00 format: date-time type: string - user_count: - description: The number of users in this group. - example: 1 - format: int32 - type: integer required: - - account_id - - apikey_count - - etag - id - - name - - object - - user_count type: object - GroupSummaryList: + EchoResource: + description: The representation of a single resource of the device stored in Device + Echo. + properties: + desired: + $ref: '#/definitions/EchoResourceDesired' + reported: + $ref: '#/definitions/EchoResourceReported' + resource_path: + description: The path of the resource. + example: /3/0/1 + type: string + subscribed: + description: System-level subscription status of the resource. If any of the + applications has placed a subscription, the status is true. Overlapping + subscriptions from multiple applications do not increase the load on the + device as the server handles the multiplexing. + type: boolean + type: object + EchoResourceDesired: + description: Resource value written, or queued to be written to the device. + properties: + desired_at: + description: The time of the latest value write was initiated. + example: 2019-10-20 10:30:55.123000+00:00 + format: date-time + type: string + status: + description: The status of the desired value. 0 = 'pending write', 1 = 'success', + 2 = 'failed'. + format: integer + type: number + status_updated_at: + description: The time of the last status update. + example: 2019-10-20 10:30:55.123000+00:00 + format: date-time + type: string + value: + description: The desired value in base64 encoded format. + example: RGVzaXJlZCB2YWx1ZS4= + format: byte + type: string + type: object + EchoResourceReported: + description: Reported single resource data received from the device. + properties: + content_type: + description: Content type of the reported resource value. + example: text/plain + type: string + expires_at: + description: The time after which the reported value is not valid, calculated + based on the max-age of the resource value the device reported. + example: 2019-10-20 10:30:55.123000+00:00 + format: date-time + type: string + reported_at: + description: The time the last value was reported. + format: date-time + type: string + value: + description: The reported value in base64 encoded format. + example: UmVwb3J0ZWQgdmFsdWUu + format: byte + type: string + type: object + EndpointData: + properties: + ep: + description: Unique Device Management device ID. + example: 015f3850a657000000000001001002ab + type: string + ept: + description: Endpoint type. + example: Light + type: string + original-ep: + description: If device registration is initiated with a self-provided endpoint + name, Device Management provides a new device ID for subsequent use. The + new platform-provided Device ID is forwarded as the 'ep' property and the + original self-provided one as the optional 'original-ep' property in a registration + notification. The name and ID can then be mapped accordingly. Device Management + saves the original endpoint name in the Device Directory for future device + registrations so you don't need to do mapping again. + example: my-device-123 + type: string + q: + description: Queue mode (default value is false). + example: false + type: boolean + resources: + items: + $ref: '#/definitions/ResourcesData' + type: array + type: object + EnrollmentId: + properties: + enrollment_identity: + description: Enrollment identity. + example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 + pattern: ^A-[A-Za-z0-9:]{95}$ + type: string + required: + - enrollment_identity + type: object + EnrollmentIdentities: properties: after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: ID + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} type: string data: - description: A list of entities. items: - $ref: '#/definitions/GroupSummary' + $ref: '#/definitions/EnrollmentIdentity' type: array has_more: - description: Flag indicating whether there are more results. - example: false + example: true type: boolean limit: - description: The number of results to return (2-1000), or equal to `total_count`. + description: Range 2-1000, or default. example: 50 - format: int32 + maximum: 1000 + minimum: 2 type: integer object: - description: 'Entity name: always `list`.' enum: - list + example: list type: string order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' + default: ASC enum: - ASC - DESC + example: ASC type: string total_count: - description: The total number of records, if requested. - example: 20 + example: 100 format: int32 + minimum: 1 type: integer required: - - data - - has_more - - limit - object + - limit + - after + - order + - has_more - total_count + - data type: object - GroupUpdateInfo: - description: This object is used when Update groups. - properties: - name: - description: The group name. - maxLength: 100 - type: string - required: - - name - type: object - IdentityProviderCreationReq: - description: This object is used for creating new federated identity provider - module. - properties: - description: - description: Description for the identity provider. - maxLength: 500 - type: string - name: - description: Name of the identity provider. - maxLength: 100 - type: string - oidc_attributes: - $ref: '#/definitions/OIDCInfo' - description: OIDC specific attributes. - saml2_attributes: - $ref: '#/definitions/SAML2Req' - description: SAML2 specific attributes. - status: - description: Status of the identity provider. - enum: - - ACTIVE - - SUSPENDED - type: string - type: - description: Identity provider type. - enum: - - SAML2 - type: string - required: - - name - - type - type: object - IdentityProviderInfo: + EnrollmentIdentity: properties: account_id: - description: The ID of the account the identity provider belongs to. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: ID + example: 00005a4e027f0a580a01081c00000000 + type: string + claimed_at: + description: The time the device was claimed. + format: date-time type: string created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' + description: The time of the enrollment identity creation. format: date-time type: string - description: - description: Description for the identity provider. - maxLength: 500 + enrolled_device_id: + description: The ID of the device in the Device Directory once it is registered. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + enrollment_identity: + description: Enrollment identity. + example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 + pattern: ^A-[A-Za-z0-9:]{95}$ type: string etag: - description: API resource entity version. - example: '1' + example: 7642xfaxz + pattern: '[A-Za-z0-9]{1,256}' + type: string + expires_at: + description: The enrollment claim expiration time. If the device does not + connect to Device Management before expiration, the claim is removed without + separate notice. + format: date-time type: string id: - description: Entity ID. - example: 01619571d01d0242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - is_default: - description: Flag indicating whether this is the global default identity provider. - readOnly: true - type: boolean - name: - description: Name of the identity provider. - maxLength: 100 + description: Enrollment identity. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} type: string object: - description: 'Entity name: always ''identity-provider''' - enum: - - identity-provider - type: string - saml2_attributes: - $ref: '#/definitions/SAML2Info' - description: SAML2 specific attributes. - status: - description: Status of the identity provider. - enum: - - ACTIVE - - SUSPENDED - type: string - type: - description: Identity provider type. enum: - - NATIVE - - MBED - - SAML2 - - OIDC - type: string - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time + - enrollment + example: enrollment type: string required: - - etag - - id - - name - object - - type + - id + - etag + - account_id + - created_at + - expires_at + - claimed_at + - enrollment_identity + - enrolled_device_id type: object - IdentityProviderList: + ErrorObjectResponse: properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - data: - description: A list of entities. - items: - $ref: '#/definitions/IdentityProviderInfo' - type: array - has_more: - description: Flag indicating whether there are more results. - example: false - type: boolean - limit: - description: The number of results to return , or equal to `total_count`. - example: 50 - format: int32 - type: integer - object: - description: 'Entity name: always `list`.' - enum: - - list - type: string - order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC - type: string - total_count: - description: The total number of records, if requested. - example: 20 + code: + description: Error code. Correlates with response status code. format: int32 type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - IdentityProviderUpdateReq: - description: Update existing federated identity provider module. - properties: - description: - description: Description for the identity provider. - maxLength: 500 + fields: + description: A list of request fields that failed validation. + items: + $ref: '#/definitions/FieldMessageEntry' + type: array + message: + description: Error message. type: string - name: - description: Name of the identity provider. - maxLength: 100 + object: + description: 'Entity name: `error`.' type: string - oidc_attributes: - $ref: '#/definitions/OIDCInfo' - description: OIDC specific attributes. - saml2_attributes: - $ref: '#/definitions/SAML2Req' - description: SAML2 specific attributes. - status: - description: Status of the identity provider. - enum: - - ACTIVE - - SUSPENDED + request_id: + description: Request ID from JWT. type: string type: - description: Identity provider type. - enum: - - SAML2 + description: Error type. type: string required: - - name + - code + - fields + - message + - object + - request_id - type type: object - IdpPublicKey: - description: Represents provider's public key and key ID used to sign ID tokens. - PEM-encoded. - properties: - key: - description: The public key. - type: string - kid: - description: The public key ID. - type: string - type: object - Image: - format: binary - type: string - InternalServerErrorResponse: - description: 500 Internal server error response. + ErrorResponse: properties: code: - description: Response code. Always set to 500. - enum: - - 500 + description: HTTP response code + example: 400 + format: int32 type: integer + fields: + description: Request fields which failed validation. + items: + properties: + message: + description: Message describing the error condition. + type: string + name: + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array message: - description: A human-readable message with detailed info. + description: A human readable informative explanation + example: Validation error type: string object: - description: Always set to `error`. + description: Entity name, always `error`. enum: - error type: string request_id: - description: Request ID + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string type: - description: Error type. Always set to `internal_error`. - enum: - - internal_error + description: Error type used to categorise the error. + example: validation_error type: string required: - - object + - code - message + - object - request_id - type - - code type: object - ListOfPreSharedKeysWithoutSecret: + EstRequestsCounter: + description: The number of certificate creation requests received from devices + during bootstrap. + format: int64 + minimum: 0 + type: integer + EventType: properties: - after: - description: An offset token for current page. - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 + campaign_id: + description: ID of the associated campaign. + example: 016e652be671000000000001001001e5 type: string - continuation_marker: - description: An offset token for fetching the next page. Note that exactly - the same limit needs to be used on the request for fetching subsequent pages. - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810005 + count: + example: 10 + type: integer + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + description: + example: Update error, nonspecific network error + type: string + event_type: + example: UPD4_FAIL_101 + type: string + id: + example: upd_fail_101 + type: string + object: + description: 'Entity name: always ''event-type''.' + example: event-type + type: string + summary_status: + example: FAIL + type: string + summary_status_id: + example: fail + type: string + type: object + EventTypeList: + properties: + after: + description: The entity ID to fetch after the given one. + example: 'null' type: string data: - description: Array of the PSK entries. The array is empty if there are no - PSKs. + enum: + - fail + - skipped + - info + - success items: - $ref: '#/definitions/PreSharedKeyWithoutSecret' - minLength: 0 + $ref: '#/definitions/EventType' type: array has_more: - description: More results are available. - example: true + description: A flag indicating whether there are more results. + example: 'false' type: boolean limit: - description: The value of limit query parameter from the request, or default - if not specified. - example: 50 + description: 'The number of results to return, (range: 2-1000), or equals + to total_count.' + example: '50' type: integer object: - description: The type of this API object is a "list". + description: 'The entity name: always ''list''.' example: list type: string order: - description: Record order based on creation time. - example: DESC - type: string - required: - - object - - limit - - order - - has_more - - data - type: object - LoginHistory: - description: Represents an entry in login history. - properties: - date: - description: UTC time RFC3339 for this login attempt. - example: '2018-02-14T17:52:07Z' - format: date-time - type: string - ip_address: - description: IP address of the client. - example: 127.0.0.1 - type: string - success: - description: Flag indicating whether login attempt was successful or not. - example: true - type: boolean - user_agent: - description: User Agent header from the login request. - example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 - (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36 - type: string - required: - - date - - ip_address - - success - - user_agent - type: object - LoginProfile: - description: Represents a user login profile in Device Management. - properties: - id: - description: ID of the identity provider. - type: string - name: - description: Name of the identity provider. - readOnly: true - type: string - type: - description: Identity provider type. + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' enum: - - NATIVE - - MBED - - SAML2 - - OIDC - readOnly: true - type: string - required: - - id - type: object - NotificationData: - properties: - ct: - description: Content type. - example: text/plain - type: string - ep: - description: Device Management Device ID. - example: 015f3850a657000000000001001002ab - type: string - max-age: - description: 'Max age value is an integer number of seconds between 0 and - 2^32-1, but the actual maximum cache time is limited to 3 days. - - Default 60.' - example: 60 - type: string - path: - description: URI path. - example: /sen/light - type: string - payload: - description: Base64 encoded payload. - example: My4zMQ== + - ASC + - DESC + example: ASC type: string + total_count: + description: The total number or records, if requested. It may be returned + also for small lists. + example: '1' + type: integer type: object - NotificationEntry: - description: Represents an account notification entry. + EventTypeSummary: properties: - account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + campaign_id: + description: ID of the associated campaign. + example: 016e652be6710000000000010010013d type: string + count: + example: 10 + type: integer created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - error_msg: - description: The error message if there was an error while transmitting the - account notification. - example: Connection error. - type: string - etag: - description: API resource entity version. - example: '1' - type: string id: - description: Entity ID. - example: 01619571d01d0242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - message: - description: The message contained in this account notification entry. - example: User limit has been reached. - type: string - object: - description: 'Entity name: always ''notification-entry''' + description: ID of the event type description. enum: - - notification-entry - type: string - receiver: - description: The receiver this account notification entry. - example: example@email-receiver.test - pattern: ^(?=.{3,254}$).+\@.+ + - fail + - success + - info + - skipped + example: fail type: string - subject: - description: The subject of this account notification entry. - example: Account locked. + object: + description: 'Entity name: always ''summary_status''.' + example: summary_status type: string - success: - description: A flag indiciating whether the sending of this account notification - entry was successful, true or false. - type: boolean - type: - description: The type of this account notification entry. - example: email + summary_status: + description: The event type description. + enum: + - FAIL + - SUCCESS + - INFO + - SKIPPED + example: FAIL type: string - required: - - etag - - id - - object type: object - NotificationEntryList: + EventTypeSummaryList: properties: after: description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + example: 'null' type: string data: - description: A list of entities. items: - $ref: '#/definitions/NotificationEntry' + $ref: '#/definitions/EventTypeSummary' type: array has_more: - description: Flag indicating whether there are more results. - example: false + description: A flag indicating whether there are more results. + example: 'false' type: boolean limit: - description: The number of results to return, or equal to `total_count`. - example: 50 - format: int32 + description: 'The number of results to return, (range: 2-1000), or equals + to total_count.' + example: '50' type: integer object: - description: 'Entity name: always `list`.' - enum: - - list + description: 'The entity name: always ''list''.' + example: list type: string order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' enum: - ASC - DESC + example: ASC type: string total_count: - description: The total number of records, if requested. - example: 20 - format: int32 + description: The total number or records, if requested. It may be returned + also for small lists. + example: '1' type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - NotificationMessage: - properties: - async-responses: - items: - $ref: '#/definitions/AsyncIDResponse' - type: array - de-registrations: - items: - description: The device ID. - example: 015f3850a657000000000001001002ab - type: string - type: array - notifications: - items: - $ref: '#/definitions/NotificationData' - type: array - reg-updates: - items: - $ref: '#/definitions/EndpointData' - type: array - registrations: - items: - $ref: '#/definitions/EndpointData' - type: array - registrations-expired: - items: - description: The device ID. - example: 015f3850a657000000000001001002ab - type: string - type: array type: object - OIDCClaimMapping: - description: Mapping for non-standard OIDC claim names. + FeaturePolicy: + description: Represents a feature policy. Either the feature or the resource must + be specified. properties: - email: - description: Custom claim name for 'email'. - example: email_address + action: + description: Comma-separated list of actions, empty string represents all + actions. + example: GET type: string - x-nullable: true - email_verified: - description: Custom claim name for 'email_verified'. + allow: + description: True or false controlling whether an action is allowed or not. + example: true + type: boolean + feature: + description: Feature name corresponding to this policy. + example: update-campaigns type: string - x-nullable: true - family_name: - description: Custom claim name for 'family_name'. + inherited: + description: Flag indicating whether this feature is inherited or overwritten + specifically. + example: false + readOnly: true + type: boolean + inherited_from: + description: An ID indicating where this policy is inherited from. + example: 016ada3ec2d46665bf66e32e00000000 + pattern: '[a-f0-9]{32}' + readOnly: true type: string - x-nullable: true - given_name: - description: Custom claim name for 'given_name'. + inherited_type: + description: Indicates the type of entity this policy is inherited from. + enum: + - account + - template + - tier_template + example: account + readOnly: true type: string - x-nullable: true - name: - description: Custom claim name for 'name'. + resource: + description: Resource that is protected by this policy. + example: /v3/update-campaign type: string - x-nullable: true - phone_number: - description: Custom claim name for 'phone_number'. + type: object + Field: + properties: + message: + description: Message describing the erroneous situation. type: string - x-nullable: true - sub: - description: Custom claim name for 'sub'. + name: + description: Name of the erroneous field. type: string - x-nullable: true - updated_at: - description: Custom claim name for 'updated_at'. + required: + - message + - name + type: object + FieldMessageEntry: + properties: + field: + description: Field name. type: string - x-nullable: true - updated_at_pattern: - description: Custom pattern for claim 'updated_at' as defined by the Java - SimpleDateFormat class. - example: yyyy-MM-dd'T'HH:mm:ssXXX + message: + description: Error message related to the field. type: string - x-nullable: true type: object - OIDCInfo: - description: Represents OIDC specific attributes. + FirmwareImage: properties: - authorization_endpoint: - description: URL of the OAuth 2.0 authorization endpoint. + created_at: *id014 + datafile: + description: The firmware image file URL. + example: http://bucket.com/myimage.elf type: string - x-nullable: true - auto_enrollment: - description: For future use. - type: boolean - x-nullable: true - claim_mapping: - $ref: '#/definitions/OIDCClaimMapping' - description: Mapping table for supporting custom OIDC claims. - x-nullable: true - client_id: - description: Client ID needed to authenticate and gain access to identity - provider's API. + datafile_checksum: + description: The checksum (sha256) generated for the datafile. + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e type: string - x-nullable: true - client_secret: - description: Client secret needed to authenticate and gain access to identity - provider's API. + datafile_size: + description: The size of the datafile in bytes. + format: int64 + type: integer + description: + description: The description of the object. + example: a description + format: free text + maxLength: 2000 type: string - x-nullable: true - end_session_endpoint: - description: URL of the provider's end session endpoint. + etag: *id015 + id: + description: The firmware image ID. + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' type: string - x-nullable: true - issuer: - description: Issuer of the identity provider. + name: + description: The firmware image name. + format: free text + maxLength: 128 type: string - jwks_uri: - description: URL of the provider's JSON web key set document. + object: + description: 'Entity name: always ''firmware-image''.' + example: firmware-image type: string - x-nullable: true - keys: - description: Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. - items: - $ref: '#/definitions/IdpPublicKey' - type: array - x-nullable: true - redirect_uri: - description: The URI needed to authenticate and gain access to identity provider's - API. Leave this empty to use the default redirect URI. + updated_at: *id016 + FirmwareImageEqNeqFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - x-nullable: true - revocation_endpoint: - description: URL of the provider's token revocation endpoint. + datafile: type: string - x-nullable: true - scopes: - description: Space-separated list of scopes sent in the authentication request. - When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). - example: openid email + datafile_checksum: type: string - token_endpoint: - description: URL of the OAuth 2.0 authorization endpoint. + datafile_size: + type: integer + description: type: string - x-nullable: true - token_request_mode: - default: POST - description: One way to obtain the access token. Since the request results - in the transmission of clear-text credentials, the client must use the POST - mode. - enum: - - POST - - GET + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - token_response_path: - description: Path to the standard data in the token response. Levels in the - JSON structure must be separated by '.' (dot) characters. - example: oidc.data + id: + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string - userinfo_endpoint: - description: URL of the OAuth 2.0 UserInfo endpoint. + name: type: string - x-nullable: true - required: - - issuer - type: object - ParentAccountInfo: - description: Represents parent account contact details in responses. + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + FirmwareImageGteLteFilter: properties: - admin_email: - description: The email address of the admin user who is the contact person - of the parent account. - example: info@arm.com - pattern: ^(?=.{3,254}$).+\@.+ + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - admin_name: - description: The name of the admin user who is the contact person of the parent - account. - example: J. Doe - maxLength: 100 + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - id: - description: The ID of the parent account. - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - type: object - PasswordPolicy: - properties: - minimum_length: - description: Minimum length for the password. - example: '8' - maximum: 512 - minimum: 8 - type: integer - required: - - minimum_length - type: object - PendingServicePackage: - description: A pending service package. + FirmwareImageInNinFilter: properties: - created: - description: Service package creation time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + created_at: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - expires: - description: Service package expiration time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + datafile: type: string - firmware_update_count: - description: Size of firmware update quota of this service package. - format: int32 + datafile_checksum: + type: string + datafile_size: type: integer - id: - description: ID of this service package. + description: type: string - modified: - description: Service package latest modified time in RFC3339 date-time with - millisecond accuracy and UTC time zone. + etag: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - previous_id: - description: Previous service package ID. + id: + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + name: + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - required: - - id - - previous_id - - created - - modified - - start_time - - expires - - firmware_update_count - type: object - PreSharedKey: + FirmwareImagePage: properties: - endpoint_name: - description: The unique endpoint identifier that this PSK applies to. 16-64 - [printable](https://en.wikipedia.org/wiki/ASCII#Printable_characters) (non-control) - ASCII characters. - example: my-endpoint-0001 - pattern: ^[ -~]{16,64}$ - type: string - secret_hex: - description: The secret of the PSK in hexadecimal. It is not case sensitive; - 4a is same as 4A, and it is allowed with or without 0x in the beginning. - The minimum length of the secret is 128 bits and maximum 256 bits. - example: 4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a - pattern: ^(0[xX])?[0-9a-fA-F]{32,64}$ - type: string - required: - - endpoint_name - - secret_hex - type: object - PreSharedKeyWithoutSecret: - properties: - created_at: - description: The date-time (RFC3339) when this PSK was uploaded to Device - Management. - example: '2017-07-21T17:32:28.012Z' - format: date-time - type: string - endpoint_name: - description: The unique endpoint identifier that this PSK applies to. 16-64 - [printable](https://en.wikipedia.org/wiki/ASCII#Printable_characters) (non-control) - ASCII characters. - example: my-endpoint-0001 - pattern: ^[ -~]{16,64}$ - type: string - required: - - endpoint_name - type: object - Presubscription: - properties: - endpoint-name: - description: The device ID. - example: 015f3850a657000000000001001002ab - type: string - endpoint-type: - example: Light + after: + example: null type: string - resource-path: + data: items: - description: A resource URI. - example: /sen/light - type: string - minItems: 1 + $ref: '#/definitions/FirmwareImage' type: array - type: object - PresubscriptionArray: - items: - $ref: '#/definitions/Presubscription' - type: array - PreviousServicePackage: - description: Previously active service package. - properties: - created: - description: Service package creation time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time - type: string - end_time: - description: Service package end time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + has_more: + type: boolean + limit: + format: int32 + type: integer + object: + description: 'Entity name: always ''list''.' + example: list type: string - expires: - description: Service package expiration time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + order: + description: The order of the records based on creation time, `ASC` or `DESC`; + by default `ASC`. + enum: + - ASC + - DESC + example: ASC type: string - firmware_update_count: - description: Size of firmware update quota of this service package. + total_count: format: int32 type: integer - id: - description: ID of this service package. + FirmwareManifest: + properties: + created_at: *id014 + datafile: + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + example: http://bucket.com/mymanifest.manifest + format: uri type: string - modified: - description: Service package latest modified time in RFC3339 date-time with - millisecond accuracy and UTC time zone. - format: date-time + datafile_size: + description: The size of the firmware manifest in bytes. + format: int64 + type: integer + delivered_payload_digest: + description: Digest (SHA256, hex-encoded) of the payload to deliver to the + device. + example: c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc + format: hex + type: string + delivered_payload_size: + description: The size in bytes of the payload to deliver to the device. + format: int64 + type: integer + delivered_payload_type: + description: Type of the payload to deliver to the device (full or delta image). + enum: + - full + - delta type: string - next_id: - description: Next service package ID if this service package has a pending - renewal or null. + delivered_payload_url: + description: The URL of the payload to deliver to the device. + example: http://bucket.com/myimage.elf + format: uri type: string - previous_id: - description: Previous service package ID. + description: + description: The description of the firmware manifest. + example: '' + format: free text + maxLength: 2000 type: string - reason: - description: Reason the service package was ended. - enum: - - renewed - - terminated + device_class: + description: The device class ID. + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + device_vendor: + description: The device vendor ID. + example: 5d645eae-c231-5a89-9764-2e655cd94fa8 + format: uuid type: string - required: - - id - - start_time - - created - - modified - - expires - - end_time - - firmware_update_count - - reason - type: object - QuotaUsageReport: - description: Account quota usage entry for queried month. - properties: - amount: - description: Amount of quota usage entry. Negative if quota consumption. - format: int64 - type: integer - campaign_name: - description: 'Campaign name of quota usage entry. - - Null if quota usage entry type is not `reservation` or `reservation release`.' + etag: *id015 + id: + description: The firmware manifest ID. + example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' type: string - time: - description: Added time of quota usage entry in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + key_table: + description: The key table of pre-shared keys for devices. + example: http://example.com/key-table + format: uri type: string - type: - description: Type of quota usage entry. + manifest_schema_version: + description: Version of the manifest schema (1 or 3). enum: - - reservation - - reservation_release - - reservation_termination - - package_renewal - - package_creation - - package_termination + - '1' + - '3' type: string - required: - - amount - - type - - time - type: object - RegisterWebsocketChannel: - properties: - serialization: - description: Serialization configuration for a channel - schema: - $ref: '#/definitions/SerializationConfigData' + name: + description: The name of the manifest. + example: manifest_name + format: free text + maxLength: 128 + type: string + object: + description: 'Entity name: always ''firmware-manifest''.' + example: firmware-manifest + type: string + parsed_raw_manifest: + description: 'Raw manifest in JSON format, parsed from ASN.1 DER encoding. + + Fields may change. Backwards compatibility is not guaranteed. + + Recommended for debugging only. + + ' type: object - type: object - ReportAccountContactInfo: - description: Account contact information. - properties: - address_line1: + precursor_payload_digest: + description: Digest (SHA256, hex-encoded) of the currently installed payload. + example: 54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f type: string - address_line2: + timestamp: + description: The firmware manifest version as a timestamp. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - city: + update_priority: + description: Update priority, passed to the application callback when an update + is performed. Allows the application to make application-specific decisions. + format: int64 + type: integer + updated_at: *id016 + FirmwareManifestEqNeqFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - company: + datafile: type: string - contact: + datafile_size: + type: integer + description: type: string - country: + device_class: type: string - email: + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string id: - description: Account ID. + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string - phone_number: + name: + format: free text + maxLength: 128 type: string - postal_code: + timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - state: + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - required: - - id - - company - type: object - ReportBillingData: + FirmwareManifestGteLteFilter: properties: - active_devices: - format: int64 - minimum: 0 - type: integer - firmware_updates: - format: int64 - minimum: 0 - type: integer - generated: - description: Billing report generated time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + created_at: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - period_end: - description: Billing report end time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + etag: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - period_start: - description: Billing report start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + timestamp: + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - sda_tokens: - format: int64 - minimum: 0 + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + FirmwareManifestInNinFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + datafile: + type: string + datafile_size: type: integer - required: - - generated - - period_start - - period_end - - active_devices - - firmware_updates - - sda_tokens - type: object - ReportNotFoundErrorResponse: - description: 404 Not found response. + description: + type: string + device_class: + type: string + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + id: + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' + type: string + name: + format: free text + maxLength: 128 + type: string + timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + FirmwareManifestPage: + properties: + after: + example: null + type: string + data: + items: + $ref: '#/definitions/FirmwareManifest' + type: array + has_more: + type: boolean + limit: + format: int32 + type: integer + object: + description: 'Entity name: always ''list''.' + example: list + type: string + order: + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC + type: string + total_count: + format: int32 + type: integer + FirmwareUpdatesCounter: + description: The total number of successful firmware update operations in the + requested time. + format: int64 + minimum: 0 + type: integer + ForbiddenErrorResponse: + description: 403 Forbidden. properties: code: - description: Response code. Always set to 404. + description: Response code. Always set to 403. enum: - - 404 + - 403 type: integer message: description: A human-readable message with detailed info. @@ -5256,9 +5121,9 @@ definitions: description: Request ID type: string type: - description: Error type. Always set to `report_not_found`. + description: Error type. Always set to `forbidden`. enum: - - report_not_found + - forbidden type: string required: - object @@ -5267,752 +5132,772 @@ definitions: - type - code type: object - ReportResponse: - description: Billing report response. + GetTrustAnchorsResponse: properties: - account: - $ref: '#/definitions/ReportAccountContactInfo' - description: Account contact information. - aggregated: - $ref: '#/definitions/ReportBillingData' - description: Aggregated report billing data including all subtenant accounts, - if any. - billing_data: - $ref: '#/definitions/ReportBillingData' - description: Report billing data. - id: - description: Billing report ID. - type: string - month: - description: Month of requested billing report. - pattern: ^\d{4}-\d{2}$ + after: + description: An offset token for the current page. + example: '01631667477600000000000100100374' + pattern: '[A-Fa-f0-9]{32}' type: string + data: + description: The list of trust anchors of the account. + items: + $ref: '#/definitions/TrustAnchorResponse' + type: array + has_more: + description: Indicates whether additional results are available. + example: false + type: boolean + limit: + default: 50 + description: Indicates how many objects to retrieve in the page. The minimum + limit is 2 and the maximum is 1000. Limit values outside of this range are + set to the closest limit. + maximum: 1000 + minimum: 2 + type: integer object: - description: Billing report response object. Always set to `billing-report`. + description: The type of this API object is a `list`. + example: list + type: string + order: + description: Indicates how to order the entries based on when they were created. enum: - - billing-report + - ASC + - DESC + example: DESC type: string - service_package: - $ref: '#/definitions/ServicePackageReport' - description: Report service package. - subtenants: - description: List of billing reports for subtenant accounts. Empty list if - account does not have any subtenant account. - items: - $ref: '#/definitions/SubtenantAccountReport' - type: array - required: - - id - - object - - account - - billing_data - - subtenants - - aggregated - - month + total_count: + example: 1 + format: integer + type: integer type: object - Resource: + GlobalSignCredentials: + description: 'The credentials required to connect to the GlobalSign account. + + The values should be taken from GlobalSign support upon account creation.' properties: - obs: - description: '''Determines whether you can subscribe to changes for this resource. - It can have values `true` or `false`.''' - example: true - type: boolean - rt: - description: Application-specific resource type that describes this resource. - It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). - Not meant to be a human-readable name for the resource. Multiple resource - types may be included, separated by a space. - example: light_sensor + api_key: + description: Unique ID for API client (provided by GlobalSign). + example: e510e289e6cd8947 + maxLength: 1000 type: string - type: - description: 'The content type of the resource. + api_secret: + description: API secret matching the API key (provided by GlobalSign). + example: a477a8393d17a55ecb2ba6a61f58feb84770b621 + format: password + maxLength: 250 + type: string + client_certificate: + description: 'The client certificate provided by GlobalSign to allow HTTPS + connection over TLS/SSL. + The certificate wraps a public key that matches a private key provided by + the customer. - We recommend you use the **resource types** listed in the [LwM2M specification](http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry).' - example: text/plain + The certificate must be in PEM format.' + example: '"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END + CERTIFICATE-----"' + maxLength: 3000 type: string - uri: - description: The resource URL. - example: /sen/light + passphrase: + description: 'The passphrase to decrypt the private key in case it is encrypted. + + Empty if the private key is not encrypted.' + example: helloworld + format: password + maxLength: 1000 + type: string + private_key: + description: 'The private key that matches the client certificate to allow + HTTPS connection over TLS/SSL. + + The private key may be encrypted using a symmetric encryption key derived + from a passphrase. + + The private key must be in PEM format.' + example: '"-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: + DES-EDE3-CBC,CCAC26A4133947CB\n\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\n-----END + RSA PRIVATE KEY-----"' + maxLength: 3000 type: string required: - - uri + - api_key + - api_secret + - client_certificate + - private_key type: object - ResourcePath: - description: A resource URI. - example: /sen/light - type: string - ResourcesData: + GroupCreationInfo: + description: This object is used when creating new groups. properties: - ct: - description: Content type. - example: text/plain - type: string - if: - description: Interface description that defines a name or URI that indicates - how to interact with the target resource. It describes a generic interface - type, such as a 'sensor'. - example: sensor - type: string - obs: - description: Whether the resource is observable (true/false). - example: true - type: boolean - path: - description: Resource's URI path. - example: /sen/light - type: string - rt: - description: 'Application-specific resource type that describes this resource. - It is created by the [client side application](../connecting/resource-setup-in-device-management-client.html). - - Not meant to be a human-readable name for the resource. Multiple resource - types may be included, separated by a space.' - example: light_sensor + members: + $ref: '#/definitions/SubjectList' + description: The members of the group as arrays of user and API key IDs. + name: + description: The group name. + maxLength: 100 type: string + required: + - name type: object - SAML2Info: - description: Represents SAML2 specific attributes in responses. + GroupIdList: + items: + example: 01705c6383f6c85b76f92f4e00000000 + type: string + type: array + GroupSummary: + description: This object contains basic information about groups. properties: - assertion_endpoint: - description: URL of the service provider's assertion endpoint. Leave this - empty to use the default assertion endpoint. + account_id: + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - x-nullable: true - idp_entity_id: - description: Entity ID of the identity provider. + apikey_count: + description: The number of API keys in this group. + example: 0 + format: int32 + type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + application_count: + description: The number of applications in this group. + example: 0 + format: int32 + type: integer + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time type: string - x-nullable: true - idp_x509_certs: - description: List of public X509 certificates of the identity provider in - PEM format. - items: - type: string - type: array - x-nullable: true - slo_endpoint: - description: URL of the identity provider's SLO endpoint. + etag: + description: API resource entity version. + example: '1' type: string - x-nullable: true - sp_entity_id: - description: Entity ID of the service provider. + id: + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - x-nullable: true - sp_x509_cert: - description: Public X509 certificate of the service provider in PEM format. - This is a read-only attribute, see API documentation about how to generate - a new one or how to delete it. - readOnly: true + name: + description: The name of the group. + example: Administrators + maxLength: 100 type: string - x-nullable: true - sso_endpoint: - description: URL of the identity provider's SSO endpoint. + object: + description: 'Entity name: always `group`.' + enum: + - group type: string - x-nullable: true + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + user_count: + description: The number of users in this group. + example: 1 + format: int32 + type: integer + required: + - account_id + - apikey_count + - etag + - id + - name + - object + - user_count type: object - SAML2Req: + GroupSummaryList: properties: - entity_descriptor: - description: Contains an entity descriptor document for the identity provider. - Can be used as an alternative method to provide the identity provider's - attributes. - format: byte - maxLength: 65535 - type: string - idp_entity_id: - description: Entity ID of the identity provider. + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - idp_x509_certs: - description: List of public X509 certificates of the identity provider. Certificates - must be in PEM format. + data: + description: A list of entities. items: - type: string + $ref: '#/definitions/GroupSummary' type: array - slo_endpoint: - description: URL of the identity provider's SLO endpoint. + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return (2-1000), or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list type: string - sp_entity_id: - description: Entity ID of the service provider. We recommend that you leave - it empty and let the system generate it. + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC type: string - sso_endpoint: - description: URL of the identity provider's SSO endpoint. + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + GroupUpdateInfo: + description: This object is used when Update groups. + properties: + name: + description: The group name. + maxLength: 100 type: string + required: + - name type: object - SerializationConfigData: + IdentityProviderCreationReq: + description: This object is used for creating new federated identity provider + module. properties: - cfg: - description: Serialization configuration object according to configuration - type. - schema: - $ref: '#/definitions/SerializationConfigObjectV2' - type: object - max_chunk_size: - description: Maximum number of messages in NotificationMessage container delivered - in one request. Default is 10000. Using a very low value for high troughput - applications may cause lag in notification delivery, as a new chunk is sent - only after the previous one has been acknowledged. Using a high value is - recommended and safe, as chunks are sent quickly after notifications are - received from devices. See [notification sending logic](../integrate-web-app/event-notification.html#notification-sending-logic) - for more details. - example: '500' - maximum: 10000 - minimum: 100 - type: integer + description: + description: Description for the identity provider. + maxLength: 500 + type: string + name: + description: Name of the identity provider. + maxLength: 100 + type: string + oidc_attributes: + $ref: '#/definitions/OIDCInfo' + description: OIDC specific attributes. + saml2_attributes: + $ref: '#/definitions/SAML2Req' + description: SAML2 specific attributes. + status: + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED + type: string type: - default: v2 - description: 'Serialization type: v2 - specified in NotificationMessage.' + description: Identity provider type. enum: - - v2 - example: v2 + - SAML2 + - OIDC type: string required: + - name - type type: object - SerializationConfigObjectV2: - properties: - deregistrations_as_object: - default: false - description: 'Defines serialization format for ''de-registrations'' and ''registrations-expired''. - If set to true, - - de-registration and registration-expired messages will be represented as - json objects and can have - - additional fields: ''uid'', ''timestamp'', ''original-ep'', together with - the ''ep'' field. If set to false, - - (default) - de-registration and ''registration-expired'' will be represented - by a string, - - containing only data from ''ep'' field. - - ' - example: 'true' - type: boolean - include_original_ep: - default: false - description: 'Include ''original-ep'' message field in serialized objects. - This is the endpoint_name from the device. - - ' - example: 'true' - type: boolean - include_timestamp: - default: false - description: 'Include ''timestamp'' message field in serialized objects. The - timestamp represents the time that the notification service receives the - message and sorts it into the queue. Timestamp provides information of queue - length (web-app current time - timestamp = delay). - - ' - example: 'true' - type: boolean - include_uid: - default: false - description: 'Include ''uid'' message field to serialized objects. This is - message ID, and can be used for duplicate detection. - - ' - example: 'true' - type: boolean - type: object - ServerCredentialsResponseData: + IdentityProviderInfo: properties: + account_id: + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string created_at: description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string + description: + description: Description for the identity provider. + maxLength: 500 + type: string etag: description: API resource entity version. + example: '1' type: string id: - description: Unique entity ID. + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + is_default: + description: Flag indicating whether this is the global default identity provider. + readOnly: true + type: boolean + name: + description: Name of the identity provider. + maxLength: 100 type: string object: - description: 'Entity name: always `server-credentials`.' - type: string - server_certificate: - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. - type: string - server_uri: - description: Server URI that the client connects to. - type: string - type: object - ServicePackageMetadata: - description: Account's service package metadata. Value is `null` if service package - has expired. - properties: - end_time: - description: Service package end time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + description: 'Entity name: always ''identity-provider''' + enum: + - identity-provider type: string - remaining_quota: - description: Current available service package quota. - format: int64 - minimum: 0 - type: integer - reserved_quota: - description: Sum of all open reservations for this account. - format: int64 - minimum: 0 - type: integer - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + oidc_attributes: + $ref: '#/definitions/OIDCInfo' + description: OIDC specific attributes. + saml2_attributes: + $ref: '#/definitions/SAML2Info' + description: SAML2 specific attributes. + status: + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED type: string - required: - - start_time - - end_time - - remaining_quota - - reserved_quota - type: object - ServicePackageQuota: - description: Quota of the service package. - properties: - object: - description: Always set to `service-package-quota`. + type: + description: Identity provider type. enum: - - service-package-quota + - NATIVE + - MBED + - SAML2 + - OIDC type: string - quota: - description: Available quota for the service package. - format: int64 - minimum: 0 - type: integer - required: - - object - - quota - type: object - ServicePackageQuotaHistoryItem: - description: Quota history item. - properties: - added: - description: Added time of quota history entry in RFC3339 date-time with millisecond - accuracy and UTC time zone. + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' format: date-time type: string - amount: - description: Negative or positive quota usage. - format: int64 - type: integer - id: - description: Service package quota history ID. - maxLength: 32 - minLength: 32 - type: string - reason: - description: Type of quota usage entry. - enum: - - reservation - - reservation_release - - reservation_termination - - package_creation - - package_renewal - - package_termination - type: string - reservation: - $ref: '#/definitions/ServicePackageQuotaHistoryReservation' - description: Reservation details if reason is `reservation`, `reservation_releasem` - or `reservation_termination`. - type: object - service_package: - $ref: '#/definitions/ServicePackageQuotaHistoryServicePackage' - description: Service package details if reason is `package_creation`, `package_renewal` - or `package_termination`. - type: object required: + - etag - id - - added - - amount - - reason + - name + - object + - type type: object - ServicePackageQuotaHistoryReservation: - description: Service package quota history reservation object. - properties: - account_id: - description: Account ID. - maxLength: 250 - minLength: 1 - type: string - campaign_name: - description: Campaign name for this reservation. - maxLength: 250 - minLength: 1 - type: string - id: - description: Reservation ID. - maxLength: 250 - minLength: 1 - type: string - required: - - id - - account_id - - campaign_name - ServicePackageQuotaHistoryResponse: - description: Quota history of the service package. + IdentityProviderList: properties: after: - description: ID after which to fetch quota history. - maxLength: 32 - minLength: 32 + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string data: - description: List of history items. Empty list if no entries are available. + description: A list of entities. items: - $ref: '#/definitions/ServicePackageQuotaHistoryItem' + $ref: '#/definitions/IdentityProviderInfo' type: array has_more: - description: If there is next available quota history paged response to fetch. + description: Flag indicating whether there are more results. + example: false type: boolean limit: - description: Maximum number of quota history entries contained in one paged - response. + description: The number of results to return , or equal to `total_count`. + example: 50 format: int32 - maximum: 1000 - minimum: 2 type: integer object: - description: Always set to `service-package-quota-history`. + description: 'Entity name: always `list`.' enum: - - service-package-quota-history + - list + type: string + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC type: string total_count: - description: Sum of all quota history entries that should be returned. + description: The total number of records, if requested. + example: 20 format: int32 - minimum: 0 type: integer required: - - object - data - has_more - limit + - object - total_count type: object - ServicePackageQuotaHistoryServicePackage: - description: Service package quota history service package object. + IdentityProviderUpdateReq: + description: Update existing federated identity provider module. properties: - expires: - description: Service package expiration time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + description: + description: Description for the identity provider. + maxLength: 500 type: string - firmware_update_count: - description: Size of firmware update quota of this service package. - format: int32 - type: integer - id: - description: ID of this service package. + name: + description: Name of the identity provider. + maxLength: 100 type: string - previous_id: - description: Previous service package ID, or null. + oidc_attributes: + $ref: '#/definitions/OIDCInfo' + description: OIDC specific attributes. + saml2_attributes: + $ref: '#/definitions/SAML2Req' + description: SAML2 specific attributes. + status: + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + type: + description: Identity provider type. + enum: + - SAML2 + - OIDC type: string required: - - id - - start_time - - expires - - firmware_update_count - ServicePackageReport: - description: Account's current service package data included in reporting. - properties: - aggregated_quota_usage: - items: - $ref: '#/definitions/AggregatedQuotaUsageReport' - type: array - metadata: - $ref: '#/definitions/ServicePackageMetadata' - description: '`Null` if service package has expired.' - x-nullable: true - quota_usage: - items: - $ref: '#/definitions/QuotaUsageReport' - type: array - required: - - metadata - - quota_usage - - aggregated_quota_usage + - name + - type type: object - ServicePackagesResponse: - description: Contains service package information for currently active service - package, currently pending service package, and all previous service packages - associated with the account. + IdpPublicKey: + description: Represents provider's public key and key ID used to sign ID tokens. + PEM-encoded. properties: - active: - $ref: '#/definitions/ActiveServicePackage' - description: Currently active service package. Can be null. - type: object - object: - description: Always set to `service-packages`. - enum: - - service-packages + key: + description: The public key. + type: string + kid: + description: The public key ID. type: string - pending: - $ref: '#/definitions/PendingServicePackage' - description: Current pending service package. Can be null. - type: object - previous: - description: List of previous service packages. - items: - $ref: '#/definitions/PreviousServicePackage' - type: array - required: - - object - - previous - SubjectList: - description: Represents arrays of user and API key IDs. - properties: - apikeys: - description: An array of API key IDs. - items: - type: string - type: array - users: - description: An array of user IDs. - items: - type: string - type: array type: object - SubscriptionsList: - description: A list of resource URIs, one per line. - example: /sen/light + Image: + format: binary type: string - SubtenantAccountReport: - description: Billing report for subtenant account. - properties: - account: - $ref: '#/definitions/SubtenantReportAccountContactInfo' - description: Subtenant account contact information. - billing_data: - $ref: '#/definitions/ReportBillingData' - description: Report billing data. - service_package: - $ref: '#/definitions/SubtenantServicePackageReport' - description: Report service package for subtenant account. - required: - - account - - billing_data - type: object - SubtenantReportAccountContactInfo: - description: Subtenant account contact information. + InternalServerErrorResponse: + description: 500 Internal server error response. properties: - address_line1: - type: string - address_line2: - type: string - city: - type: string - company: - type: string - contact: - type: string - country: - type: string - customer_subtenant_id: - description: Account subtenant ID, if a subtenant. - type: string - email: - type: string - id: - description: Account ID. + code: + description: Response code. Always set to 500. + enum: + - 500 + type: integer + message: + description: A human-readable message with detailed info. type: string - phone_number: + object: + description: Always set to `error`. + enum: + - error type: string - postal_code: + request_id: + description: Request ID type: string - state: + type: + description: Error type. Always set to `internal_error`. + enum: + - internal_error type: string required: - - id - - company - - customer_subtenant_id + - object + - message + - request_id + - type + - code type: object - SubtenantServicePackageReport: + KeyValue: properties: - quota_usage: - items: - $ref: '#/definitions/QuotaUsageReport' - type: array + key: + type: string + value: + type: string required: - - quota_usage - type: object - TrustedCertificateReq: - description: Represents a trusted certificate in upload requests. + - key + - value + ListOfPreSharedKeysWithoutSecret: properties: - certificate: - description: A chain of X509.v3 trusted certificates in PEM format. The chain - must contain all certificates from root to leaf. Otherwise, the signature - parameter is required. + after: + description: An offset token for current page. + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 type: string - description: - description: Human readable description of this certificate. - maxLength: 500 + continuation_marker: + description: An offset token for fetching the next page. Note that exactly + the same limit needs to be used on the request for fetching subsequent pages. + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810005 type: string - x-nullable: true - enrollment_mode: - description: Certificate is used in enrollment mode. Default value is false. + data: + description: Array of the PSK entries. The array is empty if there are no + PSKs. + items: + $ref: '#/definitions/PreSharedKeyWithoutSecret' + minLength: 0 + type: array + has_more: + description: More results are available. + example: true type: boolean - name: - description: Certificate name. - maxLength: 100 - type: string - service: - description: Service name where the certificate must be used. - enum: - - lwm2m - - bootstrap - type: string - signature: - description: 'DEPRECATED: Base64 encoded signature of the account ID signed - by the certificate to upload. The signature must be hashed with SHA256.' + limit: + description: The value of limit query parameter from the request, or default + if not specified. + example: 50 + type: integer + object: + description: The type of this API object is a "list". + example: list type: string - status: - description: Status of the certificate. - enum: - - ACTIVE - - INACTIVE + order: + description: Record order based on creation time. + example: DESC type: string required: - - certificate - - name - - service + - object + - limit + - order + - has_more + - data type: object - TrustedCertificateResp: - description: Represents a trusted certificate in responses. + Log: properties: account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - certificate: - description: X509.v3 trusted certificate in PEM format. - example: '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----' + description: The ID of the account associated with the device. + example: 0168e7bff4f2263cf4be560700000000 type: string - certificate_fingerprint: - description: A SHA-256 fingerprint of the certificate. - example: a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1 + app_name: + description: A tag indicating which application or software module produced + the log message. + example: modbus type: string created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' + description: RFC 3339 UTC timestamp indicating when the resource entity was + created. + example: '2017-07-21T17:32:28Z' format: date-time type: string - description: - description: Human readable description of this certificate. - example: Certificate created by me. - maxLength: 500 + device_id: + description: Device ID. + example: 00005a4e027f0a580a01081c00000000 type: string - x-nullable: true - device_execution_mode: - description: Device execution mode where 1 means a developer certificate. - example: 1 - format: int32 - type: integer - enrollment_mode: - description: If true, signature is not required. Default value false. - example: false - type: boolean etag: - description: API resource entity version. - example: '1' + description: Entity instance signature, or Unix timestamp of last customer + update. + example: stdout type: string id: - description: Entity ID. - example: 01619571d01d0242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - issuer: - description: Issuer of the certificate. - example: CN=issuer - type: string - name: - description: Certificate name. - example: My certificate - maxLength: 100 + description: mUUID Entity ID. Each device log has a unique ID. + example: 2d238a89038b4ddb84699dd36a901063 + pattern: /^[(0-9)(a-f)]{32}$/ type: string - object: - description: 'Entity name: always ''trusted-cert''' + level: + description: Log entry severity level. enum: - - trusted-cert + - DEBUG + - TRACE + - INFO + - WARNING + - ERROR + - CRITICAL + example: ERROR type: string - owner_id: - description: The ID of the owner. - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' + message: + description: Log message body. + example: 'ModbusRTU Driver: Failed to start undefined' type: string - x-nullable: true - service: - description: Service name where the certificate is used. - enum: - - lwm2m - - bootstrap + object: + description: Device log resource name. + example: device-log type: string - status: - description: Status of the certificate. - enum: - - ACTIVE - - INACTIVE - example: ACTIVE + timestamp: + description: RFC 3339 UTC timestamp indicating indicating the device time + the message was printed. + example: '2017-07-21T17:40:28Z' + format: date-time type: string - subject: - description: Subject of the certificate. - example: CN=subject + type: + description: Device log type. + example: syslog type: string - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' + type: object + LoginHistory: + description: Represents an entry in login history. + properties: + date: + description: UTC time RFC3339 for this login attempt. + example: '2018-02-14T17:52:07Z' format: date-time type: string - valid: - description: This read-only flag indicates whether the certificate is valid - or not. + ip_address: + description: IP address of the client. + example: 127.0.0.1 + type: string + success: + description: Flag indicating whether login attempt was successful or not. example: true + type: boolean + user_agent: + description: User Agent header from the login request. + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36 + type: string + required: + - date + - ip_address + - success + - user_agent + type: object + LoginProfile: + description: Represents a user login profile in Device Management. + properties: + foreign_id: + description: The ID of the user in the identity provider's service. + example: fed/user_007 + readOnly: true + type: string + id: + description: ID of the identity provider. + example: 01619571f3c00242ac12000600000000 + type: string + name: + description: Name of the identity provider. + example: Pelion + readOnly: true + type: string + type: + description: Identity provider type. + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE readOnly: true + type: string + required: + - id + type: object + LogsPage: + properties: + after: + description: An offset token for current page. + type: string + x-nullable: true + data: + items: + $ref: '#/definitions/Log' + type: array + has_more: + description: Indicates whether more results are available. + example: false type: boolean - validity: - description: Expiration time in UTC formatted as RFC3339. - example: '2038-02-14T15:24:14Z' + limit: + description: Limit applied on number of device log resource objects retrieved + in the page (2-1000). + example: 100 + maximum: 1000 + minimum: 2 + type: integer + object: + description: Always `list`. + example: list + type: string + order: + description: Entry order based on creation time. + example: DESC + type: string + total_count: + example: 1 + format: integer + type: integer + type: object + NotificationData: + properties: + ct: + description: Content type. + example: text/plain + type: string + ep: + description: Device Management Device ID. + example: 015f3850a657000000000001001002ab + type: string + max-age: + description: 'Max age value is an integer number of seconds between 0 and + 2^32-1, but the actual maximum cache time is limited to 3 days. + + Default 60.' + example: 60 + type: string + path: + description: URI path. + example: /sen/light + type: string + payload: + description: Base64 encoded payload. + example: My4zMQ== + type: string + type: object + NotificationEntry: + description: Represents an account notification entry. + properties: + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string + error_msg: + description: The error message if there was an error while transmitting the + account notification. + example: Connection error. + type: string + etag: + description: API resource entity version. + example: '1' + type: string + id: + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + message: + description: The message contained in this account notification entry. + example: User limit has been reached. + type: string + object: + description: 'Entity name: always ''notification-entry''' + enum: + - notification-entry + type: string + receiver: + description: The receiver this account notification entry. + example: example@email-receiver.test + pattern: ^(?=.{3,254}$).+\@.+ + type: string + subject: + description: The subject of this account notification entry. + example: Account locked. + type: string + success: + description: A flag indiciating whether the sending of this account notification + entry was successful, true or false. + type: boolean + type: + description: The type of this account notification entry. + example: email + type: string required: - - account_id - - certificate - - certificate_fingerprint - etag - id - - issuer - - name - object - - service - - subject - - validity type: object - TrustedCertificateRespList: + NotificationEntryList: properties: after: - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' type: string data: description: A list of entities. items: - $ref: '#/definitions/TrustedCertificateResp' + $ref: '#/definitions/NotificationEntry' type: array has_more: description: Flag indicating whether there are more results. example: false type: boolean limit: - description: The number of results to return (2-1000), or equal to `total_count`. + description: The number of results to return, or equal to `total_count`. example: 50 format: int32 type: integer @@ -6040,2952 +5925,7159 @@ definitions: - object - total_count type: object - TrustedCertificateUpdateReq: - description: Represents a trusted certificate in update requests. + NotificationMessage: properties: - certificate: - description: A chain of X509.v3 trusted certificates in PEM format. The chain - must contain all certificates from root to leaf. Otherwise, the signature - parameter is required. + async-responses: + items: + $ref: '#/definitions/AsyncIDResponse' + type: array + de-registrations: + items: + description: The device ID. + example: 015f3850a657000000000001001002ab + type: string + type: array + notifications: + items: + $ref: '#/definitions/NotificationData' + type: array + reg-updates: + items: + $ref: '#/definitions/EndpointData' + type: array + registrations: + items: + $ref: '#/definitions/EndpointData' + type: array + registrations-expired: + items: + description: The device ID. + example: 015f3850a657000000000001001002ab + type: string + type: array + type: object + OIDCClaimMapping: + description: Mapping for non-standard OIDC claim names. + properties: + email: + description: Custom claim name for 'email'. + example: email_address type: string - description: - description: Human readable description of this certificate. - maxLength: 500 + x-nullable: true + email_verified: + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + family_name: + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + given_name: + description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - enrollment_mode: - description: Certificate is used in enrollment mode. Default value is false. - type: boolean name: - description: Certificate name. - maxLength: 100 + description: Custom claim name for 'name'. + example: name type: string - service: - description: Service name where the certificate must be used. - enum: - - lwm2m - - bootstrap + x-nullable: true + phone_number: + description: Custom claim name for 'phone_number'. + example: phone_number type: string - signature: - description: 'DEPRECATED: Base64 encoded signature of the account ID signed - by the certificate to be uploaded. The signature must be hashed with SHA256.' + x-nullable: true + sub: + description: Custom claim name for 'sub'. + example: sub type: string - status: - description: Status of the certificate. - enum: - - ACTIVE - - INACTIVE + x-nullable: true + updated_at: + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + updated_at_pattern: + description: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX type: string + x-nullable: true type: object - UnauthorizedErrorResponse: - description: 401 Unauthorized response. + OIDCInfo: + description: Represents OIDC specific attributes. properties: - code: - description: Response code. Always set to 401. - enum: - - 401 - type: integer - message: - description: A human-readable message with detailed info. - type: string - object: - description: Always set to `error`. - enum: - - error + authorization_endpoint: + description: URL of the OAuth 2.0 authorization endpoint. type: string - request_id: - description: Request ID + x-nullable: true + auto_enrollment: + description: For future use. + type: boolean + x-nullable: true + claim_mapping: + $ref: '#/definitions/OIDCClaimMapping' + description: Mapping table for supporting custom OIDC claims. + x-nullable: true + client_id: + description: Client ID needed to authenticate and gain access to identity + provider's API. type: string - type: - description: Error type. Always set to `unauthorized`. - enum: - - unauthorized + x-nullable: true + client_secret: + description: Client secret needed to authenticate and gain access to identity + provider's API. type: string - required: - - object - - message - - request_id - - type - - code - type: object - UpdateCampaign: - properties: - active_at: - description: The time the campaign entered the active state. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + x-nullable: true + end_session_endpoint: + description: URL of the provider's end session endpoint. type: string - approval_required: - description: Flag indicating whether approval is needed to start the campaign. - example: 'false' - type: boolean - archived_at: - description: The time the campaign was archived. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + x-nullable: true + issuer: + description: Issuer of the identity provider. type: string - autostop: - description: Flag indicating whether the campaign should be auto-stopped on - reaching a threshold. - example: 'false' - type: boolean - autostop_reason: - description: Text description of why a campaign failed to start or why a campaign - stopped. - example: Insufficient billing credit. + jwks_uri: + description: URL of the provider's JSON web key set document. type: string - autostop_success_percent: - description: Percent of successful device updates to auto stop the campaign. - example: '85.00' - format: double - type: number - campaign_strategy: &id016 - default: one-shot - description: How the campaign adds devices. A `one-shot` campaign does not - add new devices after it has started. A `continuous` campaign means that - devices may be added to the campaign after it has started. The default is - `one-shot`. - enum: - - one-shot - - continuous + x-nullable: true + keys: + description: Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. + items: + $ref: '#/definitions/IdpPublicKey' + type: array + x-nullable: true + redirect_uri: + description: The URI needed to authenticate and gain access to identity provider's + API. Leave this empty to use the default redirect URI. type: string - created_at: *id013 - description: - description: An optional description of the campaign. - example: This campaign updates Class XX devices to version 1.34 - maxLength: 2000 + x-nullable: true + revocation_endpoint: + description: URL of the provider's token revocation endpoint. type: string - device_filter: - description: The filter for the devices the campaign is targeting at. - example: id__eq=00000000000000000000000000000000 + x-nullable: true + scopes: + description: Space-separated list of scopes sent in the authentication request. + When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email type: string - etag: *id014 - finished: - description: The time the campaign finished. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + token_endpoint: + description: URL of the OAuth 2.0 authorization endpoint. type: string - id: - description: The campaign ID. - example: '00000000000000000000000000000000' + x-nullable: true + token_request_mode: + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the POST + mode. + enum: + - POST + - GET type: string - name: - description: The campaign name. - example: campaign - maxLength: 128 + token_response_path: + description: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + example: oidc.data type: string - object: - description: 'Entity name: always ''update-campaign''.' + userinfo_endpoint: + description: URL of the OAuth 2.0 UserInfo endpoint. type: string - phase: - description: The phase of the campaign. - enum: - - draft - - awaiting_approval - - timed - - starting - - active - - stopping - - stopped - - deleted - - archived + x-nullable: true + required: + - issuer + type: object + ObservationsCounter: + description: The number of resource observation event requests received from devices. + format: int64 + minimum: 0 + type: integer + ParentAccountInfo: + description: Represents parent account contact details in responses. + properties: + admin_email: + description: The email address of the admin user who is the contact person + of the parent account. + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ type: string - root_manifest_id: - description: The ID of the manifest that will be sent to the device as part - of the campaign. - example: '00000000000000000000000000000000' + admin_name: + description: The name of the admin user who is the contact person of the parent + account. + example: J. Doe + maxLength: 100 type: string - root_manifest_url: - description: The URL for the manifest that will be sent to the device as part - of the campaign. - example: http://example.com/00000000000000000000000000000000 + id: + description: The ID of the parent account. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - started_at: - description: The time the campaign was started. - example: '2017-05-22T12:37:55.576563Z' + type: object + PasswordPolicy: + properties: + minimum_length: + description: Minimum length for the password. + example: '8' + maximum: 512 + minimum: 8 + type: integer + required: + - minimum_length + type: object + PelionToDeviceMessagesCounter: + description: The number of messages from Device Management to the device. + properties: + proxy_requests: + $ref: '#/definitions/ProxyRequestsCounter' + subscriptions: + $ref: '#/definitions/SubscriptionsCounter' + total_count: + description: The number of all outbound requests sent to devices. + format: int64 + minimum: 0 + type: integer + required: + - total_count + - proxy_requests + - subscriptions + type: object + PelionToWebappNotificationsCounter: + description: The number of notifications from Device Management to the web application + or portal. + format: int64 + minimum: 0 + type: integer + PendingServicePackage: + description: A pending service package. + properties: + created: + description: Service package creation time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - starting_at: - description: The time the campaign will be started. - example: '2017-05-22T12:37:55.576563Z' + expires: + description: Service package expiration time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - state: - description: The state of the campaign. - enum: - - draft - - scheduled - - allocatingquota - - allocatedquota - - quotaallocationfailed - - checkingmanifest - - checkedmanifest - - devicefetch - - devicecopy - - devicecheck - - publishing - - deploying - - deployed - - manifestremoved - - expired - - stopping - - autostopped - - userstopped - - conflict + firmware_update_count: + description: Size of firmware update quota of this service package. + format: int32 + type: integer + id: + description: ID of this service package. type: string - x-deprecation: - comment: Use phase instead - end_of_life_at: '2020-03-18T14:55:20+00:00' - issued_at: '2019-03-18T14:55:20+00:00' - links: [] - stopped_at: - description: The time the campaign was stopped. - example: '2017-05-22T12:37:55.576563Z' + modified: + description: Service package latest modified time in RFC3339 date-time with + millisecond accuracy and UTC time zone. format: date-time type: string - stopping_at: - description: The time the campaign will be stopped. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + previous_id: + description: Previous service package ID. type: string - updated_at: *id015 - when: - description: The scheduled start time for the campaign. The campaign will - start within 1 minute when then start time has elapsed. - example: '2017-05-22T12:37:55.576563Z' + start_time: + description: Service package start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - x-nullable: true - UpdateCampaignEqNeqFilter: + required: + - id + - previous_id + - created + - modified + - start_time + - expires + - firmware_update_count + type: object + PreSharedKey: + properties: + endpoint_name: + description: The unique endpoint identifier that this PSK applies to. 16-64 + [printable](https://en.wikipedia.org/wiki/ASCII#Printable_characters) (non-control) + ASCII characters. + example: my-endpoint-0001 + pattern: ^[ -~]{16,64}$ + type: string + secret_hex: + description: The secret of the PSK in hexadecimal. It is not case sensitive; + 4a is same as 4A, and it is allowed with or without 0x in the beginning. + The minimum length of the secret is 128 bits and maximum 256 bits. + example: 4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a + pattern: ^(0[xX])?[0-9a-fA-F]{32,64}$ + type: string + required: + - endpoint_name + - secret_hex + type: object + PreSharedKeyWithoutSecret: properties: created_at: - example: '2017-05-22T12:37:55.576563Z' + description: The date-time (RFC3339) when this PSK was uploaded to Device + Management. + example: '2017-07-21T17:32:28.012Z' format: date-time type: string - description: + endpoint_name: + description: The unique endpoint identifier that this PSK applies to. 16-64 + [printable](https://en.wikipedia.org/wiki/ASCII#Printable_characters) (non-control) + ASCII characters. + example: my-endpoint-0001 + pattern: ^[ -~]{16,64}$ type: string - device_filter: + required: + - endpoint_name + type: object + Presubscription: + properties: + endpoint-name: + description: Device Management device ID. + example: 015f3850a657000000000001001002ab type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + endpoint-type: + example: Light type: string - finished: - example: '2017-05-22T12:37:55.576563Z' + resource-path: + items: + description: A resource URI. + example: /sen/light + type: string + minItems: 1 + type: array + type: object + PresubscriptionArray: + items: + $ref: '#/definitions/Presubscription' + type: array + PreviousServicePackage: + description: Previously active service package. + properties: + created: + description: Service package creation time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - id: + end_time: + description: Service package end time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - name: + expires: + description: Service package expiration time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - root_manifest_id: + firmware_update_count: + description: Size of firmware update quota of this service package. + format: int32 + type: integer + id: + description: ID of this service package. type: string - started_at: - example: '2017-05-22T12:37:55.576563Z' + modified: + description: Service package latest modified time in RFC3339 date-time with + millisecond accuracy and UTC time zone. format: date-time type: string - state: + next_id: + description: Next service package ID if this service package has a pending + renewal or null. type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + previous_id: + description: Previous service package ID. type: string - when: - example: '2017-05-22T12:37:55.576563Z' + reason: + description: Reason the service package was ended. + enum: + - renewed + - terminated + type: string + start_time: + description: Service package start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - UpdateCampaignGteLteFilter: + required: + - id + - start_time + - created + - modified + - expires + - end_time + - firmware_update_count + - reason + type: object + ProxyRequestsCounter: + description: The number of device command requests sent to devices. + format: int64 + minimum: 0 + type: integer + ProxyResponsesCounter: + description: The number of device command responses received from devices. + format: int64 + minimum: 0 + type: integer + QuotaUsageReport: + description: Account quota usage entry for queried month. properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + amount: + description: Amount of quota usage entry. Negative if quota consumption. + format: int64 + type: integer + campaign_name: + description: 'Campaign name of quota usage entry. + + Null if quota usage entry type is not `reservation` or `reservation release`.' type: string - etag: - example: '2017-05-22T12:37:55.576563Z' + time: + description: Added time of quota usage entry in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - finished: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + type: + description: Type of quota usage entry. + enum: + - reservation + - reservation_release + - reservation_termination + - package_renewal + - package_creation + - package_termination + - package_tokens_edit type: string - started_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + required: + - amount + - type + - time + type: object + RegisterWebsocketChannel: + properties: + serialization: + $ref: '#/definitions/SerializationConfigData' + type: object + RegistrationDeletesCounter: + description: The number of deregistration requests received from devices. + format: int64 + minimum: 0 + type: integer + RegistrationUpdatesCounter: + description: The number of device registration update requests received from devices. + format: int64 + minimum: 0 + type: integer + RegistrationsCounter: + description: The number of full device registration requests received from devices. + format: int64 + minimum: 0 + type: integer + ReportAccountContactInfo: + description: Account contact information. + properties: + address_line1: type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + address_line2: type: string - when: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + alias: type: string - x-nullable: true - UpdateCampaignInNinFilter: - properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + business_model: + description: The business model selected for the account to generate the billing + reports. + enum: + - active_device_business_model + - api_calls_1_business_model type: string - description: + city: type: string - device_filter: + company: type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + contact: type: string - finished: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + country: type: string - id: + customer_subtenant_id: + description: Account tenant ID, valid only for tenants. type: string - name: + email: type: string - root_manifest_id: + id: + description: Account ID. type: string - started_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + phone_number: + type: string + postal_code: type: string state: type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' + required: + - id + - company + type: object + ReportBillingData: + properties: + active_devices: + $ref: '#/definitions/ActiveDevicesCounter' + device_to_pelion_messages: + $ref: '#/definitions/DeviceToPelionMessagesCounter' + firmware_updates: + $ref: '#/definitions/FirmwareUpdatesCounter' + generated: + description: Billing report generated time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - when: - example: '2017-05-22T12:37:55.576563Z' + pelion_to_device_messages: + $ref: '#/definitions/PelionToDeviceMessagesCounter' + pelion_to_webapp_notifications: + $ref: '#/definitions/PelionToWebappNotificationsCounter' + period_end: + description: Billing report end time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - UpdateCampaignPage: - properties: - after: - example: null + period_start: + description: Billing report start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - data: - items: - $ref: '#/definitions/UpdateCampaign' - type: array - has_more: - type: boolean - limit: + rest_api_requests_with_api_key_token: + $ref: '#/definitions/RestApiRequestsWithApiKeyTokenCounter' + rest_api_requests_with_user_token: + $ref: '#/definitions/RestApiRequestsWithUserTokenCounter' + sda_tokens: + $ref: '#/definitions/SdaTokensCounter' + required: + - generated + - period_start + - period_end + - active_devices + - firmware_updates + - sda_tokens + type: object + ReportNotFoundErrorResponse: + description: 404 Not found response. + properties: + code: + description: Response code. Always set to 404. + enum: + - 404 type: integer + message: + description: A human-readable message with detailed info. + type: string object: - description: 'Entity name: always ''list''.' + description: Always set to `error`. + enum: + - error type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' + request_id: + description: Request ID + type: string + type: + description: Error type. Always set to `report_not_found`. enum: - - ASC - - DESC - example: ASC + - report_not_found type: string - total_count: - type: integer - UpdateCampaignPostRequest: + required: + - object + - message + - request_id + - type + - code + type: object + ReportResponse: + description: Billing report response. properties: - approval_required: - default: false - type: boolean - autostop: - default: true - type: boolean - autostop_success_percent: - default: 100.0 - type: number - campaign_strategy: *id016 - description: - description: An optional description of the campaign. - example: a description - maxLength: 2000 - type: string - device_filter: - description: The filter for the devices the campaign is targeted at. - example: id__eq=00000000000000000000000000000000 + account: + $ref: '#/definitions/ReportAccountContactInfo' + description: Account contact information. + aggregated: + $ref: '#/definitions/ReportBillingData' + description: Aggregated report billing data including all tenant accounts, + if any. + billing_data: + $ref: '#/definitions/ReportBillingData' + description: Report billing data. + id: + description: Billing report ID. type: string - name: - default: default_object_name - description: The name for this campaign. - maxLength: 128 + month: + description: Month of requested billing report. + pattern: ^\d{4}-\d{2}$ type: string - root_manifest_id: - example: '12345678901234567890123456789012' - maxLength: 32 - minLength: 32 + object: + description: Billing report response object. Always set to `billing-report`. + enum: + - billing-report type: string + service_package: + $ref: '#/definitions/ServicePackageReport' + description: Service package report. + subtenants: + description: List of billing reports for tenant accounts. Empty list if account + does not have any tenant account. + items: + $ref: '#/definitions/SubtenantAccountReport' + type: array required: - - device_filter - UpdateCampaignPutRequest: + - id + - object + - account + - billing_data + - month + type: object + Resource: properties: - approval_required: - default: false - type: boolean - autostop: - default: true + obs: + description: '''Determines whether you can subscribe to changes for this resource. + It can have values `true` or `false`.''' + example: true type: boolean - autostop_success_percent: - default: 100.0 - type: number - description: - description: An optional description of the campaign. - example: '' - maxLength: 2000 - type: string - device_filter: - description: The filter for the devices the campaign is targeting at. - example: id__eq=00000000000000000000000000000000 + rt: + description: Application-specific resource type that describes this resource, + created by the [client application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). + Not meant to be a human-readable name for the resource. Multiple resource + types may be included, separated by a space. + example: light_sensor type: string - name: - description: The campaign's name. - example: campaign - maxLength: 128 + type: + description: 'The content type of the resource. + + + We recommend you use the content types listed in the [LwM2M specification](http://www.openmobilealliance.org/wp/omna/lwm2m/lwm2mregistry.html).' + example: text/plain type: string - root_manifest_id: - example: '00000000000000000000000000000000' - maxLength: 32 + uri: + description: 'The resource URL. This can be the path to: + + + - An object; for example, `3303`. + + - An object instance; for example `3303/0`. + + - A resource; for example `3303/0/5602`. + + + For more information about the Device Management resource model, please + see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html).' + example: /sen/light type: string - UploadChunkInfo: + required: + - uri + type: object + ResourceArray: + items: + $ref: '#/definitions/Resource' + type: array + ResourcePath: + description: A resource URI. + example: /sen/light + type: string + ResourcesData: properties: - created_at: *id013 - etag: *id014 - hash: - description: The hash of the chunk. The default hash is MD5. If no Content-MD5 - header is supplied as part of uploading the chunk then this will be empty. + ct: + description: Content type. + example: text/plain type: string - id: - description: The chunk number. - example: 1 - type: integer - length: - description: The length of the chunk. - example: 1234 - type: integer - object: - description: 'Entity name: always ''upload-info''.' - example: upload-info + if: + description: Interface description that defines a name or URI that indicates + how to interact with the target resource. It describes a generic interface + type, such as a 'sensor'. + example: sensor type: string - updated_at: *id015 - upload_job_id: - description: The upload job ID. - example: '00000000000000000000000000000000' + obs: + description: Whether the resource is observable (true/false). + example: true + type: boolean + path: + description: Resource's URI path. + example: /sen/light + type: string + rt: + description: 'Application-specific resource type that describes this resource. + It is created by the [client side application](https://developer.pelion.com/docs/device-management/current/resources/resource-setup-in-device-management-client.html). + + Not meant to be a human-readable name for the resource. Multiple resource + types may be included, separated by a space.' + example: light_sensor type: string type: object - UploadChunkInfoPage: + RestApiRequestsWithApiKeyTokenCounter: + description: The number of REST API requests made with access keys in web applications + or other service integrations. + format: int64 + minimum: 0 + type: integer + RestApiRequestsWithUserTokenCounter: + description: The number of REST API requests from user sessions in Device Management + Portal. + format: int64 + minimum: 0 + type: integer + SAML2Info: + description: Represents SAML2 specific attributes in responses. properties: - after: - example: null + assertion_endpoint: + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. type: string - data: + x-nullable: true + idp_entity_id: + description: Entity ID of the identity provider. + type: string + x-nullable: true + idp_x509_certs: + description: List of public X509 certificates of the identity provider in + PEM format. items: - $ref: '#/definitions/UploadChunkInfo' + type: string type: array - has_more: - type: boolean - limit: - format: int32 - type: integer - object: - description: 'Entity name: always ''list''.' - type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - enum: - - ASC - - DESC - example: ASC - type: string - total_count: - format: int32 - type: integer - UploadJob: - properties: - complete: - description: A flag that indicates job completion. - example: false - type: boolean - created_at: *id013 - description: &id028 - description: Human-readable description. - example: New Linux update for my devices - maxLength: 2000 + x-nullable: true + slo_endpoint: + description: URL of the identity provider's SLO endpoint. type: string - etag: *id014 - firmware_image_id: - description: ID of the firmware image - empty until the upload job is complete. - example: '00000000000000000000000000000000' + x-nullable: true + sp_entity_id: + description: Entity ID of the service provider. type: string - id: - description: The upload job ID. - example: '00000000000000000000000000000000' - type: string - name: &id029 - description: Human-readable name. - example: New Linux update - maxLength: 128 - type: string - object: - description: 'Entity name: always ''upload-job''.' - example: upload-job + x-nullable: true + sp_x509_cert: + description: Public X509 certificate of the service provider in PEM format. + This is a read-only attribute, see API documentation about how to generate + a new one or how to delete it. + readOnly: true type: string - status: - description: Status of the upload job. - example: in_progress + x-nullable: true + sso_endpoint: + description: URL of the identity provider's SSO endpoint. type: string - updated_at: *id015 + x-nullable: true type: object - UploadJobPage: - properties: - after: - example: null - type: string - data: - items: - $ref: '#/definitions/UploadJob' - type: array - has_more: - type: boolean - limit: - format: int32 - type: integer - object: - description: 'Entity name: always ''list''.' - type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - enum: - - ASC - - DESC - example: ASC - type: string - total_count: - format: int32 - type: integer - UserInfoReq: - description: Represents a user in requests towards Device Management. + SAML2Req: properties: - address: - description: Address. - maxLength: 100 - type: string - x-nullable: true - email: - description: The email address. - pattern: ^(?=.{3,254}$).+\@.+ + entity_descriptor: + description: Contains an entity descriptor document for the identity provider. + Can be used as an alternative method to provide the identity provider's + attributes. + format: byte + maxLength: 65535 type: string - full_name: - description: The full name of the user. - maxLength: 100 + idp_entity_id: + description: Entity ID of the identity provider. type: string - x-nullable: true - groups: - description: A list of IDs of the groups this user belongs to. + idp_x509_certs: + description: List of public X509 certificates of the identity provider. Certificates + must be in PEM format. items: type: string type: array - is_gtc_accepted: - description: A flag indicating that the user has accepted General Terms and - Conditions. - type: boolean - is_marketing_accepted: - description: A flag indicating that the user has consented to receive marketing - information. - type: boolean - login_profiles: - description: A list of login profiles for the user. Specified as the identity - providers the user should be associated with. Only the ID attribute of the - login profile should be set in the request object. - items: - $ref: '#/definitions/LoginProfile' - type: array - password: - description: The password for a new user. Generated when not present in the - request. + slo_endpoint: + description: URL of the identity provider's SLO endpoint. type: string - x-nullable: true - phone_number: - description: Phone number. - maxLength: 100 + sp_entity_id: + description: Entity ID of the service provider. We recommend that you leave + it empty and let the system generate it. type: string - x-nullable: true - username: - description: A username. - pattern: '[\w\-,._@+=]{4,30}' + sso_endpoint: + description: URL of the identity provider's SSO endpoint. type: string - x-nullable: true - required: - - email type: object - UserInfoResp: - description: Represents a user in Device Management. + SdaTokensCounter: + description: The total number of devices included in the Secure Device Access + tokens used in the requested time. A single Secure Device Access token can be + linked to multiple endpoint names. + format: int64 + minimum: 0 + type: integer + SerializationConfigData: + description: Serialization configuration for a channel. properties: - account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - active_sessions: - description: List of active user sessions. - items: - $ref: '#/definitions/ActiveSession' - type: array - address: - description: Address. - example: 110 Fulbourn Rd, Cambridge, United Kingdom + cfg: + $ref: '#/definitions/SerializationConfigObjectV2' + max_chunk_size: + description: Maximum number of messages in NotificationMessage container delivered + in one request. Default is 10000. Using a very low value for high troughput + applications may cause lag in notification delivery, as a new chunk is sent + only after the previous one has been acknowledged. Using a high value is + recommended and safe, as chunks are sent quickly after notifications are + received from devices. See [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic) + for more details. + example: '500' + maximum: 10000 + minimum: 100 + type: integer + type: + default: v2 + description: 'Serialization type: v2 - specified in NotificationMessage.' + enum: + - v2 + example: v2 type: string - x-nullable: true + required: + - type + type: object + SerializationConfigObjectV2: + description: Serialization configuration object according to configuration type. + properties: + deregistrations_as_object: + default: false + description: 'Defines serialization format for ''de-registrations'' and ''registrations-expired''. + If set to true, + + de-registration and registration-expired messages will be represented as + json objects and can have + + additional fields: ''uid'', ''timestamp'', ''original-ep'', together with + the ''ep'' field. If set to false, + + (default) - de-registration and ''registration-expired'' will be represented + by a string, + + containing only data from ''ep'' field. + + ' + example: 'true' + type: boolean + include_original_ep: + default: false + description: 'Include ''original-ep'' message field in serialized objects. + This is the endpoint_name from the device. + + ' + example: 'true' + type: boolean + include_timestamp: + default: false + description: 'Include ''timestamp'' message field in serialized objects. The + timestamp represents the time that the notification service receives the + message and sorts it into the queue. Timestamp provides information of queue + length (web-app current time - timestamp = delay). + + ' + example: 'true' + type: boolean + include_uid: + default: false + description: 'Include ''uid'' message field to serialized objects. This is + message ID, and can be used for duplicate detection. + + ' + example: 'true' + type: boolean + type: object + ServerCredentialsResponseData: + properties: created_at: description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' format: date-time type: string - creation_time: - description: A timestamp of the user creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - type: integer - custom_fields: - additionalProperties: - type: string - description: User's account-specific custom properties. The value is a string. - type: object - x-nullable: true - email: - description: The email address. - example: user@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - email_verified: - description: A flag indicating whether the user's email address has been verified - or not. - example: true - type: boolean etag: description: API resource entity version. - example: '1' - type: string - full_name: - description: The full name of the user. - example: User Doe - maxLength: 100 type: string - x-nullable: true - groups: - description: A list of IDs of the groups this user belongs to. - items: - type: string - type: array id: - description: The ID of the user. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: Unique entity ID. type: string - is_gtc_accepted: - description: A flag indicating that the user has accepted General Terms and - Conditions. - example: true - type: boolean - is_marketing_accepted: - description: A flag indicating that the user has consented to receive marketing - information. - example: true - type: boolean - is_totp_enabled: - description: A flag indicating whether two-factor authentication (TOTP) has - been enabled. - example: true - type: boolean - last_login_time: - description: A timestamp of the latest login of the user, in milliseconds. - example: 1518630727688 + object: + description: 'Entity name: always `server-credentials`.' + type: string + server_certificate: + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. + type: string + server_uri: + description: Server URI that the client connects to. + type: string + type: object + ServicePackageMetadata: + description: Account's service package metadata. Value is `null` if service package + has expired. + properties: + end_time: + description: Service package end time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time + type: string + remaining_quota: + description: Current available service package quota. format: int64 + minimum: 0 type: integer - login_history: - description: Timestamps, succeedings, IP addresses and user agent information - of the last five logins of the user, with timestamps in RFC3339 format. - items: - $ref: '#/definitions/LoginHistory' - maxItems: 5 - type: array - login_profiles: - description: A list of login profiles for the user. Specified as the identity - providers the user is associated with. - items: - $ref: '#/definitions/LoginProfile' - type: array - x-nullable: true + reserved_quota: + description: Sum of all open reservations for this account. + format: int64 + minimum: 0 + type: integer + start_time: + description: Service package start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time + type: string + required: + - start_time + - end_time + - remaining_quota + - reserved_quota + type: object + ServicePackageQuota: + description: Quota of the service package. + properties: object: - description: 'Entity name: always `user`.' + description: Always set to `service-package-quota`. enum: - - user + - service-package-quota type: string - password: - description: The password when creating a new user. It will be generated when - not present in the request. - example: PZf9eEUH43DAPE9ULINFeuj + quota: + description: Available quota for the service package. + format: int64 + minimum: 0 + type: integer + required: + - object + - quota + type: object + ServicePackageQuotaHistoryItem: + description: Quota history item. + properties: + added: + description: Added time of quota history entry in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - x-nullable: true - password_changed_time: - description: A timestamp of the latest change of the user password, in milliseconds. - example: 1518630727688 + amount: + description: Negative or positive quota usage. format: int64 type: integer - phone_number: - description: Phone number. - example: +44 (1223) 400 400 - maxLength: 100 + id: + description: Service package quota history ID. + maxLength: 32 + minLength: 32 type: string - x-nullable: true - status: - description: The status of the user. ENROLLING state indicates that the user - is in the middle of the enrollment process. INVITED means that the user - has not accepted the invitation request. RESET means that the password must - be changed immediately. INACTIVE users are locked out and not permitted - to use the system. + reason: + description: Type of quota usage entry. enum: - - ENROLLING - - INVITED - - ACTIVE - - RESET - - INACTIVE - example: ACTIVE + - reservation + - reservation_release + - reservation_termination + - package_creation + - package_renewal + - package_termination + - package_tokens_edit type: string - totp_scratch_codes: - description: A list of scratch codes for the two-factor authentication. Visible - only when 2FA is requested to be enabled or the codes regenerated. - items: - type: string - type: array - x-nullable: true - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time + reservation: + $ref: '#/definitions/ServicePackageQuotaHistoryReservation' + description: Reservation details if reason is `reservation`, `reservation_release` + or `reservation_termination`. + type: object + service_package: + $ref: '#/definitions/ServicePackageQuotaHistoryServicePackage' + description: Service package details if reason is `package_creation`, `package_renewal`, + `package_termination`, or `package_tokens_edit`. + type: object + required: + - id + - added + - amount + - reason + type: object + ServicePackageQuotaHistoryReservation: + description: Service package quota history reservation object. + properties: + account_id: + description: Account ID. + maxLength: 250 + minLength: 1 type: string - username: - description: A username. - example: admin - pattern: '[\w\-,._@+=]{4,30}' + campaign_name: + description: Campaign name for this reservation. + maxLength: 250 + minLength: 1 + type: string + id: + description: Reservation ID. + maxLength: 250 + minLength: 1 type: string - x-nullable: true required: - - account_id - - email - - etag - id - - object - - status - type: object - UserInfoRespList: + - account_id + - campaign_name + ServicePackageQuotaHistoryResponse: + description: Quota history of the service package. properties: after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: ID after which to fetch quota history. + maxLength: 32 + minLength: 32 type: string data: - description: A list of entities. + description: List of history items. Empty list if no entries are available. items: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ServicePackageQuotaHistoryItem' type: array has_more: - description: Flag indicating whether there are more results. - example: false + description: If there is next available quota history paged response to fetch. type: boolean limit: - description: The number of results to return (2-1000), or equal to `total_count`. - example: 50 + description: Maximum number of quota history entries in one paged response. format: int32 + maximum: 1000 + minimum: 2 type: integer object: - description: 'Entity name: always `list`.' + description: Always set to `service-package-quota-history`. enum: - - list + - service-package-quota-history type: string order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC + description: History item record order based on creation time. type: string total_count: - description: The total number of records, if requested. - example: 20 + description: Sum of all quota history entries that should be returned. format: int32 + minimum: 0 type: integer required: + - object - data - has_more - limit - - object - total_count + - order type: object - UserInvitationReq: - description: Represents a user invitation in requests towards Device Management. + ServicePackageQuotaHistoryServicePackage: + description: Service package quota history service package object. properties: - email: - description: The email address. - pattern: ^(?=.{3,254}$).+\@.+ + expires: + description: Service package expiration time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - groups: - description: A list of IDs of the groups this user has been invited to. - items: - type: string - type: array - login_profiles: - description: A list of login profiles for the user. Specified as the identity - providers the user should be associated with. Only the ID attribute of the - login profile should be set in the request object. - items: - $ref: '#/definitions/LoginProfile' - type: array - valid_for_days: - default: 30 - description: Specifies how many days the invitation will be valid for. + firmware_update_count: + description: Size of firmware update quota of this service package. format: int32 - maximum: 100 - minimum: 1 type: integer - required: - - email - type: object - UserInvitationResp: - description: Represents an user invitation in responses. - properties: - account_id: - description: The ID of the account the user is invited to. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + id: + description: ID of this service package. type: string - created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' - format: date-time + previous_id: + description: Previous service package ID, or null. type: string - email: - description: Email address of the invited user. - example: friend@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - etag: - description: API resource entity version. - example: '1' - type: string - expiration: - description: Invitation expiration as UTC time RFC3339. - example: '2018-02-14T15:24:14Z' + start_time: + description: Service package start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time type: string - groups: - description: A list of IDs of the groups the user is invited to. + required: + - id + - start_time + - expires + - firmware_update_count + ServicePackageReport: + description: Account's current service package data included in reporting. + properties: + aggregated_quota_usage: items: - type: string + $ref: '#/definitions/AggregatedQuotaUsageReport' type: array - id: - description: The ID of the invitation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - login_profiles: - description: A list of login profiles for the user. Specified as the identity - providers the user is associated with. + metadata: + $ref: '#/definitions/ServicePackageMetadata' + description: '`Null` if service package has expired.' + x-nullable: true + quota_usage: items: - $ref: '#/definitions/LoginProfile' + $ref: '#/definitions/QuotaUsageReport' type: array - x-nullable: true + required: + - quota_usage + type: object + ServicePackagesResponse: + description: Contains service package information for currently active service + package, currently pending service package, and all previous service packages + associated with the account. + properties: + active: + $ref: '#/definitions/ActiveServicePackage' + description: Currently active service package. Can be null. + type: object object: - description: 'Entity name: always ''user-invitation''' + description: Always set to `service-packages`. enum: - - user-invitation + - service-packages type: string - updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' + pending: + $ref: '#/definitions/PendingServicePackage' + description: Current pending service package. Can be null. + type: object + previous: + description: List of previous service packages. + items: + $ref: '#/definitions/PreviousServicePackage' + type: array + required: + - object + - previous + StatisticsReportListResponse: + properties: + after: + description: An offset token for the current page. + example: '01631667477600000000000100100374' + type: string + data: + description: List of manufacturing statistics. + items: + $ref: '#/definitions/StatisticsReportResponse' + type: array + end: + example: '2020-03-30T07:30:00.000' format: date-time type: string - user_id: - description: The ID of the invited user. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + has_more: + description: Indicates whether additional results are available. + example: false + type: boolean + limit: + description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. + example: 50 + maximum: 1000 + minimum: 2 + type: integer + object: + description: The API object type. The object type of this API is "list". + example: list + type: string + order: + description: Record order based on record identifier. + example: DESC + type: string + start: + example: '2020-03-29T07:30:00.000' + format: date-time + type: string + total_count: + example: 100 + format: integer + type: integer + type: object + StatisticsReportResponse: + properties: + avg_provisioning_time_sec: + description: Average provisioning time in seconds. + example: '2.5' + type: number + device_count: + description: Number of manufactured devices. + example: '103' + type: integer + factory_id: + description: Factory ID. + example: '164' + type: integer + factory_name: + description: Factory name. + example: factory 1 + type: string + id: + description: Unique row identifier. + example: 01612df56f3b0a580a010fc700000000 + format: uuid + pattern: '[a-fA-F0-9]{32}' + type: string + max_provisioning_time_sec: + description: Maximum provisioning time in seconds. + example: '3.1' + type: number + min_provisioning_time_sec: + description: Minimum provisioning time in seconds. + example: '2.2' + type: number + workstation: + description: Workstation. + example: ws_1 + type: string + type: object + StatisticsSeriesRecord: + description: Statistics view record. + properties: + active_devices: + $ref: '#/definitions/ActiveDevicesCounter' + device_to_pelion_messages: + $ref: '#/definitions/DeviceToPelionMessagesCounter' + firmware_updates: + $ref: '#/definitions/FirmwareUpdatesCounter' + id: + description: Metric ID. + pattern: '[0-9a-fA-F]{32}' + type: string + object: + description: Always `billing-statistics`. + enum: + - billing-statistics + type: string + pelion_to_device_messages: + $ref: '#/definitions/PelionToDeviceMessagesCounter' + pelion_to_webapp_notifications: + $ref: '#/definitions/PelionToWebappNotificationsCounter' + rest_api_requests_with_api_key_token: + $ref: '#/definitions/RestApiRequestsWithApiKeyTokenCounter' + rest_api_requests_with_user_token: + $ref: '#/definitions/RestApiRequestsWithUserTokenCounter' + sda_tokens: + $ref: '#/definitions/SdaTokensCounter' + timestamp: + description: 'The start of the interval for which the data is aggregated, + in RFC3339 date-time format with millisecond accuracy and UTC time zone. + + Each interval includes data for the time greater than or equal to the timestamp + and less than the next interval''s starting.' + format: date-time type: string required: - - account_id - - email - - etag - - id - object - - user_id + - id + - timestamp + - active_devices + - firmware_updates + - sda_tokens type: object - UserInvitationRespList: + StatisticsViewResponse: + description: Contains the statistics view of Device Management usage information. properties: after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: The ID after which to fetch the statistics view. + pattern: '[0-9a-fA-F]{32}' type: string data: - description: A list of entities. + description: List of statistics view records. Empty list if no records are + available. items: - $ref: '#/definitions/UserInvitationResp' + $ref: '#/definitions/StatisticsSeriesRecord' type: array has_more: - description: Flag indicating whether there are more results. - example: false + description: Indicates whether a new statistics view response is available. type: boolean limit: - description: The number of results to return (2-1000), or equal to `total_count`. - example: 50 + default: 50 + description: Maximum number of statistics view records on a page. format: int32 + maximum: 1000 + minimum: 2 type: integer object: - description: 'Entity name: always `list`.' + description: Always `list`. enum: - list type: string order: - description: 'The order of the records to return based on creation time. Available - values: ASC, DESC; by default ASC.' - enum: - - ASC - - DESC + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' type: string total_count: - description: The total number of records, if requested. - example: 20 - format: int32 + description: Sum of all statistics view records to return. Included in the + response when you use the query parameter include=total_count. + format: int64 + minimum: 0 type: integer required: + - object - data - has_more - limit - - object - - total_count + - order type: object - UserUpdateReq: - description: Represents a user in requests towards Device Management. + SubjectList: + description: Represents arrays of user and API key IDs. properties: - address: - description: Address. - maxLength: 100 - type: string - x-nullable: true - email: - description: The email address. Not allowed to update other user's email address. - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - full_name: - description: The full name of the user. - maxLength: 100 - type: string - x-nullable: true - groups: - description: A list of group IDs this user belongs to. Can be updated by the - Account Admin only. + apikeys: + description: An array of API key IDs. items: type: string type: array - x-nullable: true - is_gtc_accepted: - description: A flag indicating that the user has accepted General Terms and - Conditions. - type: boolean - x-nullable: true - is_marketing_accepted: - description: A flag indicating that the user has consented to receive marketing - information. - type: boolean - x-nullable: true - is_totp_enabled: - description: A flag indicating whether mandatory two-factor authentication - (TOTP) is enabled. - type: boolean - x-nullable: true - login_profiles: - description: '''A list of login profiles for the user, specified as identity - providers associated with the user. Only the ID attribute of the login profile - should be set in the request object. The list cannot be empty. Only an account - admin may update login profiles.''' + x-deprecation: + comment: This field is deprecated, use 'applications' + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + applications: + description: An array of applicationIDs. items: - $ref: '#/definitions/LoginProfile' + type: string + type: array + users: + description: An array of user IDs. + items: + type: string type: array - x-nullable: true - phone_number: - description: Phone number. - maxLength: 100 - type: string - x-nullable: true - status: - description: The status of the user. ENROLLING indicates that the user is - in the middle of the enrollment process. INVITED means that the user has - not accepted the invitation request. RESET means that the password must - be changed immediately. INACTIVE users are locked out and not permitted - to use the system. Can be changed by the Aggregator Admin only. - enum: - - ENROLLING - - INVITED - - ACTIVE - - RESET - - INACTIVE - example: ACTIVE - type: string - x-nullable: true - username: - description: A username. - pattern: '[\w\-,._@+=]{4,30}' - type: string - x-nullable: true type: object - Webhook: + SubscriptionsCounter: + description: The number of subscription requests sent to devices. + format: int64 + minimum: 0 + type: integer + SubscriptionsList: + description: A list of resource URIs, one per line. + example: /sen/light + type: string + SubtenantAccountReport: + description: Billing report for tenant account. properties: - headers: - additionalProperties: - type: string - description: The headers (key/value) sent with the notification. Optional. - example: '{"authorization" : "f4b93d6e-4652-4874-82e4-41a3ced0cd56"}' - type: object - serialization: - description: Serialization configuration for a channel. - schema: - $ref: '#/definitions/SerializationConfigData' - type: object - url: - description: The URL to which the notifications are sent. We recommend that - you serve this URL over HTTPS. - example: https://www.example.com/my-webhook - type: string + account: + $ref: '#/definitions/SubtenantReportAccountContactInfo' + description: Tenant account contact information. + billing_data: + $ref: '#/definitions/ReportBillingData' + description: Report billing data. + service_package: + $ref: '#/definitions/SubtenantServicePackageReport' + description: service package report for the tenant. required: - - url + - account + - billing_data type: object - WebsocketChannel: + SubtenantReportAccountContactInfo: + description: Tenant account contact information. properties: - queue_size: - default: 0 - description: Number of events in the channel's event queue waiting to be delivered. - example: 0 - type: integer - serialization: - description: Serialization configuration for a channel. - schema: - $ref: '#/definitions/SerializationConfigData' - type: object - status: - default: disconnected - description: Channel status is 'connected' when the channel has an active - WebSocket bound to it. The state is 'disconnected' when either the channel - or the WebSocket bound to it is closed. + address_line1: + type: string + address_line2: + type: string + alias: + type: string + business_model: + description: The business model selected for the account to generate the billing + reports. enum: - - connected - - disconnected - example: disconnected + - active_device_business_model + - api_calls_1_business_model + type: string + city: + type: string + company: + type: string + contact: + type: string + country: + type: string + customer_subtenant_id: + description: Account tenant ID, valid only for tenants. + type: string + email: + type: string + id: + description: Account ID. + type: string + phone_number: + type: string + postal_code: + type: string + state: type: string + required: + - id + - company + - customer_subtenant_id type: object - error-response: + SubtenantServicePackageReport: properties: - code: - description: HTTP response code. - format: int32 - type: integer - fields: - description: Details of the error fields. + quota_usage: items: - $ref: '#/definitions/fields' + $ref: '#/definitions/QuotaUsageReport' type: array - message: - description: Description of the error. - type: string - object: - description: Response type, always "error". + required: + - quota_usage + type: object + TierHistory: + properties: + tier: + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' type: string - request_id: - description: Request ID. + updatedAt: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string - type: - description: Type of error. + type: object + TokenRequest: + properties: + aud: + description: 'Array of \:\ tuples representing devices for + which access is being requested. There must be at least one id/ep tuple.
+ \ ::= id|ep
\::=[a-zA-Z0-9+/=- ]+
\ + :== \ ":" \
\ can be up to 60 characters + long, and can contain spaces.
+ + The audience array can contain up to 50 tuples. If IAM does not authorize + even one item in the list, Secure Device Access does not authorize the whole + request and does not return an access token (access denied).' + items: + $ref: '#/definitions/AudienceItem' + maxItems: 50 + minItems: 1 + type: array + cnf: + description: The Android application proof-of-possession public key. + format: The public key in PEM format. + type: string + grant_type: + description: Hardcoded - can only be "client_credentials". + type: string + scope: + description: The space-delimited list of operations that user is requesting + permission for. The array must contain at least one scope item. A scope + item can have up to 60 characters. A scope list can hold up to 20 scope + items.
\::=[a-zA-Z][a-zA-Z0-9-]*
\::= \ + | \ " " | \ " " \
The scope being requested + must match the action that the Android application eventually performs on + the IoT device. The device matches the scope in the access token to the + action requested in the operation bundle. + format: scope-item scope-item ... type: string + required: + - grant_type + - aud + - scope + - cnf type: object - fields: + TokenResponse: properties: - message: - description: Error description. + access_token: + description: The generated CWT (CBOR Web Token) access token as a Base64 string. + format: byte type: string - name: - description: The field name in the request for which the validation has failed. + granted_until: + description: Grant expiration UTC time RFC3339. + format: date-time type: string type: object - metric: + TransactionsCounter: + description: A transaction is a data block of 512 bytes processed by Device Management. + It can be sent either by the device (device --> Device Management) or received + by the device (Device Management --> device). A transaction does not include + IP, TCP or UDP, TLS or DTLS packet overhead. It only contains the packet payload + (full CoAP packet including CoAP headers). + format: int64 + minimum: 0 + type: integer + TrustAnchorResponse: properties: - bootstraps_failed: - description: The number of failed bootstraps the account has performed. Bootstrap - is the process of provisioning a Lightweight Machine to Machine Client to - a state where it can initiate a management session to a new Lightweight - Machine to Machine Server. - format: int64 - type: integer - bootstraps_pending: - description: The number of pending bootstraps the account has performed. Bootstrap - is the process of provisioning a Lightweight Machine to Machine Client to - a state where it can initiate a management session to a new Lightweight - Machine to Machine Server. - format: int64 - type: integer - bootstraps_successful: - description: The number of successful bootstraps the account has performed. - Bootstrap is the process of provisioning a Lightweight Machine to Machine - Client to a state where it can initiate a management session to a new Lightweight - Machine to Machine Server. - format: int64 - type: integer - connect_rest_api_error: - description: The number of failed [Connect API](/docs/current/service-api-references/device-management-connect.html) - requests that have been performed using the account. This metric does not - consider the response from the device, it includes only the responses to - the HTTP requests used to manage the device. This metric includes only messages - handled by the Connect service, it does not include any HTTP errors returned - by firewall as result of malformed messages. - format: int64 - type: integer - connect_rest_api_success: - description: The number of successful [Connect API](/docs/current/service-api-references/device-management-connect.html) - requests that have been performed using the account. This metric does not - consider the response from the device, it includes only the responses to - the HTTP requests used to manage the device. - format: int64 - type: integer - deleted_registrations: - description: The number of deleted registrations (deregistrations) linked - to the account. Deregistration is the process of removing the device registration - from the Device Management Connect registry. The deregistration is usually - initiated by the device. Device Management Connect no longer handles requests - for a deregistered device. - format: int64 - type: integer - device_observations: - description: '**(Beta)** The number of notifications received by the Device - Management Connect service from the devices linked to the account. The device - pushes notifications to Device Management Connect when you have successfully - subscribed to the device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) - endpoints. - - ' - format: int64 - type: integer - device_proxy_request_error: - description: '**(Beta)** The number of failed proxy requests from the Device - Management Connect service to devices linked to the account. Device Management - Connect makes proxy requests to devices when you try to read or write values - to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) - endpoints. - - ' - format: int64 - type: integer - device_proxy_request_success: - description: '**(Beta)** The number of successful proxy requests from the - Device Management Connect service to devices linked to the account. Device - Management Connect makes proxy requests to devices when you try to read - or write values to device resources using [Connect API](/docs/current/service-api-references/device-management-connect.html) - endpoints. - - ' - format: int64 - type: integer - device_subscription_request_error: - description: '**(Beta)** The number of failed subscription requests from the - Device Management Connect service to devices linked to the account. Device - Management Connect makes subscription requests to devices when you try to - subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) - endpoints. - - ' - format: int64 - type: integer - device_subscription_request_success: - description: '**(Beta)** The number of successful subscription requests from - the Device Management Connect service to devices linked to the account. - Device Management Connect makes subscription requests to devices when you - try to subscribe to a resource path using [Connect API](/docs/current/service-api-references/device-management-connect.html) - endpoints. - - ' - format: int64 - type: integer - expired_registrations: - description: The number of expired registrations linked to the account. Device - Management Connect removes the device registrations when the devices cannot - update their registration before the expiry of the lifetime. Device Management - Connect no longer handles requests for a device whose registration has expired - already. - format: int64 - type: integer - full_registrations: - description: The number of full registrations linked to the account. Full - registration is the process of registering a device with Device Management - Connect by providing its lifetime and capabilities such as the resource - structure.The registered status of the device does not guarantee that the - device is active and accessible from Device Management Connect at any point - of time. - format: int64 - type: integer - handshakes_successful: - description: The number of successful TLS handshakes the account has performed. - The SSL or TLS handshake enables the SSL or TLS client and server to establish - the secret keys with which they communicate. A successful TLS handshake - is required for establishing a connection with Device Management Connect - for any operaton such as registration, registration update and deregistration. - format: int64 - type: integer - id: - description: A unique metric ID. + created_at: *id017 + description: + description: The updated notes about the trust anchor. + format: free text + maxLength: 256 + minLength: 1 type: string - registration_updates: - description: The number of registration updates linked to the account. Registration - update is the process of updating the registration status with Device Management - Connect to update or extend the lifetime of the device. - format: int64 - type: integer - timestamp: - description: UTC time in RFC3339 format. The timestamp is the starting point - of the interval for which the data is aggregated. Each interval includes - data for the time greater than or equal to the timestamp and less than the - next interval's starting point. - format: date-time + etag: *id018 + fingerprint: + description: The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' + followed by the trust anchor public key as a SHA256 hash in Base64-encoded + DER format. + format: byte type: string - transactions: - description: The number of transaction events from or to devices linked to - the account. A transaction is a 512-byte block of data processed by Device - Management. It can be either sent by the device (device --> Device Management) - or received by the device (Device Management --> device). A transaction - does not include IP, TCP or UDP, TLS or DTLS packet overhead. It only contains - the packet payload (full CoAP packet including CoAP headers). - format: int64 - type: integer + id: *id019 + object: *id020 + public_key: + description: The trust anchor public key in PEM format. + format: byte + type: string + public_key_der: + description: The generated trust anchor public key in Base64-encoded DER format. + format: byte + type: string + updated_at: *id021 type: object - successful-response: + TrustedCertificateReq: + description: Represents a trusted certificate in upload requests. properties: - after: - description: The metric ID included in the request or null. + certificate: + description: A chain of X509.v3 trusted certificates in PEM format. The chain + must contain all certificates from root to leaf. Otherwise, the signature + parameter is required. type: string - data: - items: - $ref: '#/definitions/metric' - type: array - has_more: - description: Indicates whether there are more results for you to fetch in - the next page. + description: + description: Human readable description of this certificate. + maxLength: 500 + type: string + x-nullable: true + enrollment_mode: + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' type: boolean - limit: - description: The limit used in the request to retrieve the results. - type: integer - object: - description: API resource name. + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] + name: + description: Certificate name. + maxLength: 100 type: string - total_count: - description: The total number of records available. + service: + description: Service name where the certificate must be used. + enum: + - lwm2m + - bootstrap + type: string + signature: + description: 'DEPRECATED: Base64 encoded signature of the account ID signed + by the certificate to upload. The signature must be hashed with SHA256.' + type: string + status: + description: Status of the certificate. + enum: + - ACTIVE + - INACTIVE + type: string + required: + - certificate + - name + - service + type: object + TrustedCertificateResp: + description: Represents a trusted certificate in responses. + properties: + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + certificate: + description: X509.v3 trusted certificate in PEM format. + example: '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----' + type: string + certificate_fingerprint: + description: A SHA-256 fingerprint of the certificate. + example: a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1 + type: string + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + description: + description: Human readable description of this certificate. + example: Certificate created by me. + maxLength: 500 + type: string + x-nullable: true + device_execution_mode: + description: Device execution mode where 1 means a developer certificate. + example: 1 + format: int32 + type: integer + enrollment_mode: + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' + example: false + type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] + etag: + description: API resource entity version. + example: '1' + type: string + id: + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + issuer: + description: Issuer of the certificate. + example: CN=issuer + type: string + name: + description: Certificate name. + example: My certificate + maxLength: 100 + type: string + object: + description: 'Entity name: always ''trusted-cert''' + enum: + - trusted-cert + type: string + owner_id: + description: The ID of the owner. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + service: + description: Service name where the certificate is used. + enum: + - lwm2m + - bootstrap + type: string + status: + description: Status of the certificate. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + subject: + description: Subject of the certificate. + example: CN=subject + type: string + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + valid: + description: This read-only flag indicates whether the certificate is valid + or not. + example: true + readOnly: true + type: boolean + validity: + description: Expiration time in UTC formatted as RFC3339. + example: '2038-02-14T15:24:14Z' + format: date-time + type: string + required: + - account_id + - certificate + - certificate_fingerprint + - etag + - id + - issuer + - name + - object + - service + - subject + - validity + type: object + TrustedCertificateRespList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + data: + description: A list of entities. + items: + $ref: '#/definitions/TrustedCertificateResp' + type: array + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return (2-1000), or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list + type: string + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC + type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + TrustedCertificateUpdateReq: + description: Represents a trusted certificate in update requests. + properties: + certificate: + description: A chain of X509.v3 trusted certificates in PEM format. The chain + must contain all certificates from root to leaf. Otherwise, the signature + parameter is required. + type: string + description: + description: Human readable description of this certificate. + maxLength: 500 + type: string + x-nullable: true + enrollment_mode: + description: Certificate is used in enrollment mode. Default value is false. + type: boolean + name: + description: Certificate name. + maxLength: 100 + type: string + service: + description: Service name where the certificate must be used. Service cannot + be updated for developer certificates. + enum: + - lwm2m + - bootstrap + type: string + signature: + description: 'DEPRECATED: Base64 encoded signature of the account ID signed + by the certificate to be uploaded. The signature must be hashed with SHA256.' + type: string + status: + description: Status of the certificate. + enum: + - ACTIVE + - INACTIVE + type: string + type: object + UnauthorizedErrorResponse: + description: 401 Unauthorized response. + properties: + code: + description: Response code. Always set to 401. + enum: + - 401 + type: integer + message: + description: A human-readable message with detailed info. + type: string + object: + description: Always set to `error`. + enum: + - error + type: string + request_id: + description: Request ID + type: string + type: + description: Error type. Always set to `unauthorized`. + enum: + - unauthorized + type: string + required: + - object + - message + - request_id + - type + - code + type: object + UpdateCampaign: + properties: + active_at: + description: The time the campaign entered the active state. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + approval_required: + description: Flag indicating whether approval is needed to start the campaign. + example: 'false' + type: boolean + archived_at: + description: The time the campaign was archived. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + autostop: + description: Flag indicating whether the campaign should be auto-stopped on + reaching a threshold. + example: 'false' + type: boolean + autostop_reason: + description: Text description of why a campaign failed to start or why a campaign + stopped. + example: Insufficient billing credit. + type: string + autostop_success_percent: + description: Percent of successful device updates to auto stop the campaign. + example: '85.00' + format: double + type: number + campaign_strategy: &id022 + default: one-shot + description: How the campaign adds devices. A `one-shot` campaign does not + add new devices after it has started. A `continuous` campaign means that + devices may be added to the campaign after it has started. The default is + `one-shot`. + enum: + - one-shot + - continuous + type: string + created_at: *id014 + description: + description: An optional description of the campaign. + example: This campaign updates Class XX devices to version 1.34 + maxLength: 2000 + type: string + device_filter: + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. + example: state__eq=registered + type: string + etag: *id015 + finished: + description: The time the campaign finished. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + id: + description: The campaign ID. + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' + type: string + name: + description: The campaign name. + example: campaign + maxLength: 128 + type: string + object: + description: 'Entity name: always ''update-campaign''.' + example: update-campaign + type: string + phase: + description: The phase of the campaign. + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived + type: string + root_manifest_id: + description: The ID of the manifest that will be sent to the device as part + of the campaign. + example: 016e83dce36a00000000000100100102 + type: string + root_manifest_url: + description: The URL for the manifest that will be sent to the device as part + of the campaign. + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 + type: string + started_at: + description: The time the campaign was started. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + starting_at: + description: The time the campaign will be started. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + state: + description: The state of the campaign. + enum: + - draft + - scheduled + - allocatingquota + - allocatedquota + - quotaallocationfailed + - checkingmanifest + - checkedmanifest + - devicefetch + - devicecopy + - devicecheck + - publishing + - deploying + - deployed + - manifestremoved + - expired + - stopping + - autostopped + - userstopped + - conflict + type: string + x-deprecation: + comment: Use phase instead + end_of_life_at: '2020-03-18T14:55:20+00:00' + issued_at: '2019-03-18T14:55:20+00:00' + links: [] + stopped_at: + description: The time the campaign was stopped. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + stopping_at: + description: The time the campaign will be stopped. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + updated_at: *id016 + when: + description: The scheduled start time for the campaign. The campaign will + start within 1 minute when then start time has elapsed. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + x-nullable: true + UpdateCampaignEqNeqFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + description: + type: string + device_filter: + type: string + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + finished: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + id: + pattern: '[A-Fa-f0-9]{32}' + type: string + name: + type: string + root_manifest_id: + pattern: '[A-Fa-f0-9]{32}' + type: string + started_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + state: + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + when: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + UpdateCampaignGteLteFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + finished: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + started_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + when: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + x-nullable: true + UpdateCampaignInNinFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + description: + type: string + device_filter: + type: string + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + finished: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + id: + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' + type: string + name: + type: string + root_manifest_id: + example: 015c6029f6f9000000000001001000f4 + pattern: '[A-Fa-f0-9]{32}' + type: string + started_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + state: + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + when: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + UpdateCampaignPage: + properties: + after: + example: null + type: string + data: + items: + $ref: '#/definitions/UpdateCampaign' + type: array + has_more: + type: boolean + limit: + type: integer + object: + description: 'Entity name: always ''list''.' + example: list + type: string + order: + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC + type: string + total_count: + type: integer + UpdateCampaignPostRequest: + properties: + approval_required: + default: false + type: boolean + autostop: + default: true + type: boolean + autostop_success_percent: + default: 100.0 + type: number + campaign_strategy: *id022 + description: + description: An optional description of the campaign. + example: a description + maxLength: 2000 + type: string + device_filter: + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. + example: state__eq=registered + type: string + name: + default: default_object_name + description: The name for this campaign. + maxLength: 128 + type: string + root_manifest_id: + example: 016e83b46477000000000001001001f3 + pattern: '[A-Fa-f0-9]{32}' + type: string + state: + description: 'DEPRECATED: The state of the campaign (use phase instead)' + enum: + - draft + - scheduled + type: string + x-deprecation: + comment: Use phase instead + end_of_life_at: '2020-03-18T14:55:20+00:00' + issued_at: '2019-03-18T14:55:20+00:00' + links: [] + when: + description: The scheduled start time for the update campaign. Not in use. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + x-nullable: true + required: + - device_filter + UpdateCampaignPutRequest: + properties: + approval_required: + default: false + type: boolean + autostop: + default: true + type: boolean + autostop_success_percent: + default: 100.0 + type: number + description: + description: An optional description of the campaign. + example: description + format: free text + maxLength: 2000 + type: string + device_filter: + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. + example: state__eq=registered + type: string + name: + description: The campaign's name. + example: campaign + format: free text + maxLength: 128 + type: string + root_manifest_id: + example: 016e83dce36a00000000000100100201 + pattern: '[A-Fa-f0-9]{32}' + type: string + state: + description: 'DEPRECATED: The state of the campaign (use phase instead).' + enum: + - draft + - scheduled + - allocatingquota + - allocatedquota + - quotaallocationfailed + - checkingmanifest + - checkedmanifest + - devicefetch + - devicecopy + - devicecheck + - publishing + - deploying + - deployed + - manifestremoved + - expired + - stopping + - autostopped + - userstopped + - conflict + type: string + x-deprecation: + comment: Use phase instead + end_of_life_at: '2020-03-18T14:55:20+00:00' + issued_at: '2019-03-18T14:55:20+00:00' + links: [] + when: + description: The scheduled start time for the update campaign. Not in use. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + x-nullable: true + UpdateTrustAnchorRequest: + properties: + description: + description: The new description for the trust anchor. + format: free text + maxLength: 256 + minLength: 1 + type: string + required: + - description + type: object + UpdateTrustAnchorResponse: + properties: + created_at: *id017 + description: + description: The updated notes about the trust anchor. + format: free text + maxLength: 256 + minLength: 1 + type: string + etag: *id018 + fingerprint: + description: The SHA256 of the trust anchor public key; the prefix 'mbed.ta.' + followed by the trust anchor public key as a SHA256 hash in Base64-encoded + DER format. + format: byte + type: string + id: *id019 + object: *id020 + public_key: + description: The trust anchor public key in PEM format. + format: byte + type: string + public_key_der: + description: The generated trust anchor public key in Base64-encoded DER format. + format: byte + type: string + updated_at: *id021 + type: object + UploadChunkInfo: + properties: + created_at: *id014 + etag: *id015 + hash: + description: The hash of the chunk. The default hash is MD5. If no Content-MD5 + header is supplied as part of uploading the chunk then this will be empty. + type: string + id: + description: The chunk number. + example: 1 + type: integer + length: + description: The length of the chunk. + example: 1234 + type: integer + object: + description: 'Entity name: always ''upload-info''.' + example: upload-info + type: string + updated_at: *id016 + upload_job_id: + description: The upload job ID. + example: '00000000000000000000000000000000' + type: string + type: object + UploadChunkInfoPage: + properties: + after: + example: null + type: string + data: + items: + $ref: '#/definitions/UploadChunkInfo' + type: array + has_more: + type: boolean + limit: + format: int32 + type: integer + object: + description: 'Entity name: always ''list''.' + example: list + type: string + order: + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC + type: string + total_count: + format: int32 + type: integer + UploadJob: + properties: + complete: + description: A flag that indicates job completion. + example: false + type: boolean + created_at: *id014 + description: &id035 + description: Human-readable description. + example: New Linux update for my devices + maxLength: 2000 + type: string + etag: *id015 + firmware_image_id: + description: ID of the firmware image - empty until the upload job is complete. + example: 016e652be671000000000001001001a8 + pattern: '[A-Fa-f0-9]{32}' + type: string + id: + description: The upload job ID. + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' + type: string + name: &id036 + description: Human-readable name. + example: New Linux update + maxLength: 128 + type: string + object: + description: 'Entity name: always ''upload-job''.' + example: upload-job + type: string + status: + description: Status of the upload job. + example: in_progress + type: string + updated_at: *id016 + type: object + UploadJobPage: + properties: + after: + example: null + type: string + data: + items: + $ref: '#/definitions/UploadJob' + type: array + has_more: + type: boolean + limit: + format: int32 + type: integer + object: + description: 'Entity name: always ''list''.' + example: list + type: string + order: + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC + type: string + total_count: + format: int32 + type: integer + UserInfoReq: + description: Represents a user in requests towards Device Management. + properties: + address: + description: Address. + maxLength: 100 + type: string + x-nullable: true + email: + description: The email address. + pattern: ^(?=.{3,254}$).+\@.+ + type: string + full_name: + description: The full name of the user. + maxLength: 100 + type: string + x-nullable: true + groups: + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + is_gtc_accepted: + description: A flag indicating that the user has accepted General Terms and + Conditions. + type: boolean + is_marketing_accepted: + description: A flag indicating that the user has consented to receive marketing + information. + type: boolean + login_profiles: + description: A list of login profiles for the user. Specified as the identity + providers the user should be associated with. Only the ID attribute of the + login profile should be set in the request object. + items: + $ref: '#/definitions/LoginProfile' + type: array + password: + description: The password for a new user. Generated when not present in the + request. + type: string + x-nullable: true + phone_number: + description: Phone number. + maxLength: 100 + type: string + x-nullable: true + username: + description: A username. + pattern: '[\w\-,._@+=]{4,30}' + type: string + x-nullable: true + required: + - email + type: object + UserInfoResp: + description: Represents a user in Device Management. + properties: + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + active_sessions: + description: List of active user sessions. + items: + $ref: '#/definitions/ActiveSession' + type: array + address: + description: Address. + example: 110 Fulbourn Rd, Cambridge, United Kingdom + type: string + x-nullable: true + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + creation_time: + description: A timestamp of the user creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + custom_fields: + additionalProperties: + type: string + description: User's account-specific custom properties. The value is a string. + type: object + x-nullable: true + email: + description: The email address. + example: user@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + email_verified: + description: A flag indicating whether the user's email address has been verified + or not. + example: true + type: boolean + etag: + description: API resource entity version. + example: '1' + type: string + full_name: + description: The full name of the user. + example: User Doe + maxLength: 100 + type: string + x-nullable: true + groups: + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + id: + description: The ID of the user. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + is_gtc_accepted: + description: A flag indicating that the user has accepted General Terms and + Conditions. + example: true + type: boolean + is_marketing_accepted: + description: A flag indicating that the user has consented to receive marketing + information. + example: true + type: boolean + is_totp_enabled: + description: A flag indicating whether two-factor authentication (TOTP) has + been enabled. + example: true + type: boolean + last_login_time: + description: A timestamp of the latest login of the user, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + login_history: + description: Timestamps, succeedings, IP addresses and user agent information + of the last five logins of the user, with timestamps in RFC3339 format. + items: + $ref: '#/definitions/LoginHistory' + maxItems: 5 + type: array + login_profiles: + description: A list of login profiles for the user. Specified as the identity + providers the user is associated with. + items: + $ref: '#/definitions/LoginProfile' + type: array + x-nullable: true + object: + description: 'Entity name: always `user`.' + enum: + - user + type: string + password: + description: The password when creating a new user. It will be generated when + not present in the request. + example: PZf9eEUH43DAPE9ULINFeuj + type: string + x-nullable: true + password_changed_time: + description: A timestamp of the latest change of the user password, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + phone_number: + description: Phone number. + example: +44 (1223) 400 400 + maxLength: 100 + type: string + x-nullable: true + status: + description: The status of the user. ENROLLING state indicates that the user + is in the middle of the enrollment process. INVITED means that the user + has not accepted the invitation request. RESET means that the password must + be changed immediately. INACTIVE users are locked out and not permitted + to use the system. + enum: + - ENROLLING + - INVITED + - ACTIVE + - RESET + - INACTIVE + example: ACTIVE + type: string + totp_scratch_codes: + description: A list of scratch codes for the two-factor authentication. Visible + only when 2FA is requested to be enabled or the codes regenerated. + items: + type: string + type: array + x-nullable: true + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + username: + description: A username. + example: admin + pattern: '[\w\-,._@+=]{4,30}' + type: string + x-nullable: true + required: + - account_id + - email + - etag + - id + - object + - status + type: object + UserInfoRespList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + data: + description: A list of entities. + items: + $ref: '#/definitions/UserInfoResp' + type: array + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return (2-1000), or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list + type: string + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC + type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + UserInvitationReq: + description: Represents a user invitation in requests towards Device Management. + properties: + email: + description: The email address. + pattern: ^(?=.{3,254}$).+\@.+ + type: string + groups: + description: A list of IDs of the groups this user has been invited to. + items: + type: string + type: array + login_profiles: + description: A list of login profiles for the user. Specified as the identity + providers the user should be associated with. Only the ID attribute of the + login profile should be set in the request object. + items: + $ref: '#/definitions/LoginProfile' + type: array + valid_for_days: + default: 30 + description: Specifies how many days the invitation will be valid for. + format: int32 + maximum: 100 + minimum: 1 + type: integer + required: + - email + type: object + UserInvitationResp: + description: Represents an user invitation in responses. + properties: + account_id: + description: The ID of the account the user is invited to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + email: + description: Email address of the invited user. + example: friend@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + etag: + description: API resource entity version. + example: '1' + type: string + expiration: + description: Invitation expiration as UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + groups: + description: A list of IDs of the groups the user is invited to. + items: + type: string + type: array + id: + description: The ID of the invitation. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + login_profiles: + description: A list of login profiles for the user. Specified as the identity + providers the user is associated with. + items: + $ref: '#/definitions/LoginProfile' + type: array + x-nullable: true + object: + description: 'Entity name: always ''user-invitation''' + enum: + - user-invitation + type: string + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + user_id: + description: The ID of the invited user. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + required: + - account_id + - email + - etag + - id + - object + - user_id + type: object + UserInvitationRespList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + data: + description: A list of entities. + items: + $ref: '#/definitions/UserInvitationResp' + type: array + has_more: + description: Flag indicating whether there are more results. + example: false + type: boolean + limit: + description: The number of results to return (2-1000), or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' + enum: + - list + type: string + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' + enum: + - ASC + - DESC + type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + UserUpdateReq: + description: Represents a user in requests towards Device Management. + properties: + address: + description: Address. + maxLength: 100 + type: string + x-nullable: true + email: + description: The email address. Not allowed to update other user's email address. + pattern: ^(?=.{3,254}$).+\@.+ + type: string + x-nullable: true + full_name: + description: The full name of the user. + maxLength: 100 + type: string + x-nullable: true + groups: + description: A list of group IDs this user belongs to. Can be updated by the + Account Admin only. + items: + type: string + type: array + x-nullable: true + is_gtc_accepted: + description: A flag indicating that the user has accepted General Terms and + Conditions. + type: boolean + x-nullable: true + is_marketing_accepted: + description: A flag indicating that the user has consented to receive marketing + information. + type: boolean + x-nullable: true + is_totp_enabled: + description: A flag indicating whether two-factor authentication (TOTP) is + enabled. An account administrator can disable it, but cannot enable it for + other users. + type: boolean + x-nullable: true + login_profiles: + description: '''A list of login profiles for the user, specified as identity + providers associated with the user. Only the ID attribute of the login profile + should be set in the request object. The list cannot be empty. Only an account + admin may update login profiles.''' + items: + $ref: '#/definitions/LoginProfile' + type: array + x-nullable: true + phone_number: + description: Phone number. + maxLength: 100 + type: string + x-nullable: true + status: + description: The status of the user. ENROLLING indicates that the user is + in the middle of the enrollment process. INVITED means that the user has + not accepted the invitation request. RESET means that the password must + be changed immediately. INACTIVE users are locked out and not permitted + to use the system. Can be changed by the Aggregator Admin only. + enum: + - ENROLLING + - INVITED + - ACTIVE + - RESET + - INACTIVE + example: ACTIVE + type: string + x-nullable: true + username: + description: A username. + pattern: '[\w\-,._@+=]{4,30}' + type: string + x-nullable: true + type: object + Webhook: + properties: + headers: + additionalProperties: + type: string + description: The headers (key/value) sent with the notification. Optional. + example: '{"authorization" : "f4b93d6e-4652-4874-82e4-41a3ced0cd56"}' + type: object + serialization: + $ref: '#/definitions/SerializationConfigData' + url: + description: The URL to which the notifications are sent. We recommend that + you serve this URL over HTTPS. + example: https://www.example.com/my-webhook + type: string + required: + - url + type: object + WebsocketChannel: + properties: + queue_size: + default: 0 + description: Number of events in the channel's event queue waiting to be delivered. + If the server cannot determine the queue size the value will be set to `-1`. + example: 0 + type: integer + serialization: + $ref: '#/definitions/SerializationConfigData' + status: + default: disconnected + description: Channel status is 'connected' when the channel has an active + WebSocket bound to it. The status is 'disconnected' when either the channel + or the WebSocket bound to it is closed and 'unknown' when the server cannot + determine it. + enum: + - connected + - disconnected + - unknown + example: disconnected + type: string + type: object + error-response: + properties: + code: + description: HTTP response code. + format: int32 + type: integer + fields: + description: Details of the error fields. + items: + $ref: '#/definitions/fields' + type: array + message: + description: Description of the error. + type: string + object: + description: 'Response type: always `error`.' + type: string + request_id: + description: Request ID. + type: string + type: + description: Type of error. + type: string + type: object + fields: + properties: + message: + description: Error description. + type: string + name: + description: The field name in the failed validation request. + type: string + type: object + metric: + properties: + bootstraps_failed: + description: The number of failed bootstraps the account has performed. Bootstrap + is the process of provisioning an Lw2M2M client to a state where it can + initiate a management session to a new LwM2M server. + format: int64 + type: integer + bootstraps_pending: + description: The number of pending bootstraps the account has performed. Bootstrap + is the process of provisioning an Lw2M2M client to a state where it can + initiate a management session to a new LwM2M server. + format: int64 + type: integer + bootstraps_successful: + description: The number of successful bootstraps the account has performed. + Bootstrap is the process of provisioning a lightweight machine-to-machine + (LwM2M) client to a state where it can initiate a management session to + a new LwM2M Server. + format: int64 + type: integer + connect_rest_api_error: + description: The number of failed [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + requests that have been performed using the account. This metric does not + consider the response from the device, it includes only the responses to + the HTTP requests used to manage the device. This metric includes only messages + handled by the Connect service, not any HTTP errors returned by the firewall + as a result of incorrect messages. + format: int64 + type: integer + connect_rest_api_success: + description: The number of successful [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + requests that have been performed using the account. This metric does not + consider the response from the device, only the responses to the HTTP requests + used to manage the device. + format: int64 + type: integer + deleted_registrations: + description: The number of deleted registrations (deregistrations) linked + to the account. Deregistration is the process of removing the device registration + from the Device Management Connect registry. The deregistration is usually + initiated by the device. Device Management Connect no longer handles requests + for deregistered devices. + format: int64 + type: integer + device_observations: + description: '**(Beta)** The number of notifications received by the Device + Management Connect service from the devices linked to the account. The device + pushes notifications to Device Management Connect when you have successfully + subscribed to the device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + endpoints.' + format: int64 + type: integer + device_proxy_request_error: + description: '**(Beta)** The number of failed proxy requests from the Device + Management Connect service to devices linked to the account. Device Management + Connect makes proxy requests to devices when you try to read or write values + to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + endpoints.' + format: int64 + type: integer + device_proxy_request_success: + description: '**(Beta)** The number of successful proxy requests from the + Device Management Connect service to devices linked to the account. Device + Management Connect makes proxy requests to devices when you try to read + or write values to device resources using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + endpoints.' + format: int64 + type: integer + device_subscription_request_error: + description: '**(Beta)** The number of failed subscription requests from the + Device Management Connect service to devices linked to the account. Device + Management Connect makes subscription requests to devices when you try to + subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + endpoints.' + format: int64 + type: integer + device_subscription_request_success: + description: '**(Beta)** The number of successful subscription requests from + the Device Management Connect service to devices linked to the account. + Device Management Connect makes subscription requests to devices when you + try to subscribe to a resource path using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/) + endpoints.' + format: int64 + type: integer + expired_registrations: + description: The number of expired registrations linked to the account. Device + Management Connect removes a registration when the device cannot update + its registration before lifetime expiry. Device Management Connect no longer + handles requests for devices with already expired registrations. + format: int64 + type: integer + full_registrations: + description: The number of full registrations linked to the account. Full + registration is the process of registering a device with Device Management + Connect by providing its lifetime and capabilities, such as resource structure. + Device registered status does not guarantee that the device is active and + accessible from Device Management Connect at any point of time. + format: int64 + type: integer + handshakes_successful: + description: The number of successful TLS handshakes the account has performed. + The SSL or TLS handshake enables the SSL or TLS client and server to establish + secret keys. A successful TLS handshake is required for establishing a connection + with Device Management Connect for any operation such as registration, registration + update, and deregistration. + format: int64 + type: integer + id: + description: A unique metric ID. + type: string + registration_updates: + description: The number of registration updates linked to the account. Registration + update is the process of updating the registration status with Device Management + Connect to update or extend the lifetime of the device. + format: int64 + type: integer + timestamp: + description: UTC time in RFC3339 format. The timestamp is the starting point + of the interval for which the data is aggregated. Each interval includes + data for the time greater than or equal to the timestamp and less than the + next interval's starting point. + format: date-time + type: string + transactions: + description: The number of transaction events from or to devices linked to + the account. A transaction is a 512-byte block of data processed by Device + Management. It can be either sent by the device (device --> Device Management) + or received by the device (Device Management --> device). A transaction + does not include IP, TCP or UDP, or TLS or DTLS packet overhead. It contains + only the packet payload (full CoAP packet including CoAP headers). + format: int64 + type: integer + type: object + successful-response: + properties: + after: + description: The metric ID included in the request, or null. + type: string + data: + items: + $ref: '#/definitions/metric' + type: array + has_more: + description: Indicates whether there are more results for you to fetch in + the next page. + type: boolean + limit: + description: The limit used in the request to retrieve the results. + type: integer + object: + description: API resource name. + type: string + total_count: + description: The total number of records available. + type: integer + type: object +host: api.us-east-1.mbedcloud.com +info: + description: Pelion Device Management API build from the publicly defined API definitions. + title: Pelion Device Management API + version: '3' +paths: + //ace-auth/token: + post: + description: "Generate a signed CWT (CBOR Web Token). The SDA Android SDK uses\ + \ this API to gain access to perform actions on the devices specified in the\ + \ audience (aud).\n
\nAuthorized for roles: Service, ServiceAdministrator\n\ +
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/ace-auth/token\ + \ \\\n-H 'Authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8'\ + \ \\\n-d '{\n \"grant_type\":\"client_credentials\",\n \"aud\":[\"id:f90b1017e52f4c70ad92684e802c9249\"\ + ,\"ep:dev1\"],\n \"scope\":\"turn-led-on\",\n \"cnf\":\"-----BEGIN PUBLIC\ + \ KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ...XwIDAQAB-----END PUBLIC KEY-----\"\ + \n}'\n```\n" + operationId: createAceAuthToken + parameters: + - description: Create access token request. + in: body + name: body + required: true + schema: + $ref: '#/definitions/TokenRequest' + responses: + '200': + description: A signed CWT (CBOR Web Token) access token. + schema: + $ref: '#/definitions/TokenResponse' + '400': + description: 'Bad request. Returns the standard error object detailing the + error message and, optionally, the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: 'Authentication failure. The provided header is invalid or + missing. + + Returns the standard error object detailing the error message and, optionally, + the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get an access token to use with a device. + tags: + - Security and identity - secure device access + x-origin: C:\Source\mbed\mbed-cloud-api-contract\sda-service\public\sda.yaml + //v3/trust-anchors: + get: + description: 'Get all trust anchors that match the account ID specified in the + JWT. + +
+ + Authorized for roles: Service, ServiceAdministrator + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/trust-anchors \ + + -H ''Authorization: '' + + ``` + + ' + operationId: getTrustAnchors + parameters: + - description: Indicates how many objects to retrieve in the page. The minimum + limit is 2 and the maximum is 1000. Limit values outside of this range are + set to the closest limit. + in: query + maximum: 1000 + minimum: 2 + name: limit + type: integer + - description: Indicates how to order the entries based on when they were created. + `ASC` by default. + enum: + - ASC + - DESC + in: query + name: order + type: string + - description: The ID of the item after which to retrieve the next page. + in: query + name: after + pattern: '[A-Fa-f0-9]{32}' + type: string + - description: 'Comma-separated list of data fields to return. Currently supported: + `total_count`.' + in: query + name: include + type: string + responses: + '200': + description: 'Returns the list of trust anchors associated to the account_id + specified in the access token. + + ' + schema: + $ref: '#/definitions/GetTrustAnchorsResponse' + '400': + description: 'Bad request. Returns the standard error object detailing the + error message and, optionally, the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: 'Authentication failure. The provided header is invalid or + missing. + + Returns the standard error object detailing the error message and, optionally, + the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get the account's trust anchor used to sign the access token. + tags: + - Security and identity - secure device access + x-origin: C:\Source\mbed\mbed-cloud-api-contract\sda-service\public\sda.yaml + post: + description: "Create a trust anchor key pair and return the public key and creation\ + \ time.\nEach account can have one trust anchor only. This API fails if a\ + \ trust anchor already exists for the account.\n
\nAuthorized for roles:\ + \ Service, ServiceAdministrator\n
\n**Usage example:**\n```\ncurl -X POST\ + \ https://api.us-east-1.mbedcloud.com/v3/trust-anchors \\\n-H 'Authorization:\ + \ ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n\ + -d '{\n \"description\": \"Trust anchor for room lighting controller.\"\n\ + }'\n```\n" + operationId: createTrustAnchor + parameters: + - description: Request a new trust anchor. + in: body + name: body + required: true + schema: + $ref: '#/definitions/CreateTrustAnchorRequest' + responses: + '201': + description: Trust anchor created. + schema: + $ref: '#/definitions/CreateTrustAnchorResponse' + '400': + description: 'Bad request. Returns the standard error object detailing the + error message and, optionally, the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: 'Authentication failure. The provided header is invalid or + missing. + + Returns the standard error object detailing the error message and, optionally, + the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: 'Account limit exceeded. There is already a trust anchor defined + for the account. + + Returns the standard error object detailing the error message. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new trust anchor for the account. + tags: + - Security and identity - secure device access + x-origin: C:\Source\mbed\mbed-cloud-api-contract\sda-service\public\sda.yaml + //v3/trust-anchors/{trust_anchor_id}: + delete: + description: 'Delete the specified trust anchor. Unrecoverable. + +
+ + Authorized for roles: Service, ServiceAdministrator + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725 + \ + + -H ''Authorization: '' \ + + ``` + + ' + operationId: deleteTrustAnchor + parameters: + - description: The id of the trust anchor to be deleted + in: path + name: trust_anchor_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + responses: + '204': + description: Trust anchor deleted. + '400': + description: 'Bad request. Returns the standard error object detailing the + error message and, optionally, the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: 'Authentication failure. The provided header is invalid or + missing. + + Returns the standard error object detailing the error message and, optionally, + the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: The trust anchor to be deleted was not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete a trust anchor. + tags: + - Security and identity - secure device access + x-origin: C:\Source\mbed\mbed-cloud-api-contract\sda-service\public\sda.yaml + put: + description: "Updates a trust anchor description attribute.\n
\nAuthorized\ + \ for roles: Service, ServiceAdministrator\n
\n**Usage example:**\n```\n\ + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trust-anchors/8e0a9494cc95b750ec6c81464eb06725\ + \ \\\n-H 'Authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8'\ + \ \\\n-d '{\n \"description\": \"Trust anchor for ambient light module\"\n\ + }'\n```\n" + operationId: updateTrustAnchor + parameters: + - description: The id of the trust anchor to be updated + in: path + name: trust_anchor_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + - description: Update trust anchor request. + in: body + name: body + required: true + schema: + $ref: '#/definitions/UpdateTrustAnchorRequest' + responses: + '200': + description: Trust anchor updated. + schema: + $ref: '#/definitions/UpdateTrustAnchorResponse' + '400': + description: 'Bad request. Returns the standard error object detailing the + error message and, optionally, the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: 'Authentication failure. The provided header is invalid or + missing. + + Returns the standard error object detailing the error message and, optionally, + the invalid fields. + + ' + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: The trust anchor to be updated was not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update trust anchor attributes (description). + tags: + - Security and identity - secure device access + x-origin: C:\Source\mbed\mbed-cloud-api-contract\sda-service\public\sda.yaml + /downloads/fcu/factory_configurator_utility.zip: + get: + description: 'Downloads the Factory Configurator Utility (FCU) archive .zip + file for the account ID associated with the access token. + +
+ + **Example:** + +
+ + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/factory_configurator_utility.zip + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + operationId: downloadFactoryTool + produces: + - application/zip + responses: + '200': + description: The archive file was downloaded successfully. + '400': + description: Validation error or bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Access denied. + schema: + $ref: '#/definitions/ErrorResponse' + '500': + description: Internal server error. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Download the Factory Configurator Utility archive. + tags: + - Manufacturing - Factory Configurator Utility (FCU) + x-origin: C:\Source\mbed\mbed-cloud-api-contract\factory-tool-download\public\swagger.yaml + /downloads/fcu/info: + get: + description: "Returns information about the Factory Configurator Utility (FCU)\ + \ archive.\n
\n**Example:**\n
\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/inf\ + \ \\\n-H 'Authorization: Bearer ' \n```\n" + operationId: getFactoryToolInfo + produces: + - application/json + responses: + '200': + description: Successful response of the archive information. + schema: + $ref: '#/definitions/ArchiveInfoResponse' + '400': + description: Validation error or bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Access denied. + schema: + $ref: '#/definitions/ErrorResponse' + '500': + description: Internal server error. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Download information about the Factory Configurator Utility archive. + tags: + - Manufacturing - Factory Configurator Utility (FCU) + x-origin: C:\Source\mbed\mbed-cloud-api-contract\factory-tool-download\public\swagger.yaml + /downloads/fcu/release_notes: + get: + description: 'Downloads the Factory Configurator Utility (FCU) release notes. + +
+ + **Example:** + +
+ + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/downloads/fcu/release_notes + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + operationId: getFactoryToolReleaseNotes + produces: + - text/markdown ; charset=UTF-8 + - application/json + responses: + '200': + description: The release notes were downloaded successfully. + '400': + description: Validation error or bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Access denied. + schema: + $ref: '#/definitions/ErrorResponse' + '500': + description: Internal server error. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Download Factory Configurator Utility release notes. + tags: + - Manufacturing - Factory Configurator Utility (FCU) + x-origin: C:\Source\mbed\mbed-cloud-api-contract\factory-tool-download\public\swagger.yaml + /v2/device-requests/{device-id}: + post: + consumes: + - application/json + description: "This API provides an interface to call CoAP (Constrained Application\ + \ Protocol) methods on a device and send commands to device resources.\n\n\ + As part of the request body, you must specify the CoAP method you want to\ + \ call on the device:\n\n- Use the GET method to read resource values.\n\n\ + \ For example, to read the value of resource `/3200/0/5501`, use:\n\n \ + \ ```\n curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-requests/{device_id}?async-id={async-response-id}\ + \ \\\n -H 'Authorization: Bearer {access_key}' \\\n -H 'content-type:\ + \ application/json' \\\n -d '{\"method\": \"GET\", \"uri\": \"/3200/0/5501\"\ + }'\n ```\n\n> For `GET` methods, the API may fetch values from an internal\ + \ cache, instead of contacting the device.\n> If the value is not in the cache,\ + \ the read command goes all the way to the device.\n\n\n- Use the PUT method\ + \ to write [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html)\ + \ or resource values for a resource.\n\n Example payload to write a notification\ + \ rule:\n\n ```\n { \"method\": \"PUT\", \"uri\": \"/5/0/1?lt=10>=60&pmax=120\"\ + \ }\n ```\n\n- Example payload to write a value to resource `/5/0/1`:\n\ + \n ```\n { \"method\": \"PUT\", \"uri\": \"/5/0/1?k1=v1&k2=v2\", \"\ + accept\": \"text/plain\", \"content-type\": \"text/plain\", \"payload-b64\"\ + : \"dmFsdWUxCg==\" }\n ```\n\n- Use the POST method to execute or create\ + \ a resource on a LWM2M supporting device.\n\n When you create a resource,\ + \ `uri` must refer to an object, and `payload-b64` must be in LWM2M TLV format\ + \ for example:\n\n ```\n { \"method\": \"POST\", \"uri\": \"/123\",\ + \ \"content-type\": \"application/vnd.oma.lwm2m+tlv\", \"payload-b64\": \"\ + BwHFAnZhbHVl\" }\n ```\n\n- Use the POST method to execute resource on\ + \ a LWM2M supporting device.\n\n Example payload to execute LWM2M resource\ + \ `/123/1/1`:\n\n ```\n { \"method\": \"POST\", \"uri\": \"/123/1/1\"\ + \ }\n ```\n\n- Device Management sends responses through the currently\ + \ configured notification channel as `AsyncIDResponse`.\n\n Example `AsyncIDResponse`\ + \ delivered through the notification channel:\n\n ```\n { \"async-responses\"\ + : [ { \"id\": \"123e4567-e89b-12d3-a456-426655440000\", \"status\": 200, \"\ + payload\": \"dmFsdWUxCg==\", \"ct\": \"text/plain\", \"max-age\": 600 } ]\ + \ }\n ```\n\n ```\n { \"async-responses\": [ { \"id\": \"123e4567-e89b-12d3-a456-426655440000\"\ + , \"status\": 504, \"error\": \"TIMEOUT\" } ] }\n ```\n\n> If it cannot\ + \ reach the device at the time of the request, Device Management puts the\ + \ requests in a queue.\n\n**Queueing behavior**\n\nIf Device Management does\ + \ not reach the device, or the device fails to respond, the server queues\ + \ the request and retries the delivery, for the period of time defined by\ + \ `expiry-seconds`, the next time the device contacts the server.\n\nThe queue\ + \ is limited to 20 requests per device. If the queue is full, subsequent messages\ + \ will be rejected until some of the existing messages are delivered or expired.\n\ + \nDevice Management delivers requests from the queue in the order of insertion,\ + \ one at a time, and not concurrently.\n\nDelivery attempts follow protocol-specific\ + \ retransmission logic. There can be multiple transmissions, depending on\ + \ the protocol. For CoAP, the retransmissions have an exponential backoff\ + \ of 2, 4, 8, 16, and up to 64 seconds, taking in total over two minutes.\n\ + If the device does not respond within this two-minute period, the delivery\ + \ fails, Device Management performs one retry and then puts the request back\ + \ into the queue until the retry count reaches its limit.\n\nDevice Management\ + \ attempts to redeliver the request when the device next contacts the server.\n\ + \nWhen Device Management reaches the `retry` or `expiry-seconds` limit, the\ + \ server discards the request and sends an error in `AsyncIDResponse`.\n\n\ + For example:\n\n- Retries could be exhausted if the device periodically contacts\ + \ the server and receives the request from the queue, but then fails to respond\ + \ to the server.\n\n- The device may lose its network connectivity, and the\ + \ requests in the queue may expire and get discarded before the device regains\ + \ connectivity. When Device Management delivers the request to the device,\ + \ the status code in `AsyncIDResponse` is *2xx* or *4xx*, based on the device's\ + \ response. If Device Management could not deliver the request, the server\ + \ generates a status code of *429* or *5xx*." + operationId: createAsyncRequest + parameters: + - description: The device ID generated by Device Management. + format: uuid, 32 hexadecimal characters + in: path + name: device-id + required: true + type: string + - description: A client-generated ID that lets the REST client track the end-to-end + flow and prevents race conditions with the notification channel. The `async-id` + can be, for example, a UUID or the web application session ID along with + the device ID and the resource. + format: 1-40 alphanumeric characters and dashes. + in: query + name: async-id + pattern: ^[\w\-]{1,40}$ + required: true + type: string + - description: The number of attempts to deliver the request to the device after + the first delivery attempt. For example, two retries sums up to the total + of three delivery attempts. When retries are exhausted, Device Management + discards the request and delivers an error in the AsyncIDResponse. The default + number of retries for a non-queue mode device is `0`. The default number + of retries for a queue-mode device is `2`. + in: query + maximum: 10 + minimum: 0 + name: retry + required: false + type: integer + - description: The time period during which the delivery is attempted, in seconds. + If the device is not reachable within this period, Device Management discards + the request and delivers an error in the AsyncIDResponse. The default time + period during which the delivery is attempted is two hours for a non-queue + mode device and three days for a queue-mode device. + in: query + maximum: 2592000 + minimum: 60 + name: expiry-seconds + required: false + type: integer + - description: 'Device request to send. The body element has `method`, `uri`, + `accept`, `content-type` and `payload-b64` fields. + + - The `method` is one of `GET`, `PUT`, `POST`, `DELETE`. + + - The `uri` field is the path to the LwM2M object and can include query + parameters. This can include key-value pairs, for example, `/5/0/1?key1=value1;key2=value2`. + + - The `accept` field defines the content type that the requesting client + will accept. + + - The `content-type` describes the content type of the base-64 encoded `payload-b64` + field. + + - The `payload-b64` is the payload to send to the device in base-64 encoded + form.' + in: body + name: body + required: true + schema: + $ref: '#/definitions/DeviceRequest' + produces: + - application/json + responses: + 202: + description: Accepted. + 400: + description: "Bad request. Contains one of the errors:\n\n \n\ + \ \n \n \n\ + \ \n \n \n \n \n\ + \ \n\ + \ \n \n \n \ + \ \n \n \n \n\ + \ \n \n \n \n\ + \ \n \ + \ \n \n \n \n \n \n\ +
Error messageDescription
LIMITS_EXCEEDEDThis account has reached its transaction quota limit.
RESOURCE_NOT_FOUNDThe requested resource does not exist on the device. Check that\ + \ the resource path is correct.
MALFORMED_JSON_CONTENTThe JSON payload could not be processed. Check that the payload\ + \ is correct.
MALFORMED_ASYNC_IDThe required async-id input parameter is invalid.
QUEUE_IS_FULLThe\ + \ Device Management service queue is full. Messages will be rejected until\ + \ some queued messages are delivered or expired.
" + 401: + description: Authentication failure. + 404: + description: Device not found. The device has deregistered or did not connect + in time and is expired. + summary: Send an asynchronous request to read, write or post to a device resource. + tags: + - Device data - requests + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v2/device-shared-keys: + get: + consumes: + - application/json + description: 'Retrieve pre-shared keys (PSKs) with pagination. Default page + size of 50 entries. + + + **Example:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ + + -H "Authorization: Bearer " + + ```' + operationId: listPreSharedKeys + parameters: + - default: 50 + description: The number of objects to retrieve on a page (2-1000). Values + outside the range are set to the closest limit. + in: query + maximum: 1000 + minimum: 2 + name: limit + required: false + type: integer + - description: An offset token for fetching a specific page. Provided by the + server. + in: query + name: after + required: false + type: string + produces: + - application/json + responses: + 200: + description: List of PSKs. + schema: + $ref: '#/definitions/ListOfPreSharedKeysWithoutSecret' + 400: + description: Bad request. Contains the error as a string, either TOKEN_NOT_FOUND + or INVALID_LIMIT. + summary: List PSKs. + tags: + - Security and identity - pre-shared keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-bootstrap\public\swagger.yaml + post: + consumes: + - application/json + description: "Upload a PSK for an endpoint to allow it to bootstrap. The existing\ + \ key cannot be overwritten, but needs\nto be deleted first in the case of\ + \ re-setting a PSK for an endpoint.\n\n**Note**: The PSK APIs are available\ + \ only to accounts that have this feature enabled.\n\n**Example:**\n```\n\ + curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n\ + -H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\"\ + \ \\\n -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\"\ + : \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }'\n```" + operationId: uploadPreSharedKey + parameters: + - description: PSK to upload. + in: body + name: body + required: true + schema: + $ref: '#/definitions/PreSharedKey' + produces: + - application/json + responses: + 201: + description: Successfully created. + 400: + description: Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, + INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT. + schema: + type: string + 401: + description: Authentication failure. + 403: + description: Forbidden. You need to read and accept the PSK license in Device + Management Portal. + 409: + description: Conflict. The PSK for the endpoint already exists and cannot + be overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT. + schema: + type: string + summary: Upload a PSK to Pelion Device Management. + tags: + - Security and identity - pre-shared keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-bootstrap\public\swagger.yaml + /v2/device-shared-keys/{endpoint_name}: + delete: + description: 'Remove a PSK. + + + **Example:** + + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 + \ + + -H "Authorization: Bearer " + + ```' + operationId: deletePreSharedKey + parameters: + - description: The unique endpoint identifier that this PSK applies to. [Reserved + characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) + must be percent-encoded. + in: path + name: endpoint_name + required: true + type: string + responses: + 204: + description: Successfully deleted. Responds even if the endpoint does not + have an associated PSK. + 400: + description: Bad request. Endpoint name validation failed. Contains error + INVALID_ENDPOINT_NAME. + schema: + type: string + 401: + description: Authentication failure. + summary: Remove a PSK. + tags: + - Security and identity - pre-shared keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-bootstrap\public\swagger.yaml + get: + description: 'Check if a PSK for an endpoint exists or not. The response does + not contain the secret itself. + + + **Example:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 + \ + + -H "Authorization: Bearer " + + ```' + operationId: getPreSharedKey + parameters: + - description: The unique endpoint identifier that this PSK applies to. [Reserved + characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) + must be percent-encoded. + in: path + name: endpoint_name + required: true + type: string + responses: + 200: + description: Pre-shared key for the device (does not contain secret). + schema: + $ref: '#/definitions/PreSharedKeyWithoutSecret' + 400: + description: Bad request. Endpoint name validation failed. Contains error + INVALID_ENDPOINT_NAME. + schema: + type: string + 401: + description: Authentication failure. + 404: + description: The PSK does not exist. + summary: Get a PSK. + tags: + - Security and identity - pre-shared keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-bootstrap\public\swagger.yaml + /v2/endpoints/{device-id}: + get: + description: 'Retrieves information about the resource structure for a device + from Device Management. This call does not reach the device. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id} \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getEndpointResources + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + produces: + - application/json + responses: + 200: + description: Successful response with an array of resources. + schema: + $ref: '#/definitions/ResourceArray' + 404: + description: Endpoint not found. + summary: List the resources on a device. + tags: + - Device data - resources + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v2/endpoints/{device-id}/{resourcePath}: + delete: + deprecated: true + description: '(DEPRECATED) A request to delete a resource path must be handled + by both Device Management Client and Device Management + + Connect. + + + All resource APIs are asynchronous. These APIs respond only if the device + is on and connected to Device Management Connect, and there is an active notification + channel. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteResourcePath + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: The resource URL. + in: path + name: resourcePath + required: true + type: string + - description: 'If you make a request with `noResp=true`, Device Management + Connect makes a CoAP non-confirmable request to the device. Such requests + are not guaranteed to arrive at the device, and do not return an async-response-id. + + + When calls with this parameter enabled succeed, they return with the status + code `204 No Content`. If the underlying protocol does not support non-confirmable + requests, or if the endpoint is registered in queue mode, the response is + status code `409 Conflict`.' + in: query + name: noResp + required: false + type: boolean + responses: + 202: + description: Accepted. Returns an asynchronous response ID. + schema: + $ref: '#/definitions/AsyncID' + 400: + description: Bad request. + 404: + description: "Requested endpoint\u2019s resource is not found." + 409: + description: Conflict. If `noResp=true`, the non-confirmable request is + not supported by the used protocol. + 410: + description: Gone. Endpoint not found. + 429: + description: 'Cannot accept the request at the moment: the queue is full.' + 502: + description: TCP or TLS connection to endpoint cannot be established. + summary: (DEPRECATED) Delete a resource path. + tags: + - Device data - resources + x-deprecation: + comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. + end_of_life_at: '2020-05-17T00:00:00+00:00' + issued_at: '2019-05-17T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management-api/connect/ + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + get: + deprecated: true + description: '(DEPRECATED) Requests the resource value either from the device + or cache. If the value is not in the cache, the request goes all the + + way to the device. When the response is available, an `AsyncIDResponse` JSON + object is received in the notification channel. + + The resource values can also be in cache based on `max_age` defined by the + device. The value found from the cache is returned + + immediately in the response. + + + The preferred way to get resource values is to use the **subscribe** and **callback** + methods. + + + All resource APIs are asynchronous. These APIs only respond if the device + is on and connected to Device Management. + + + See also how [resource caching](https://developer.pelion.com/docs/device-management/current/connecting/device-guidelines.html#resource-cache) + works. + + + Please see the [Lightweight Machine to Machine Technical specification](http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf) + for more information. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getResourceValue + parameters: + - description: Unique Device Management device ID for the endpoint. The ID must + be an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: The resource URL. + in: path + name: resourcePath + required: true + type: string + - description: 'If true, the response comes only from the cache. Default: false. + Device Management Connect caches the received resource values for the time + of [max_age](https://developer.pelion.com/docs/device-management/current/resources/working-with-the-resources.html) + defined in the client.' + in: query + name: cacheOnly + required: false + type: boolean + - description: 'If a request is made with `noResp=true`, Device Management Connect + makes a CoAP non-confirmable request to the device. Such requests are not + guaranteed to arrive on the device, and no `async-response-id` returns. + + + Successful calls return with the status code `204 No Content`. If the underlying + protocol does not support non-confirmable requests, or if the endpoint is + registered in queue mode, the response is status code `409 Conflict`.' + in: query + name: noResp + required: false + type: boolean + responses: + 200: + description: Resource value found in cache. Returns the string value of + the resource. + 202: + description: Accepted. Returns an asynchronous response ID. + schema: + $ref: '#/definitions/AsyncID' + 205: + description: No cache available for the resource. + 400: + description: Bad request. + 404: + description: "Requested endpoint\u2019s resource is not found." + 409: + description: Conflict. If `noResp=true`, the non-confirmable request is + not supported by the used protocol. + 410: + description: Gone. Endpoint not found. + 429: + description: 'Cannot accept the request at the moment: the queue is full.' + 502: + description: TCP or TLS connection to endpoint cannot be established. + summary: (DEPRECATED) Read from a resource. + tags: + - Device data - resources + x-deprecation: + comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. + The /v2/device-requests/{device-id} endpoint lets you use your own async-id, + and simplifies integration by returning all resource values, cached and + non-cached, through the event notification channel. + end_of_life_at: '2020-05-17T00:00:00+00:00' + issued_at: '2019-05-17T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management-api/connect/ + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + post: + consumes: + - text/plain + - application/xml + - application/octet-stream + - application/exi + - application/json + - application/link-format + - application/senml+json + - application/nanoservice-tlv + - application/vnd.oma.lwm2m+text + - application/vnd.oma.lwm2m+opaq + - application/vnd.oma.lwm2m+tlv + - application/vnd.oma.lwm2m+json + deprecated: true + description: '(DEPRECATED) [Execute a function](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html#the-execute-operation) + on an existing resource and create a new Object instance on the device. The + resource path does not have to exist; you can set it with the call. The maximum + length of the resource path is 255 characters. + + + All resource APIs are asynchronous. These APIs respond only if the device + is on and connected to Device Management Connect, and there is an active notification + channel. + + + Supported content types depend on the device and its resource. Device Management + translates HTTP to the equivalent CoAP content type. + + + **Example:** + + + This example resets the min and max values of the [temperature sensor](http://www.openmobilealliance.org/tech/profiles/lwm2m/3303.xml) + instance 0 by executing Resource 5605 ''Reset Min and Max Measured Values''. + + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3303/0/5605 + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: executeOrCreateResource + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: The resource URL. + in: path + name: resourcePath + required: true + type: string + - description: This value is not needed. Most of the time, resources do not + accept a function; they have their own functions predefined. You can use + this to trigger them. If a function is included, the body of this request + is passed as a char* to the function in Device Management Client. + in: body + name: resourceFunction + required: false + schema: + type: string + - description: 'If you make a request with `noResp=true`, Device Management + Connect makes a CoAP non-confirmable request to the device. Such requests + are not guaranteed to arrive in the device, and you do not get back an async-response-id. + + + When calls with this parameter enabled succeed, they return with the status + code `204 No Content`. If the underlying protocol does not support non-confirmable + requests, or if the endpoint is registered in queue mode, the response is + status code `409 Conflict`.' + in: query + name: noResp + required: false + type: boolean + responses: + 202: + description: Accepted. Returns an asynchronous response ID. + schema: + $ref: '#/definitions/AsyncID' + 400: + description: Bad request. + 404: + description: "Requested endpoint\u2019s resource not found." + 409: + description: Conflict. If `noResp=true`, the non-confirmable request is + not supported by the used protocol. + 410: + description: Gone. Endpoint not found. + 429: + description: 'Cannot accept the request at the moment: the queue is full.' + 502: + description: TCP or TLS connection to endpoint cannot be established. + summary: (DEPRECATED) Execute a function on a Resource or create new Object + instance. + tags: + - Device data - resources + x-deprecation: + comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. + end_of_life_at: '2020-05-17T00:00:00+00:00' + issued_at: '2019-05-17T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management-api/connect/ + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + put: + consumes: + - text/plain + - application/xml + - application/octet-stream + - application/exi + - application/json + - application/link-format + - application/senml+json + - application/nanoservice-tlv + - application/vnd.oma.lwm2m+text + - application/vnd.oma.lwm2m+opaq + - application/vnd.oma.lwm2m+tlv + - application/vnd.oma.lwm2m+json + deprecated: true + description: '(DEPRECATED) With this API, you can [write a new value to existing + Resources](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + or use the **write** attribute to set [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html) + for the Resources. The notification rules only work on the device client side + and may not be supported by all clients. + + + This API can also be used to transfer files to the device. Device Management + Connect LwM2M server implements Option 1 from RFC7959. The maximum block size + is 1024 bytes. + + Note block size versus transferred file size in low-quality networks. The + customer application needs to know what type of file is transferred (for example, + TXT) + + and the customer can encrypt the payload. The maximum payload size is 1048576 + bytes. + + + All resource APIs are asynchronous. These APIs respond only if the device + is on and connected to Device Management Connect, and there is an active notification + channel. + + + Supported content types depend on the device and its resource. Device Management + translates HTTP to equivalent CoAP content type. + + + **Example:** + + + This example sets the alarm on a buzzer. The command writes the [Buzzer](http://www.openmobilealliance.org/tech/profiles/lwm2m/3338.xml) + instance 0, "On/Off" boolean resource to ''1''. + + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3338/0/5850 + \ + + -H "content-type: text/plain" \ + + -H ''Authorization: Bearer '' \ + + -d ''1'' + + ```' + operationId: updateResourceValue + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: Resource URL. + in: path + name: resourcePath + required: true + type: string + - description: The value to set to the resource. + in: body + name: resourceValue + required: true + schema: + type: string + - description: 'If you make a request with `noResp=true`, Device Management + Connect makes a CoAP non-confirmable request to the device. Such requests + are not guaranteed to arrive to the device, and do not return an `async_response_id`. + + + When a call with this parameter enabled succeeds, it return status code + `204 No Content`. If the underlying protocol does not support non-confirmable + requests, or if the endpoint is registered in queue mode, the response is + status code `409 Conflict`.' + in: query + name: noResp + required: false + type: boolean + responses: + 202: + description: Accepted. Returns an asynchronous response ID. + schema: + $ref: '#/definitions/AsyncID' + 400: + description: Bad request. + 409: + description: '''Conflict. If `noResp=true`, the non-confirmable request + is not supported by the used protocol.''' + 410: + description: Gone. Endpoint not found. + 429: + description: 'Cannot accept the request at the moment: the queue is full.' + 502: + description: TCP or TLS connection to endpoint cannot be established. + summary: (DEPRECATED) Write to a Resource or use write-attributes (notification + rules) for a Resource. + tags: + - Device data - resources + x-deprecation: + comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. + end_of_life_at: '2020-05-17T00:00:00+00:00' + issued_at: '2019-05-17T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management-api/connect/ + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v2/notification/callback: + delete: + description: 'Deletes the callback URL. + + + Deleting the callback URL also removes the channel''s notification queue. + Any unsent notifications are lost when the channel is deleted. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/callback + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deregisterWebhook + responses: + 204: &id025 + description: Successfully deleted. + 401: &id023 + description: Unauthorized. + 403: &id024 + description: Forbidden. The authorization token used is not an access key. + 404: + description: Callback URL does not exist. + summary: Delete callback URL. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + get: + description: 'Shows the current callback URL if it exists. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/callback \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getWebhook + produces: + - application/json + responses: + 200: + description: URL found. + schema: + $ref: '#/definitions/Webhook' + 401: *id023 + 403: *id024 + 404: + description: The callback URL does not exist. + summary: Check callback URL. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + put: + consumes: + - application/json + description: "Register a URL to which the server delivers notifications of changes\ + \ to the subscribed resource. To push notifications, you must first place\ + \ subscriptions. The maximum length of the URL, header keys, and values, all\ + \ combined, is 400 characters.\n\nNotifications are delivered as PUT requests\ + \ to the HTTP server, which the client defines with a subscription server\ + \ message. The given URL must be accessible, and respond to the PUT request\ + \ with a response code of 200 or 204.\n\nDevice Management Connect tests the\ + \ callback URL with an empty JSON payload `{}` when the URL is registered.\ + \ Callback implementation does not support URL redirection. For more information\ + \ on notification messages, see [NotificationMessage](#NotificationMessage).\n\ + \n**Optional headers in a callback message:**\n\nYou can set optional headers\ + \ to a callback in a **Webhook** object. Device Management Connect includes\ + \ the header and key pairs in the notification messages send them to callback\ + \ URL. The callback URLs and headers are application-specific.\n\nOne possible\ + \ use for additional headers is checking the origin of a PUT request, as well\ + \ as distinguishing the application to which the notification belongs.\n\n\ + **Note**: Only one callback URL for each application can be active. If you\ + \ register a new URL while another one is active, it replaces the active one.\ + \ There can be only one notification channel at a time for each application.\ + \ If another type of channel is already present, you need to delete it before\ + \ setting the callback URL.\n\n**Expiration of a callback URL:**\n\nA callback\ + \ can expire when Device Management cannot deliver a notification due to a\ + \ connection timeout or error response (4xx or 5xx). After each delivery failure,\ + \ Device Management sets an exponential back-off time and makes a retry attempt\ + \ after that. The first retry delay is 1 second, then 2s, 4s, 8s, up to a\ + \ maximum delay of two minutes. The retry delay is applied when the response\ + \ is received, or in case of timeout, after the timeout expires. The request\ + \ timeout is 20 seconds; in the case of timeout, the first retry happens 20\ + \ + 1 seconds after the first delivery attempt, then 20 + 2 seconds, and so\ + \ on. The callback URL is removed if all retries fail within 24 hours. More\ + \ about [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic)\ + \ in the Device Management documentation.\n\n**Supported callback URL protocols:**\n\ + \nCurrently, only HTTP and HTTPS protocols are supported.\n\n**HTTPS callback\ + \ URLs:**\n\nWhen delivering a notification to an HTTPS-based callback URL,\ + \ Device Management Connect identifies itself with a valid client certificate.\ + \ The certificate is signed by a trusted certificate authority (GlobalSign),\ + \ with a Common Name (CN) set to `notifications.mbedcloud.com`.\n\n**Configuration\ + \ options:**\n\nThe event notification channel provides configurations options\ + \ defined in [Serialization config](#SerializationConfigObjectV2).\n\n**Example:**\n\ + \nThis example command shows how to set your callback URL. It also sets an\ + \ optional header authorization. When Device Management Connect calls your\ + \ callback URL, the call contains the authorization header with the defined\ + \ value.\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ + \ \\\n-d '{\n \"url\": \"{callback-url}\",\n \"headers\": {\"authorization\"\ + : \"f4b93d6e-4652-4874-82e4-41a3ced0cd56\"},\n \"serialization\": {\"type\"\ + : \"v2\", \"max_chunk_size\": \"100\",\n \"cfg\": {\"deregistrations_as_object\"\ + : \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"\ + include_original_ep\": \"true\"\n }\n }\n}'\n```" + operationId: registerWebhook + parameters: + - description: A JSON object that contains the optional headers and URL where + notifications are sent. + in: body + name: webhook + required: true + schema: + $ref: '#/definitions/Webhook' + responses: + 204: + description: Successfully subscribed. + 400: + description: Given URL is not accessible, or other type of channel already + exists. + 401: *id023 + 403: *id024 + 415: + description: Unsupported Media Type. + summary: Register a callback URL. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + /v2/notification/channel: + get: + description: "Get channel delivery mechanism.\n\n**Example:**\n\n curl -X\ + \ GET https://api.us-east-1.mbedcloud.com/v2/notification/channel \\\n \ + \ -H 'Authorization: Bearer '\n" + operationId: getChannelMetadata + responses: + 200: + description: Success. + schema: + $ref: '#/definitions/ChannelMetadata' + 404: + description: Channel was not found. + summary: Get channel metadata. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + /v2/notification/pull: + delete: + deprecated: true + description: 'Delete a notification Long Poll channel. This is required to change + the channel from Long Poll to another type. Do not make a GET `/v2/notification/pull` + call for two minutes after deleting the channel, because it can implicitly + recreate the pull channel. You can also have some random responses with payload + or 410 GONE with "CHANNEL_DELETED" as a payload or 200/204 until the old channel + is purged. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/pull \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteLongPollChannel + responses: + 200: + description: Success. The body can contain "REMOVED" if it was deleted with + this call or "ALREADY_DELETED" if it was deleted before and not purged + yet. + 401: *id023 + summary: Delete notification Long Poll channel. + tags: + - Device data - notifications + x-deprecation: + comment: Long polling is deprecated and should be used for development purposes + only. + end_of_life_at: '2020-06-30T00:00:00+00:00' + issued_at: '2017-02-10T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + get: + deprecated: true + description: 'In this case, notifications are delivered through HTTP long poll + requests. The HTTP request is kept open until one or more event notifications + are delivered to the client, or the request times out (response code 204). + In both cases, the client should open a new polling connection after the previous + one closes. Only a single long polling connection per application can be ongoing + at any given time. We recommend using a persistent connection (Connection + keep-alive header in the request) to avoid excess TLS handshakes. + + + The pull channel is implicitly created by the first GET call to `/v2/notification/pull`. + It refreshes on each GET call. If the channel is not polled for a long time + (10 minutes), it expires and is deleted. This means that no notifications + will stay in the queue between polls. A channel can be also be deleted explicitly + with a DELETE call. + + + **Note:** If you cannot have a public-facing callback URL, for example, when + developing on your local machine, you can use long polling to check for new + messages. However, **long polling is deprecated** and will likely be replaced + in the future. It is meant only for experimentation, not commercial use. The + proper method to receive notifications is a **notification callback**. + + + There can only be one notification channel per application in Device Management + Connect. If a notification channel of other type already exists for the application, + delete it before creating a long poll notification channel. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/pull \ + + -H ''Authorization: Bearer '' + + ```' + operationId: longPollNotifications + produces: + - application/json + responses: + 200: + description: Success. + schema: + $ref: '#/definitions/NotificationMessage' + 204: + description: No new notifications. + 400: + description: Other type of channel already exists. + 401: *id023 + 409: + description: Conflict. Long poll request exists already. + 410: + description: Pull channel was deleted and waiting to be purged. This code + is a result of incorrect client behavior (delete channel and then pull), + which can prevent the creation of a callback channel after the pull channel + is deleted. The channel can be (randomly) recreated by this call when + deleted and not purged. This client behaviour can set the channel in an + undefined state for some time. The channel may respond with 410 GONE or + 200/204 codes randomly for some time. Finally, the channel enters a valid + "channel exists" state. + summary: Get notifications using Long Poll + tags: + - Device data - notifications + x-deprecation: + comment: Long polling is deprecated and should be used for development purposes + only. + end_of_life_at: '2020-06-30T00:00:00+00:00' + issued_at: '2017-02-10T15:23:00+00:00' + links: + - https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + /v2/notification/websocket: + delete: + description: 'Delete a notification websocket channel bound to the application. + This is required to change the channel from websocket to another type. + + + Deleting the websocket channel also removes the channel''s notification queue. + Any unsent notifications are lost when the channel is deleted. + + **Example:** + + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/websocket + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteWebsocket + responses: + 204: *id025 + 401: *id023 + 403: *id024 + 404: + description: Websocket channel doesn't exist. + summary: Delete websocket channel. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + get: + description: 'Returns 200 with websocket connection status, if websocket channel + exists. + + + **Note**: The current version does not yet have the capability to determine + the channel status and will always return status ''unknown'' and queue size + ''-1''. + + + **Example:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/websocket + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getWebsocket + produces: + - application/json + responses: + 200: + description: Websocket found. + schema: + $ref: '#/definitions/WebsocketChannel' + 401: *id023 + 403: *id024 + 404: + description: No channel has been registered. + summary: Get websocket channel information. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + put: + consumes: + - application/json + description: "Register (or update) a channel using websocket connection to deliver\ + \ notifications. The websocket channel should be opened by client using `/v2/notification/websocket-connect`\ + \ endpoint. To get notifications pushed, you must place subscriptions. For\ + \ more information on notification messages, see [NotificationMessage](#NotificationMessage).\n\ + \nA websocket channel can have only one active websocket connection at a time.\ + \ If a websocket connection for a channel exists and a new connection to the\ + \ same channel is made, the connection is accepted and the older connection\ + \ is closed.\n\n**Note**: Only one websocket channel for each application\ + \ can be active at a time. If you register a new websocket channel while another\ + \ one is active, it replaces the previously active one. If another type of\ + \ channel is already present, you need to delete it before registering a websocket\ + \ channel.\n\n**Note**: The current version does not yet have the capability\ + \ to determine the channel status and will always return status 'unknown'\ + \ and queue size '-1'.\n\n**Expiration of a websocket:**\n\nA websocket channel\ + \ is expired if the channel does not have an opened websocket connection for\ + \ a 24-hour period. Channel expiration means the channel is deleted and any\ + \ undelivered notifications stored in its internal queue is removed. As long\ + \ as the channel has an opened websocket connection or time between successive\ + \ websocket connections is less than 24 hours,\nthe channel is considered\ + \ active, notifications are stored in its internal queue and delivered when\ + \ a websocket connection is active. A channel can be also deleted explicitly\ + \ with a DELETE call.\n\nMore about [notification sending logic](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html#notification-sending-logic).\n\ + \n**Configuration options:**\n\nThe event notification channel provides configurations\ + \ options defined in [Serialization config](#SerializationConfigObjectV2)\n\ + \n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/websocket\ + \ \\\n-H 'Authorization: Bearer ' \\\n-d '{\n \"serialization\"\ + : {\"type\": \"v2\", \"max_chunk_size\": \"100\",\n \"cfg\": {\"deregistrations_as_object\"\ + : \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"\ + include_original_ep\": \"true\"\n }\n }\n}\n```" + operationId: registerWebsocket + responses: + 200: + description: Channel successfully updated. In the current v2 implementation + this operation has no effect, and any subsequent PUT call from a client + previously registered to a channel results in a 200 OK response. + schema: + $ref: '#/definitions/RegisterWebsocketChannel' + 201: + description: Channel succesfully registered. + schema: + $ref: '#/definitions/WebsocketChannel' + 400: + description: Other type of channel already exists. + 401: *id023 + 403: *id024 + summary: Register a websocket channel. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + /v2/notification/websocket-connect: + get: + description: "\nA websocket channel can have only one active connection at a\ + \ time. If a websocket connection for a channel exists and a new connection\ + \ to the same channel is made, the connection is accepted and the older connection\ + \ is closed.\n\nA websocket client library should be used when connecting\ + \ to this endpoint.\n\nOnce the socket has been opened, the server may close\ + \ it with one of the following status codes.\n\n\n \n \n\ + \ \n \n \n \n\ + \ \n \n \n \n \n \n \n \ + \ \n\ + \ \n \n \n \n \n \n \n\ + \ \n \n \n \ + \ \n \n \n\ + \ \n \n \n\ + \ \n \n
CodeDescription
1000Socket closed\ + \ normally by the client, or by the server when the channel is deleted with\ + \ a REST call.
1001Going away. Set when another socket opens on the used channel.
1006Abnormal closure.\ + \ The client should reconnect after receiving this status code. A short reconnect\ + \ delay is recommended.
1008Policy violation. Set if the access key is lost or invalidated\ + \ after a successful WebSocket handshake.
1011Unexpected condition. The socket is closed\ + \ with this status in an attempt to open a socket to a nonexistent channel\ + \ (without a prior PUT request). This code is also used to indicate a closing\ + \ socket for any other unexpected condition in the server.
1012Service restart. Set when\ + \ the server restarts for update, maintenance, and so on. The client should\ + \ reconnect after receiving this status code. A short reconnect delay is recommended.
\n\n**Expected client behaviour:**\n\nIf the\ + \ connection is closed with code 1006 or 1012, the client should try to reconnect\ + \ to maintain the notification flow. The client might disconnect several times\ + \ in a relatively short period, for example, during service updates. This\ + \ is normal. The desired client behavior is to reconnect after each disconnect.\n\ + \n**Example:**\n\nThe example is meant only for testing. For production devices,\ + \ use a WebSocket client library. Websocat (https://github.com/vi/websocat)\ + \ is a command-line client for WebSockets, like netcat or cURL. The example\ + \ command opens a new WebSocket, waits for any data sent to the socket from\ + \ the server, and prints it to `stdout`.\n\n```\nwebsocat wss://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect\ + \ \\\n-H \"Sec-WebSocket-Protocol:wss,pelion_ak_\"\n```" + operationId: connectWebsocket + parameters: + - default: Upgrade + in: header + name: Connection + required: true + type: string + - default: websocket + in: header + name: Upgrade + required: true + type: string + - description: 'Access key or user token must be present in the `Sec-WebSocket-Protocol` + header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:"wss,pelion_ak_{access_key}"`. + + Refer to the notification service documentation for examples.' + in: header + name: Sec-WebSocket-Protocol + required: false + type: string + - description: Originating host of the request. + in: header + name: Origin + required: true + type: string + - default: 13 + description: WebSocket version. Must be 13. + in: header + name: Sec-WebSocket-Version + required: true type: integer - type: object -host: api.us-east-1.mbedcloud.com -info: - description: Pelion Device Management API build from the publicly defined API definitions. - title: Pelion Device Management API - version: '3' -paths: - /v2/device-requests/{device-id}: - post: + - description: The value of this header field must be a nonce consisting of + a randomly selected 16-byte value that has been base64-encoded (see Section + 4 of [RFC4648]). The nonce must be selected randomly for each connection. + in: header + name: Sec-WebSocket-Key + required: true + type: string + responses: + 101: + description: Switching protocols. + 400: + description: Required header(s) missing. + 401: *id023 + 426: + description: Upgrade required. Connect and/or Upgrade headers missing. + 429: + description: While a WebSocket handshake is still in progress, no new WebSocket + requests with the same authorization token will be accepted. + summary: Open the websocket. + tags: + - Device data - notifications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\notification-service\public\swagger.yaml + /v2/subscriptions: + delete: + description: 'Remove pre-subscriptions. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deletePreSubscriptions + responses: + 204: + description: Successfully removed subscriptions. + 401: + description: Unauthorized. + 403: + description: 'Forbidden: the authorization token used is not an access key.' + summary: Remove pre-subscriptions. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + get: + description: 'Retrieve pre-subscription data. The server returns a JSON structure. + If there are no pre-subscribed resources, the server returns an empty array. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getPreSubscriptions + produces: + - application/json + responses: + 200: + description: OK. + schema: + $ref: '#/definitions/PresubscriptionArray' + 401: + description: Unauthorized. + 403: + description: 'Forbidden: the authorization token used is not an access key.' + summary: View pre-subscriptions. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + put: consumes: - application/json - description: 'This API provides an interface to asynchronously call methods - on a device. + description: "A pre-subscription is a set of rules you define to subscribe to\ + \ specific resources automatically when certain devices register or does a\ + \ register update.\nYou can set subscription rules based on the endpoint ID\ + \ (optionally having an `*` character at the end), endpoint type, a list of\ + \ resources, or expressions with an `*` character at the end.\nWhen a device\ + \ that meets the subscription rules registered, Device Management Connect\ + \ automatically sends subscription requests to the device for the resources\ + \ you specify.\nTo remove the pre-subscription data, put an empty array as\ + \ a rule.\nTo place dynamic observation rules for individual object instances\ + \ and resources and define when the device sends observations, set [notification\ + \ rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html).\n\ + \n**Note:** The subscription is bound to the application you are using. To\ + \ get notifications of the resource value changes, you need to create an [event\ + \ notification channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html)\ + \ with an access key of the same application.\n\n**Example request:**\n```\n\ + curl -X PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions \\\n-H 'Authorization:\ + \ Bearer ' \\\n-H 'content-type: application/json' \\\n-d '[\n\ + \ {\n \"endpoint-name\": \"node-001\",\n \"resource-path\"\ + : [\"/dev\"]\n },\n {\n \"endpoint-type\": \"Light\",\n\ + \ \"resource-path\": [\"/sen/*\"]\n },\n {\n \"\ + endpoint-name\": \"node*\"\n },\n {\n \"endpoint-type\"\ + : \"Sensor\"\n },\n {\n \"resource-path\": [\"/dev/temp\"\ + ,\"/dev/hum\"]\n }\n ]'\n```\n\n- Subscribe to `/dev` resource of\ + \ endpoint named `node-001`.\n- Subscribe to `Light` type of endpoints and\ + \ their resources prefixed with `/sen/`.\n- Subscribe to all observable resources\ + \ of endpoint names prefixed with `node`.\n- Subscribe to all observable resources\ + \ of `Sensor` type endpoints.\n- Subscribe to `/dev/temp` and `/dev/hum` resources\ + \ of all endpoints.\n\n**Limits**:\n\n- The maximum length of the endpoint\ + \ name and endpoint type is 64 characters.\n- The maximum length of the resource\ + \ path is 128 characters.\n- You can subscribe to 256 separate resource paths.\n\ + - The maximum number of pre-subscription entries is 1024.\n\n**Note**: To\ + \ save bandwidth and avoid unnecessary traffic, use resource path patterns\ + \ to limit the matching resources in the presubscription data. This prevents\ + \ your web application from receiving unwanted resource notifications. See\ + \ [Subscribe only to what you need](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html)." + operationId: updatePreSubscriptions + parameters: + - description: Array of pre-subscriptions. + in: body + name: presubscription + required: true + schema: + $ref: '#/definitions/PresubscriptionArray' + produces: + - text/plain + responses: + 204: + description: Successfully created. + 400: + description: Bad request, malformed content. + 401: + description: Unauthorized. + 403: + description: 'Forbidden: the authorization token used is not an access key.' + summary: Set pre-subscriptions. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v2/subscriptions/{device-id}: + delete: + description: 'Delete all resource subscriptions in a single device. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteEndpointSubscriptions + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + responses: + 204: + description: Successfully removed. + summary: Delete all subscriptions on a device. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + get: + description: 'Retrieve a list of all subscribed resources on a single device. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getEndpointSubscriptions + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + produces: + - text/uri-list + responses: + 200: + description: List of subscribed resources. + schema: + description: A list of resource URIs, one per line. + example: /sen/light + type: string + 404: + description: Endpoint not found, or there are no subscriptions for that + endpoint. + summary: View all subscriptions on a device. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v2/subscriptions/{device-id}/{resourcePath}: + delete: + description: 'Remove an existing subscription to a resource. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteResourceSubscription + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: 'The resource URL. This can be the path to: + + + - An object; for example, `3303`. + + - An object instance; for example `3303/0`. + + - A resource; for example `3303/0/5602`. + + + For more information about the Device Management resource model, please + see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html).' + in: path + name: resourcePath + required: true + type: string + responses: + 204: + description: Successfully removed subscription. + summary: Remove a subscription. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + get: + description: Check whether you are subscribed to receive resource content updates + for a specific resource. + operationId: checkResourceSubscription + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: 'The resource URL. This can be the path to: + + + - An object; for example, `3303`. + + - An object instance; for example `3303/0`. + + - A resource; for example `3303/0/5602`. + + + For more information about the Device Management resource model, please + see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html).' + in: path + name: resourcePath + required: true + type: string + responses: + 200: + description: Resource is subscribed. + 404: + description: Resource is not subscribed. + summary: Read the subscription status for a specific resource. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + put: + description: ' + + Subscribe to a resource to receive updated resource content, periodically + or based on a more sophisticated solution-dependent logic. + + + To place dynamic observation rules for individual object instances and resources + and define when the device sends observations, set [notification rules](https://developer.pelion.com/docs/device-management/current/resources/resource-change-webapp.html). + + + **Note:** Device Management removes all manual subscriptions during a full + device registration, at which point applications must re-subscribe. To avoid + this, use `/subscriptions` to set a pre-subscription. + + + You can subscribe to resources, objects and object instances. + + + **Example:** + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} + \ + + -H ''Authorization: Bearer '' + + ``` + + + **Important:** You must also call a [`/notification/callback`](https://developer.pelion.com/docs/device-management-api/notifications/) + method for Device Management Connect to push resource change notifications.' + operationId: addResourceSubscription + parameters: + - description: The device ID generated by Device Management. The ID must be + an exact match. Do not use wildcards. + in: path + name: device-id + required: true + type: string + - description: 'The resource URL. This can be the path to: + + + - An object; for example, `3303`. + + - An object instance; for example `3303/0`. + + - A resource; for example `3303/0/5602`. + + + For more information about the Device Management resource model, please + see the [Device Management documentation](https://developer.pelion.com/docs/device-management/current/resources/resource-model.html).' + in: path + name: resourcePath + required: true + type: string + produces: + - application/json + responses: + 200: + description: Successfully subscribed. + 202: + description: Accepted. Returns an asynchronous response ID used to reference + the future asynchronous response. + schema: + $ref: '#/definitions/AsyncID' + 400: + description: Bad request, malformed content. + 404: + description: "Not found. Contains one of these errors:\n\n \n\ + \ \n \n \n\ + \ \n \n \n \n \n\ + \ \n \n \n\ + \ \n \n \n \n
Error messageDescription
DEVICE_NOT_FOUNDThe device cannot be found. Either it never connected, it deregistered\ + \ or did not connect in time and is expired.
URI_PATH_DOES_NOT_EXISTSThe requested\ + \ resource does not exist on the device. Check that the resource path\ + \ is correct.
" + 429: + description: "Cannot accept the request at the moment. Contains one of these\ + \ errors:\n\n \n \n \n\ + \ \n \n \n \n \n\ + \ \n \n \n \n \n\ + \ \n \n \n \n\ + \ \n\ + \ \n \n
Error messageDescription
LIMITS_EXCEEDEDThis account has reached\ + \ its transaction quota limit.
CONGESTION_CONTROLThe subscription has been queued but cannot currently be sent\ + \ to the device because too many requests are being directed at the device\ + \ at this time.
QUEUE_IS_FULLThe Device Management service queue is full. The subscription\ + \ will be rejected until some queued messages are delivered or expired.
" + 502: + description: Subscription failed. Endpoint not connected. + summary: Subscribe to a resource to receive updates about resource changes. + tags: + - Device data - subscriptions + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v3/access-keys: + get: + description: 'Retrieve an array of access keys. + + Note: This endpoint is restricted to administrators. - The `async-id` is provided by the client, enabling the client to track the - end-to-end flow with an identifier + **Example:** - that is relevant to the end application. For example, a web application''s - session ID along with the device ID + ``` - and the resource path could be used as the `async-id`. This also avoids any - race conditions with + curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys \ - [the notification channel](/docs/current/integrate-web-app/event-notification.html). - All responses are sent through the + -H ''Authorization: Bearer '' - currently configured notification channel as an **AsyncIDResponse**. + ```' + operationId: getAllAccessKeys + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string + - description: Application filter. + in: query + name: application_id__eq + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccessKeyList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all access keys. + tags: + - Account - access keys + x-filter: + application_id: + - eq + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/access-keys/{access_key_id}: + get: + description: 'Retrieve details of an access key. + Note: This endpoint is restricted to administrators. - For `GET` methods, values may be fetched from an internal cache, instead of - contacting the device. + **Example:** - The server queues requests if it cannot reach the device at the time of the - request. The queue is limited to 20 + ``` - requests. The queueing behaviour is affected by the `retry` and the `expiry-seconds` - parameters. If the device + curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys/{access_key_id} + \ - is not reached, or the device fails to respond when the request is made, the - server queues the request + -H ''Authorization: Bearer '' - and retries within the given expiry period the next time the device contacts - the server. The requests from + ```' + operationId: getAccessKey + parameters: + - description: The ID of the access key to retrieve. + in: path + name: access_key_id + required: true + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccessKey' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An access key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get access key. + tags: + - Account - access keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts: + get: + description: 'Retrieve an array of tenant accounts, optionally filtered by status + and tier level. - the queue are delivered in the order of insertion, one at a time, and not - concurrently. + Note: This endpoint is restricted to administrators. - One delivery attempt consist from protocol specific retrasmission logic, where - is multiple trasmissions. In case + **Example:** - of CoAP, the retrasmissions exponential backoff 2, 4, 8, 16 to 64 seconds, - taking total over 2 minutes. + ``` - If the device does not respond within this two-minute period, delivery fails, - and the request is put back + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ - in the queue so long as the retry count is less than its maximum. + -H ''Authorization: Bearer '' + ```' + operationId: getAllAccounts + parameters: + - description: An optional filter for account status, ENROLLING, ACTIVE, RESTRICTED, + or SUSPENDED. + in: query + name: status__eq + required: false + type: string + - description: An optional filter to retrieve accounts with a specified set + of statuses. + in: query + name: status__in + required: false + type: string + - description: An optional filter to exclude accounts with a specified set of + statuses. + in: query + name: status__nin + required: false + type: string + - description: An optional filter for tier level. Must be 0, 1, 2, 98, 99, or + omitted. + in: query + name: tier__eq + required: false + type: string + - description: An optional filter for parent account ID. + in: query + name: parent__eq + required: false + type: string + - description: An optional filter for account end market. + in: query + name: end_market__eq + required: false + type: string + - description: 'An optional filter for account country. Finds all matches where + the filter value is a case-insensitive substring of the result. Example: + country__like=LAND matches Ireland.' + in: query + name: country__like + required: false + type: string + - default: 1000 + description: The number of results to return (2-1000). Default 1000. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + limits, policies, sub_accounts, history.' + in: query + name: include + required: false + type: string + - description: 'Format information for the query response. Supported: format=breakdown.' + in: query + name: format + required: false + type: string + - description: Property name returned from account-specific properties. + in: query + name: properties + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccountInfoList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all accounts. + tags: + - Tenant accounts - accounts + x-filter: + country: + - like + end_market: + - eq + parent: + - eq + status: + - eq + - in + - nin + tier: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new account. - For a queue-mode device, the request delivery is not attempted immediately, - but only when the device next time + Note: This endpoint is restricted to administrators. - contacts the server. + **Example:** - If retries are exhausted or the expiry time has passed, then the server discards - the request and sends an error + ``` - in **AsyncIDResponse**. The retries could be exhausted, for example, if the - device periodically contacts + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ - the server and receives the request from the queue, but then fails to respond - back to the server. + -H ''Authorization: Bearer '' \ + -H ''content-type: application/json'' \ - On the other hand, the device might lose its network connectivity, and the - requests in the queue might expire + -d ''{"display_name": "MyAccount1", "aliases": [ "my-account" ], "admin_name": + "accountAdmin1", "email": "example_admin@myaccount.info", "country": "United + Kingdom", "end_market": "Smart City", "address_line1": "110 Fulbourn Rd", + "city": "Cambridge", "contact": "J. Doe", "company": "Arm"}'' - and get discarded before the device regains the connectivity. + ```' + operationId: createAccount + parameters: + - description: Details of the account to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/AccountCreationReq' + - default: create + description: 'Action, either `create` or `enroll`. +
    - You can write [Notification Rules](../connecting/resource-change-webapp.html#notification-rules) - for a +
  • `create` creates the account where its admin user has ACTIVE status + if `admin_password` was defined in the request, or RESET status if no `admin_password` + was defined. If the user already exists, its status is not modified.
  • - resource with PUT command. Please see example of the payload below. +
  • `enroll` creates the account where its admin user has ENROLLING status. + If the user already exists, its status is not modified. Email to finish + enrollment or notify the existing user about the new account is sent to + the `admin_email` defined in the request.
' + in: query + name: action + required: false + type: string + produces: + - application/json + responses: + '201': + description: Successful operation. + schema: + $ref: '#/definitions/AccountCreationResp' + '400': + description: Error in input data, for example, invalid username. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: Account with the specified alias exists already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new account. + tags: + - Tenant accounts - accounts + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/me: + get: + description: 'Retrieve information about the account. - ``` - { "method": "PUT", "uri": "/5/0/1?lt=10>=60&pmax=120" } + **Example:** ``` + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies + \ - POST `method` can be used to either execute or create resource on a LWM2M - supporting device. When creating - - a resource, `uri` must refer to an object, and `payload-b64` must be in LWM2M - TLV format, as in - - the following example. + -H ''Authorization: Bearer '' - ``` + ```' + operationId: getMyAccountInfo + parameters: + - description: 'Comma-separated additional data to return. Currently supported: + limits, policies, sub_accounts.' + in: query + name: include + required: false + type: string + - description: Property name to return from account-specific properties. + in: query + name: properties + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccountInfo' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get account information. + tags: + - Account - profile + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update the account. - { "method": "POST", "uri": "/123", "content-type": "application/vnd.oma.lwm2m+tlv", - "payload-b64": "BwHFAnZhbHVl" } + Note: This endpoint is restricted to administrators. - ``` + **Example:** ``` - Example URIs: - - POST /v2/device-requests/015f2fa34d310000000000010030036c?async-id=123e4567-e89b-12d3-a456-426655440000 + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \ - POST /v2/device-requests/015f2fa34d310000000000010030036c?async-id=123e4567-e89b-12d3-a456-426655440000&retry=2&expiry-seconds=7200 + -H ''Authorization: Bearer '' \ + -H ''content-type: application/json'' \ - Example payload to read value from resource /5/0/1: + -d ''{"phone_number": "12345678"}'' - { "method": "GET", "uri": "/5/0/1" } + ```' + operationId: updateMyAccount + parameters: + - description: Details of the account to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/AccountUpdateReq' + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccountInfo' + '400': + description: Error in input data format. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Updates attributes of the account. + tags: + - Account - profile + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/me/notifications: + get: + description: Retrieve an array of email notification logs. + operationId: getNofificationEntries + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/NotificationEntryList' + '400': + description: Error in input data, or missing or invalid parameters. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get logs of email notifications. + tags: + - Account - email notification logs + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/me/notifications/{notification_id}: + get: + description: Retrieve an email notification log entry. + operationId: getNofificationEntry + parameters: + - description: The ID of the log entry to be retrieved. + in: path + name: notification_id + required: true + type: string + produces: + - application/json + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/NotificationEntry' + '400': + description: Error in input data, missing or invalid parameters. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: No entry found for the given ID. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get an email notification. + tags: + - Account - email notification logs + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}: + get: + description: 'Retrieve detailed information about an account. + Note: This endpoint is restricted to administrators. - Example payload to set notification rules for resource /5/0/1: - { "method": "PUT", "uri": "/5/0/1?lt=10>=60&pmax=120" } + **Example:** - Example payload to write value "value1" to resource /5/0/1: + ``` - { "method": "PUT", "uri": "/5/0/1?k1=v1&k2=v2", "accept": "text/plain", "content-type": - "text/plain", "payload-b64": "dmFsdWUxCg==" } + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ + -H ''Authorization: Bearer '' - Example payload to execute LWM2M resource /123/1/1: + ```' + operationId: getAccountInfo + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - description: 'Comma-separated additional data to return. Currently supported: + limits, policies, sub_accounts, history.' + in: query + name: include + required: false + type: string + - description: Property name to return from account-specific properties. + in: query + name: properties + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccountInfo' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account with the given ID not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get account information. + tags: + - Tenant accounts - accounts + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update an account. - { "method": "POST", "uri": "/123/1/1" } + Note: This endpoint is restricted to administrators. - Immediate response: + **Example:** - 202 Accepted + ``` - Examples of AsyncIDResponse, delivered via the notification channel: + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - { "async-responses": [ { "id": "123e4567-e89b-12d3-a456-426655440000", "status": - 200, "payload": "dmFsdWUxCg==", "ct": "text/plain", "max-age": 600 } ] } + -H ''Authorization: Bearer '' \ - { "async-responses": [ { "id": "123e4567-e89b-12d3-a456-426655440000", "status": - 504, "error": "TIMEOUT" } ] } + -H ''content-type: application/json'' \ - ``` + -d ''{"phone_number": "12345678"}'' - ' - operationId: createAsyncRequest + ```' + operationId: updateAccount parameters: - - description: The device ID generated by Device Management. - format: uuid, 32 hexadecimal characters + - description: The ID of the account to update. in: path - name: device-id - required: true - type: string - - description: The client-generated ID for matching the correct response delivered - by notification. - format: 1-40 alphanumeric characters and dashes. - in: query - name: async-id - pattern: ^[\w\-]{1,40}$ + name: account_id required: true type: string - - description: The count of retry transmissions of the request to the device, - after initial transmission. For example, retry of two means three delivery - attempts in total. If retries are exhausted, the request is discarded and - an error is delivered in the AsyncIDResponse. Default value of retry is - 0 for a non-queue-mode device and 2 for a queue-mode device. - in: query - maximum: 10 - minimum: 0 - name: retry - required: false - type: integer - - description: The time period during which the delivery is attempted, in seconds. - If the device is not reachable within this period, the request is discarded - and an error is delivered in the AsyncIDResponse. Default value of expiry-seconds - is 2 hours for a non-queue-mode device and 3 days for a queue-mode device. - in: query - maximum: 2592000 - minimum: 60 - name: expiry-seconds - required: false - type: integer - - description: Device request to send. + - description: Details of the account to update. in: body name: body required: true schema: - $ref: '#/definitions/DeviceRequest' + $ref: '#/definitions/AccountUpdateRootReq' produces: - application/json responses: - 202: - description: Accepted. - 400: - description: Bad request. Contains one of the errors RESOURCE_NOT_FOUND, - DEVICE_NOT_CONNECTED, MALFORMED_JSON_CONTENT, MALFORMED_ASYNC_ID and QUEUE_IS_FULL + '200': + description: Successful operation. schema: - type: string - 401: + $ref: '#/definitions/AccountInfo' + '400': + description: Error in input data format. + schema: + $ref: '#/definitions/ErrorResponse' + '401': description: Authentication failure. - 404: - description: "Contains one of the following errors:\n\n \n\ - \ \n \n \n\ - \ \n \n \n \n \n\ - \ \n\ - \ \n \n \n\ - \ \n \n \n
Error messageDescription
DEVICE_NOT_FOUNDDevice is not in Device reqistry. Either device has requestd\ - \ register delete or device has not connected in time and expired.
URI_PATH_DOES_NOT_EXISTSThe device does not have requested resource. Check the resource\ - \ path is correct.
" schema: - type: string - summary: Send an async request to device + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account with the given ID not found. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: Account with the specified new alias exists already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update attributes of an existing account. tags: - - DeviceRequests - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/device-shared-keys: + - Tenant accounts - accounts + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/access-keys: get: - consumes: - - application/json - description: 'Retrieve pre-shared keys (PSKs) with pagination. Default page - size of 50 entries. + description: 'Retrieve an array of access keys. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys + \ - -H "Authorization: Bearer " + -H ''Authorization: Bearer '' ```' - operationId: listPreSharedKeys + operationId: getAllAccountAccessKeys parameters: - - description: The number of entries per page. + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query name: limit required: false type: integer - - description: An offset token for fetching a specific page. Provided by the - server. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string + - description: Application filter. + in: query + name: application_id__eq + required: false + type: string produces: - application/json responses: - 200: - description: List of PSKs. - schema: - $ref: '#/definitions/ListOfPreSharedKeysWithoutSecret' - 400: - description: Bad request. Contains the error as a string, either TOKEN_NOT_FOUND - or INVALID_LIMIT. - summary: List PSKs. - tags: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml - post: - consumes: - - application/json - description: "Upload a PSK for an endpoint to allow it to bootstrap. The existing\ - \ key cannot be overwritten, but needs\nto be deleted first in the case of\ - \ re-setting a PSK for an endpoint.\n\n**Note**: The PSK APIs are available\ - \ only to accounts that have this feature enabled.\n\n**Example:**\n```\n\ - curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n\ - -H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\"\ - \ \\\n -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\"\ - : \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }'\n```" - operationId: uploadPreSharedKey - parameters: - - description: PSK to upload. - in: body - name: body - required: true - schema: - $ref: '#/definitions/PreSharedKey' - produces: - - application/json - responses: - 201: - description: Successfully created. - 400: - description: Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, - INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT. + '200': + description: Successful operation. schema: - type: string - 401: + $ref: '#/definitions/AccessKeyList' + '401': description: Authentication failure. - 403: - description: Forbidden. You need to read and accept the PSK license in Device - Management Portal. - 409: - description: Conflict. The PSK for the endpoint already exists and cannot - be overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT. schema: - type: string - summary: Upload a PSK to Pelion Device Management. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all access keys. tags: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml - /v2/device-shared-keys/{endpoint_name}: - delete: - description: 'Remove a PSK. + - Tenant accounts - access keys + x-filter: + application_id: + - eq + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/access-keys/{access_key_id}: + get: + description: 'Retrieve details of an access key. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys/{access_key_id} \ - -H "Authorization: Bearer " + -H ''Authorization: Bearer '' ```' - operationId: deletePreSharedKey + operationId: getAccountAccessKey parameters: - - description: The unique endpoint identifier that this PSK applies to. [Reserved - characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) - must be percent-encoded. + - description: The ID of the account to retrieve. in: path - name: endpoint_name + name: account_id + required: true + type: string + - description: The ID of the access key to retrieve. + in: path + name: access_key_id required: true type: string + produces: + - application/json responses: - 204: - description: Successfully deleted. Responds even if the endpoint does not - have an associated PSK. - 400: - description: Bad request. Endpoint name validation failed. Contains error - INVALID_ENDPOINT_NAME. + '200': + description: Successful operation. schema: - type: string - 401: + $ref: '#/definitions/AccessKey' + '401': description: Authentication failure. - summary: Remove a PSK. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or access key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get access key. tags: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml + - Tenant accounts - access keys + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys: get: - description: 'Check if a PSK for an endpoint exists or not. The response does - not contain the secret itself. + deprecated: true + description: 'Retrieve an array of API keys, optionally filtered by the owner. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \ - -H "Authorization: Bearer " + -H ''Authorization: Bearer '' ```' - operationId: getPreSharedKey + operationId: getAllAccountApiKeys parameters: - - description: The unique endpoint identifier that this PSK applies to. [Reserved - characters](https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters) - must be percent-encoded. + - description: Account ID. in: path - name: endpoint_name + name: account_id required: true type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: API key filter. Do not include the private portion of the API + key (the last 32 characters). + in: query + name: key__eq + required: false + type: string + - description: Owner name filter. + in: query + name: owner__eq + required: false + type: string + produces: + - application/json responses: - 200: - description: Pre-shared key for the device (does not contain secret). - schema: - $ref: '#/definitions/PreSharedKeyWithoutSecret' - 400: - description: Bad request. Endpoint name validation failed. Contains error - INVALID_ENDPOINT_NAME. + '200': + description: Successful operation. schema: - type: string - 401: + $ref: '#/definitions/ApiKeyInfoRespList' + '401': description: Authentication failure. - 404: - description: The PSK does not exist. - summary: Get a PSK. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the given ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all API keys. tags: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml - /v2/endpoints/{device-id}: - get: - description: 'Retrieves resources cached by Device Management Connect. This - call does not formulate a message to the device. + - Tenant accounts - API keys + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-filter: + key: + - eq + owner: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + deprecated: true + description: 'Create a new API key. There is no default value for the owner + ID, and it must be from the same account where the new API key is created. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id} \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "MyKey1"}'' ```' - operationId: getEndpointResources + operationId: createAccountApiKey parameters: - - description: A unique device ID for an endpoint. The ID must be an exact match. - Do not use wildcards. + - description: Account ID. in: path - name: device-id + name: account_id required: true type: string + - description: Details of the API key to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/ApiKeyInfoReq' produces: - application/json responses: - 200: - description: Successful response with an array of resources. + '201': + description: New entity created. schema: - items: - $ref: '#/definitions/Resource' - type: array - 404: - description: Endpoint not found. - summary: List the resources on an endpoint. + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data, for example, missing API key name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the given ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new API key. tags: - - Endpoints - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/endpoints/{device-id}/{resourcePath}: + - Tenant accounts - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}: delete: deprecated: true - description: '(DEPRECATED) A request to delete a resource path must be handled - by both Device Management Client and Device Management - - Connect. - + description: 'Delete an API key. - All resource APIs are asynchronous. These APIs respond only if the device - is on and connected to Device Management Connect, and there is an active notification - channel. + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteResourcePath + operationId: deleteAccountApiKey parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: Account ID. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: The ID of the API key to delete. in: path - name: resourcePath + name: apikey_id required: true type: string - - description: 'If you make a request with `noResp=true`, Device Management - Connect makes a CoAP non-confirmable request to the device. Such requests - are not guaranteed to arrive at the device, and do not return an async-response-id. - - - If calls with this parameter enabled succeed, they return with the status - code `204 No Content`. If the underlying protocol does not support non-confirmable - requests, or if the endpoint is registered in queue mode, the response is - status code `409 Conflict`.' - in: query - name: noResp - required: false - type: boolean + produces: + - application/json responses: - 202: - description: Accepted. Returns an asynchronous response ID. + '204': + description: Deleted successfully. + '401': + description: Authentication failure. schema: - $ref: '#/definitions/AsyncID' - 400: - description: Bad request. - 404: - description: "Requested endpoint\u2019s resource is not found." - 409: - description: Conflict. If `noResp=true`, the non-confirmable request is - not supported by the used protocol. - 410: - description: Gone. Endpoint not found. - 429: - description: 'Cannot accept the request at the moment: the queue is full.' - 502: - description: TCP or TLS connection to endpoint cannot be established. - summary: (DEPRECATED) Delete a resource path. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete the API key. tags: - - Resources + - Tenant accounts - API keys x-deprecation: - comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. - end_of_life_at: '2020-05-17T00:00:00+00:00' - issued_at: '2019-05-17T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/service-api-references/device-management-connect.html#createAsyncRequest - x-origin: /home/circleci/project/device-server/public/swagger.yaml + comment: This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: deprecated: true - description: '(DEPRECATED) Requests the resource value either from the device - or cache. If the value is not in the cache, the request goes all the - - way to the device. When the response is available, an `AsyncIDResponse` JSON - object is received in the notification channel. - - The resource values can be also in cache based on `max_age` defined by the - device side. The value found from the cache is returned - - immediately in the response. - - - The preferred way to get resource values is to use the **subscribe** and **callback** - methods. - - - All resource APIs are asynchronous. These APIs only respond if the device - is on and connected to Device Management. - - - See also how [resource caching](../connecting/device-guidelines.html#resource-cache) - works. - - - Please refer to [Lightweight Machine to Machine Technical specification](http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20170208-A/OMA-TS-LightweightM2M-V1_0-20170208-A.pdf) - for more inforamtion. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} - \ - - -H ''Authorization: Bearer '' - - ```' - operationId: getResourceValue + description: "Retrieve details of an API key.\nNote: This endpoint is\ + \ restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}\ + \ \\\n -H 'Authorization: Bearer '\n```" + operationId: getAccountApiKey parameters: - - description: Unique Device Management device ID for the endpoint. The ID must - be an exact match. Do not use wildcards. + - description: Account ID. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: The ID of the API key to retrieve. in: path - name: resourcePath + name: apikey_id required: true type: string - - description: 'If true, the response comes only from the cache. Default: false. - Device Management Connect caches the received resource values for the time - of [max_age](../connecting/working-with-the-resources.html) defined in the - client side.' - in: query - name: cacheOnly - required: false - type: boolean - - description: 'If a request is made with `noResp=true`, Device Management Connect - makes a CoAP non-confirmable request to the device. Such requests are not - guaranteed to arrive on the device, and no `async-response-id` returns. - - - Successful calls return with the status code `204 No Content`. If the underlying - protocol does not support non-confirmable requests, or if the endpoint is - registered in queue mode, the response is status code `409 Conflict`.' - in: query - name: noResp - required: false - type: boolean + produces: + - application/json responses: - 200: - description: Resource value found in cache. Returns the string value of - the resource. - 202: - description: Accepted. Returns an asynchronous response ID. + '200': + description: Successful operation. schema: - $ref: '#/definitions/AsyncID' - 205: - description: No cache available for resource. - 400: - description: Bad request. - 404: - description: "Requested endpoint\u2019s resource is not found." - 409: - description: Conflict. If `noResp=true`, the non-confirmable request is - not supported by the used protocol. - 410: - description: Gone. Endpoint not found. - 429: - description: 'Cannot accept the request at the moment: the queue is full.' - 502: - description: TCP or TLS connection to endpoint cannot be established. - summary: (DEPRECATED) Read from a resource. + $ref: '#/definitions/ApiKeyInfoResp' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get API key details. tags: - - Resources + - Tenant accounts - API keys x-deprecation: - comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. - The /v2/device-requests/{device-id} endpoint lets you use your own async-id, - and simplifies integration by returning all resource values, cached and - non-cached, through the event notification channel. - end_of_life_at: '2020-05-17T00:00:00+00:00' - issued_at: '2019-05-17T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/service-api-references/device-management-connect.html#createAsyncRequest - x-origin: /home/circleci/project/device-server/public/swagger.yaml - post: - consumes: - - text/plain - - application/xml - - application/octet-stream - - application/exi - - application/json - - application/link-format - - application/senml+json - - application/nanoservice-tlv - - application/vnd.oma.lwm2m+text - - application/vnd.oma.lwm2m+opaq - - application/vnd.oma.lwm2m+tlv - - application/vnd.oma.lwm2m+json - deprecated: true - description: '(DEPRECATED) [Execute a function](../connecting/handle-resource-webapp.html#the-execute-operation) - on an existing resource and create a new Object instance on the device. The - resource path does not have to exist; you can set it with the call. The maximum - length of the resource path is 255 characters. - - - All resource APIs are asynchronous. These APIs respond only if the device - is on and connected to Device Management Connect, and there is an active notification - channel. - + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + deprecated: true + description: 'Update API key details. - Supported content types depend on the device and its resource. Device Management - translates HTTP to the equivalent CoAP content type. + Note: This endpoint is restricted to administrators. **Example:** - - This example resets the min and max values of the [temperature sensor](http://www.openmobilealliance.org/tech/profiles/lwm2m/3303.xml) - instance 0 by executing Resource 5605 ''Reset Min and Max Measured Values''. - - ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3303/0/5605 + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestApiKey25"}'' ```' - operationId: executeOrCreateResource + operationId: updateAccountApiKey parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: Account ID. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: The ID of the API key to update. in: path - name: resourcePath + name: apikey_id required: true type: string - - description: This value is not needed. Most of the time, resources do not - accept a function but they have their own functions predefined. You can - use this to trigger them. If a function is included, the body of this request - is passed as a char* to the function in Device Management Client. + - description: New API key attributes to be stored. in: body - name: resourceFunction - required: false + name: body + required: true schema: - type: string - - description: 'If you make a request with `noResp=true`, Device Management - Connect makes a CoAP non-confirmable request to the device. Such requests - are not guaranteed to arrive in the device, and you do not get back an async-response-id. - - - If calls with this parameter enabled succeed, they return with the status - code `204 No Content`. If the underlying protocol does not support non-confirmable - requests, or if the endpoint is registered in queue mode, the response is - status code `409 Conflict`.' - in: query - name: noResp - required: false - type: boolean + $ref: '#/definitions/ApiKeyUpdateReq' + produces: + - application/json responses: - 202: - description: Accepted. Returns an asynchronous response ID. + '200': + description: Successful operation. schema: - $ref: '#/definitions/AsyncID' - 400: - description: Bad request. - 404: - description: "Requested endpoint\u2019s resource not found." - 409: - description: Conflict. If `noResp=true`, the non-confirmable request is - not supported by the used protocol. - 410: - description: Gone. Endpoint not found. - 429: - description: 'Cannot accept the request at the moment: the queue is full.' - 502: - description: TCP or TLS connection to endpoint cannot be established. - summary: (DEPRECATED) Execute a function on a Resource or create new Object - instance. + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data, for example, invalid API key name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account ID or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update API key details. tags: - - Resources + - Tenant accounts - API keys x-deprecation: - comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. - end_of_life_at: '2020-05-17T00:00:00+00:00' - issued_at: '2019-05-17T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/service-api-references/device-management-connect.html#createAsyncRequest - x-origin: /home/circleci/project/device-server/public/swagger.yaml - put: + comment: This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}/groups: + delete: consumes: - - text/plain - - application/xml - - application/octet-stream - - application/exi - application/json - - application/link-format - - application/senml+json - - application/nanoservice-tlv - - application/vnd.oma.lwm2m+text - - application/vnd.oma.lwm2m+opaq - - application/vnd.oma.lwm2m+tlv - - application/vnd.oma.lwm2m+json deprecated: true - description: '(DEPRECATED) With this API, you can [write a new value to existing - Resources](../connecting/handle-resource-webapp.html) or use the **write** - attribute to set [notification rules](../connecting/resource-change-webapp.html#notification-rules) - for the Resources. The notification rules only work on the device client side - and may not be supported by all clients. + description: 'Remove API key from groups. + Note: This endpoint is restricted to administrators. - This API can also be used to transfer files to the device. Device Management - Connect LwM2M server implements Option 1 from RFC7959. The maximum block size - is 1024 bytes. - Note block size versus transferred file size in low-quality networks. The - customer application needs to know what type of file is transferred (for example, - TXT) + **Example:** - and the customer can encrypt the payload. The maximum payload size is 1048576 - bytes. + ``` + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups + \ - All resource APIs are asynchronous. These APIs respond only if the device - is on and connected to Device Management Connect, and there is an active notification - channel. + -H ''Authorization: Bearer '' \ + -H ''content-type: application/json'' \ - Supported content types depend on the device and its resource. Device Management - translates HTTP to equivalent CoAP content type. + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: removeAccountApiKeyFromGroups + parameters: + - description: Account ID. + in: path + name: account_id + required: true + type: string + - description: The ID of the API key to remove from the group. + in: path + name: apikey_id + required: true + type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + items: + type: string + type: array + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove API key from groups. + tags: + - Tenant accounts - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + deprecated: true + description: 'Retrieve an array of policy groups associated with an API key. + + Note: This endpoint is restricted to administrators. **Example:** + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getGroupsOfAccountApikey + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Account ID. + in: path + name: account_id + required: true + type: string + - description: The ID of the API key. + in: path + name: apikey_id + required: true + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummaryList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get policy groups of an API key. + tags: + - Tenant accounts - API keys + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + deprecated: true + description: 'Add API key to groups. + + Note: This endpoint is restricted to administrators. - This example sets the alarm on a buzzer. The command writes the [Buzzer](http://www.openmobilealliance.org/tech/profiles/lwm2m/3338.xml) - instance 0, "On/Off" boolean resource to ''1''. + **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/3338/0/5850 + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \ - -H "content-type: text/plain" \ + -H ''Authorization: Bearer '' \ - -H ''Authorization: Bearer '' \ + -H ''content-type: application/json'' \ - -d ''1'' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: updateResourceValue + operationId: addAccountApiKeyToGroups parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: Account ID. in: path - name: device-id + name: account_id required: true type: string - - description: Resource URL. + - description: The ID of the API key to add to the group. in: path - name: resourcePath + name: apikey_id required: true type: string - - description: The value to set to the resource. + - description: A list of IDs of groups to update. in: body - name: resourceValue + name: body required: true schema: - type: string - - description: 'If you make a request with `noResp=true`, Device Management - Connect makes a CoAP non-confirmable request to the device. Such requests - are not guaranteed to arrive to the device, and do not return an `async_response_id`. - - - If a call with this parameter enabled succeeds, it return status code `204 - No Content`. If the underlying protocol does not support non-confirmable - requests, or if the endpoint is registered in queue mode, the response is - status code `409 Conflict`.' - in: query - name: noResp - required: false - type: boolean + items: + type: string + type: array + produces: + - application/json responses: - 202: - description: Accepted. Returns an asynchronous response ID. + '200': + description: Successful operation. schema: - $ref: '#/definitions/AsyncID' - 400: - description: Bad request. - 409: - description: '''Conflict. If `noResp=true`, the non-confirmable request - is not supported by the used protocol.''' - 410: - description: Gone. Endpoint not found. - 429: - description: 'Cannot accept the request at the moment: the queue is full.' - 502: - description: TCP or TLS connection to endpoint cannot be established. - summary: (DEPRECATED) Write to a Resource or use write-attributes (notification - rules) for a Resource. + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: The API key is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add API key to a list of groups. tags: - - Resources + - Tenant accounts - API keys x-deprecation: - comment: /v2/endpoints/{device-id}/{resourcePath} is replaced by /v2/device-requests/{device-id}. - end_of_life_at: '2020-05-17T00:00:00+00:00' - issued_at: '2019-05-17T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/service-api-references/device-management-connect.html#createAsyncRequest - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/callback: - delete: - description: 'Deletes the callback URL. + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add: + post: + consumes: + - application/json + deprecated: true + description: 'Add an API key to groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/callback + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add \ - -H ''Authorization: Bearer '' - - ```' - operationId: deregisterWebhook - responses: - 204: &id019 - description: Successfully deleted. - 401: &id017 - description: Unauthorized. - 403: &id018 - description: Forbidden. The authorization token used is not an API key. - 404: - description: Callback URL does not exist. - summary: Delete callback URL. - tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - get: - description: 'Shows the current callback URL if it exists. - - - **Example:** - - ``` + -H ''Authorization: Bearer '' \ - curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/callback \ + -H ''content-type: application/json'' \ - -H ''Authorization: Bearer '' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: getWebhook - produces: - - application/json - responses: - 200: - description: URL found. - schema: - $ref: '#/definitions/Webhook' - 401: *id017 - 403: *id018 - 404: - description: The callback URL does not exist. - summary: Check callback URL. - tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - put: - consumes: - - application/json - description: "Register a URL to which the server delivers notifications of changes\ - \ to the subscribed resource. To push notifications, you must first place\ - \ subscriptions. The maximum length of the URL, header keys, and values, all\ - \ combined, is 400 characters. \n\nNotifications are delivered as PUT requests\ - \ to the HTTP server, which the client defines with a subscription server\ - \ message. The given URL must be accessible, and respond to the PUT request\ - \ with a response code of 200 or 204. \n\nDevice Management Connect tests\ - \ the callback URL with an empty JSON payload `{}` when the URL is registered.\ - \ Callback implementation does not support URL redirection. For more information\ - \ on notification messages, see [NotificationMessage](#NotificationMessage).\n\ - \n**Optional headers in a callback message:**\n\nYou can set optional headers\ - \ to a callback in a **Webhook** object. Device Management Connect includes\ - \ the header and key pairs in the notification messages send them to callback\ - \ URL. The callback URLs and headers are API key-specific.\n\nOne possible\ - \ use for additional headers is checking the origin of a PUT request, as well\ - \ as distinguishing the application (API key) to which the notification belongs.\n\ - \n**Note**: Only one callback URL per API key can be active. If you register\ - \ a new URL while another one is active, it replaces the active one. There\ - \ can be only one notification channel at a time. If another type of channel\ - \ is already present, you need to delete it before setting the callback URL.\n\ - \n**Expiration of a callback URL:**\n\nA callback can expire when Device Management\ - \ cannot deliver a notification due to a connection timeout or an error response\ - \ (4xx or 5xx). After each delivery failure, Device Management sets an exponential\ - \ back off time and makes a retry attempt after that. The first retry delay\ - \ is 1 second, then 2s, 4s, 8s, up to maximum delay of two minutes. The callback\ - \ URL is removed if all retries fail within 24 hours. More about [notification\ - \ sending logic](../integrate-web-app/event-notification.html#notification-sending-logic).\n\ - \n**Supported callback URL protocols:**\n\nCurrently, only HTTP and HTTPS\ - \ protocols are supported.\n\n**HTTPS callback URLs:**\n\nWhen delivering\ - \ a notification to an HTTPS based callback URL, Device Management Connect\ - \ presents a valid client certificate to identify itself. The certificate\ - \ is signed by a trusted certificate authorithy (GlobalSign) with a Common\ - \ Name (CN) set to notifications.mbedcloud.com.\n\n**Configuration options:**\n\ - \nThe event notification channel provides configurations options defined in\ - \ [Serialization config](#SerializationConfigObjectV2).\n\n**Example:**\n\n\ - This example command shows how to set your callback URL and API key. It also\ - \ sets an optional header authorization. When Device Management Connect calls\ - \ your callback URL, the call contains the authorization header with the defined\ - \ value.\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback\ - \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ - \ \\\n-d '{\n \"url\": \"{callback-url}\",\n \"headers\": {\"authorization\"\ - : \"f4b93d6e-4652-4874-82e4-41a3ced0cd56\"},\n \"serialization\": {\"type\"\ - : \"v2\", \"max_chunk_size\": \"100\",\n \"cfg\": {\"deregistrations_as_object\"\ - : \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"\ - include_original_ep\": \"true\"\n }\n }\n}'\n```" - operationId: registerWebhook + operationId: addAccountApiKeyToListedGroups parameters: - - description: A JSON object that contains the optional headers and URL where - notifications are sent. + - description: The ID of the Account. + in: path + name: account_id + required: true + type: string + - description: The ID of the API key to add to the group. + in: path + name: apikey_id + required: true + type: string + - description: A list of IDs of groups to update. in: body - name: webhook + name: body required: true schema: - $ref: '#/definitions/Webhook' - responses: - 204: - description: Successfully subscribed. - 400: - description: Given URL is not accessible, or other type of channel already - exists. - 401: *id017 - 403: *id018 - 415: - description: Unsupported Media Type. - summary: Register a callback URL. - tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/channel: - get: - description: "Get channel delivery mechanism.\n\n**Example:**\n\n curl -X\ - \ GET https://api.us-east-1.mbedcloud.com/v2/notification/channel \\\n \ - \ -H 'Authorization: Bearer ' \\\n" - operationId: getChannelMetadata + $ref: '#/definitions/GroupIdList' + produces: + - application/json responses: - 200: - description: Success. + '200': + description: Successful operation. schema: - $ref: '#/definitions/ChannelMetadata' - 404: - description: Channel was not found. - summary: Get channel metadata. - tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/pull: - delete: - deprecated: true - description: 'Delete a notification Long Poll channel. This is required to change - the channel from Long Poll to another type. Do not make a GET `/v2/notification/pull` - call for two minutes after deleting the channel, because it can implicitly - recreate the pull channel. You can also have some random responses with payload - or 410 GONE with "CHANNEL_DELETED" as a payload or 200/204 until the old channel - is purged. - - - **Example:** - - ``` - - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/pull \ - - -H ''Authorization: Bearer '' - - ```' - operationId: deleteLongPollChannel - responses: - 200: - description: Success. The body can contain "REMOVED" if it was deleted with - this call or "ALREADY_DELETED" if it was deleted before and not purged - yet. - 401: *id017 - summary: Delete notification Long Poll channel. + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: The API key is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add API key to a list of groups. tags: - - Notifications + - Tenant accounts - API keys x-deprecation: - comment: Long polling is deprecated and should be used for development purposes - only. - end_of_life_at: '2020-03-31T00:00:00+00:00' - issued_at: '2017-02-10T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html - x-origin: /home/circleci/project/device-server/public/swagger.yaml - get: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/groups/add + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove: + post: + consumes: + - application/json deprecated: true - description: 'In this case, notifications are delivered through HTTP long poll - requests. The HTTP request is kept open until one or more event notifications - are delivered to the client, or the request times out (response code 204). - In both cases, the client should open a new polling connection after the previous - one closes. Only a single long polling connection per API key can be ongoing - at any given time. We recommend using a persistent connection (Connection - keep-alive header in the request) to avoid excess TLS handshakes. - - - The pull channel is implicitly created by the first GET call to `/v2/notification/pull`. - It refreshes on each GET call. If the channel is not polled for a long time - (10 minutes), it expires and is deleted. This means that no notifications - will stay in the queue between polls. A channel can be also be deleted explicitly - with a DELETE call. - - - **Note:** If you cannot have a public-facing callback URL, for example, when - developing on your local machine, you can use long polling to check for new - messages. However, **long polling is deprecated** and will likely be replaced - in the future. It is meant only for experimentation, not commercial use. The - proper method to receive notifications is a **notification callback**. - + description: 'Remove an API key from groups. - There can only be one notification channel per API key in Device Management - Connect. If a notification channel of other type already exists for the API - key, delete it before creating a long poll notification channel. + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/pull \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: longPollNotifications + operationId: removeAccountApiKeyFromListedGroups + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The ID of the API key to remove from the group. + in: path + name: apikey_id + required: true + type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - 200: - description: Success. + '200': + description: Successful operation. schema: - $ref: '#/definitions/NotificationMessage' - 204: - description: No new notifications. - 400: - description: Other type of channel already exists. - 401: *id017 - 409: - description: Conflict. Long poll request exists already. - 410: - description: Pull channel was deleted and waiting to be purged. This code - is a result of incorrect client behavior (delete channel and then pull), - which can prevent the creation of a callback channel after the pull channel - is deleted. The channel can be (randomly) recreated by this call when - deleted and not purged. This client behaviour can set the channel in an - undefined state for some time. The channel may respond with 410 GONE or - 200/204 codes randomly for some time. Finally, the channel enters a valid - "channel exists" state. - summary: Get notifications using Long Poll + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove API key from groups. tags: - - Notifications + - Tenant accounts - API keys x-deprecation: - comment: Long polling is deprecated and should be used for development purposes - only. - end_of_life_at: '2020-03-31T00:00:00+00:00' - issued_at: '2017-02-10T15:23:00+00:00' - links: - - https://www.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/websocket: - delete: - description: '(PREVIEW) Delete a notification websocket channel bound to the - API key. This is required to change the channel from websocket to another - type. + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret: + post: + deprecated: true + description: 'Reset the secret key of the API key. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/websocket + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteWebsocket + operationId: resetAccountApiKeySecret + parameters: + - description: Account ID. + in: path + name: account_id + required: true + type: string + - description: The ID of the API key to reset. + in: path + name: apikey_id + required: true + type: string + - description: New API key attributes to be stored. + in: body + name: body + required: false + schema: + $ref: '#/definitions/ApiKeyUpdateReq' + produces: + - application/json responses: - 204: *id019 - 401: *id017 - 403: *id018 - 404: - description: Websocket channel doesn't exist. - summary: (PREVIEW) Delete websocket channel. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data format. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Reset the secret key. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant accounts - API keys + x-deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications: get: - description: '(PREVIEW) Returns 200 with websocket connection status, if websocket - channel exists. + description: 'Retrieve an array of applications. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/websocket + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getWebsocket + operationId: getAllAccountApplications + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string produces: - application/json responses: - 200: - description: Websocket found. + '200': + description: Successful operation. schema: - $ref: '#/definitions/WebsocketChannel' - 401: *id017 - 403: *id018 - 404: - description: No channel has been registered. - summary: (PREVIEW) Get websocket channel information. - tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - put: - consumes: - - application/json - description: "(PREVIEW) Register (or update) a channel using websocket connection\ - \ to deliver notifications. The websocket channel should be opened by client\ - \ using `/v2/notification/websocket-connect` endpoint. To get notifications\ - \ pushed, you must place subscriptions. For more information on notification\ - \ messages, see [NotificationMessage](#NotificationMessage).\n\nA websocket\ - \ channel can have only one active websocket connection at a time. If a websocket\ - \ connection for a channel exists and a new connection to the same channel\ - \ is made, the connection is accepted and the older connection is closed.\n\ - \n**Expiration of a websocket:**\n\nA websocket channel is expired if the\ - \ channel does not have an opened websocket connection for a 24-hour period.\ - \ Channel expiration means the channel is deleted and any undelivered notifications\ - \ stored in its internal queue is removed. As long as the channel has an opened\ - \ websocket connection or time between successive websocket connections is\ - \ less than 24 hours,\nthe channel is considered active, notifications are\ - \ stored in its internal queue and delivered when a websocket connection is\ - \ active. A channel can be also deleted explicitly with a DELETE call.\n\n\ - More about [notification sending logic](../integrate-web-app/event-notification.html#notification-sending-logic).\n\ - \n**Configuration options:**\n\nThe event notification channel provides configurations\ - \ options defined in [Serialization config](#SerializationConfigObjectV2)\n\ - \n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/websocket\ - \ \\\n-H 'Authorization: Bearer '\n-d '{\n \"serialization\": {\"\ - type\": \"v2\", \"max_chunk_size\": \"100\",\n \"cfg\": {\"deregistrations_as_object\"\ - : \"true\", \"include_uid\": \"true\", \"include_timestamp\": \"true\", \"\ - include_original_ep\": \"true\"\n }\n }\n}\n```" - operationId: registerWebsocket - responses: - 200: - description: Channel successfully updated. In the current v2 implementation - this operation has no effect, and any subsequent PUT call from a client - previously registered to a channel results in a 200 OK response. + $ref: '#/definitions/ApplicationList' + '401': + description: Authentication failure. schema: - $ref: '#/definitions/RegisterWebsocketChannel' - 201: - description: Channel succesfully registered. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. schema: - $ref: '#/definitions/WebsocketChannel' - 400: - description: Other type of channel already exists. - 401: *id017 - 403: *id018 - summary: (PREVIEW) Register a websocket channel. + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all applications. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/websocket-connect: - get: - description: "\n(PREVIEW) A websocket channel can have only one active connection\ - \ at a time. If a websocket connection for a channel exists and a new connection\ - \ to the same channel is made, the connection is accepted and the older connection\ - \ is closed.\n\nOnce the socket has been opened, it may be closed with one\ - \ of the following status codes.\n\n\n \n \n \n\ - \ \n \n \n \n \n\ - \ \n \n\ - \ \n \n \n \n \n \n\ - \ \n \n \n \n \n\ - \ \n \n \n
CodeDescription
1000Socket closed by the client.
1001Going away. Set\ - \ when another socket opens on the used channel, the channel is deleted with\ - \ a REST call, or the server is shutting down.
1008Policy violation. Set when the API\ - \ key is missing or invalid.
1011Unexpected condition. Socket is closed with this status at an attempt\ - \ to open a socket to a nonexistent channel (without a prior PUT request).\ - \ This code is also used to indicate closing socket for any other unexpected\ - \ condition in the server.
\n\n\n**Example:**\n\ - ```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect\ - \ \\\n-H \"Authorization:Bearer {apikey}\" \\\n-H \"Connection:upgrade\" \\\ - \n-H \"Upgrade:websocket\" \\\n-H \"Sec-WebSocket-Version: 13\" \\\n-H \"\ - Sec-WebSocket-Key: {base64nonce}\" \\\n-N -I\n```" - operationId: connectWebsocket - parameters: - - default: Upgrade - in: header - name: Connection - required: true - type: string - - default: websocket - in: header - name: Upgrade - required: true - type: string - - description: 'API key or user token must be present in the `Sec-WebSocket-Protocol` - header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:"wss,pelion_ak_{api_key}"`. + - Tenant accounts - applications + x-filter: + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new application. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` - Refer to the notification service documentation for examples.' - in: header - name: Sec-WebSocket-Protocol - required: false - type: string - - description: Originating host of the request. - in: header - name: Origin + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications + -d ''{"name": "MyApplication1"}'' \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' + + ```' + operationId: createAccountApplication + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id required: true type: string - - default: 13 - description: WebSocket version. Must be 13. - in: header - name: Sec-WebSocket-Version - required: true - type: integer - - description: The value of this header field must be a nonce consisting of - a randomly selected 16-byte value that has been base64-encoded (see Section - 4 of [RFC4648]). The nonce must be selected randomly for each connection. - in: header - name: Sec-WebSocket-Key + - description: The details of the application to create. + in: body + name: body required: true - type: string + schema: + $ref: '#/definitions/Application' + produces: + - application/json responses: - 101: - description: Switching protocols. - 400: - description: Required header(s) missing. - 401: *id017 - 426: - description: Upgrade required. Connect and/or Upgrade headers missing. - summary: (PREVIEW) Open the websocket. + '201': + description: New entity created. + schema: + $ref: '#/definitions/Application' + '400': + description: Error in input data, for example, missing name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new application. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/subscriptions: + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}: delete: - description: 'Removes pre-subscriptions. + description: 'Delete the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deletePreSubscriptions + operationId: deleteAccountApplication + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - description: The ID of the application to delete. + in: path + name: application_id + required: true + type: string + produces: + - application/json responses: - 204: - description: Successfully removed subscriptions. - 401: - description: Unauthorized. - 403: - description: 'Forbidden: the authorization token used is not an API key.' - summary: Remove pre-subscriptions. + '204': + description: Deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete application. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve pre-subscription data. The server returns a JSON structure. - If there are no pre-subscribed resources, it returns an empty array. + description: 'Retrieve details of an application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getPreSubscriptions + operationId: getAccountApplication + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - description: The ID of the application to retrieve. + in: path + name: application_id + required: true + type: string produces: - application/json responses: - 200: - description: OK. + '200': + description: Successful operation. schema: - $ref: '#/definitions/PresubscriptionArray' - 401: - description: Unauthorized. - 403: - description: 'Forbidden: the authorization token used is not an API key.' - summary: Get pre-subscriptions. + $ref: '#/definitions/Application' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get application. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: - consumes: - - application/json - description: "Pre-subscription is a set of rules and patterns established by\ - \ the application. When an endpoint registers and its ID, type, and registered\ - \ resources match the pre-subscription data, Device Management Connect automatically\ - \ sends subscription requests to the device. The pattern may include the endpoint\ - \ ID (optionally having an `*` character at the end), endpoint type, a list\ - \ of resources, or expressions with an `*` character at the end. Subscriptions\ - \ based on pre-subscriptions are done when device registers or does register\ - \ update. To remove the pre-subscription data, put an empty array as a rule.\n\ - \n**Notification rules**\n\nA web application can place dynamic observation\ - \ rules for individual Object Instances and Resources to define when the device\ - \ sends observations. More information in [Notification rules](../connecting/resource-change-webapp.html).\n\ - \n**Limits**:\n\n- The maximum length of the endpoint name and endpoint type\ - \ is 64 characters.\n- The maximum length of the resource path is 128 characters.\n\ - - You can listen to 256 separate resource paths.\n- The maximum number of\ - \ pre-subscription entries is 1024.\n\n**Example request:**\n```\ncurl -X\ - \ PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions \\\n-H 'Authorization:\ - \ Bearer ' \\\n-H 'content-type: application/json' \\\n-d '[\n \ - \ {\n \"endpoint-name\": \"node-001\",\n \"resource-path\"\ - : [\"/dev\"]\n },\n {\n \"endpoint-type\": \"Light\",\n\ - \ \"resource-path\": [\"/sen/*\"]\n },\n {\n \"\ - endpoint-name\": \"node*\"\n },\n {\n \"endpoint-type\"\ - : \"Sensor\"\n },\n {\n \"resource-path\": [\"/dev/temp\"\ - ,\"/dev/hum\"]\n }\n ]'\n```\n\n- Subscribe to `/dev` resource of\ - \ endpoint named `node-001`.\n- Subscribe to `Light` type of endpoints and\ - \ their resources prefixed with `/sen/`.\n- Subscribe to all observable resources\ - \ of endpoint names prefixed with `node`.\n- Subscribe to all observable resources\ - \ of `Sensor` type endpoints.\n- Subscribe to `/dev/temp` and `/dev/hum` resources\ - \ of all endpoints.\n\n**Note**: For efficiency, you should use resource path\ - \ patterns in the pre-subscription data. This prevents notification flow from\ - \ unwanted resources." - operationId: updatePreSubscriptions - parameters: - - description: Array of pre-subscriptions. - in: body - name: presubsription - required: true - schema: - $ref: '#/definitions/PresubscriptionArray' - produces: - - text/plain - responses: - 204: - description: Successfully created. - 400: - description: Bad request, malformed content. - 401: - description: Unauthorized. - 403: - description: 'Forbidden: the authorization token used is not an API key.' - summary: Set pre-subscriptions - tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/subscriptions/{device-id}: - delete: - description: 'Deletes all resource subscriptions in a single endpoint. + description: 'Update application details. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestApplication25"}'' ```' - operationId: deleteEndpointSubscriptions + operationId: updateAccountApplication parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: The ID of the account to retrieve. in: path - name: device-id + name: account_id + required: true + type: string + - description: The ID of the application to update. + in: path + name: application_id required: true type: string + - description: New applicationattributes to store. + in: body + name: body + required: true + schema: + $ref: '#/definitions/Application' + produces: + - application/json responses: - 204: - description: Successfully removed. - summary: Delete subscriptions from an endpoint. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data, for example, invalid display name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update application details. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/access-keys: get: - description: 'Lists all subscribed resources from a single endpoint. + description: 'Retrieve an array of access keys associated with the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getEndpointSubscriptions + operationId: getAllAccountApplicationAccessKeys parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: The ID of the account to retrieve. in: path - name: device-id + name: account_id required: true type: string + - description: The ID of the application. + in: path + name: application_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string produces: - - text/uri-list + - application/json responses: - 200: - description: List of subscribed resources. + '200': + description: Successful operation. schema: - description: A list of resource URIs, one per line. - example: /sen/light - type: string - 404: - description: Endpoint not found, or there are no subscriptions for that - endpoint. - summary: Read endpoints subscriptions + $ref: '#/definitions/AccessKeyList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all access keys associated with the application. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/subscriptions/{device-id}/{resourcePath}: - delete: - description: 'Remove an existing subscription from a resource path. + - Tenant accounts - applications + x-filter: + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new access key for the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} - \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + -d ''{"name": "MyKey1"}'' \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' ```' - operationId: deleteResourceSubscription + operationId: createAccountApplicationAccessKey parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. - in: path - name: device-id - required: true - type: string - - description: The resource URL. + - description: The ID of the account to retrieve. in: path - name: resourcePath + name: account_id required: true type: string - responses: - 204: - description: Successfully removed subscription. - 404: - description: Endpoint or resource not found. - summary: Remove a subscription. - tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - get: - operationId: checkResourceSubscription - parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: The ID of the application. in: path - name: device-id + name: application_id required: true type: string - - description: The resource URL. - in: path - name: resourcePath + - description: The details of the access key to create. + in: body + name: body required: true - type: string + schema: + $ref: '#/definitions/AccessKey' + produces: + - application/json responses: - 200: - description: Resource is subscribed. - 404: - description: Resource is not subscribed. - summary: Read subscription status + '201': + description: New entity created. + schema: + $ref: '#/definitions/AccessKey' + '400': + description: Error in input data, for example, missing display name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new application access key. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - put: - description: 'The Device Management Connect eventing model consists of observable - Resources. - - - This means that endpoints can deliver updated resource content, periodically - or with a more sophisticated solution-dependent logic. The OMA LwM2M resource - model also supports including objects, object instances, resources, and resource - instances. - - - Applications can subscribe to objects, object instances or individual resources - to make the device provide value change notifications to Device Management - Connect service. An application needs to call a `/notification/callback` method - to get Device Management Connect to push notifications of the resource changes. - - - **Notification rules** - - - A web application can place dynamic observation rules for individual Object - Instances and Resources to define when the device sends observations. More - information in [Notification rules](../connecting/resource-change-webapp.html). - + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}: + delete: + description: 'Delete the access key associated with the application. - All manual subscriptions are removed during a full device registration, at - which point applications must re-subscribe. To avoid this, you can use `/subscriptions` - to set a pre-subscription. + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id}/{resourcePath} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: addResourceSubscription + operationId: deleteAccountApplicationAccessKey parameters: - - description: A unique Device Management device ID for the endpoint. The ID - must be an exact match. Do not use wildcards. + - description: The ID of the account to retrieve. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: The ID of the application. in: path - name: resourcePath + name: application_id + required: true + type: string + - description: The ID of the access key to delete. + in: path + name: access_key_id required: true type: string produces: - application/json responses: - 200: - description: Successfully subscribed. - 202: - description: Accepted. Returns an asynchronous response ID used to reference - the future asynchronous response. + '204': + description: Deleted successfully. + '401': + description: Authentication failure. schema: - $ref: '#/definitions/AsyncID' - 400: - description: Bad request, malformed content. - 404: - description: Endpoint or its resource not found. - 429: - description: 'Cannot accept the request at the moment: the queue is full.' - 502: - description: 'Subscription failed: endpoint not connected.' - summary: Subscribe to a resource path. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account, application or access key with the specified ID + does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete access key associated with the application. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v3/accounts: + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Returns an array of account objects, optionally filtered by status - and tier level. + description: 'Retrieve details of an access key associated with the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccounts + operationId: getAccountApplicationAccessKey parameters: - - description: An optional filter for account status, ENROLLING, ACTIVE, RESTRICTED, - or SUSPENDED. - in: query - name: status__eq - required: false - type: string - - description: An optional filter to retrieve accounts with a specified set - of statuses. - in: query - name: status__in - required: false - type: string - - description: An optional filter to exclude accounts with a specified set of - statuses. - in: query - name: status__nin - required: false - type: string - - description: An optional filter for tier level. Must be 0, 1, 2, 98, 99, or - omitted. - in: query - name: tier__eq - required: false - type: string - - description: An optional filter for parent account ID. - in: query - name: parent__eq - required: false - type: string - - description: An optional filter for account end market. - in: query - name: end_market__eq - required: false - type: string - - description: 'An optional filter for account country. Finds all matches where - the filter value is a case-insensitive substring of the result. Example: - country__like=LAND matches Ireland.' - in: query - name: country__like - required: false - type: string - - default: 1000 - description: The number of results to return (2-1000). Default 1000. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts, history.' - in: query - name: include - required: false + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true type: string - - description: 'Format information for the query response. Supported: format=breakdown.' - in: query - name: format - required: false + - description: The ID of the application. + in: path + name: application_id + required: true type: string - - description: Property name returned from account-specific properties. - in: query - name: properties - required: false + - description: The ID of the access key to retrieve. + in: path + name: access_key_id + required: true type: string produces: - application/json @@ -8993,7 +13085,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/AccountInfoList' + $ref: '#/definitions/AccessKey' '401': description: Authentication failure. schema: @@ -9002,79 +13094,65 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all accounts. + '404': + description: An account, application or access key with the specified ID + does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get access key. tags: - - Tenant accounts - accounts - x-filter: - country: - - like - end_market: - - eq - parent: - - eq - status: - - eq - - in - - nin - tier: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - consumes: - - application/json - description: 'Create a new account. + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + description: 'Update access key details. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"display_name": "MyAccount1", "admin_name": "accountAdmin1", "email": - "example_admin@myaccount.info", "country": "United Kingdom", "end_market": - "Smart City", "address_line1": "110 Fulbourn Rd", "city": "Cambridge", "contact": - "J. Doe", "company": "Arm"}'' + -d ''{"name": "TestAccessKey"}'' ```' - operationId: createAccount + operationId: updateAccountApplicationAccessKey parameters: - - description: Details of the account to create. - in: body - name: body + - description: The ID of the account to retrieve. + in: path + name: account_id required: true - schema: - $ref: '#/definitions/AccountCreationReq' - - default: create - description: 'Action, either `create` or `enroll`. - -
    - -
  • `create` creates the account where its admin user has ACTIVE status - if `admin_password` was defined in the request, or RESET status if no `admin_password` - was defined. If the user already exists, its status is not modified.
  • - -
  • `enroll` creates the account where its admin user has ENROLLING status. - If the user already exists, its status is not modified. Email to finish - enrollment or notify the existing user about the new account is sent to - the `admin_email` defined in the request.
' - in: query - name: action - required: false type: string + - description: The ID of the application. + in: path + name: application_id + required: true + type: string + - description: The ID of the access key to update. + in: path + name: access_key_id + required: true + type: string + - description: New access key attributes to store. + in: body + name: body + required: true + schema: + $ref: '#/definitions/AccessKey' produces: - application/json responses: - '201': + '200': description: Successful operation. schema: - $ref: '#/definitions/AccountInfo' + $ref: '#/definitions/AccessKey' '400': - description: Error in input data, for example, invalid username. + description: Error in input data, for example, invalid display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9085,36 +13163,67 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new account. + '404': + description: An account, application or access key with the specified ID + does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update access key details. tags: - - Tenant accounts - accounts - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/me: + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups: get: - description: 'Retrieve detailed information about the account. + description: 'Retrieve an array of policy groups associated with an application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getMyAccountInfo + operationId: getGroupsOfAccountApplication parameters: - - description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts.' + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - description: The ID of the application. + in: path + name: application_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query - name: include + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after required: false type: string - - description: Property name to return from account-specific properties. + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query - name: properties + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include required: false type: string produces: @@ -9123,7 +13232,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/AccountInfo' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -9132,46 +13241,62 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get account info. + '404': + description: An account or application with the given ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get policy groups of an application. tags: - - Account - profile - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups/add: + post: consumes: - application/json - description: 'Update the account. + description: 'Add application to groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/add + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"phone_number": "12345678"}'' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: updateMyAccount + operationId: addAccountApplicationToGroups parameters: - - description: Details of the account to update. + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true + type: string + - description: The ID of the application to add to the group. + in: path + name: application_id + required: true + type: string + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/AccountUpdateReq' + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': + '204': description: Successful operation. - schema: - $ref: '#/definitions/AccountInfo' '400': - description: Error in input data format. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9182,43 +13307,66 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates attributes of the account. + '404': + description: An account, a group or application with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: The application is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add application to a list of groups. tags: - - Account - profile - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/me/notifications: - get: - description: Retrieve notifications for an account. - operationId: getNofificationEntries + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups/remove: + post: + consumes: + - application/json + description: 'Remove application from groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: removeAccountApplicationFromGroups parameters: - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false + - description: The ID of the application to remove from the group. + in: path + name: application_id + required: true type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': + '204': description: Successful operation. - schema: - $ref: '#/definitions/NotificationEntryList' '400': - description: Error in input data, or missing or invalid parameters. + description: Error in input data, for example, invalid group ID. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9226,90 +13374,173 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or application with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get notification events for an account. + summary: Remove application from groups. tags: - - Account - email notification logs - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/me/notifications/{notification_id}: - get: - description: An endpoint for retrieving notification event details. - operationId: getNofificationEntry + - Tenant accounts - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors: + delete: + description: 'Delete account branding colors for all themes. + + Note: This endpoint is restricted to administrators. + + + **Example usage:** + + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountColors parameters: - - description: The ID of the notification entry to be retrieved. + - description: The ID of the account. in: path - name: notification_id + name: account_id required: true type: string produces: - application/json responses: - '200': - description: successful operation + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. schema: - $ref: '#/definitions/NotificationEntry' - '400': - description: Error in input data, missing or invalid parameters. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account or branding colors not found. schema: $ref: '#/definitions/ErrorResponse' + summary: Delete all colors. + tags: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/dark: + delete: + description: 'Delete account dark theme branding colors. + + Note: This endpoint is restricted to administrators. + + + **Example usage:** + + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountDarkColors + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + produces: + - application/json + responses: + '204': + description: Colors have been deleted successfully. '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: No entry found for the given ID. + description: Account or branding colors not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get notification event details. + summary: Delete colors in the dark theme. tags: - - Account Admin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve detailed information about an account. + description: 'Retrieve dark theme branding colors for an account. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountInfo + operationId: getAccountDarkColors parameters: - - description: The ID of the account to fetch. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts, history.' - in: query - name: include - required: false - type: string - - description: Property name to return from account-specific properties. - in: query - name: properties - required: false + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingColorList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get dark theme branding colors. + tags: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: "Update an array of dark theme branding colors.\nNote: This\ + \ endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X\ + \ PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ + \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"#f3f93e\" }]'\n```" + operationId: bulkSetAccountDarkColors + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true type: string + - description: List of branding colors. + in: body + name: body + required: true + schema: + items: + $ref: '#/definitions/BrandingColorUpdate' + type: array produces: - application/json responses: - '200': - description: Successful operation. + '204': + description: Colors have been set successfully. + '400': + description: Error in input data format. schema: - $ref: '#/definitions/AccountInfo' + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -9319,57 +13550,48 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account with the given ID not found. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get account info. + summary: Updates an array of dark theme branding colors. tags: - - Tenant accounts - accounts - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update an account. + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/dark/{reference}: + delete: + description: 'Resets the branding color to its dark theme default. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} + \ - -d ''{"phone_number": "12345678"}'' + -H ''Authorization: Bearer '' ```' - operationId: updateAccount + operationId: resetAccountDarkColor parameters: - - description: The ID of the account to update. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: Details of the account to update. - in: body - name: body + - description: The name of the branding color. + enum: *id001 + in: path + name: reference required: true - schema: - $ref: '#/definitions/AccountUpdateRootReq' + type: string produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/AccountInfo' - '400': - description: Error in input data format. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -9379,70 +13601,41 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account with the given ID not found. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Update attributes of an existing account. + summary: Reset branding color to default. tags: - - Tenant accounts - accounts - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve API keys in an array, optionally filtered by the owner. + description: 'Retrieve the requested dark theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountApiKeys + operationId: getAccountDarkColor parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string - - description: API key filter. Do not include the private portion of the API - key (the last 32 characters). - in: query - name: key__eq - required: false - type: string - - description: Owner name filter. - in: query - name: owner__eq - required: false + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true type: string produces: - application/json @@ -9450,7 +13643,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/BrandingColor' '401': description: Authentication failure. schema: @@ -9460,61 +13653,63 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the given ID does not exist. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all API keys. + summary: Get dark theme branding color. tags: - - Tenant accounts - API keys - x-filter: - key: - - eq - owner: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: consumes: - application/json - description: 'Create a new API key. There is no default value for the owner - ID, and it must be from the same account where the new API key is created. + description: 'Update a dark theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"name": "MyKey1"}'' + -d ''{ "color": "#f3f93e" }'' ```' - operationId: createAccountApiKey + operationId: setAccountDarkColor parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: Details of the API key to create. + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true + type: string + - description: The branding color. in: body name: body required: true schema: - $ref: '#/definitions/ApiKeyInfoReq' + $ref: '#/definitions/BrandingColor' produces: - application/json responses: - '201': - description: New entity created. + '200': + description: Color has been set successfully. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/BrandingColor' '400': - description: Error in input data, for example, missing display name. + description: Error in input data format. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9526,45 +13721,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the given ID does not exist. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new API key. + summary: Updates a dark theme branding color. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/light: delete: - description: 'Delete an API key. - - - **Example:** + description: 'Delete account light theme branding colors. - ``` + Note: This endpoint is restricted to administrators. - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} - \ - -H ''Authorization: Bearer '' + **Example usage:** - ```' - operationId: deleteAccountApiKey + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountLightColors parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to delete. - in: path - name: apikey_id - required: true - type: string produces: - application/json responses: '204': - description: Deleted successfully. + description: Colors have been deleted successfully. '401': description: Authentication failure. schema: @@ -9574,35 +13760,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Account or branding colors not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete the API key. + summary: Delete colors in the light theme. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: "Retrieve API key details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}\ - \ \\\n -H 'Authorization: Bearer '\n```" - operationId: getAccountApiKey + description: 'Retrieve light theme branding colors for an account. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountLightColors parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to retrieve. - in: path - name: apikey_id - required: true - type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/BrandingColorList' '401': description: Authentication failure. schema: @@ -9612,58 +13806,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + summary: Get light theme branding colors. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: - description: 'Update API key details. - - - **Example:** - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "TestApiKey25"}'' - - ```' - operationId: updateAccountApiKey + consumes: + - application/json + description: "Update an array of light theme branding colors.\nNote:\ + \ This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl\ + \ -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ + \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"purple\" }]'\n```" + operationId: bulkSetAccountLightColors parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to update. - in: path - name: apikey_id - required: true - type: string - - description: New API key attributes to be stored. + - description: List of branding colors. in: body name: body required: true schema: - $ref: '#/definitions/ApiKeyUpdateReq' + items: + $ref: '#/definitions/BrandingColorUpdate' + type: array produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' + '204': + description: Colors have been set successfully. '400': - description: Error in input data, for example, missing display name. + description: Error in input data format. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9675,66 +13854,48 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account ID or API key with the specified ID does not exist. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Update API key details. + summary: Updates an array of light theme branding colors. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}/groups: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/light/{reference}: delete: - consumes: - - application/json - deprecated: true - description: 'Remove API key from groups. + description: 'Resets the branding color to its light theme default. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -H ''Authorization: Bearer '' ```' - operationId: removeAccountApiKeyFromGroups + operationId: resetAccountLightColor parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to remove from the group. + - description: The name of the branding color. + enum: *id001 in: path - name: apikey_id + name: reference required: true type: string - - description: A list of IDs of the groups to update. - in: body - name: body - required: true - schema: - items: - type: string - type: array produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -9744,67 +13905,39 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Reset branding color to default. tags: - - Tenant accounts - API keys - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve groups associated with the API key. + description: 'Retrieve the requested light theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfAccountApikey + operationId: getAccountLightColor parameters: - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key. + - description: The name of the branding color. + enum: *id001 in: path - name: apikey_id + name: reference required: true type: string produces: @@ -9813,7 +13946,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/BrandingColor' '401': description: Authentication failure. schema: @@ -9823,63 +13956,63 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups associated with the API key. + summary: Get light theme branding color. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: consumes: - application/json - deprecated: true - description: 'Add API key to groups. + description: 'Update a light theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "color": "purple" }'' ```' - operationId: addAccountApiKeyToGroups + operationId: setAccountLightColor parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to add to the group. + - description: The name of the branding color. + enum: *id001 in: path - name: apikey_id + name: reference required: true type: string - - description: A list of IDs of groups to update. + - description: The branding color. in: body name: body required: true schema: - items: - type: string - type: array + $ref: '#/definitions/BrandingColor' produces: - application/json responses: '200': - description: Successful operation. + description: Color set successfully. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/BrandingColor' '400': - description: Error in input data. + description: Error in input data format. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9891,72 +14024,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the group already. + description: Color or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Updates light theme branding color. tags: - - Tenant accounts - API keys - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add: - post: - consumes: - - application/json - description: 'Add an API key to groups. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/add - \ + - Tenant user interface configuration - colors + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images: + delete: + description: 'Delete account branding images for all themes. - -H ''Authorization: Bearer '' \ + Note: This endpoint is restricted to administrators. - -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + **Example usage:** - ```' - operationId: addAccountApiKeyToListedGroups + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountImages parameters: - - description: The ID of the Account. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to add to the group. - in: path - name: apikey_id - required: true - type: string - - description: A list of IDs of groups to update. - in: body - name: body - required: true - schema: - $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Images have been deleted successfully. '401': description: Authentication failure. schema: @@ -9966,67 +14063,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the group already. + description: Account or branding images not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Delete all images. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove: - post: - consumes: - - application/json - description: 'Remove an API key from groups. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove - \ + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/dark: + delete: + description: 'Delete account dark theme branding images. - -H ''Authorization: Bearer '' \ + Note: This endpoint is restricted to administrators. - -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + **Example usage:** - ```' - operationId: removeAccountApiKeyFromListedGroups - parameters: - - description: The ID of the account. - in: path - name: account_id - required: true - type: string - - description: The ID of the API key to remove from the group. + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountDarkImages + parameters: + - description: The ID of the account. in: path - name: apikey_id + name: account_id required: true type: string - - description: A list of IDs of the groups to update. - in: body - name: body - required: true - schema: - $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Images have been deleted successfully. '401': description: Authentication failure. schema: @@ -10036,57 +14102,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Account or branding images not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Delete images in the dark theme. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret: - post: - description: 'Reset the secret key of the API key. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + description: 'Retrieve the metadata of all dark theme branding images. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: resetAccountApiKeySecret + operationId: getAllAccountDarkImageData parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the API key to reset. - in: path - name: apikey_id - required: true - type: string - - description: New API key attributes to be stored. - in: body - name: body - required: false - schema: - $ref: '#/definitions/ApiKeyUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data format. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/BrandingImageList' '401': description: Authentication failure. schema: @@ -10096,34 +14148,50 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset the secret key. + summary: Get metadata of all dark theme images. tags: - - Tenant accounts - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors: - delete: - description: 'Delete account branding colors for all themes. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/dark/{reference}: + get: + description: 'Retrieve metadata of one account dark theme branding image. + Note: This endpoint is restricted to administrators. - **Example usage:** - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountColors + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountDarkImageData parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference + required: true + type: string produces: - application/json responses: - '204': - description: Colors have been deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingImage' '401': description: Authentication failure. schema: @@ -10133,34 +14201,48 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or branding colors not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete all colors. + summary: Get metadata of a dark theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/dark: - delete: - description: 'Delete account dark theme branding colors. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/dark/{reference}/clear: + post: + description: 'Revert an account branding image to dark theme default. + Note: This endpoint is restricted to administrators. - **Example usage:** - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountDarkColors + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: clearAccountDarkImage parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference + required: true + type: string produces: - application/json responses: '204': - description: Colors have been deleted successfully. + description: Image reverted successfully. '401': description: Authentication failure. schema: @@ -10170,41 +14252,73 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or branding colors not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete colors in the dark theme. + summary: Revert an image to dark theme default. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve dark theme branding colors for an account. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/dark/{reference}/upload: + post: + consumes: + - image/png + - image/jpeg + description: 'Upload a new account dark theme branding image in PNG or JPEG + format. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' + + -H ''content-type: image/png'' --data-binary ''@myimage.png'' ```' - operationId: getAccountDarkColors + operationId: uploadAccountDarkImage parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference + required: true + type: string + - description: The image in PNG or JPEG format. + in: body + name: body + required: true + schema: + $ref: '#/definitions/Image' produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: Image uploaded successfully. + headers: + Content-Location: + description: Location of the image metadata. + type: string + Location: + description: Location of the image binary. + type: string schema: - $ref: '#/definitions/BrandingColorList' + $ref: '#/definitions/BrandingImage' + '400': + description: Error in input data format, for example, image is too large. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -10214,42 +14328,55 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get dark theme branding colors. + summary: Upload a dark theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart: + post: consumes: - - application/json - description: "Update an array of dark theme branding colors of a tenant account.\n\ - \n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark\ - \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ - \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"#f3f93e\" }]'\n```" - operationId: bulkSetAccountDarkColors + - multipart/form-data + description: 'Upload a new account dark theme branding image as form data in + PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' + operationId: uploadAccountDarkImageMultipart parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: List of branding colors. - in: body - name: body + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference required: true - schema: - items: - $ref: '#/definitions/BrandingColor' - type: array + type: string + - description: The image in PNG or JPEG format as multipart form data. + in: formData + name: image + required: true + type: file produces: - application/json responses: - '204': - description: Colors have been set successfully. + '201': + description: Image uploaded successfully. + headers: + Content-Location: + description: Location of the image metadata. + type: string + Location: + description: Location of the image binary. + type: string + schema: + $ref: '#/definitions/BrandingImage' '400': - description: Error in input data format. + description: Error in input data format, for example, image is too large. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10261,47 +14388,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: Unknown image reference. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates an array of dark theme branding colors. + summary: Upload a dark theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/dark/{reference}: + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/light: delete: - description: 'Resets the branding color of a tenant account to its dark theme - default. - - - **Example:** + description: 'Delete account light theme branding images. - ``` + Note: This endpoint is restricted to administrators. - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} - \ - -H ''Authorization: Bearer '' + **Example usage:** - ```' - operationId: resetAccountDarkColor + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountLightImages parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 - in: path - name: reference - required: true - type: string produces: - application/json responses: '204': - description: Deleted successfully. + description: Images have been deleted successfully. '401': description: Authentication failure. schema: @@ -10311,47 +14427,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Account or branding images not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset branding color to default. + summary: Delete images in the light theme. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve the requested dark theme branding color. + description: 'Retrieve the metadata of all light theme branding images. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountDarkColor + operationId: getAllAccountLightImageData parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 - in: path - name: reference - required: true - type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/BrandingImageList' '401': description: Authentication failure. schema: @@ -10361,63 +14473,50 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get dark theme branding color. + summary: Get metadata of all light theme images. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update a dark theme branding color of a tenant account. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/light/{reference}: + get: + description: 'Retrieve metadata for one account light theme branding image. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "color": "#f3f93e" }'' + -H ''Authorization: Bearer '' ```' - operationId: setAccountDarkColor + operationId: getAccountLightImageData parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 + - description: Name of the branding images (icon or picture). + enum: *id026 in: path name: reference required: true type: string - - description: The branding color. - in: body - name: body - required: true - schema: - $ref: '#/definitions/BrandingColor' produces: - application/json responses: '200': - description: Color has been set successfully. - schema: - $ref: '#/definitions/BrandingColor' - '400': - description: Error in input data format. + description: Successful operation. schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/BrandingImage' '401': description: Authentication failure. schema: @@ -10427,34 +14526,46 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates a dark theme branding color. + summary: Get metadata of a light theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/light: - delete: - description: 'Delete account light theme branding colors. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/light/{reference}/clear: + post: + description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. - **Example usage:** - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountLightColors + **Example:** + + ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: clearAccountLightImage parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference + required: true + type: string produces: - application/json responses: '204': - description: Colors have been deleted successfully. + description: Image reverted successfully. '401': description: Authentication failure. schema: @@ -10464,86 +14575,71 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or branding colors not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete colors in the light theme. + summary: Revert an image to light theme default. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve light theme branding colors for an account. + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/light/{reference}/upload: + post: + consumes: + - image/png + - image/jpeg + description: 'Upload a new account light theme branding image in PNG or JPEG + format. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: image/png'' --data-binary ''@myimage.png'' ```' - operationId: getAccountLightColors + operationId: uploadAccountLightImage parameters: - description: The ID of the account. in: path name: account_id required: true type: string - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/BrandingColorList' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: Account not found. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get light theme branding colors. - tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: "Update an array of light theme branding colors of a tenant account.\n\ - \n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light\ - \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ - \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"purple\" }]'\n```" - operationId: bulkSetAccountLightColors - parameters: - - description: The ID of the account. + - description: Name of the branding images (icon or picture). + enum: *id026 in: path - name: account_id + name: reference required: true type: string - - description: List of branding colors. + - description: The image in PNG or JPEG format. in: body name: body required: true schema: - items: - $ref: '#/definitions/BrandingColor' - type: array + $ref: '#/definitions/Image' produces: - application/json responses: - '204': - description: Colors have been set successfully. + '201': + description: Image uploaded successfully. + headers: + Content-Location: + description: Location of image metadata. + type: string + Location: + description: Location of the image binary. + type: string + schema: + $ref: '#/definitions/BrandingImage' '400': - description: Error in input data format. + description: Error in input data format, for example, image is too large. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10555,47 +14651,57 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: Unknown image reference, or account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates an array of light theme branding colors. + summary: Upload a light theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/light/{reference}: - delete: - description: 'Resets the branding color of a tenant account to its light theme - default. - - - **Example:** - - ``` - - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} - \ - - -H ''Authorization: Bearer '' + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart: + post: + consumes: + - multipart/form-data + description: 'Upload a new account branding image as form data in PNG or JPEG + format. - ```' - operationId: resetAccountLightColor + Note: This endpoint is restricted to administrators.' + operationId: uploadAccountLightImageMultipart parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 + - description: Name of the branding images (icon or picture). + enum: *id026 in: path name: reference required: true type: string + - description: The image in PNG or JPEG format as multipart form data. + in: formData + name: image + required: true + type: file produces: - application/json responses: - '204': - description: Deleted successfully. + '201': + description: Image uploaded successfully. + headers: + Content-Location: + description: Location of the image metadata. + type: string + Location: + description: Location of the image binary. + type: string + schema: + $ref: '#/definitions/BrandingImage' + '400': + description: Error in input data format, for example, image is too large. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -10605,38 +14711,51 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Unknown image reference. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset branding color to default. + summary: Upload a light theme image. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant user interface configuration - images + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/identity-providers: get: - description: 'Retrieve the requested light theme branding color. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} - - -H ''Authorization: Bearer '' + consumes: + - application/json + description: 'Retrieve an array of identity providers. - ```' - operationId: getAccountLightColor + Note: This endpoint is restricted to administrators.' + operationId: getAllAccountIdentityProviders parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 - in: path - name: reference - required: true + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false type: string produces: - application/json @@ -10644,7 +14763,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/IdentityProviderList' '401': description: Authentication failure. schema: @@ -10654,61 +14773,56 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get light theme branding color. + summary: Get all identity providers. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: consumes: - application/json - description: 'Update a light theme branding color of a tenant account. - - - **Example:** - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "color": "purple" }'' + description: 'Create a new identity provider. - ```' - operationId: setAccountLightColor + Note: This endpoint is restricted to administrators.' + operationId: createAccountIdentityProvider parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id020 - in: path - name: reference - required: true - type: string - - description: The branding color. + - allowEmptyValue: true + description: 'Indicates that the OpenID Connect endpoints and keys should + be set using the OpenID Connect Discovery mechanism. The following parameters + are set automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint + * revocation_endpoint * jwks_uri * keys' + in: query + name: discovery + type: boolean + - description: Details of the identity provider to create. in: body name: body required: true schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/IdentityProviderCreationReq' produces: - application/json responses: - '200': - description: Color set successfully. + '201': + description: New entity created. + headers: + Content-Location: + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string + Location: + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/IdentityProviderInfo' '400': - description: Error in input data format. + description: Error in input data, for example, too long name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10720,115 +14834,74 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates light theme branding color. + summary: Create a new identity provider. tags: - - Tenant user interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images: + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}: delete: - description: 'Delete account branding images for all themes. - - - **Example usage:** + description: 'Delete an identity provider by ID. - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountImages + Note: This endpoint is restricted to administrators.' + operationId: deleteAccountIdentityProvider parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - produces: - - application/json - responses: - '204': - description: Images have been deleted successfully. - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: Account or branding images not found. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Delete all images. - tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark: - delete: - description: 'Delete account dark theme branding images. - - - **Example usage:** - - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountDarkImages - parameters: - - description: The ID of the account. + - description: The ID of the identity provider to delete. in: path - name: account_id + name: identity_provider_id required: true type: string produces: - application/json responses: '204': - description: Images have been deleted successfully. + description: Deleted successfully. '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, or identity provider is in use. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or branding images not found. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete images in the dark theme. + summary: Delete an identity provider by ID. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve the metadata of all dark theme branding images. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark - \ - - -H ''Authorization: Bearer '' + description: 'Retrieve an identity provider. - ```' - operationId: getAllAccountDarkImageData + Note: This endpoint is restricted to administrators.' + operationId: getAccountIdentityProvider parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string + - description: The ID of the identity provider to retrieve. + in: path + name: identity_provider_id + required: true + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingImageList' + $ref: '#/definitions/IdentityProviderInfo' '401': description: Authentication failure. schema: @@ -10838,48 +14911,56 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of all dark theme images. + summary: Get an identity provider. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}: - get: - description: 'Retrieve metadata of one account dark theme branding image. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} - \ - - -H ''Authorization: Bearer '' + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update an existing identity provider. - ```' - operationId: getAccountDarkImageData + Note: This endpoint is restricted to administrators.' + operationId: updateAccountIdentityProvider parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the identity provider to update. in: path - name: reference + name: identity_provider_id required: true type: string + - allowEmptyValue: true + description: 'Indicates that the OpenID Connect endpoints and keys should + be set using the OpenID Connect Discovery mechanism. The following parameters + are set automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint + * revocation_endpoint * jwks_uri * keys' + in: query + name: discovery + type: boolean + - description: Details of the identity provider to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/IdentityProviderUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/IdentityProviderInfo' + '400': + description: Error in input data, for example, missing name. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -10889,46 +14970,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of a dark theme image. + summary: Update an existing identity provider. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/clear: + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate: post: - description: 'Revert an account branding image to dark theme default. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear - \ - - -H ''Authorization: Bearer '' + consumes: + - application/json + description: 'Delete a service provider certificate. - ```' - operationId: clearAccountDarkImage + Note: This endpoint is restricted to administrators.' + operationId: deleteAccountSpCertificate parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the identity provider whose certificate should be deleted. in: path - name: reference + name: identity_provider_id required: true type: string produces: - application/json responses: - '204': - description: Image reverted successfully. + '200': + description: Successful operation. + headers: + Content-Location: + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string + schema: + $ref: '#/definitions/IdentityProviderInfo' '401': description: Authentication failure. schema: @@ -10938,69 +15016,52 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Revert an image to dark theme default. + summary: Delete the service provider certificate. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/upload: - post: - consumes: - - image/png - - image/jpeg - description: 'Upload a new account dark theme branding image in PNG or JPEG - format. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload - \ - - -H ''Authorization: Bearer '' - - -H ''content-type: image/png'' --data-binary ''@myimage.png'' + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate: + post: + consumes: + - application/json + description: 'Generate a new service provider certificate. - ```' - operationId: uploadAccountDarkImage + Note: This endpoint is restricted to administrators.' + operationId: generateAccountSpCertificate parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the identity provider for which to generate a certificate. in: path - name: reference + name: identity_provider_id required: true type: string - - description: The image in PNG or JPEG format. + - description: Details of the service provider certificate to be generated. in: body name: body required: true schema: - $ref: '#/definitions/Image' + $ref: '#/definitions/CertificateGenerationReq' produces: - application/json responses: - '201': - description: Image uploaded successfully. + '200': + description: Successful operation. headers: Content-Location: - description: Location of the image metadata. - type: string - Location: - description: Location of the image binary. + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} type: string schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/IdentityProviderInfo' '400': - description: Error in input data format, for example, image is too large. + description: Error in input data, for example, invalid certificate validity + value. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11012,53 +15073,46 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a dark theme image. + summary: Generate a new service provider certificate. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart: + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks: post: consumes: - - multipart/form-data - description: Upload a new account dark theme branding image as form data in - PNG or JPEG format. - operationId: uploadAccountDarkImageMultipart + - application/json + description: 'Refresh an OIDC IdP''s signing keys. + + Note: This endpoint is restricted to administrators.' + operationId: refreshAccountJwks parameters: - - description: The ID of the account. + - description: The ID of the account to be managed. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the identity provider for which to refresh the signing + keys. in: path - name: reference + name: identity_provider_id required: true type: string - - description: The image in PNG or JPEG format as multipart form data. - in: formData - name: image - required: true - type: file produces: - application/json responses: - '201': - description: Image uploaded successfully. + '200': + description: Successful operation. headers: Content-Location: - description: Location of the image metadata. - type: string - Location: - description: Location of the image binary. + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} type: string schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/IdentityProviderInfo' '400': - description: Error in input data format, for example, image is too large. + description: Not an OIDC IdP or JWKS URI is unspecified. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11070,34 +15124,38 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a dark theme image. + summary: Refresh the OIDC signing keys. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light: - delete: - description: 'Delete account light theme branding images. - - - **Example usage:** + - Tenant accounts - identity providers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/limitations: + get: + description: 'Retrieve an array of entitlement limitations. - `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light - -H ''Authorization: Bearer API_KEY''`' - operationId: deleteAllAccountLightImages + Note: This endpoint is restricted to administrators.' + operationId: aggregatorGetAccountLimitations parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: Filter for finding account limitations by inheritance. True returns + also inherited limitations. False returns only non-inherited ones. + in: query + name: inherited__eq + required: false + type: string produces: - application/json responses: - '204': - description: Images have been deleted successfully. + '200': + description: successful operation + schema: + $ref: '#/definitions/AccountLimitationList' '401': description: Authentication failure. schema: @@ -11107,41 +15165,40 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or branding images not found. + description: An account with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete images in the light theme. + summary: Get entitlement limitations. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - entitlement limitations + x-filter: + inherited: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/limitations/{limitation_id}: get: - description: 'Retrieve the metadata of all light theme branding images. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light - \ + description: 'Retrieve an entitlement limitation. - -H ''Authorization: Bearer '' - - ```' - operationId: getAllAccountLightImageData + Note: This endpoint is restricted to administrators.' + operationId: aggregatorGetAccountLimitation parameters: - description: The ID of the account. in: path name: account_id required: true type: string + - description: The ID of the limitation to be fetched. + in: path + name: limitation_id + required: true + type: string produces: - application/json responses: '200': - description: Successful operation. + description: successful operation schema: - $ref: '#/definitions/BrandingImageList' + $ref: '#/definitions/AccountLimitation' '401': description: Authentication failure. schema: @@ -11151,95 +15208,176 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: Limitation or account with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of all light theme images. + summary: Get an entitlement limitation. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light/{reference}: + - Tenant accounts - entitlement limitations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/notifications: get: - description: 'Retrieve metadata for one account light theme branding image. - - - **Example:** + description: 'Retrieve an array of email notification logs. - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} - \ - - -H ''Authorization: Bearer '' + Note: This endpoint is restricted to administrators.' + operationId: getAccountNofificationEntries + parameters: + - description: Account ID. + in: path + name: account_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/NotificationEntryList' + '400': + description: Error in input data, or missing or invalid parameters. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account with the given ID not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get email notifications. + tags: + - Tenant accounts - email notification logs + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/notifications/{notification_id}: + get: + description: 'Retrieve an email notifications log entry. - ```' - operationId: getAccountLightImageData + Note: This endpoint is restricted to administrators.' + operationId: getAccountNofificationEntry parameters: - - description: The ID of the account. + - description: The ID of the account for which this notification should be retrieved. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the notification entry to be retrieved. in: path - name: reference + name: notification_id required: true type: string produces: - application/json responses: '200': - description: Successful operation. + description: successful operation schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/NotificationEntry' + '400': + description: Error in input data, missing or invalid parameters. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: No entry found for the given ID. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of a light theme image. + summary: Get an email notification. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light/{reference}/clear: - post: - description: 'Revert an account branding image to light theme default. + - Tenant accounts - email notification logs + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups: + get: + description: 'Retrieve an array of policy groups. + + Note: This endpoint is restricted to administrators. **Example:** - ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: clearAccountLightImage + operationId: getAllAccountGroups parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 - in: path - name: reference - required: true + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Filter for group name. + in: query + name: name__eq + required: false type: string produces: - application/json responses: - '204': - description: Image reverted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -11249,69 +15387,60 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Revert an image to light theme default. + summary: Get policy groups. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light/{reference}/upload: + - Tenant accounts - policy groups + x-filter: + name: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - - image/png - - image/jpeg - description: 'Upload a new account light theme branding image in PNG or JPEG - format. + - application/json + description: 'Create a new group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/upload + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ - -H ''content-type: image/png'' --data-binary ''@myimage.png'' + -H ''content-type: application/json'' \ + + -d ''{"name": "MyGroup1"}'' ```' - operationId: uploadAccountLightImage + operationId: createAccountGroup parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 - in: path - name: reference - required: true - type: string - - description: The image in PNG or JPEG format. + - description: Details of the group to create. in: body name: body required: true schema: - $ref: '#/definitions/Image' + $ref: '#/definitions/GroupCreationInfo' produces: - application/json responses: '201': - description: Image uploaded successfully. - headers: - Content-Location: - description: Location of image metadata. - type: string - Location: - description: Location of the image binary. - type: string + description: New entity created. schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format, for example, image is too large. + description: Error in input data, for example, invalid group name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11323,107 +15452,94 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a light theme image. + '409': + description: A group with that name already exists. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new group. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart: - post: - consumes: - - multipart/form-data - description: Upload a new account branding image as form data in PNG or JPEG - format. - operationId: uploadAccountLightImageMultipart + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}: + delete: + description: 'Delete a group. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteAccountGroup parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id021 + - description: The ID of the group to delete. in: path - name: reference + name: group_id required: true type: string - - description: The image in PNG or JPEG format as multipart form data. - in: formData - name: image - required: true - type: file produces: - application/json responses: - '201': - description: Image uploaded successfully. - headers: - Content-Location: - description: Location of the image metadata. - type: string - Location: - description: Location of the image binary. - type: string - schema: - $ref: '#/definitions/BrandingImage' - '400': - description: Error in input data format, for example, image is too large. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, or Administrators group cannot be removed. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a light theme image. + summary: Delete a group. tags: - - Tenant user interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers: + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - consumes: - - application/json - description: Retrieve identity providers in an array. - operationId: getAllAccountIdentityProviders + description: 'Retrieve policy group details. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountGroupSummary parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false + - description: The ID of the group to retrieve. + in: path + name: group_id + required: true type: string produces: - application/json @@ -11431,7 +15547,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderList' + $ref: '#/definitions/GroupSummary' '401': description: Authentication failure. schema: @@ -11441,54 +15557,63 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all identity providers. + summary: Get policy group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: Create a new identity provider. - operationId: createAccountIdentityProvider + description: 'Add users and API keys to groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: addSubjectsToAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - allowEmptyValue: true - description: 'Indicates that the OpenID Connect endpoints and keys should - be set using the OpenID Connect Discovery mechanism. The following parameters - are set automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint - * revocation_endpoint * jwks_uri * keys' - in: query - name: discovery - type: boolean - - description: Details of the identity provider to create. + - description: The ID of the group to update. + in: path + name: group_id + required: true + type: string + - description: A list of users and API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/IdentityProviderCreationReq' + $ref: '#/definitions/SubjectList' produces: - application/json responses: - '201': - description: New entity created. - headers: - Content-Location: - description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} - type: string - Location: - description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} - type: string + '200': + description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, too long name. + description: Error in input data, for example, the user or API key does + not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11500,70 +15625,138 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new identity provider. + '409': + description: The user of this API key is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add members to a group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}: - delete: - description: Delete an identity provider by ID. - operationId: deleteAccountIdentityProvider + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update a group name. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestGroup2"}'' + + ```' + operationId: updateAccountGroupName parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the identity provider to delete. + - description: The ID of the group to update. in: path - name: identity_provider_id + name: group_id required: true type: string + - description: Details of the group to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupUpdateInfo' produces: - application/json responses: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the group name is too long. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, or identity provider is in use. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete an identity provider by ID. + summary: Update the group name. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: Manage identity providers of a tenant account. - operationId: getAccountIdentityProvider + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys: + delete: + consumes: + - application/json + deprecated: true + description: 'Remove API keys from groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: removeApiKeysFromAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the identity provider to retrieve. + - description: The ID of the group to remove API keys from. in: path - name: identity_provider_id + name: group_id required: true type: string + - description: A list of API keys to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the array of API keys is + missing. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -11573,54 +15766,79 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Retrieve identity provider by ID. + summary: Remove API keys from a group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: Update an existing identity provider. - operationId: updateAccountIdentityProvider + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + deprecated: true + description: 'Retrieve an array of API keys associated with a policy group. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getApiKeysOfAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the identity provider to update. + - description: The ID of the group to retrieve API keys for. in: path - name: identity_provider_id + name: group_id required: true type: string - - allowEmptyValue: true - description: 'Indicates that the OpenID Connect endpoints and keys should - be set using the OpenID Connect Discovery mechanism. The following parameters - are set automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint - * revocation_endpoint * jwks_uri * keys' + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query - name: discovery - type: boolean - - description: Details of the identity provider to update. - in: body - name: body - required: true - schema: - $ref: '#/definitions/IdentityProviderUpdateReq' + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' - '400': - description: Error in input data, for example, missing name. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/ApiKeyInfoRespList' '401': description: Authentication failure. schema: @@ -11630,41 +15848,64 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update an existing identity provider. + summary: Get API keys in a group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate: + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: - consumes: - - application/json - description: Delete a service provider certificate. - operationId: deleteAccountSpCertificate + deprecated: true + description: 'Add API keys to account groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: addApiKeysToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the identity provider whose certificate should be deleted. + - description: The ID of the group to retrieve API keys for. in: path - name: identity_provider_id + name: group_id required: true type: string + - description: A list of API keys to add to the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. - headers: - Content-Location: - description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} - type: string schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -11674,50 +15915,71 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete the service provider certificate. + '409': + description: The API Key is a member of the group or account already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add API keys to Account group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate: + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add: post: - consumes: - - application/json - description: Generate a new service provider certificate. - operationId: generateAccountSpCertificate + deprecated: true + description: 'Add API keys to account groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: addListedApiKeysToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the identity provider for which to generate a certificate. + - description: The ID of the group to remove API keys from. in: path - name: identity_provider_id + name: group_id required: true type: string - - description: Details of the service provider certificate to be generated. + - description: A list of API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/CertificateGenerationReq' + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. - headers: - Content-Location: - description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} - type: string schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, invalid certificate validity - value. + description: Successful operation. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11729,44 +15991,74 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Generate a new service provider certificate. + '409': + description: The API key is a member of the account group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add API keys to account group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks: + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove: post: consumes: - application/json - description: Refreshes an OIDC IdP's signing keys. - operationId: refreshAccountJwks + deprecated: true + description: 'Remove API keys from groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: removeListedApiKeysFromAccountGroup parameters: - - description: The ID of the account to be managed. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the identity provider for which to refresh the signing - keys. + - description: The ID of the group to remove API keys from. in: path - name: identity_provider_id + name: group_id required: true type: string + - description: A list of API keys to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. - headers: - Content-Location: - description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} - type: string schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' '400': - description: Not an OIDC IdP or JWKS URI is unspecified. + description: Error in input data, for example, the array of API keys is + missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11778,36 +16070,77 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Refreshes the OIDC signing keys. + summary: Remove API keys from a group. tags: - - Tenant accounts - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/limitations: + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/applications: get: - description: An endpoint for retrieving all limitations of an account. - operationId: aggregatorGetAccountLimitations + description: 'Retrieve an array of applications associated with a policy group. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getApplicationsOfAccountGroup parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: Filter for finding account limitations by inheritance. True returns - also inherited limitations. False returns only non-inherited ones. + - description: The ID of the group to retrieve applications for. + in: path + name: group_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query - name: inherited__eq + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include required: false type: string produces: - application/json responses: '200': - description: successful operation + description: Successful operation. schema: - $ref: '#/definitions/AccountLimitationList' + $ref: '#/definitions/ApplicationList' '401': description: Authentication failure. schema: @@ -11817,38 +16150,61 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account with the given ID not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all limitations of an account. + summary: Get applications in a group. tags: - - Tenant accounts - limitations - x-filter: - inherited: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/limitations/{limitation_id}: - get: - description: An endpoint for retrieving a limitation of an account. - operationId: aggregatorGetAccountLimitation + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/applications/add: + post: + description: 'Add applications to account groups. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: addListedApplicationsToAccountGroup parameters: - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the limitation to be fetched. + - description: The ID of the group to add applications to. in: path - name: limitation_id + name: group_id required: true type: string + - description: A list of applications to add to the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': - description: successful operation + description: Successful operation. schema: - $ref: '#/definitions/AccountLimitation' + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -11858,51 +16214,66 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Limitation or account with the given ID not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a limitation of an account. + '409': + description: The application is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add applications to account group. tags: - - Tenant accounts - limitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/notifications: - get: - description: Retrieve notifications. - operationId: getAccountNofificationEntries + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove: + post: + consumes: + - application/json + description: 'Remove applications from groups. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: removeListedApplicationsFromAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false + - description: The ID of the group to remove applications from. + in: path + name: group_id + required: true type: string + - description: A list of applications to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/NotificationEntryList' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, or missing or invalid parameters. + description: Error in input data, for example, the array of applications + is missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11910,41 +16281,55 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account with the given ID not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the notification events of an account. + summary: Remove applications from a group. tags: - - Tenant accounts - email notification logs - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/notifications/{notification_id}: - get: - description: An endpoint for retrieving notification event details of an account. - operationId: getAccountNofificationEntry + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/users: + delete: + consumes: + - application/json + deprecated: true + description: "Remove users from groups.\nNote: This endpoint is restricted\ + \ to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users\ + \ \\\n-H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ + \ \\\n-d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"\ + ]}'\n```" + operationId: removeUsersFromAccountGroup parameters: - - description: The ID of the account for which this notification should be retrieved. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the notification entry to be retrieved. + - description: The ID of the group to remove users from. in: path - name: notification_id + name: group_id required: true type: string + - description: A list of users to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': - description: successful operation + description: Successful operation. schema: - $ref: '#/definitions/NotificationEntry' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, missing or invalid parameters. + description: Error in input data, for example, the last user to remove from + Administrators group. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11952,37 +16337,48 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: No entry found for the given ID. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a notification event of an account. + summary: Remove users from a group. tags: - - Aggregator Account Admin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups: + - Tenant accounts - policy groups + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve all group information. + description: 'Retrieve an array of users associated with a policy group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountGroups + operationId: getUsersOfAccountGroup parameters: - description: Account ID. in: path - name: account_id + name: account_id + required: true + type: string + - description: The ID of the group to retrieve users for. + in: path + name: group_id required: true type: string - default: 50 @@ -11992,14 +16388,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -12010,9 +16406,20 @@ paths: name: include required: false type: string - - description: Filter for group name. + - description: An optional filter to retrieve users by status. in: query - name: name__eq + name: status__eq + required: false + type: string + - description: An optional filter to retrieve users with a specified set of + statuses. + in: query + name: status__in + required: false + type: string + - description: An optional filter to exclude users with a specified set of statuses. + in: query + name: status__nin required: false type: string produces: @@ -12021,7 +16428,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/UserInfoRespList' '401': description: Authentication failure. schema: @@ -12031,58 +16438,62 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the specified ID does not exist. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all group information. + summary: Get users in a policy group. tags: - Tenant accounts - policy groups x-filter: - name: + status: - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - in + - nin + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: - consumes: - - application/json - description: 'Create a new group. + deprecated: true + description: 'Add users to account group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "MyGroup1"}'' + -H ''Authorization: Bearer '' ```' - operationId: createAccountGroup + operationId: addUsersToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: Details of the group to create. + - description: The ID of the group to add users to. + in: path + name: group_id + required: true + type: string + - description: A list of user IDs to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/GroupCreationInfo' + $ref: '#/definitions/SubjectList' produces: - application/json responses: - '201': - description: New entity created. + '200': + description: Successful operation. schema: $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, invalid group name. + description: Successful operation. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -12094,162 +16505,354 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the specified ID does not exist. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' '409': - description: A group with that name already exists. + description: The user is a member of the account group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new group. + summary: Add users to account group. tags: - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}: - delete: - description: 'Delete a group. + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/users/add: + post: + description: 'Add users to account group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteAccountGroup + operationId: addListedUsersToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the group to delete. + - description: The ID of the group to retrieve users for. in: path name: group_id required: true type: string + - description: A list of users to add to the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, or Administrators group cannot be removed. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a group. + '409': + description: The user is a member of the account group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add users to account group. + tags: + - Tenant accounts - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/policy-groups/{group_id}/users/remove: + post: + consumes: + - application/json + description: "Remove users from groups.\nNote: This endpoint is restricted\ + \ to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove\ + \ \\\n-H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ + \ \\\n-d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"\ + ]}'\n```" + operationId: removeListedUsersFromAccountGroup + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The ID of the group to remove users from. + in: path + name: group_id + required: true + type: string + - description: A list of users to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the last user to remove from + Administrators group. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An account or group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove users from a group. tags: - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/trusted-certificates: get: - description: 'Retrieve general information about the group. + description: 'Retrieve an array of trusted certificates. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountGroupSummary + operationId: getAllAccountCertificates parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve. - in: path - name: group_id - required: true + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false type: string + - description: Filter for certificate name. + in: query + name: name__eq + required: false + type: string + - description: Filter for service. + in: query + name: service__eq + required: false + type: string + - description: Filter for expire. + format: int32 + in: query + name: expire__eq + required: false + type: integer + - description: Filter for developer certificates. + format: int32 + in: query + name: device_execution_mode__eq + required: false + type: integer + - description: Filter for not developer certificates. + format: int32 + in: query + name: device_execution_mode__neq + required: false + type: integer + - description: Owner name filter. + in: query + name: owner__eq + required: false + type: string + - description: Enrollment mode filter. + in: query + name: enrollment_mode__eq + required: false + type: boolean + - description: Filter for certificate status. + in: query + name: status__eq + required: false + type: string + - description: 'Filter for issuer. Finds all matches where the filter value + is a case-insensitive substring of the result. Example: issuer__like=cn=iss + matches CN=issuer.' + in: query + name: issuer__like + required: false + type: string + - description: 'Filter for subject. Finds all matches where the filter value + is a case-insensitive substring of the result. Example: subject__like=cn=su + matches CN=subject.' + in: query + name: subject__like + required: false + type: string + - description: Filter for certificate fingerprint. + in: query + name: certificate_fingerprint__eq + required: false + type: string + - description: Filter for finding certificates by validity. True returns certificates + which are not yet expired. False returns certificates which have expired. + in: query + name: valid__eq + required: false + type: boolean produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummary' + $ref: '#/definitions/TrustedCertificateRespList' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get group information. + summary: Get trusted certificates. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant security and identity - certificates + x-filter: + certificate_fingerprint: + - eq + device_execution_mode: + - eq + - neq + enrollment_mode: + - eq + expire: + - eq + issuer: + - like + name: + - eq + owner: + - eq + service: + - eq + status: + - eq + subject: + - like + valid: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: 'Add users and API keys to groups. + description: 'Upload new trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -d {"name": "myCert1", "description": "very important cert", "certificate": + "certificate_data", "service": "lwm2m"} ```' - operationId: addSubjectsToAccountGroup + operationId: addAccountCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to update. - in: path - name: group_id - required: true - type: string - - description: A list of users and API keys to add to the group. + - description: A trusted certificate object with attributes. Signature is optional. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + $ref: '#/definitions/TrustedCertificateReq' produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: New entity created. schema: - $ref: '#/definitions/GroupSummary' + $ref: '#/definitions/TrustedCertificateResp' '400': - description: Error in input data, for example, the user or API key does - not exist. + description: Invalid certificate data, certificate validation failed, certificate + already expired or certificate uses unsupported, or weak cipher. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -12257,277 +16860,230 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The user of this API key is a member of the group already. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add members to a group. + summary: Upload new trusted certificate. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update a group name. + - Tenant security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/trusted-certificates/{cert_id}: + delete: + description: 'Delete a trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "TestGroup2"}'' + -H ''Authorization: Bearer '' ```' - operationId: updateAccountGroupName + operationId: deleteAccountCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to update. + - description: The ID of the trusted certificate to delete. in: path - name: group_id + name: cert_id required: true type: string - - description: Details of the group to create. - in: body - name: body - required: true - schema: - $ref: '#/definitions/GroupUpdateInfo' produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/GroupSummary' - '400': - description: Error in input data, for example, the group name is too long. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: A group with that ID does not exist. + description: An account or certificate with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Update the group name. + summary: Delete a trusted certificate by ID. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys: - delete: - consumes: - - application/json - deprecated: true - description: 'Remove API keys from groups. + - Tenant security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + description: 'Retrieve a trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -H ''Authorization: Bearer '' ```' - operationId: removeApiKeysFromAccountGroup + operationId: getAccountCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to remove API keys from. + - description: The ID of the trusted certificate to retrieve. in: path - name: group_id + name: cert_id required: true type: string - - description: A list of API keys to remove from the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummary' - '400': - description: Error in input data, for example, the array of API keys is - missing. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/TrustedCertificateResp' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account or certificate with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API keys from a group. + summary: Get a trusted certificate. tags: - - Tenant accounts - policy groups - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'List the API keys of the group with details. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys - \ - - -H ''Authorization: Bearer '' - - ```' - operationId: getApiKeysOfAccountGroup + - Tenant security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + consumes: + - application/json + description: "Update a trusted certificate.\nNote: This endpoint is restricted\ + \ to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id}\ + \ \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ + \ \\\n -d {\"description\": \"very important cert\"}\n ```" + operationId: updateAccountCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve API keys for. + - description: The ID of the trusted certificate to update. in: path - name: group_id + name: cert_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string + - description: A trusted certificate object with attributes. + in: body + name: body + required: true + schema: + $ref: '#/definitions/TrustedCertificateUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/TrustedCertificateResp' + '400': + description: Invalid certificate data, certificate validation failed, certificate + already expired or certificate uses unsupported, or weak cipher. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account or certificate with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API keys of a group. + summary: Update trusted certificate. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - deprecated: true - description: 'Add API keys to account groups. + - Tenant security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/user-invitations: + get: + description: 'Retrieve an array of active user invitations. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: addApiKeysToAccountGroup + operationId: getAllAccountInvitations parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve API keys for. - in: path - name: group_id - required: true + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: Filter to retrieve user invitations by a specified login profile. + in: query + name: login_profiles__eq + required: false type: string - - description: A list of API keys to add to the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' - '400': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/UserInvitationRespList' '401': description: Authentication failure. schema: @@ -12537,66 +17093,62 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API Key is a member of the group or account already. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API keys to Account group. + summary: Get user invitations. tags: - - Tenant accounts - policy groups - x-deprecation: - comment: This endpoint is deprecated. use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add: + - Tenant accounts - user invitations + x-filter: + login_profiles: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: - description: 'Add API keys to account groups. + consumes: + - application/json + description: 'Invite a new or existing user. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d {"email": "myemail@company.com"} ```' - operationId: addListedApiKeysToAccountGroup + operationId: createAccountInvitation parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve API keys for. - in: path - name: group_id - required: true - type: string - - description: A list of API keys to add to the group. + - description: A user invitation object with attributes. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + $ref: '#/definitions/UserInvitationReq' produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: New entity created. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/UserInvitationResp' '400': - description: Successful operation. + description: Error in input data, for example, invalid email address. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -12605,69 +17157,44 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the account group already. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Add API keys to account group. + summary: Create a user invitation. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove: - post: - consumes: - - application/json - description: 'Remove API keys from groups. + - Tenant accounts - user invitations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/user-invitations/{invitation_id}: + delete: + description: 'Delete an active user invitation sent to a new or existing user. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -H ''Authorization: Bearer '' ```' - operationId: removeListedApiKeysFromAccountGroup + operationId: deleteAccountInvitation parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to remove API keys from. + - description: The ID of the invitation to delete. in: path - name: group_id + name: invitation_id required: true type: string - - description: A list of API keys to remove from the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/GroupSummary' - '400': - description: Error in input data, for example, the array of API keys is - missing. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -12677,53 +17204,49 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account or invitation with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API keys from a group. + summary: Delete a user invitation. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/users: - delete: - consumes: - - application/json - deprecated: true - description: "Remove users from groups.\n\n**Example:**\n```\ncurl -X DELETE\ - \ https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users\ - \ \\\n-H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ - \ \\\n-d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"\ - ]}'\n```" - operationId: removeUsersFromAccountGroup + - Tenant accounts - user invitations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + description: 'Retrieve details of an active user invitation sent for a new or + existing user. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountInvitation parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to remove users from. + - description: The ID of the invitation to retrieve. in: path - name: group_id + name: invitation_id required: true type: string - - description: A list of users to remove from the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummary' - '400': - description: Error in input data, for example, the last user to remove from - Administrators group. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/UserInvitationResp' '401': description: Authentication failure. schema: @@ -12733,44 +17256,37 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account or invitation with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove users from a group. + summary: Details of a user invitation. tags: - - Tenant accounts - policy groups - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/remove/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - user invitations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users: get: - description: 'List a group''s users, with details. + description: 'Retrieve an array of users. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getUsersOfAccountGroup + operationId: getAllAccountUsers parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve users for. - in: path - name: group_id - required: true - type: string - default: 50 description: The number of results to return (2-1000). Default 50. format: int32 @@ -12778,14 +17294,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -12796,94 +17312,39 @@ paths: name: include required: false type: string - - description: An optional filter to retrieve users by status. - in: query - name: status__eq - required: false - type: string - - description: An optional filter to retrieve users with a specified set of - statuses. + - description: Filter for email address. in: query - name: status__in + name: email__eq required: false type: string - - description: An optional filter to exclude users with a specified set of statuses. + - description: Filter for status. in: query - name: status__nin + name: status__eq required: false type: string - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInfoRespList' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get users of a group. - tags: - - Tenant accounts - policy groups - x-filter: - status: - - eq - - in - - nin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - deprecated: true - description: 'Add users to account group. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users - \ - - -H ''Authorization: Bearer '' - - ```' - operationId: addUsersToAccountGroup - parameters: - - description: The ID of the account. - in: path - name: account_id - required: true + - description: An optional filter to retrieve users with a specified set of + statuses. + in: query + name: status__in + required: false type: string - - description: The ID of the group to retrieve API keys for. - in: path - name: group_id - required: true + - description: An optional filter to exclude users with a specified set of statuses. + in: query + name: status__nin + required: false + type: string + - description: An optional filter to retrieve users with a specified login profile. + in: query + name: login_profiles__eq + required: false type: string - - description: A list of API keys to add to the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' - '400': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/UserInfoRespList' '401': description: Authentication failure. schema: @@ -12893,66 +17354,75 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The user is a member of the account group already. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add users to account group. + summary: Get users. tags: - - Tenant accounts - policy groups - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/users/add: + - Tenant accounts - users + x-filter: + email: + - eq + login_profiles: + - eq + status: + - eq + - in + - nin + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: - description: 'Add users to account group. + consumes: + - application/json + description: 'Create or invite a new user to the account. Only email address + is used; other attributes are set in the second step. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d {"email": "myemail@company.com"} ```' - operationId: addListedUsersToAccountGroup + operationId: createAccountUser parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve API keys for. - in: path - name: group_id - required: true - type: string - - description: A list of API keys to add to the group. + - description: A user object with attributes. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + $ref: '#/definitions/UserInfoReq' + - default: create + description: Create or invite user. + in: query + name: action + required: false + type: string produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: New entity created. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/UserInfoResp' '400': - description: Successful operation. + description: Error in input data, for example, an invalid email address. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -12962,53 +17432,53 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' '409': - description: The user is a member of the account group already. + description: A user with the given username or email already exists. schema: $ref: '#/definitions/ErrorResponse' - summary: Add users to account group. + summary: Create a new user. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/users/remove: - post: - consumes: - - application/json - description: "Remove users from groups.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users\ - \ \\\n-H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ - \ \\\n-d '{\"users\": [\"0162056a9a1586f30242590700000000\",\"0117056a9a1586f30242590700000000\"\ - ]}'\n```" - operationId: removeListedUsersFromAccountGroup + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}: + delete: + description: 'Delete a user. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteAccountUser parameters: - - description: The ID of the account. + - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to remove users from. + - description: The ID of the user to delete. in: path - name: group_id + name: user_id required: true type: string - - description: A list of users to remove from the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/GroupSummary' + '204': + description: Deleted successfully. '400': - description: Error in input data, for example, the last user to remove from - Administrators group. + description: Bad request, for example, trying to delete an active user. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13020,212 +17490,113 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove users from a group. + summary: Delete a user. tags: - - Tenant accounts - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/trusted-certificates: + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve trusted certificates in an array. + description: 'Retrieve user details. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountCertificates + operationId: getAccountUser parameters: - description: Account ID. in: path name: account_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string - - description: Filter for certificate name. - in: query - name: name__eq - required: false - type: string - - description: Filter for service. - in: query - name: service__eq - required: false - type: string - - description: Filter for expire. - format: int32 - in: query - name: expire__eq - required: false - type: integer - - description: Filter for developer certificates. - format: int32 - in: query - name: device_execution_mode__eq - required: false - type: integer - - description: Filter for not developer certificates. - format: int32 - in: query - name: device_execution_mode__neq - required: false - type: integer - - description: Owner name filter. - in: query - name: owner__eq - required: false - type: string - - description: Enrollment mode filter. - in: query - name: enrollment_mode__eq - required: false - type: boolean - - description: Filter for certificate status. - in: query - name: status__eq - required: false - type: string - - description: 'Filter for issuer. Finds all matches where the filter value - is a case-insensitive substring of the result. Example: issuer__like=cn=iss - matches CN=issuer.' - in: query - name: issuer__like - required: false - type: string - - description: 'Filter for subject. Finds all matches where the filter value - is a case-insensitive substring of the result. Example: subject__like=cn=su - matches CN=subject.' - in: query - name: subject__like - required: false + - description: The ID of the user to retrieve. + in: path + name: user_id + required: true type: string - - description: Filter for finding certificates by validity. True returns certificates - which are not yet expired. False returns certificates which have expired. - in: query - name: valid__eq - required: false - type: boolean produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/TrustedCertificateRespList' + $ref: '#/definitions/UserInfoResp' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the given ID does not exist. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all trusted certificates. + summary: Details of the user. tags: - - Tenant device security - certificates - x-filter: - device_execution_mode: - - eq - - neq - enrollment_mode: - - eq - expire: - - eq - issuer: - - like - name: - - eq - owner: - - eq - service: - - eq - status: - - eq - subject: - - like - valid: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: consumes: - application/json - description: 'Upload new trusted certificates. + description: 'Update user details. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d {"name": "myCert1", "description": "very important cert", "certificate": - "certificate_data", "service": "lwm2m"} + -d ''{"username": "myusername"}'' ```' - operationId: addAccountCertificate + operationId: updateAccountUser parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: A trusted certificate object with attributes. Signature is optional. + - description: The ID of the user to update. + in: path + name: user_id + required: true + type: string + - description: A user object with attributes. in: body name: body required: true schema: - $ref: '#/definitions/TrustedCertificateReq' + $ref: '#/definitions/UserUpdateReq' produces: - application/json responses: - '201': - description: New entity created. + '200': + description: Successful operation. schema: - $ref: '#/definitions/TrustedCertificateResp' + $ref: '#/definitions/UserInfoResp' '400': - description: Invalid certificate data, certificate validation failed, certificate - already expired or certificate uses unsupported, or weak cipher. + description: Error in input data, for example, an invalid email address. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13233,89 +17604,148 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the given ID does not exist. + description: An account or user with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload new trusted certificate. + '409': + description: A user with the given username or email already exists. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update user details. tags: - - Tenant device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/trusted-certificates/{cert_id}: + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}/groups: delete: - description: 'Delete the trusted certificate. + consumes: + - application/json + deprecated: true + description: 'Remove user from groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: deleteAccountCertificate + operationId: removeAccountUserFromGroups parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the trusted certificate to delete. + - description: The ID of the user to remove from the group. in: path - name: cert_id + name: user_id required: true type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + items: + type: string + type: array produces: - application/json responses: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/UserInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or certificate with the given ID not found. + description: An account, user, or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete trusted certificate by ID. + summary: Remove user from groups. tags: - - Tenant device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - users + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve an array of policy groups associated with a user. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountCertificate + operationId: getGroupsOfAccountUser parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the trusted certificate to retrieve. + - description: The ID of the user. in: path - name: cert_id + name: user_id required: true type: string produces: @@ -13324,58 +17754,75 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/TrustedCertificateResp' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or certificate with the given ID not found. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get trusted certificate by ID. + summary: Get policy groups for a user. tags: - - Tenant device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: consumes: - application/json - description: "Update existing trusted certificates.\n\n**Example:**\n```\ncurl\ - \ -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id}\ - \ \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ - \ \\\n -d {\"description\": \"very important cert\"}\n ```" - operationId: updateAccountCertificate + deprecated: true + description: 'Add user to groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: addAccountUserToGroups parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the trusted certificate to update. + - description: The ID of the user to add to the group. in: path - name: cert_id + name: user_id required: true type: string - - description: A trusted certificate object with attributes. + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/TrustedCertificateUpdateReq' + items: + type: string + type: array produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/TrustedCertificateResp' + $ref: '#/definitions/UserInfoResp' '400': - description: Invalid certificate data, certificate validation failed, certificate - already expired or certificate uses unsupported, or weak cipher. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13383,71 +17830,78 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or certificate with the given ID does not exist. + description: An account, user, or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update trusted certificate. + '409': + description: The user is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add user to a list of groups. tags: - - Tenant device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/user-invitations: - get: - description: 'Retrieve details of all active user invitations sent for new or - existing users. + - Tenant accounts - users + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}/groups/add: + post: + consumes: + - application/json + description: 'Add a user to groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: getAllAccountInvitations + operationId: addAccountUserToListedGroups parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: Filter to retrieve user invitations by a specified login profile. - in: query - name: login_profiles__eq - required: false + - description: The ID of the user to add to the group. + in: path + name: user_id + required: true type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupIdList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInvitationRespList' + $ref: '#/definitions/UserInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -13457,58 +17911,67 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the specified ID does not exist. + description: An account, user, or group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: The user is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the details of all user invitations. + summary: Add user to a list of groups. tags: - - Tenant accounts - user invitations - x-filter: - login_profiles: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}/groups/remove: post: consumes: - application/json - description: 'Invite a new or existing user. + description: 'Remove a user from groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d {"email": "myemail@company.com"} + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: createAccountInvitation + operationId: removeAccountUserFromListedGroups parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: A user invitation object with attributes. + - description: The ID of the user to remove from the group. + in: path + name: user_id + required: true + type: string + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/UserInvitationReq' + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '201': - description: New entity created. + '200': + description: Successful operation. schema: - $ref: '#/definitions/UserInvitationResp' + $ref: '#/definitions/UserInfoResp' '400': - description: Error in input data, for example, invalid email address. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13519,42 +17982,50 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a user invitation. + '404': + description: An account, user, or group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove user from groups. tags: - - Tenant accounts - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/user-invitations/{invitation_id}: - delete: - description: 'Delete an active user invitation sent to a new or existing user. + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}/remove: + post: + description: 'Remove user from the account. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/remove \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteAccountInvitation + operationId: removeAccountUserFromAccount parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The ID of the invitation to delete. + - description: The ID of the user to remove from the account. in: path - name: invitation_id + name: user_id required: true type: string - produces: - - application/json responses: '204': - description: Deleted successfully. + description: Successful operation. + '400': + description: Error removing user from the account. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -13564,47 +18035,47 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or invitation with the specified ID does not exist. + description: An account or user with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a user invitation. + summary: Remove user from the account. tags: - - Tenant accounts - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve details of an active user invitation sent for a new or - existing user. + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/accounts/{account_id}/users/{user_id}/validate-email: + post: + description: 'Validate user email. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountInvitation + operationId: validateAccountUserEmail parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the invitation to retrieve. + - description: The ID of the user. in: path - name: invitation_id + name: user_id required: true type: string produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInvitationResp' + '204': + description: Email validation successfully requested. '401': description: Authentication failure. schema: @@ -13614,35 +18085,30 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or invitation with the specified ID does not exist. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Details of a user invitation. + summary: Validate the user email. tags: - - Tenant accounts - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users: + - Tenant accounts - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys: get: - description: 'Retrieve details of all users. + deprecated: true + description: 'Retrieve an array of API keys, optionally filtered by the owner. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountUsers + operationId: getAllApiKeys parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - default: 50 description: The number of results to return (2-1000). Default 50. format: int32 @@ -13650,14 +18116,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -13668,30 +18134,17 @@ paths: name: include required: false type: string - - description: Filter for email address. - in: query - name: email__eq - required: false - type: string - - description: Filter for status. - in: query - name: status__eq - required: false - type: string - - description: An optional filter to retrieve users with a specified set of - statuses. - in: query - name: status__in - required: false - type: string - - description: An optional filter to exclude users with a specified set of statuses. + - description: API key filter. Do not include the private portion of the API + key (the last 32 characters). in: query - name: status__nin + name: key__eq required: false type: string - - description: An optional filter to retrieve users with a specified login profile. + - description: 'Owner name filter. + + Note: This parameter is restricted to administrators.' in: query - name: login_profiles__eq + name: owner__eq required: false type: string produces: @@ -13700,7 +18153,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoRespList' + $ref: '#/definitions/ApiKeyInfoRespList' '401': description: Authentication failure. schema: @@ -13709,128 +18162,56 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account with the given ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get the details of all users. + summary: Get all API keys. tags: - - Tenant accounts - users + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x-filter: - email: - - eq - login_profiles: + key: - eq - status: + owner: - eq - - in - - nin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: 'Create or invite a new user to the account. Only email address - is used; other attributes are set in the second step. + deprecated: true + description: 'Create a new API key. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d {"email": "myemail@company.com"} - - ```' - operationId: createAccountUser - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: A user object with attributes. - in: body - name: body - required: true - schema: - $ref: '#/definitions/UserInfoReq' - - default: create - description: Create or invite user. - in: query - name: action - required: false - type: string - produces: - - application/json - responses: - '201': - description: New entity created. - schema: - $ref: '#/definitions/UserInfoResp' - '400': - description: Error in input data, for example, an invalid email address. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: A user with the given username or email already exists. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Create a new user. - tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}: - delete: - description: 'Delete a user. - - - **Example:** - - ``` + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d ''{"name": + "MyKey1"}'' \ - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} - \ + -H ''Authorization: Bearer '' \ - -H ''Authorization: Bearer '' + -H ''content-type: application/json'' ```' - operationId: deleteAccountUser + operationId: createApiKey parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to delete. - in: path - name: user_id + - description: The details of the API key to create. + in: body + name: body required: true - type: string + schema: + $ref: '#/definitions/ApiKeyInfoReq' produces: - application/json responses: - '204': - description: Deleted successfully. + '201': + description: New entity created. + schema: + $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Bad request, for example, trying to delete an active user. + description: Error in input data, for example, missing API key name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13841,47 +18222,39 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or user with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Delete a user. + summary: Create a new API key. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/me: get: - description: 'Retrieve user details. + deprecated: true + description: 'Retrieve details of current API key. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountUser - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to retrieve. - in: path - name: user_id - required: true - type: string + operationId: getMyApiKey + parameters: [] produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '401': description: Authentication failure. schema: @@ -13890,61 +18263,50 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or user with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Details of the user. + summary: Get current API key. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: - consumes: - - application/json - description: 'Update user details. + deprecated: true + description: 'Update API key details. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} - \ + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"username": "myusername"}'' + -d ''{"name": "TestApiKey25"}'' ```' - operationId: updateAccountUser + operationId: updateMyApiKey parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to update. - in: path - name: user_id - required: true - type: string - - description: A user object with attributes. + - description: New API key attributes to store. in: body name: body required: true schema: - $ref: '#/definitions/UserUpdateReq' + $ref: '#/definitions/ApiKeyUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Error in input data, for example, an invalid email address. + description: Error in input data, for example, invalid API key name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13955,67 +18317,51 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or user with the given ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: A user with the given username or email already exists. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Update user details. + summary: Update API key details. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/groups: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/me/groups: delete: consumes: - application/json deprecated: true - description: 'Remove user from groups. + description: 'Remove API key from groups. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups - \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: removeAccountUserFromGroups + operationId: removeMyApiKeyListedGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to remove from the group. - in: path - name: user_id - required: true - type: string - - description: A list of IDs of the groups to update. + - description: A list of IDs of groups to update. in: body name: body required: true schema: - items: - type: string - type: array + $ref: '#/definitions/GroupIdList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -14028,34 +18374,31 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account, user, or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Remove user from groups. + summary: Remove API key from groups. tags: - - Tenant accounts - users + - Account - API keys x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove/ + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove/ end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve user''s groups. + deprecated: true + description: 'Retrieve an array of policy groups associated with the current + API key. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfAccountUser + operationId: getGroupsOfMyApiKey parameters: - default: 50 description: The number of results to return (2-1000). Default 50. @@ -14064,14 +18407,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -14082,16 +18425,6 @@ paths: name: include required: false type: string - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user. - in: path - name: user_id - required: true - type: string produces: - application/json responses: @@ -14107,47 +18440,37 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or user with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get user's groups. + summary: Get policy groups of the current API key. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json deprecated: true - description: 'Add user to groups. + description: 'Add API key to groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups - \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: addAccountUserToGroups + operationId: addMyApiKeyToGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to add to the group. - in: path - name: user_id - required: true - type: string - description: A list of IDs of the groups to update. in: body name: body @@ -14162,82 +18485,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' - '400': - description: Error in input data. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account, user, or group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The user is a member of the group already. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Add user to a list of groups. - tags: - - Tenant accounts - users - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/groups/add: - post: - consumes: - - application/json - description: 'Add a user to groups. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/add - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' - - ```' - operationId: addAccountUserToListedGroups - parameters: - - description: The ID of the account. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to add to the group. - in: path - name: user_id - required: true - type: string - - description: A list of IDs of the groups to update. - in: body - name: body - required: true - schema: - $ref: '#/definitions/GroupIdList' - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -14247,54 +18495,47 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account, user, or group with that ID does not exist. + description: Forbidden. Adding API key to the 'Administrators' group is + restricted to administrators. schema: $ref: '#/definitions/ErrorResponse' '409': - description: The user is a member of the group already. + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Add user to a list of groups. + summary: Add API key to a list of groups. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/groups/remove: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/me/groups/add: post: consumes: - application/json - description: 'Remove a user from groups. + deprecated: true + description: 'Add API key to groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups/remove + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: removeAccountUserFromListedGroups + operationId: addMyApiKeyToListedGroups parameters: - - description: The ID of the account. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to remove from the group. - in: path - name: user_id - required: true - type: string - description: A list of IDs of the groups to update. in: body name: body @@ -14307,7 +18548,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -14317,124 +18558,64 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Adding API key to the 'Administrators' group is + restricted to administrators. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account, user, or group with that ID does not exist. + '409': + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove user from groups. + summary: Add API key to a list of groups. tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/validate-email: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/me/groups/remove: post: - description: 'Validate user email. + consumes: + - application/json + deprecated: true + description: 'Remove API key from groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \ - -H ''Authorization: Bearer '' - - ```' - operationId: validateAccountUserEmail - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user. - in: path - name: user_id - required: true - type: string - produces: - - application/json - responses: - '204': - description: Email validation successfully requested. - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account or user with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Validate the user email. - tags: - - Tenant accounts - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys: - get: - description: 'Retrieve API keys in an array, optionally filtered by the owner. - - - **Example:** - - ``` + -H ''Authorization: Bearer '' \ - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ + -H ''content-type: application/json'' \ - -H ''Authorization: Bearer '' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: getAllApiKeys + operationId: removeMyApiKeyFromListedGroups parameters: - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string - - description: API key filter. Do not include the private portion of the API - key (the last 32 characters). - in: query - name: key__eq - required: false - type: string - - description: Owner name filter. - in: query - name: owner__eq - required: false - type: string + - description: A list of IDs of groups to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupIdList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -14443,80 +18624,86 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all API keys. + summary: Remove API key from groups. tags: - Account - API keys - x-filter: - key: - - eq - owner: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - consumes: - - application/json - description: 'Create a new API key. + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/{apikey_id}: + delete: + deprecated: true + description: 'Delete the API key. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d ''{"name": - "MyKey1"}'' \ - - -H ''Authorization: Bearer '' \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} + \ - -H ''content-type: application/json'' + -H ''Authorization: Bearer '' ```' - operationId: createApiKey + operationId: deleteApiKey parameters: - - description: The details of the API key to create. - in: body - name: body + - description: The ID of the API key to delete. + in: path + name: apikey_id required: true - schema: - $ref: '#/definitions/ApiKeyInfoReq' + type: string produces: - application/json responses: - '201': - description: New entity created. - schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data, for example, missing display name. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Only the owner of the API key or an administrator + can delete an API key. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new API key. + '404': + description: An API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete API key. tags: - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me: + x-deprecation: + comment: This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve API key details. + deprecated: true + description: 'Retrieve details of an API key. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getMyApiKey - parameters: [] + operationId: getApiKey + parameters: + - description: The ID of the API key to retrieve. + in: path + name: apikey_id + required: true + type: string produces: - application/json responses: @@ -14532,29 +18719,42 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + '404': + description: An API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get API key. tags: - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: + deprecated: true description: 'Update API key details. **Example:** - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''{"name": "TestApiKey25"}'' ```' - operationId: updateMyApiKey + operationId: updateApiKey parameters: + - description: The ID of the API key to update. + in: path + name: apikey_id + required: true + type: string - description: New API key attributes to store. in: body name: body @@ -14569,7 +18769,7 @@ paths: schema: $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Error in input data, for example, missing display name. + description: Error in input data, for example, invalid API key name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -14577,42 +18777,62 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Only the owner of the API key or an administrator + can update an API key. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An API key with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' summary: Update API key details. tags: - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me/groups: + x-deprecation: + comment: This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/{apikey_id}/groups: delete: consumes: - application/json deprecated: true description: 'Remove API key from groups. + Note: This endpoint is restricted to administrators. + **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: removeMyApiKeyListedGroups + operationId: removeApiKeyFromGroups parameters: - - description: A list of IDs of groups to update. + - description: The ID of the API key to remove from the group. + in: path + name: apikey_id + required: true + type: string + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/GroupIdList' + items: + type: string + type: array produces: - application/json responses: @@ -14632,29 +18852,37 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' + '404': + description: An API key with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' summary: Remove API key from groups. tags: - Account - API keys x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove/ + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove/ end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve groups associated with the API key. + deprecated: true + description: 'Retrieve an array of policy groups associated with an API key. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfMyApiKey + operationId: getGroupsOfApikey parameters: - default: 50 description: The number of results to return (2-1000). Default 50. @@ -14663,14 +18891,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -14681,6 +18909,11 @@ paths: name: include required: false type: string + - description: The ID of the API key. + in: path + name: apikey_id + required: true + type: string produces: - application/json responses: @@ -14696,32 +18929,49 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups of the API key. + '404': + description: An API key with the given ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get policy groups of an API key. tags: - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json deprecated: true description: 'Add API key to groups. + Note: This endpoint is restricted to administrators. + **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: addMyApiKeyToGroups + operationId: addApiKeyToGroups parameters: + - description: The ID of the API key to add to the group. + in: path + name: apikey_id + required: true + type: string - description: A list of IDs of the groups to update. in: body name: body @@ -14749,6 +18999,10 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' + '404': + description: A group or API key with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' '409': description: The API key is a member of the group already. schema: @@ -14757,34 +19011,42 @@ paths: tags: - Account - API keys x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add/ end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me/groups/add: + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/{apikey_id}/groups/add: post: consumes: - application/json + deprecated: true description: 'Add API key to groups. + Note: This endpoint is restricted to administrators. + **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/add/ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: addMyApiKeyToListedGroups + operationId: addApiKeyToListedGroups parameters: + - description: The ID of the API key to add to the group. + in: path + name: apikey_id + required: true + type: string - description: A list of IDs of the groups to update. in: body name: body @@ -14810,52 +19072,260 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' + '404': + description: A group or API key with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' '409': description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Add API key to a list of groups. + tags: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/{apikey_id}/groups/remove: + post: + consumes: + - application/json + deprecated: true + description: 'Remove API key from groups. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: removeApiKeyFromListedGroups + parameters: + - description: The ID of the API key to remove from the group. + in: path + name: apikey_id + required: true + type: string + - description: A list of IDs of the groups to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupIdList' + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An API key with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove API key from groups. + tags: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/api-keys/{apikey_id}/reset-secret: + post: + deprecated: true + description: 'Reset the secret key of the API key. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: resetSecret + parameters: + - description: The ID of the API key to reset. + in: path + name: apikey_id + required: true + type: string + - description: New API key attributes to be stored. + in: body + name: body + required: false + schema: + $ref: '#/definitions/ApiKeyUpdateReq' + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data format. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An API key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Reset the secret key. + tags: + - Account - API keys + x-deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications: + get: + description: 'Retrieve an array of applications. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAllApplications + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApplicationList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all applications. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me/groups/remove: + - Account - applications + x-filter: + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: 'Remove API key from groups. + description: 'Create a new application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove - \ - - -H ''Authorization: Bearer '' \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications -d ''{"name": + "MyApplication1"}'' \ - -H ''content-type: application/json'' \ + -H ''Authorization: Bearer '' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -H ''content-type: application/json'' ```' - operationId: removeMyApiKeyFromListedGroups + operationId: createApplication parameters: - - description: A list of IDs of groups to update. + - description: The details of the application to create. in: body name: body required: true schema: - $ref: '#/definitions/GroupIdList' + $ref: '#/definitions/Application' produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: New entity created. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/Application' '400': - description: Error in input data. + description: Error in input data, for example, missing name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -14866,30 +19336,32 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Create a new application. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}: + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}: delete: - description: 'Delete the API key. + description: 'Delete the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteApiKey + operationId: deleteApplication parameters: - - description: The ID of the API key to delete. + - description: The ID of the application to delete. in: path - name: apikey_id + name: application_id required: true type: string produces: @@ -14906,31 +19378,34 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: The API key with the specified ID does not exist. + description: An application with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete API key. + summary: Delete application. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve API key details. + description: 'Retrieve details of an application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getApiKey + operationId: getApplication parameters: - - description: The ID of the API key to retrieve. + - description: The ID of the application to retrieve. in: path - name: apikey_id + name: application_id required: true type: string produces: @@ -14939,7 +19414,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/Application' '401': description: Authentication failure. schema: @@ -14949,41 +19424,44 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: API key with the specified ID does not exist. + description: An application with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + summary: Get application. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: - description: 'Update API key details. + description: 'Update application details. + + Note: This endpoint is restricted to administrators. **Example:** - `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"name": "TestApiKey25"}'' + -d ''{"name": "TestApplication25"}'' ```' - operationId: updateApiKey + operationId: updateApplication parameters: - - description: The ID of the API key to update. + - description: The ID of the application to update. in: path - name: apikey_id + name: application_id required: true type: string - - description: New API key attributes to store. + - description: New applicationattributes to store. in: body name: body required: true schema: - $ref: '#/definitions/ApiKeyUpdateReq' + $ref: '#/definitions/Application' produces: - application/json responses: @@ -14992,7 +19470,7 @@ paths: schema: $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Error in input data, for example, missing display name. + description: Error in input data, for example, invalid display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -15004,59 +19482,135 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: The API key with the specified ID does not exist. + description: An application with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update API key details. + summary: Update applicationdetails. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}/groups: - delete: - consumes: - - application/json - deprecated: true - description: 'Remove API key from groups. + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}/access-keys: + get: + description: 'Retrieve an array of access keys associated with the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' - -H ''content-type: application/json'' \ + ```' + operationId: getAllApplicationAccessKeys + parameters: + - description: The ID of the application. + in: path + name: application_id + required: true + type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Status filter. + in: query + name: status__eq + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/AccessKeyList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all access keys associated with the application. + tags: + - Account - applications + x-filter: + status: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new access key for the application. - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + -d ''{"name": "MyKey1"}'' \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' ```' - operationId: removeApiKeyFromGroups + operationId: createApplicationAccessKey parameters: - - description: The ID of the API key to remove from the group. + - description: The ID of the application. in: path - name: apikey_id + name: application_id required: true type: string - - description: A list of IDs of the groups to update. + - description: The details of the access key to create. in: body name: body required: true schema: - items: - type: string - type: array + $ref: '#/definitions/AccessKey' produces: - application/json responses: - '200': - description: Successful operation. + '201': + description: New entity created. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/AccessKey' '400': - description: Error in input data. + description: Error in input data, for example, missing display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -15068,62 +19622,90 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with that ID does not exist. + description: An application with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Create a new applicationaccess key. tags: - - Account - API keys - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve groups associated with the API key. + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}/access-keys/{access_key_id}: + delete: + description: 'Delete the access key associated with the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfApikey + operationId: deleteApplicationAccessKey parameters: - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false + - description: The ID of the application. + in: path + name: application_id + required: true type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false + - description: The ID of the access key to delete. + in: path + name: access_key_id + required: true type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false + produces: + - application/json + responses: + '204': + description: Deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An application or access key with the specified ID does not + exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete access key associated with the application. + tags: + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + description: 'Retrieve details of an access key associated with the application. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getApplicationAccessKey + parameters: + - description: The ID of the application. + in: path + name: application_id + required: true type: string - - description: The ID of the API key. + - description: The ID of the access key to retrieve. in: path - name: apikey_id + name: access_key_id required: true type: string produces: @@ -15132,7 +19714,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/AccessKey' '401': description: Authentication failure. schema: @@ -15142,58 +19724,59 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with the given ID does not exist. + description: An application or access key with the specified ID does not + exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups of the API key. + summary: Get access key. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - consumes: - - application/json - deprecated: true - description: 'Add API key to groups. + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: + description: 'Update access key details. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{"name": "TestAccessKey"}'' ```' - operationId: addApiKeyToGroups + operationId: updateApplicationAccessKey parameters: - - description: The ID of the API key to add to the group. + - description: The ID of the application. in: path - name: apikey_id + name: application_id required: true type: string - - description: A list of IDs of the groups to update. + - description: The ID of the access key to update. + in: path + name: access_key_id + required: true + type: string + - description: New access key attributes to store. in: body name: body required: true schema: - items: - type: string - type: array + $ref: '#/definitions/AccessKey' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/AccessKey' '400': - description: Error in input data. + description: Error in input data, for example, invalid display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -15204,68 +19787,71 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: A group or API key with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the group already. + '404': + description: An application or access key with the specified ID does not + exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Update access key details. tags: - - Account - API keys - x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}/groups/add: - post: - consumes: - - application/json - description: 'Add API key to groups. + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}/groups: + get: + description: 'Retrieve an array of policy groups associated with an application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/add + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -H ''Authorization: Bearer '' ```' - operationId: addApiKeyToListedGroups + operationId: getGroupsOfApplication parameters: - - description: The ID of the API key to add to the group. + - description: The ID of the application. in: path - name: apikey_id + name: application_id required: true type: string - - description: A list of IDs of the groups to update. - in: body - name: body - required: true - schema: - $ref: '#/definitions/GroupIdList' + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -15275,43 +19861,41 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: A group or API key with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the group already. + description: An application with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Get policy groups of an application. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}/groups/remove: + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}/groups/add: post: consumes: - application/json - description: 'Remove API key from groups. + description: 'Add application to groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups/remove + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/add \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: removeApiKeyFromListedGroups + operationId: addApplicationToGroups parameters: - - description: The ID of the API key to remove from the group. + - description: The ID of the application to add to the group. in: path - name: apikey_id + name: application_id required: true type: string - description: A list of IDs of the groups to update. @@ -15323,10 +19907,8 @@ paths: produces: - application/json responses: - '200': + '204': description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -15340,50 +19922,60 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with that ID does not exist. + description: A group or application with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + '409': + description: The application is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add application to a list of groups. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}/reset-secret: + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/applications/{application_id}/groups/remove: post: - description: 'Reset the secret key of the API key. + consumes: + - application/json + description: 'Remove application from groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/reset-secret + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups/remove \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: resetSecret + operationId: removeApplicationFromGroups parameters: - - description: The ID of the API key to reset. + - description: The ID of the application to remove from the group. in: path - name: apikey_id + name: application_id required: true type: string - - description: New API key attributes to be stored. + - description: A list of IDs of the groups to update. in: body name: body - required: false + required: true schema: - $ref: '#/definitions/ApiKeyUpdateReq' + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': + '204': description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Error in input data format. + description: Error in input data, for example, invalid API key name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -15391,36 +19983,29 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Only the owner of the API key or an administrator + can reset an API key. schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with the specified ID does not exist. + description: An application with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset the secret key. + summary: Remove application from groups. tags: - - Account - API keys - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Account - applications + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/billing-report: get: - description: 'Fetch the billing report generated for the currently authenticated - commercial non-subtenant account. - - Billing reports for subtenant accounts are included in their aggregator''s - billing report response. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07 - \ - - -H ''Authorization: Bearer '' - - ```' + description: "Fetch the billing report generated for the currently authenticated\ + \ commercial account. The billing reports for\ntenant accounts are also included\ + \ in their aggregator's billing report response. The response contains below\ + \ additional counters\nwhen the account's business model is set to `API calls`\ + \ by the account administrator.\n - rest_api_requests_with_user_token\n \ + \ - rest_api_requests_with_api_key_token\n - pelion_to_webapp_notifications\n\ + \ - device_to_pelion_messages\n - pelion_to_device_messages\n\n**Example:**\n\ + ```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07\ + \ \\\n-H 'Authorization: Bearer '\n```" operationId: getBillingReport parameters: - description: Queried year and month of billing report. @@ -15475,14 +20060,14 @@ paths: campaign_name: example-account-campaign-name time: 2016-09-02T00:00.000Z type: reservation - - account_id: example-subtenant-account-1 + - account_id: example-tenant-account-1 amount: -20 - campaign_name: example-subtenant-account-1-campaign-name + campaign_name: example-tenant-account-1-campaign-name time: 2016-09-03T00:00.000Z type: reservation - - account_id: example-subtenant-account-2 + - account_id: example-tenant-account-2 amount: -30 - campaign_name: example-subtenant-account-2-campaign-name + campaign_name: example-tenant-account-2-campaign-name time: 2016-09-04T00:00.000Z type: reservation metadata: @@ -15504,12 +20089,12 @@ paths: address_line1: null address_line2: null city: null - company: example-subtenant-company-1 + company: example-tenant-company-1 contact: null country: null - customer_subtenant_id: example-customer-subtenant-id-1 + customer_subtenant_id: example-customer-tenant-id-1 email: null - id: example-subtenant-account-1 + id: example-tenant-account-1 phone_number: null postal_code: null state: null @@ -15523,19 +20108,19 @@ paths: service_package: quota_usage: - amount: -20 - campaign_name: example-subtenant-account-1-campaign-name + campaign_name: example-tenant-account-1-campaign-name time: 2016-09-03T00:00.000Z type: reservation - account: address_line1: null address_line2: null city: null - company: example-subtenant-company-2 + company: example-tenant-company-2 contact: null country: null - customer_subtenant_id: example-customer-subtenant-id-2 + customer_subtenant_id: example-customer-tenant-id-2 email: null - id: example-subtenant-account-2 + id: example-tenant-account-2 phone_number: null postal_code: null state: null @@ -15549,7 +20134,7 @@ paths: service_package: quota_usage: - amount: -30 - campaign_name: example-subtenant-account-2-campaign-name + campaign_name: example-tenant-account-2-campaign-name time: 2016-09-04T00:00.000Z type: reservation schema: @@ -15580,7 +20165,7 @@ paths: schema: $ref: '#/definitions/UnauthorizedErrorResponse' 403: - description: Access forbidden if account is not commercial or subtenant. + description: Access forbidden if account is not commercial. examples: application/json: code: 403 @@ -15615,16 +20200,18 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get billing report. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + tags: + - Usage - billing reports + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/billing-report-active-devices: get: description: 'Fetch raw billing data for active devices for the currently authenticated - commercial non-subtenant account. + commercial account. - This is supplementary data for the billing report. The raw billing data of - the active devices for subtenant accounts - are included in their aggregator''s raw billing data of the active devices. + This is supplementary data for the billing report. The raw billing data of + the active devices for tenant accounts are included in their aggregator''s + raw billing data of the active devices. The endpoint returns the URL to download the gzipped CSV file. The first line @@ -15639,7 +20226,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-active-devices?month=2018-07 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getBillingReportActiveDevices @@ -15687,7 +20274,7 @@ paths: schema: $ref: '#/definitions/UnauthorizedErrorResponse' 403: - description: Access forbidden if account is not commercial or subtenant. + description: Access forbidden if account is not commercial. examples: application/json: code: 403 @@ -15720,16 +20307,18 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get raw billing data of the active devices for the month. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + tags: + - Usage - billing reports + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/billing-report-firmware-updates: get: description: 'Fetch raw billing data for firmware updates for the currently - authenticated commercial non-subtenant account. + authenticated commercial account. - This is supplementary data for the billing report. The raw billing data of - the firmware updates for subtenant accounts - are included in their aggregator''s raw billing data of the firmware updates. + This is supplementary data for the billing report. The raw billing data of + the firmware updates for tenant accounts are also included in their aggregator''s + raw billing data of the firmware updates. The endpoint returns the URL to download the gzipped CSV file. The first line @@ -15744,28 +20333,224 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-firmware-updates?month=2018-07 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getBillingReportFirmwareUpdates parameters: - description: Queried year and month of billing report. in: query - name: month - pattern: ^\d{4}-\d{2}$ - required: true + name: month + pattern: ^\d{4}-\d{2}$ + required: true + type: string + responses: + 200: + description: The response includes the URL to download raw billing data + of the firmware updates. + examples: + application/json: + filename: example.csv.gz + object: billing-report-firmware-updates + url: https://example.com/example.csv.gz + schema: + $ref: '#/definitions/BillingReportRawDataResponse' + 400: + description: Bad request. + examples: + application/json: + code: 400 + fields: + - message: Parameter missing. + name: month + message: One of the request fields has failed validation. + object: error + request_id: example-request-id + type: validation_error + schema: + $ref: '#/definitions/BadRequestErrorResponse' + 401: + description: Unauthorized access. + examples: + application/json: + code: 401 + message: Access is denied. + object: error + request_id: example-request-id + type: unauthorized + schema: + $ref: '#/definitions/UnauthorizedErrorResponse' + 403: + description: Access forbidden if account is not commercial. + examples: + application/json: + code: 403 + message: Account is not a commercial account. + object: error + request_id: example-request-id + type: forbidden + schema: + $ref: '#/definitions/ForbiddenErrorResponse' + 404: + description: Firmware updates billing data not found. + examples: + application/json: + code: 404 + message: Firmware updates billing data not yet available. + object: error + request_id: example-request-id + type: report_not_found + schema: + $ref: '#/definitions/ReportNotFoundErrorResponse' + 500: + description: Internal server error. + examples: + application/json: + code: 500 + message: Unexpected internal server error. + object: error + request_id: example-request-id + type: internal_error + schema: + $ref: '#/definitions/InternalServerErrorResponse' + summary: Get raw billing data of the firmware updates for the month. + tags: + - Usage - billing reports + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml + /v3/billing-statistics: + get: + description: "Fetch the statistics view of Device Management usage in time series\ + \ for the currently authenticated commercial account.\nThe response contains\ + \ the additional counters below, if the account business model is set to `API\ + \ calls` by the account administrator:\n - device_to_pelion_messages\n -\ + \ pelion_to_device_messages\n - pelion_to_webapp_notifications\n - rest_api_requests_with_api_key_token\n\ + \ - rest_api_requests_with_user_token\n\nThe return data is retrieved during\ + \ a defined time window and grouped by defined interval.\nThe time window\ + \ for data retrieval is defined as a range, that can be either absolute (for\ + \ instance, using timestamps) or relative (referring to the 'period' parameter).\n\ + Range start is inclusive, while range end is exclusive. The specified range\ + \ must be equal to or greater than the specified interval.\n\nReturned data\ + \ does not include any tenant usage.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-statistics?start=2019-11-01T00:00:00.000Z&end=2019-12-01T00:00:00.000Z&interval=1d\ + \ \\\n -H 'Authorization: Bearer '\n```" + operationId: getStatisticsView + parameters: + - description: 'Start time of the statistics view in RFC3339 date-time format, + with millisecond accuracy and UTC time zone. + + The parameter is mandatory if the period is not specified. Do not set the + parameter if you have specified the period. + + Fetch data with timestamp greater than or equal to this value. Sample value: + 2017-02-07T09:20:56.990Z. + + The specified range must be equal to or greater than 5 minutes. Maximum + supported range is 98 days when using timestamps to specify the range.' + format: date-time + in: query + name: start + required: false + type: string + - description: 'End time of the statistics view in RFC3339 date-time format + with millisecond accuracy and UTC time zone. + + The parameter is mandatory if the period is not specified. Do not set the + parameter if you have specified the period. + + Fetch the data with timestamp less than this value. Sample value: 2017-02-07T09:20:56.990Z. + + The specified range must be equal to or greater than 5 minutes. Maximum + supported range is 98 days when using timestamps to specify the range.' + format: date-time + in: query + name: end + required: false + type: string + - description: 'Period. Alternative for specifying the range if not using start + and end parameters. + + The parameter is mandatory if the start and end parameters are not specified. + Do not set the parameter if you have specified the start and end parameters. + + Fetch the data for the period in minutes, hours, days, weeks or months. + + One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. + + The allowed periods (inclusive) are 5m-141120m/1h-2352h/1d-98d/1w-14w/1mo-3mo.' + in: query + name: period + required: false + type: string + - description: 'Group the data by this interval in minutes, hours, days, weeks + or months. + + One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. + + Minimum supported interval is 5 minutes. The specified interval must not + be greater than the specified range.' + in: query + name: interval + required: true + type: string + - default: 50 + description: Maximum number of statistics view records in one paginated response. + format: int32 + in: query + maximum: 1000 + minimum: 2 + name: limit + required: false + type: integer + - description: Results after specified record ID. + in: query + name: after + pattern: '[0-9a-fA-F]{32}' + required: false + type: string + - description: 'Record order. Acceptable values (case insensitive): ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false type: string responses: 200: - description: The response includes the URL to download raw billing data - of the firmware updates. + description: Statistics view of Device Management usage for the currently + authenticated commercial account. examples: application/json: - filename: example.csv.gz - object: billing-report-firmware-updates - url: https://example.com/example.csv.gz + after: null + data: + - active_devices: 10 + firmware_updates: 4286 + id: 00000000000000000000016e7bcf1800 + object: billing-statistics + sda_tokens: 962 + timestamp: '2019-11-18T00:00:00.000Z' + - active_devices: 0 + firmware_updates: 6553 + id: 00000000000000000000016e80f57400 + object: billing-statistics + sda_tokens: 1440 + timestamp: '2019-11-19T00:00:00.000Z' + - active_devices: 0 + firmware_updates: 0 + id: 00000000000000000000016e861bd000 + object: billing-statistics + sda_tokens: 0 + timestamp: '2019-11-20T00:00:00.000Z' + has_more: false + limit: 50 + object: list + order: asc + total_count: 3 schema: - $ref: '#/definitions/BillingReportRawDataResponse' + $ref: '#/definitions/StatisticsViewResponse' 400: description: Bad request. examples: @@ -15773,7 +20558,7 @@ paths: code: 400 fields: - message: Parameter missing. - name: month + name: interval message: One of the request fields has failed validation. object: error request_id: example-request-id @@ -15792,7 +20577,7 @@ paths: schema: $ref: '#/definitions/UnauthorizedErrorResponse' 403: - description: Access forbidden if account is not commercial or subtenant. + description: Forbidden. examples: application/json: code: 403 @@ -15802,17 +20587,6 @@ paths: type: forbidden schema: $ref: '#/definitions/ForbiddenErrorResponse' - 404: - description: Firmware updates billing data not found. - examples: - application/json: - code: 404 - message: Firmware updates billing data not yet available. - object: error - request_id: example-request-id - type: report_not_found - schema: - $ref: '#/definitions/ReportNotFoundErrorResponse' 500: description: Internal server error. examples: @@ -15824,17 +20598,21 @@ paths: type: internal_error schema: $ref: '#/definitions/InternalServerErrorResponse' - summary: Get raw billing data of the firmware updates for the month. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + summary: Get statistics view of Device Management usage. + tags: + - Usage - statistics + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/branding-colors: delete: description: 'Delete account branding colors for all themes. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors -H - ''Authorization: Bearer API_KEY''`' + ''Authorization: Bearer ''`' operationId: deleteAllColors parameters: [] produces: @@ -15857,16 +20635,18 @@ paths: summary: Delete all colors. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-colors/dark: delete: description: 'Delete account dark theme branding colors. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark - -H ''Authorization: Bearer API_KEY''`' + -H ''Authorization: Bearer ''`' operationId: deleteAllDarkColors parameters: [] produces: @@ -15889,7 +20669,7 @@ paths: summary: Delete colors in the dark theme. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the dark theme branding colors. @@ -15900,7 +20680,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getDarkColors @@ -15923,14 +20703,15 @@ paths: summary: Get dark theme branding colors. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json - description: "Update an array of dark theme branding colors.\n\n**Example:**\n\ - ```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark\ - \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ - \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"#f3f93e\" }]'\n```" + description: "Update an array of dark theme branding colors.\nNote: This\ + \ endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X\ + \ PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\\n-H 'Authorization:\ + \ Bearer ' \\\n-H 'content-type: application/json' \\\n'[{ \"\ + reference\": \"primary\",\n \"color\": \"#f3f93e\" }]'\n```" operationId: bulkSetDarkColors parameters: - description: List of branding colors. @@ -15939,7 +20720,7 @@ paths: required: true schema: items: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/BrandingColorUpdate' type: array produces: - application/json @@ -15961,11 +20742,13 @@ paths: summary: Updates an array of dark theme branding colors. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-colors/dark/{reference}: delete: description: 'Resets the branding color to its dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -15974,13 +20757,13 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: resetDarkColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16005,7 +20788,7 @@ paths: summary: Reset branding color to default. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the requested dark theme branding color. @@ -16017,13 +20800,13 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getDarkColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16050,12 +20833,14 @@ paths: summary: Get dark theme branding color. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json description: 'Update a dark theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16064,7 +20849,7 @@ paths: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -16074,7 +20859,7 @@ paths: operationId: setDarkColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16111,16 +20896,18 @@ paths: summary: Updates a dark theme branding color. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-colors/light: delete: description: 'Delete account light theme branding colors. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light - -H ''Authorization: Bearer API_KEY''`' + -H ''Authorization: Bearer ''`' operationId: deleteAllLightColors parameters: [] produces: @@ -16143,7 +20930,7 @@ paths: summary: Delete colors in the light theme. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the light theme branding colors. @@ -16154,7 +20941,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getLightColors @@ -16177,13 +20964,14 @@ paths: summary: Get light theme branding colors. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json - description: "Update an array of light theme branding colors.\n\n**Example:**\n\ - ```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light\ - \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ + description: "Update an array of light theme branding colors.\nNote:\ + \ This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl\ + \ -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\\n\ + -H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\ \ \\\n'[{ \"reference\": \"primary\",\n \"color\": \"purple\" }]'\n```" operationId: bulkSetLightColors parameters: @@ -16193,7 +20981,7 @@ paths: required: true schema: items: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/BrandingColorUpdate' type: array produces: - application/json @@ -16215,11 +21003,13 @@ paths: summary: Updates an array of light theme branding colors. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-colors/light/{reference}: delete: description: 'Resets the branding color to its light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16228,13 +21018,13 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: resetLightColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16259,7 +21049,7 @@ paths: summary: Reset branding color to default. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the requested light theme branding color. @@ -16271,13 +21061,13 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getLightColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16304,12 +21094,14 @@ paths: summary: Get light theme branding color. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json description: 'Update light theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16318,7 +21110,7 @@ paths: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -16328,7 +21120,7 @@ paths: operationId: setLightColor parameters: - description: The name of the branding color. - enum: *id020 + enum: *id001 in: path name: reference required: true @@ -16365,16 +21157,18 @@ paths: summary: Updates light theme branding color. tags: - User interface configuration - colors - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images: delete: description: 'Delete account branding images for all themes. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images -H - ''Authorization: Bearer API_KEY''`' + ''Authorization: Bearer ''`' operationId: deleteAllImages parameters: [] produces: @@ -16397,16 +21191,18 @@ paths: summary: Delete all images. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/dark: delete: description: 'Delete account dark theme branding images. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/dark - -H ''Authorization: Bearer API_KEY''`' + -H ''Authorization: Bearer ''`' operationId: deleteAllDarkImages parameters: [] produces: @@ -16429,7 +21225,7 @@ paths: summary: Delete images in the dark theme. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve metadata for all dark theme branding images. @@ -16438,7 +21234,7 @@ paths: `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllDarkImageData @@ -16461,7 +21257,7 @@ paths: summary: Get metadata of all dark theme images. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/dark/{reference}: get: description: 'Retrieve metadata for one account dark theme branding image. @@ -16474,13 +21270,13 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getDarkImageData parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16507,11 +21303,13 @@ paths: summary: Get metadata of a dark theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/dark/{reference}/clear: post: description: 'Revert an account branding image to dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16520,13 +21318,13 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: clearDarkImage parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16551,7 +21349,7 @@ paths: summary: Revert an image to dark theme default. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/dark/{reference}/upload: post: consumes: @@ -16560,6 +21358,8 @@ paths: description: 'Upload a new account branding image in the dark theme in PNG or JPEG format. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16568,7 +21368,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/upload \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: image/png'' --data-binary ''@myimage.png'' @@ -16576,7 +21376,7 @@ paths: operationId: uploadDarkImage parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16620,17 +21420,19 @@ paths: summary: Upload a dark theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/dark/{reference}/upload-multipart: post: consumes: - multipart/form-data - description: Upload a new account branding image as form data in the dark theme + description: 'Upload a new account branding image as form data in the dark theme in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' operationId: uploadDarkImageMultipart parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16673,16 +21475,18 @@ paths: summary: Upload a dark theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/light: delete: description: 'Delete account light theme branding images. + Note: This endpoint is restricted to administrators. + **Example usage:** `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-images/light - -H ''Authorization: Bearer API_KEY''`' + -H ''Authorization: Bearer ''`' operationId: deleteAllLightImages parameters: [] produces: @@ -16705,7 +21509,7 @@ paths: summary: Delete images in the light theme. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the metadata of all light theme branding images. @@ -16716,7 +21520,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllLightImageData @@ -16739,7 +21543,7 @@ paths: summary: Get metadata of all light theme images. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/light/{reference}: get: description: 'Retrieve metadata for one account light theme branding image. @@ -16752,13 +21556,13 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getLightImageData parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16785,11 +21589,13 @@ paths: summary: Get metadata of a light theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/light/{reference}/clear: post: description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16798,13 +21604,13 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: clearLightImage parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16829,7 +21635,7 @@ paths: summary: Revert an image to light theme default. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/light/{reference}/upload: post: consumes: @@ -16838,6 +21644,8 @@ paths: description: 'Upload a new account light theme branding image in PNG or JPEG format. + Note: This endpoint is restricted to administrators. + **Example:** @@ -16846,7 +21654,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/upload \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: image/png'' --data-binary ''@myimage.png'' @@ -16854,7 +21662,7 @@ paths: operationId: uploadLightImage parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16898,17 +21706,19 @@ paths: summary: Upload a light theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/branding-images/light/{reference}/upload-multipart: post: consumes: - multipart/form-data - description: Upload a new account branding image as form data in the light theme - in PNG or JPEG format. + description: 'Upload a new account branding image as form data in the light + theme in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' operationId: uploadLightImageMultipart parameters: - description: Name of the branding images (icon or picture). - enum: *id021 + enum: *id026 in: path name: reference required: true @@ -16951,7 +21761,7 @@ paths: summary: Upload a light theme image. tags: - User interface configuration - images - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/certificate-enrollments: get: description: 'Get certificate enrollments list, optionally filtered. @@ -16965,7 +21775,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ``` @@ -16975,7 +21785,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getCertificateEnrollments @@ -17118,7 +21928,7 @@ paths: updated_at: - lte - gte - x-origin: /home/circleci/project/certificate-enrollment/public/swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\certificate-enrollment\public\swagger.yaml /v3/certificate-enrollments/{certificate-enrollment-id}: get: description: 'Get a certificate enrollment by ID. @@ -17132,7 +21942,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getCertificateEnrollment @@ -17167,7 +21977,7 @@ paths: summary: Get a certificate enrollment by ID. tags: - Device security - device certificate renewals - x-origin: /home/circleci/project/certificate-enrollment/public/swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\certificate-enrollment\public\swagger.yaml /v3/certificate-issuer-configurations: get: description: 'Get certificate issuer configurations, optionally filtered by @@ -17175,59 +21985,53 @@ paths:
- **Example usage:** - + **Example:** ``` - curl \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ - ``` +
+ ``` - curl \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms - \ - ``` - Note: This endpoint does not implement pagination and therefore, list control - parameters such as `limit` or `after` will be ignored by the system. - - ' + **Note:** This endpoint does not implement pagination, and therefore ignores + list control parameters such as `limit` or `after`.' operationId: getCertificateIssuerConfigs parameters: - - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. + - description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. in: query maximum: 1000 minimum: 2 name: limit type: integer - - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + - description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' in: query name: order type: string - - description: The ID of The item after which to retrieve the next page. + - description: The ID of the item after which to retrieve the next page. in: query name: after type: string - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`' + `total_count`.' in: query name: include type: string @@ -17256,21 +22060,20 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer configurations. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-filter: reference: - eq - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml post: - description: "Configure the certificate issuer to be used when creating the\ - \ device custom certificates.\n
\n**Example usage:**\n\n```\ncurl -X POST\ - \ \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8'\ - \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations\ + description: "Configure the certificate issuer to use when creating device custom\ + \ certificates.\n
\n**Example:**\n\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"reference\": \"customer.dlms\",\n \"certificate_issuer_id\"\ - : \"01621a36719d507b9d48a91b00000000\"\n}'\n```\n" + : \"01621a36719d507b9d48a91b00000000\"\n}'\n```" operationId: createCertificateIssuerConfig parameters: - - description: Certificate issuer configuration request + - description: Certificate issuer configuration request. in: body name: CreateCertificateIssuerConfig required: true @@ -17294,24 +22097,20 @@ paths: schema: $ref: '#/definitions/ErrorObjectResponse' '409': - description: 'A certificate issuer configuration with this reference already + description: A certificate issuer configuration with this reference already exists. - - ' schema: $ref: '#/definitions/ErrorObjectResponse' summary: Create certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/certificate-issuer-configurations/lwm2m: get: - description: 'Provides the configured certificate issuer to be used when creating + description: 'Provides the configured certificate issuer used when creating device - certificates for LwM2M communication.
- - ' + certificates for LwM2M.' operationId: getCertificateIssuerConfig responses: '200': @@ -17332,15 +22131,14 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml put: - description: "Configure the certificate issuer to be used when creating device\ - \ certificates\nfor LwM2M communication.\n
\n**Example usage:**\n\n```\n\ - curl -X PUT \\\n-H 'authorization: ' \\\n-H 'content-type:\ - \ application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations/lwm2m\ + description: "Configure the certificate issuer used when creating device certificates\n\ + for LwM2M.\n
\n**Example:**\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations/lwm2m\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\"\ - \n}'\n```\n" + \n}'\n```" operationId: updateCertificateIssuerConfig parameters: - description: Certificate Issuer Configuration Request @@ -17372,21 +22170,17 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Update certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}: delete: - description: 'Delete the configured certificate issuer configuration. + description: 'Delete certificate issuer configuration. - You can only delete the configurations of custom certificates. - - ' + You can only delete custom certificate configurations.' operationId: deleteCertificateIssuerConfigByID parameters: - - &id022 - description: 'The ID of the certificate issuer configuration. - - ' + - &id027 + description: Certificate issuer ID configuration. in: path name: certificate-issuer-configuration-id required: true @@ -17412,15 +22206,13 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Delete certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml get: - description: 'Provides the configured certificate issuer. - - ' + description: Provides the configured certificate issuer. operationId: getCertificateIssuerConfigByID parameters: - - *id022 + - *id027 responses: '200': description: OK. @@ -17444,21 +22236,19 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml put: - description: 'Update the configured certificate issuer configuration. - - ' + description: Update certificate issuer configuration. operationId: updateCertificateIssuerConfigByID parameters: - - description: Certificate issuer configuration request + - description: Certificate issuer configuration request. in: body name: CertificateIssuerConfigRequest required: true schema: $ref: '#/definitions/CertificateIssuerConfigRequest' - - *id022 + - *id027 responses: '200': description: OK. @@ -17482,36 +22272,31 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Update certificate issuer configuration. tags: - - Certificate Issuers Activation - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuer configurations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/certificate-issuers: get: - description: 'Note: This endpoint does not implement pagination and therefore, - list control parameters such as `limit` or `after` will be ignored by the - system. - - ' + description: '**Note:** This endpoint does not use pagination, and therefore + ignores list control parameters such as `limit` or `after`.' operationId: getCertificateIssuers parameters: - - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. + - description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. in: query maximum: 1000 minimum: 2 name: limit type: integer - - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + - description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' in: query name: order type: string - - description: The ID of The item after which to retrieve the next page. + - description: The ID of the item after which to retrieve the next page. in: query name: after type: string - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`' + `total_count`.' in: query name: include type: string @@ -17530,15 +22315,15 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuers list. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml post: - description: "Create a certificate issuer.\nThe maximum number of issuers is\ - \ limited to 20 per account.\nMultiple certificate issuers of the same issuer\ - \ type can be created, provided they have a different name. This allows verification\ - \ of the certificate issuer configuration before activating it.\n
\n**Example\ - \ usage:**\n\n```\ncurl -X POST \\\n-H 'authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers\ + description: "Create a certificate issuer.\n
\nThe maximum number of issuers\ + \ is limited to 20 per account.\n
\nYou can create multiple certificate\ + \ issuers of the same type, provided they have different names. This allows\ + \ verification of the certificate issuer configuration before activation.\n\ +
\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"issuer_type\": \"GLOBAL_SIGN\",\n \"name\": \"GS Issuer\"\ ,\n \"description\": \"Sample GlobalSign certificate issuer\",\n \"issuer_attributes\"\ : null,\n \"issuer_credentials\": {\n \"api_key\": \"e510e289e6cd8947\"\ @@ -17559,7 +22344,7 @@ paths: nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\\ n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\\ n-----END RSA PRIVATE KEY-----\",\n \"passphrase\": \"helloworld\"\n\ - \ }\n}'\n```\n" + \ }\n}'\n```" operationId: createCertificateIssuer parameters: - description: Certificate issuer request. @@ -17575,9 +22360,7 @@ paths: $ref: '#/definitions/CertificateIssuerInfo' '400': description: 'Validation error: The data used to create the certificate - issuer failed validation. - - ' + issuer failed validation.' schema: $ref: '#/definitions/ErrorObjectResponse' '401': @@ -17589,48 +22372,38 @@ paths: schema: $ref: '#/definitions/ErrorObjectResponse' '409': - description: 'Conflict. A certificate issuer with this name already exists. - - ' + description: Conflict. A certificate issuer with this name already exists. schema: $ref: '#/definitions/ErrorObjectResponse' '424': - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer configured external service. schema: $ref: '#/definitions/ErrorObjectResponse' summary: Create certificate issuer. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/certificate-issuers/{certificate-issuer-id}: delete: description: 'Delete a certificate issuer by ID.
- **Example usage:** - + **Example:** ``` - curl -X DELETE \ - - -H ''authorization: '' \ - - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + \ - ``` + -H ''Authorization: Bearer '' \ - ' + ```' operationId: deleteCertificateIssuer parameters: - - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - An active certificate issuer may not be deleted. + - description: 'Certificate issuer ID. - ' + An active certificate issuer cannot be deleted.' in: path name: certificate-issuer-id required: true @@ -17639,9 +22412,7 @@ paths: '204': description: Certificate issuer deleted. '400': - description: 'Validation error: An active certificate issuer cannot be deleted. - - ' + description: 'Validation error: An active certificate issuer cannot be deleted.' schema: $ref: '#/definitions/ErrorObjectResponse' '401': @@ -17658,16 +22429,12 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Delete certificate issuer. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml get: operationId: getCertificateIssuer parameters: - - description: 'Certificate issuer ID. - - The ID of the certificate issuer. - - ' + - description: Certificate issuer ID. in: path name: certificate-issuer-id required: true @@ -17679,9 +22446,7 @@ paths: $ref: '#/definitions/CertificateIssuerInfo' '400': description: 'Validation error: The data used to get the certificate issuer - failed validation. - - ' + failed validation.' schema: $ref: '#/definitions/ErrorObjectResponse' '401': @@ -17698,19 +22463,17 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer by ID. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml put: - description: "Update a certificate issuer.\n
\n**Example usage:**\n\n```\n\ - curl -X PUT \\\n-H 'authorization: ' \\\n-H 'content-type:\ - \ application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000\ + description: "Update a certificate issuer.\n
\n**Example:**\n\n```\ncurl\ + \ -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"description\": \"Sample GlobalSign certificate issuer - updated.\"\ - ,\n \"name\": \"GlobalSign Issuer\"\n}'\n```\n" + ,\n \"name\": \"GlobalSign Issuer\"\n}'\n```" operationId: updateCertificateIssuer parameters: - - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - ' + - description: Certificate issuer ID. in: path name: certificate-issuer-id required: true @@ -17728,9 +22491,7 @@ paths: $ref: '#/definitions/CertificateIssuerInfo' '400': description: 'Validation error: The data used to update the certificate - issuer failed validation. - - ' + issuer failed validation.' schema: $ref: '#/definitions/ErrorObjectResponse' '401': @@ -17746,28 +22507,22 @@ paths: schema: $ref: '#/definitions/ErrorObjectResponse' '409': - description: 'Conflict. A certificate issuer with this name already exists. - - ' + description: Conflict. A certificate issuer with this name already exists. schema: $ref: '#/definitions/ErrorObjectResponse' '424': - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer-configured external service. schema: $ref: '#/definitions/ErrorObjectResponse' summary: Update certificate issuer. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/certificate-issuers/{certificate-issuer-id}/verify: post: - description: 'A utility API that can be used to validate the user configuration - before activating a certificate issuer. - - Verifies that the certificate issuer is accessible and can be used to generate - certificates by Device Management. + description: 'Validates the certificate issuer by sending a signing request + for a test certificate. This should be done before the configuration is made + active.
@@ -17775,31 +22530,25 @@ paths: The API requests the 3rd party CA to sign a test certificate. - For some 3rd party CAs, this operation may make use of the account quota. + For some 3rd party CAs, this operation may use the account quota.
- **Example usage:** - + **Example:** ``` - curl -X POST \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify - - ``` - - ' + ```' operationId: verifyCertificateIssuer parameters: - - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - ' + - description: Certificate issuer ID. in: path name: certificate-issuer-id required: true @@ -17826,15 +22575,13 @@ paths: schema: $ref: '#/definitions/ErrorObjectResponse' '424': - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer configured external service. schema: $ref: '#/definitions/ErrorObjectResponse' summary: Verify certificate issuer. tags: - - Certificate Issuers - x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml + - Security and identity - certificate issuers + x-origin: C:\Source\mbed\mbed-cloud-api-contract\cloud-vault\public\swagger.yaml /v3/developer-certificates: post: description: 'Create a developer certificate (a certificate that can be flashed @@ -17842,7 +22589,7 @@ paths: **Note:** The number of developer certificates allowed per account is limited. - Please see [Using your own certificate authority](../provisioning-process/using-CA.html). + Please see [Setting up a Certificate Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). **Example:** @@ -17852,7 +22599,7 @@ paths: curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \ - -H "Authorization: Bearer " \ + -H "Authorization: Bearer " \ -H "content-type: application/json" \ @@ -18145,8 +22892,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Create a new developer certificate to connect to the bootstrap server. tags: - - Device security - developer class certificates - x-origin: /home/circleci/project/connector-ca/public/swagger.yaml + - Security and identity - developer class certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-ca\public\swagger.yaml /v3/developer-certificates/{developerCertificateId}: get: description: 'Return an existing developer certificate (a certificate that can @@ -18160,7 +22907,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getDeveloperCertificate @@ -18421,8 +23168,8 @@ paths: summary: Fetch an existing developer certificate to connect to the bootstrap server. tags: - - Device security - developer class certificates - x-origin: /home/circleci/project/connector-ca/public/swagger.yaml + - Security and identity - developer class certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-ca\public\swagger.yaml /v3/device-block-categories/: get: description: 'List all device block categories. A block category is a short @@ -18431,7 +23178,7 @@ paths: **Example:** - Get all defined categories of why device is blocked from the device management + Get all defined device suspension categories: ``` @@ -18444,7 +23191,7 @@ paths: operationId: Block_Categories_list parameters: - description: This endpoint doesn't support paging. Parameter is accepted for - API compatibility. Value is ignored + API compatibility. Value is ignored. in: query maximum: 1000 minimum: 2 @@ -18455,7 +23202,7 @@ paths: name: order type: string - description: This endpoint doesn't support paging. Parameter is accepted for - API compatibility. Value is ignored + API compatibility. Value is ignored. in: query name: after type: string @@ -18471,203 +23218,89 @@ paths: - description: neq filter for the "reference" field in: query name: reference__neq - type: string - - description: in filter for the "reference" field - in: query - name: reference__in - type: string - - description: nin filter for the "reference" field - in: query - name: reference__nin - type: string - - description: in filter for the "updated_at" field - in: query - name: updated_at__in - type: string - - description: nin filter for the "updated_at" field - in: query - name: updated_at__nin - type: string - - description: lte filter for the "updated_at" field - format: date-time - in: query - name: updated_at__lte - type: string - - description: gte filter for the "updated_at" field - format: date-time - in: query - name: updated_at__gte - type: string - responses: - 200: - description: Ok - schema: - $ref: '#/definitions/DeviceBlockCategoryPage' - 400: - description: Bad request. - schema: - $ref: '#/definitions/ErrorResponse' - 401: - description: Unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - summary: List all device block categories - tags: - - Device directory - lifecycle - x-filter: - reference: - - eq - - neq - - in - - nin - updated_at: - - in - - nin - - lte - - gte - x-origin: /home/circleci/project/device-directory/public/swagger.yml - /v3/device-block-categories/{block_category_reference}: - get: - description: Retrieve a device block category. A block category is a short description - of why a device was suspended or returned to service. - operationId: Block_Categories_retrieve - parameters: - - description: The reference of the block category. - in: path - name: block_category_reference - required: true - type: string - responses: - 200: - description: OK - schema: - $ref: '#/definitions/DeviceBlockCategory' - 401: - description: Unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - 404: - description: Not found. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get a device block category. - tags: - - Device directory - lifecycle - x-origin: /home/circleci/project/device-directory/public/swagger.yml - /v3/device-enrollment-denials: - get: - description: 'This produces a list of failed attempts to bootstrap using a particular - certificate which is blacklisted (trusted_certificate). - - Returned list can be filtered by endpoint name. Trusted certificate ID filter - is required. - - - **Example usage:** - - ``` - - curl -X GET -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials?trusted_certificate_id__eq={cert-id}&endpoint_name__eq={endpoint_name} - - ``` - - ' - operationId: listEnrollmentDenialAttempts - parameters: - - description: filtering based on trusted certificate id + type: string + - description: in filter for the "reference" field in: query - name: trusted_certificate_id__eq - required: true + name: reference__in type: string - - description: filtering based on endpoint name + - description: nin filter for the "reference" field in: query - name: endpoint_name__eq + name: reference__nin type: string - - description: Optional parameter for pagination. Denied device ID. + - description: in filter for the "updated_at" field in: query - name: after + name: updated_at__in type: string - - description: Optional parameter for pagination. - enum: - - ASC - - DESC + - description: nin filter for the "updated_at" field in: query - name: order + name: updated_at__nin type: string - - description: Optional parameter for pagination. + - description: lte filter for the "updated_at" field + format: date-time in: query - name: limit - type: integer - produces: - - application/json + name: updated_at__lte + type: string + - description: gte filter for the "updated_at" field + format: date-time + in: query + name: updated_at__gte + type: string responses: 200: - description: Query Success. Responding with List of Devices. + description: Ok schema: - $ref: '#/definitions/DenialAttemptsResponse' - 401: - description: JWT validation failed. + $ref: '#/definitions/DeviceBlockCategoryPage' + 400: + description: Bad request. schema: $ref: '#/definitions/ErrorResponse' - 404: - description: ID set in pagination parameter `after` not found. + 401: + description: Unauthorized. schema: $ref: '#/definitions/ErrorResponse' - summary: Return list of devices which were denied to bootstrap due to being - subjected to blacklisting. + summary: List all device block categories tags: - - EnrollmentDenials + - Device directory - lifecycle x-filter: - endpoint_name: - - eq - trusted_certificate_id: + reference: - eq - x-origin: /home/circleci/project/enrollment-denial-service/public/swagger.yaml - /v3/device-enrollment-denials/{device_enrollment_denial_id}: + - neq + - in + - nin + updated_at: + - in + - nin + - lte + - gte + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml + /v3/device-block-categories/{block_category_reference}: get: - description: 'Query for a single attempt to bootstrap with a blacklisted certificate - by ID. - - - **Example usage:** - - ``` - - curl -X GET -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials/{device_enrollment_denial_id} - - ``` - - ' - operationId: getEnrollmentDenialAttempt + description: Retrieve a device block category. A block category is a short description + of why a device was suspended or returned to service. + operationId: Block_Categories_retrieve parameters: - - description: id of the recorded failed bootstrap attempt + - description: The reference of the block category. in: path - name: device_enrollment_denial_id + name: block_category_reference required: true type: string - produces: - - application/json responses: 200: - description: Query Success. Responding with blacklisted device. + description: OK schema: - $ref: '#/definitions/BlackListedDeviceData' + $ref: '#/definitions/DeviceBlockCategory' 401: - description: JWT validation failed. + description: Unauthorized. schema: $ref: '#/definitions/ErrorResponse' 404: - description: ID not found. + description: Not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Query for a single device by ID + summary: Get a device block category. tags: - - EnrollmentDenials - x-origin: /home/circleci/project/enrollment-denial-service/public/swagger.yaml + - Device directory - lifecycle + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-enrollments: get: description: 'Provides a list of pending and claimed enrollments. @@ -18679,7 +23312,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments @@ -18691,7 +23324,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ ''https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'' @@ -18742,8 +23375,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get a list of enrollments per account. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml post: description: 'When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account. @@ -18756,7 +23389,7 @@ paths: curl -X POST \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -18793,15 +23426,15 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Create a single enrollment. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-enrollments-bulk-deletes: post: consumes: - multipart/form-data description: "With bulk delete, you can upload a `CSV` file containing a number\ \ of enrollment IDs to delete.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ - \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ + \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes\n\ \n```\n**To ensure your CSV file is valid:**\n1. The first line of the file\ \ (header) is ignored.\n1. Each line can contain comma-separated values, where\ @@ -18824,7 +23457,7 @@ paths: \ , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A\ \ file containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ , First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ - \ Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ + \ Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23,\ \ Too-short identity.\n\"\", Empty quotation marks are an invalid identity.\n\ \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\ \ \", Whitespace inside quotation marks is not trimmed, causing an error.\n\ @@ -18853,8 +23486,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Bulk delete. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-enrollments-bulk-deletes/{id}: get: description: 'Provides information on bulk delete for the given ID, for example, @@ -18901,7 +23534,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} @@ -18935,15 +23568,15 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get bulk delete entity. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-enrollments-bulk-uploads: post: consumes: - multipart/form-data description: "With bulk upload, you can upload a `CSV` file containing a number\ \ of enrollment IDs.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ - \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ + \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads\n\ \n```\n **To ensure your CSV file is valid:**\n 1. The first line of the\ \ file (header) is ignored.\n 1. Each line can contain comma-separated values,\ @@ -18996,8 +23629,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Bulk upload. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-enrollments-bulk-uploads/{id}: get: description: 'Provides information on bulk upload for the given ID, for example, @@ -19044,7 +23677,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} @@ -19078,14 +23711,14 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get bulk upload entity. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-enrollments/{id}: delete: description: 'To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to delete the enrollment and factory reset the device. For more information, see [Transferring ownership using - First-to-Claim](../connecting/device-ownership-first-to-claim-by-enrollment-list.html). + First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html).
@@ -19095,7 +23728,7 @@ paths: curl -X DELETE \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} @@ -19120,8 +23753,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Delete an enrollment by ID. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml get: description: 'Check detailed enrollment info, for example, date of claim or expiration date. @@ -19133,7 +23766,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} @@ -19160,35 +23793,19 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get details of an single enrollment by ID. tags: - - Public API - x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml + - Device ownership - enrollments + x-origin: C:\Source\mbed\mbed-cloud-api-contract\enrollment-service\public\swagger.yaml /v3/device-events/: get: - description: 'List all device events for an account. - - - **Example:** - - Following example gets device-events limiting returned results to max 5 events - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \ - - -H ''Authorization: Bearer '' - - ``` - - or to get events for certain device filter based on device_id: - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id= - \ - - -H ''Authorization: Bearer '' - - ```' + description: "List all or a filtered list of device events for the account.\ + \ Device events are events significant to operation or lifetime, such as creation,\ + \ firmware update, and suspension.\n\nTo see statistics for device connectivity\ + \ and usage, use the [Statistics API](https://developer.pelion.com/docs/device-management-api/connect-statistics/).\n\ + \n **Example:**\n Following example gets device-events limiting returned results\ + \ to max 5 events\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5\ + \ \\\n -H 'Authorization: Bearer '\n ```\n or to get events for certain\ + \ device filter based on device_id:\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=\ + \ \\\n -H 'Authorization: Bearer '\n ```" operationId: Device_Event_list parameters: - description: How many objects to retrieve in the page (2-1000). Limit values @@ -19214,7 +23831,7 @@ paths: - description: "URL-encoded query string parameter to filter returned data.\n\ \n##### Filtering\n\n`?filter={URL encoded query string}`\n\nThe query string\ \ is made up of key/value pairs separated by ampersands. So for a query\ - \ of\n`key1=value1&key2=value2&key3=value3`, this would be encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`.\n\ + \ of\n`key1=value1&key2=value2&key3=value3`, this is encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`.\n\ \n###### Filterable fields:\n\nThe below table lists all filterable fields:\n\ \n\n \n \n \n \n \n \n\ @@ -19383,15 +24000,16 @@ paths: state_change: - eq - neq - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-events/{device_event_id}/: get: - description: 'Retrieve a specific device event. + description: '"Retrieve a specific device event. See ''/v3/device-events/'' + for information on device events, and how to get the device_event_id." **Example:** - To fetch a specific event you can use the ''id'' field form the ''/v3/device-events''. + To fetch a specific event you can use the ''id'' field from ''/v3/device-events''. Form of ''016c03d40a4e000000000001001003b4'' ``` @@ -19422,7 +24040,7 @@ paths: summary: Retrieve a device event. tags: - Device directory - events - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-groups/: get: description: List all groups. @@ -19461,26 +24079,30 @@ paths: \ \n \n \n \n \ \ \n \n \n \n\ \ \n \n \n \ - \ \n \n \n \n \n\ - \ \n \n \n \ - \ \n \n \n \n\ + \ \n \n \n \n \n\ + \ \n \n \n \ + \ \n \n \n \n\ \ \n \n \n \n \ - \ \n \n \n \n \n \n
Field= / __eq\ \ / __neq__in / __nin__lte / __gte\u2713
name\u2713\u2713 
custom_attributes\u2713  
created_at\u2713\u2713\u2713
updated_at\u2713  
component_attributes\u2713  
created_at\u2713\u2713\u2713
etag\u2713\u2713\u2713\ -
\n \n\nThe examples below show\ - \ the queries in *unencoded* form.\n\n###### By device group properties:\n\ - \n`name__eq=mygroup`\n\n###### On date-time fields:\n\nDate-time fields\ - \ should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There\ - \ are three permitted\nvariations:\n\n* UTC RFC3339 with milliseconds, for\ - \ example, 2016-11-30T16:25:12.1234Z.\n* UTC RFC3339 without milliseconds,\ - \ for example, 2016-11-30T16:25:12Z.\n* UTC RFC3339 shortened - without\ - \ milliseconds and punctuation, for example, 20161130T162512Z.\n\nDate-time\ - \ filtering supports three operators:\n\n* Equality.\n* Greater than or\ - \ equal to – field name suffixed with `__gte`.\n* Less than or equal\ - \ to – field name suffixed with `__lte`.\n\nLower and upper limits\ - \ to a date-time range may be specified by including both the `__gte` and\ - \ `__lte` forms in\nthe filter:\n\n`{field name}[|__lte|__gte]={UTC RFC3339\ - \ date-time}`\n\n###### By device group custom attributes:\n\n`custom_attributes__{param}={value}`\n\ - \n`custom_attributes__tag=TAG1`\n\n##### Multi-field example\n\n`name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z`\n\ + \ updated_at\n \u2713\n \u2713\n\ + \ \u2713\n \n \n etag\n \ + \ \u2713\n \u2713\n \u2713\n \n\ + \ \n\n \n\nThe examples below show the queries in\ + \ *unencoded* form.\n\n###### By device group properties:\n\n`name__eq=mygroup`\n\ + \n###### On date-time fields:\n\nDate-time fields should be specified in\ + \ UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted\n\ + variations:\n\n* UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z.\n\ + * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z.\n\ + * UTC RFC3339 shortened - without milliseconds and punctuation, for example,\ + \ 20161130T162512Z.\n\nDate-time filtering supports three operators:\n\n\ + * Equality.\n* Greater than or equal to – field name suffixed with\ + \ `__gte`.\n* Less than or equal to – field name suffixed with `__lte`.\n\ + \nLower and upper limits to a date-time range may be specified by including\ + \ both the `__gte` and `__lte` forms in\nthe filter:\n\n`{field name}[|__lte|__gte]={UTC\ + \ RFC3339 date-time}`\n\n###### By device group custom attributes:\n\n`custom_attributes__{param}={value}`\n\ + \n`custom_attributes__tag=TAG1`\n\n###### By device group component attributes:\n\ + \n`component_attributes__{name}={version}`\n`component_attributes__{name}__{operator}={version}`\n\ + \n`component_attributes__ble=1.2.3`\n`component_attributes__main__gt=1.2.3`\n\ + \n##### Multi-field example\n\n`name__eq=mygroup&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z`\n\ \nEncoded:\n\n`?filter=name__eq%3Dmygroup%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-12-30T00%3A00%3A00Z`\n\ \n##### Filtering with filter operators\n\nString field filtering supports\ \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ @@ -19625,7 +24247,7 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml post: description: Create a group. operationId: Group_create @@ -19636,9 +24258,9 @@ paths: required: true schema: properties: - custom_attributes: *id023 - description: *id024 - name: *id025 + custom_attributes: *id028 + description: *id029 + name: *id030 type: object responses: '201': @@ -19660,10 +24282,11 @@ paths: summary: Create a group. tags: - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-groups/{device-group-id}/: delete: - description: Delete a group. + description: Delete a group. This deletes the group, but not the devices in + the group. operationId: Group_delete parameters: - description: The ID of the group. @@ -19685,9 +24308,11 @@ paths: summary: Delete a group. tags: - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml get: - description: Get a group. + description: Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) + info what contains info of the group, for example, name and updated date. + To list the devices in the group, use '/v3/device-groups/{device-group-id}/devices/'. operationId: Group_retrieve parameters: - description: The group ID @@ -19715,9 +24340,9 @@ paths: summary: Get a group. tags: - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml put: - description: Modify the attributes of a group. + description: Modify the attributes of a group, such as the description. operationId: Group_update parameters: - in: path @@ -19730,9 +24355,9 @@ paths: required: true schema: properties: - custom_attributes: *id023 - description: *id024 - name: *id025 + custom_attributes: *id028 + description: *id029 + name: *id030 type: object responses: '200': @@ -19754,10 +24379,10 @@ paths: summary: Modify the attributes of a group. tags: - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-groups/{device-group-id}/devices/: get: - description: Get a page of devices. + description: Get a page of devices in a specified group. operationId: Group_members_retrieve parameters: - in: path @@ -20272,6 +24897,22 @@ paths: in: query name: name__nin type: string + - description: eq filter for the "net_id" field + in: query + name: net_id__eq + type: string + - description: neq filter for the "net_id" field + in: query + name: net_id__neq + type: string + - description: in filter for the "net_id" field + in: query + name: net_id__in + type: string + - description: nin filter for the "net_id" field + in: query + name: net_id__nin + type: string - description: eq filter for the "serial_number" field in: query name: serial_number__eq @@ -20358,7 +24999,7 @@ paths: summary: Get a page of devices. tags: - Device directory - groups - x-filter: &id026 + x-filter: &id031 account_id: - eq - neq @@ -20502,6 +25143,11 @@ paths: - neq - in - nin + net_id: + - eq + - neq + - in + - nin operator_suspended: - eq - neq @@ -20528,10 +25174,10 @@ paths: - neq - in - nin - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-groups/{device-group-id}/devices/add/: post: - description: Add one device to a group. + description: Add one device to a group. A device can be in multiple groups. operationId: Group_members_add parameters: - description: The ID of the group. @@ -20563,42 +25209,207 @@ paths: summary: Add a device to a group. tags: - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-groups/{device-group-id}/devices/remove/: post: description: Remove one device from a group. operationId: Group_members_remove parameters: - - description: The ID of the group. + - description: The ID of the group. + in: path + name: device-group-id + required: true + type: string + - description: Body of the request. + in: body + name: body + required: true + schema: + $ref: '#/definitions/DeviceGroupManipulation' + responses: + '204': + description: Success - device removed. + '400': + description: Bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Unauthorized. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove a device from a group. + tags: + - Device directory - groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml + /v3/device-logs: + get: + description: 'List logs for all devices based on a combination of filters. + + + **Example usage:** + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-logs + + ``` + + ' + operationId: ListGatewayDeviceLogs + parameters: + - description: The device ID for which to retrieve logs. + in: query + name: device_id__in + required: false + type: string + - default: 100 + description: Limit the number of returned results. The default value is 100. + in: query + maximum: 1000 + minimum: 2 + name: limit + required: false + type: integer + - description: The entity ID to fetch after the given one. + in: query + name: after + required: false + type: string + - default: DESC + description: 'Record order. Acceptable values: ASC, DESC.' + enum: &id032 + - ASC + - DESC + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count' + in: query + name: include + required: false + type: string + - description: RFC 3339 UTC timestamp range upper limit. + format: date-time + in: query + name: timestamp__lte + required: false + type: string + - description: RFC 3339 UTC timestamp range lower limit. + format: date-time + in: query + name: timestamp__gte + required: false + type: string + - description: Name of the application on a device that generated logs. + in: query + name: app_name__eq + required: false + type: string + - description: Device log type filter. + in: query + name: type__eq + required: false + type: string + - description: Device log message filter. + in: query + name: message__eq + required: false + type: string + - description: Minimum severity level of logs to retrieve. + enum: &id033 + - DEBUG + - TRACE + - INFO + - WARNING + - ERROR + - CRITICAL + in: query + name: level__gte + required: false + type: string + responses: + '200': + description: Retrieved logs successfully + schema: + $ref: '#/definitions/LogsPage' + '400': + description: Bad request + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Not authenticated + schema: + $ref: '#/definitions/ErrorResponse' + summary: List all device logs based on filters + tags: + - Gateway Logs Public API + x-filter: + app_name: + - eq + device_id: + - in + level: + - gte + message: + - eq + timestamp: + - lte + - gte + type: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\gateway\public\logs.yaml + /v3/device-logs/{device_log_id}: + get: + description: 'Retrieve a device log from a device by log ID. + + + **Example usage:** + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-logs/(device_log_id) + + ``` + + ' + operationId: GetDeviceLogBasedOnLogID + parameters: + - description: The ID of the device log. in: path - name: device-group-id + name: device_log_id required: true type: string - - description: Body of the request. - in: body - name: body - required: true - schema: - $ref: '#/definitions/DeviceGroupManipulation' responses: - '204': - description: Success - device removed. - '400': - description: Bad request. + '200': + description: Retrieved result successfully schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/Log' '401': - description: Unauthorized. + description: Not authenticated schema: $ref: '#/definitions/ErrorResponse' '404': - description: Not found. + description: Not found schema: $ref: '#/definitions/ErrorResponse' - summary: Remove a device from a group. + summary: Retrieve a device log by ID. tags: - - Device directory - groups - x-origin: /home/circleci/project/device-directory/public/swagger.yml + - Gateway Logs Public API + x-origin: C:\Source\mbed\mbed-cloud-api-contract\gateway\public\logs.yaml /v3/device-queries/: get: description: List all device queries. @@ -20628,32 +25439,33 @@ paths: \n##### Filtering\n\n`?filter={URL encoded query string}`\n\nThe query string\ \ is made up of key/value pairs separated by ampersands. So for a query\ \ of\n`key1=value1&key2=value2&key3=value3`, this would be encoded as: `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`.\n\ - \nThe below table lists all filterable fields:\n\n\n \n \ - \ \n \n \n \n \n \n \n \n\ - \ \n \n \n \n \n \n \n \n\ - \ \n \n \n \ - \ \n \n \n \n \n \n \n \n \n\ + \n###### Filterable fields\n\nThe below table lists all filterable fields:\n\ + \n
Field= / __eq / __neq__in\ - \ / __nin__lte / __gte
created_at\u2713\u2713\ - \u2713
etag\u2713\u2713\u2713
id\u2713\u2713\ -  
name
\n \n \n \n \n \n \n\ + \ \n \n \n \n \n \ + \ \n \n \n \ + \ \n \n \n \n \n \n \n \n \n \ + \ \n \n \n \ + \ \n \n \n \n \n \n \n \n \n\ \ \n \n \n \ - \ \n \n \n \n \ - \ \n \n \n \n \n\ - \ \n \n \n \ - \ \n \n
Field= / __eq\ + \ / __neq__in / __nin__lte / __gte
created_at\u2713\u2713\u2713
etag\u2713\u2713\ + \u2713
id\u2713\u2713 
name\u2713\u2713\ +  
query\u2713\u2713 
query\u2713\u2713 
updated_at\u2713\u2713\u2713
\n \n\nThe examples below show the queries\ - \ in *unencoded* form.\n\n###### By device query properties (all properties\ - \ are filterable):\n\nFor example:\n`description={value}`\n\n###### On date-time\ - \ fields:\n\nDate-time fields should be specified in UTC RFC3339 format\ - \ `YYYY-MM-DDThh:mm:ss.msZ`. There are three permitted\nvariations:\n\n\ - * UTC RFC3339 with milliseconds, for example, 2016-11-30T16:25:12.1234Z.\n\ - * UTC RFC3339 without milliseconds, for example, 2016-11-30T16:25:12Z.\n\ - * UTC RFC3339 shortened - without milliseconds and punctuation, for example,\ - \ 20161130T162512Z.\n\nDate-time filtering supports three operators:\n\n\ - * Equality.\n* Greater than or equal to – field name suffixed with\ - \ `__gte`.\n* Less than or equal to – field name suffixed with `__lte`.\n\ - \nLower and upper limits to a date-time range may be specified by including\ - \ both the `__gte` and `__lte` forms in\nthe filter: `{field name}[|__lte|__gte]={UTC\ - \ RFC3339 date-time}`.\n\n##### Multi-field example\n\n`query_id=0158d38771f70000000000010010038c&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z`\n\ + \ \n \n updated_at\n \u2713\n\ + \ \u2713\n \u2713\n \n \n\n\ +  \n\nThe examples below show the queries in *unencoded* form.\n\n######\ + \ By device query properties (all properties are filterable):\n\nFor example:\n\ + `description={value}`\n\n###### On date-time fields:\n\nDate-time fields\ + \ should be specified in UTC RFC3339 format `YYYY-MM-DDThh:mm:ss.msZ`. There\ + \ are three permitted\nvariations:\n\n* UTC RFC3339 with milliseconds, for\ + \ example, 2016-11-30T16:25:12.1234Z.\n* UTC RFC3339 without milliseconds,\ + \ for example, 2016-11-30T16:25:12Z.\n* UTC RFC3339 shortened - without\ + \ milliseconds and punctuation, for example, 20161130T162512Z.\n\nDate-time\ + \ filtering supports three operators:\n\n* Equality.\n* Greater than or\ + \ equal to – field name suffixed with `__gte`.\n* Less than or equal\ + \ to – field name suffixed with `__lte`.\n\nLower and upper limits\ + \ to a date-time range may be specified by including both the `__gte` and\ + \ `__lte` forms in\nthe filter: `{field name}[|__lte|__gte]={UTC RFC3339\ + \ date-time}`.\n\n##### Multi-field example\n\n`query_id=0158d38771f70000000000010010038c&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z`\n\ \nEncoded:\n\n`filter=query_id%3D0158d38771f70000000000010010038c%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z`\n\ \n##### Filtering with filter operators\n\nString field filtering supports\ \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ @@ -20759,7 +25571,7 @@ paths: description: Unable to find page. summary: List device queries. tags: - - Device directory - filter queries + - Device directory - device queries x-filter: created_at: - in @@ -20786,7 +25598,7 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml post: description: Create a new device query. operationId: Device_Query_create @@ -20808,8 +25620,8 @@ paths: description: Not authenticated. summary: Create a device query. tags: - - Device directory - filter queries - x-origin: /home/circleci/project/device-directory/public/swagger.yml + - Device directory - device queries + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/device-queries/{query_id}/: delete: description: Delete a device query. @@ -20831,8 +25643,8 @@ paths: description: Unable to delete update device query because it can't be found. summary: Delete a device query. tags: - - Device directory - filter queries - x-origin: /home/circleci/project/device-directory/public/swagger.yml + - Device directory - device queries + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml get: description: Retrieve a specific device query. operationId: Device_Query_retrieve @@ -20855,8 +25667,8 @@ paths: description: Unable to find device query. summary: Retrieve a device query. tags: - - Device directory - filter queries - x-origin: /home/circleci/project/device-directory/public/swagger.yml + - Device directory - device queries + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml put: description: Update a specifc device query. operationId: Device_Query_update @@ -20885,12 +25697,12 @@ paths: description: Unable to update device query because it can't be found. summary: Update a device query. tags: - - Device directory - filter queries - x-origin: /home/circleci/project/device-directory/public/swagger.yml + - Device directory - device queries + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/devicelog/: get: deprecated: true - description: 'DEPRECATED: List all device events. Use `/v3/device-events/` instead.' + description: 'DEPRECATED: This API is replaced with `/v3/device-events/`.' operationId: Device_Log_list parameters: - description: How many objects to retrieve in the page (2-1000). Limit values @@ -21060,7 +25872,7 @@ paths: '401': description: Not authenticated. '404': - description: Unable to find page + description: Unable to find page. summary: 'DEPRECATED: List all device events.' tags: - Device directory - events @@ -21095,12 +25907,11 @@ paths: - neq - in - nin - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/devicelog/{device_event_id}/: get: deprecated: true - description: Retrieve device event (deprecated, use /v3/device-events/{device_event_id}/ - instead). + description: 'DEPRECATED: This API is replaced by `/v3/device-events/` and `/v3/device-events/{device_event_id}/`.' operationId: Device_Log_retrieve parameters: - in: path @@ -21121,10 +25932,17 @@ paths: summary: 'DEPRECATED: Retrieve a device event.' tags: - Device directory - events - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/devices/: get: - description: 'List all devices. + description: 'List all devices enrolled to Device Management for the account. + + The URL length must be fewer than 4096 characters. Requests that exceed this + limit, such as those including too many query parameters in a filter, fail + with a bad request response. + + devices with too long list of query parameters, the request is deemed as bad + request. **Example:** @@ -21157,6 +25975,116 @@ paths: in: query name: after type: string + - description: 'URL encoded query string parameter to filter returned data. + + + ##### Filtering + + ```?filter={URL encoded query string}``` + + + The query string is made up of key/value pairs separated by ampersands. + So for a query of + + ```key1=value1&key2=value2&key3=value3``` this would be encoded as follows: + + ```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3``` + + The examples below show the queries in *unencoded* form. + + + ###### By device properties (all properties are filterable): + + ```state=[unenrolled|cloud_enrolling|bootstrapped|registered]``` + + + ```device_class={value}``` + + + ###### On date-time fields: + + Date-time fields should be specified in UTC RFC3339 format ```YYYY-MM-DDThh:mm:ss.msZ```. + There are three permitted + + variations: + + + * UTC RFC3339 with milliseconds e.g. 2016-11-30T16:25:12.1234Z + + * UTC RFC3339 without milliseconds e.g. 2016-11-30T16:25:12Z + + * UTC RFC3339 shortened - without milliseconds and punctuation e.g. 20161130T162512Z + + + Date-time filtering supports three operators: + + + * equality + + * greater than or equal to – field name suffixed with ```__gte``` + + * less than or equal to – field name suffixed with ```__lte``` + + + Lower and upper limits to a date-time range may be specified by including + both the ```__gte``` and ```__lte``` forms in + + the filter. + + + ```{field name}[|__lte|__gte]={UTC RFC3339 date-time}``` + + + ###### On device custom attributes: + + + ```custom_attributes__{param}={value}``` + + ```custom_attributes__tag=TAG1``` + + + ###### On device component attributes: + + + ```component_attributes__{name}={version}``` + + ```component_attributes__ble=1.2.3``` + + + ##### Multi-field example + + + ```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z``` + + + Encoded: + + + ```?filter=state%3Dbootstrapped%26created_at__gte%3D2016-11-30T16%3A25%3A12.1234Z%26created_at__lte%3D2016-11-30T00%3A00%3A00Z``` + + + ##### Filtering with filter operators + + + String field filtering supports the following operators: + + + * equality: `__eq` + + * non-equality: `__neq` + + * in : `__in` + + * not in: `__nin` + + + For `__in` and `__nin` filters list of parameters must be comma-separated: + + + `state__nin=unenrolled,dergistered`' + in: query + name: filter + type: string - description: 'Comma-separated list of data fields to return. Currently supported: `total_count`.' in: query @@ -21650,6 +26578,22 @@ paths: in: query name: name__nin type: string + - description: eq filter for the "net_id" field + in: query + name: net_id__eq + type: string + - description: neq filter for the "net_id" field + in: query + name: net_id__neq + type: string + - description: in filter for the "net_id" field + in: query + name: net_id__in + type: string + - description: nin filter for the "net_id" field + in: query + name: net_id__nin + type: string - description: eq filter for the "serial_number" field in: query name: serial_number__eq @@ -21730,10 +26674,12 @@ paths: summary: List all devices. tags: - Device directory - devices - x-filter: *id026 - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-filter: *id031 + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml post: - description: Create a new device. + description: Create a new device in Device Management. Usually you do not need + to create a device this way, as it is automatically created when it bootstraps + or connects to Device Management. operationId: Device_create parameters: - in: body @@ -21758,7 +26704,7 @@ paths: summary: Create a device. tags: - Device directory - devices - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/devices/{device-id}/certificates/{certificate-name}/renew: post: description: 'Request a certificate renewal. @@ -21772,7 +26718,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-length: 0'' @@ -21785,57 +26731,264 @@ paths: pattern: '[0-9a-fA-F]{32}' required: true type: string - - description: The certificate name. - in: path - name: certificate-name - pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' - required: true + - description: The certificate name. + in: path + name: certificate-name + pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' + required: true + type: string + responses: + '201': + description: Created. + schema: + $ref: '#/definitions/CertificateEnrollment' + '400': + description: 'Validation error: There is no certificate issuer configured + for this certificate.' + schema: + $ref: '#/definitions/ErrorObjectResponse' + '401': + description: You are not authorized to perform the action. + schema: + $ref: '#/definitions/ErrorObjectResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorObjectResponse' + '404': + description: The device ID or certificate name is not found. + schema: + $ref: '#/definitions/ErrorObjectResponse' + '409': + description: Conflict. A renewal request for this certificate is in progress. + schema: + $ref: '#/definitions/ErrorObjectResponse' + '423': + description: 'Either: + + - Operation not supported for this device. + + - The device is not connected.' + schema: + $ref: '#/definitions/ErrorObjectResponse' + summary: Request certificate renewal. + tags: + - Device security - device certificate renewals + x-origin: C:\Source\mbed\mbed-cloud-api-contract\certificate-enrollment\public\swagger.yaml + /v3/devices/{device-id}/echo: + delete: + description: 'Calling this API removes your application data and device from + the Device Echo service. You can still find the device using ''GET /v3/devices/{id}'' + from the Device Directory API. + + + For privacy reasons, you might need to delete device data that contains personal + information about the device owner or user. + + Private information is stored by the application; Pelion Device Management + Client does not provide or store any private data. + + + **Note:** If the device is able to connect, its data will reappear in Echo + the next time the device sends that information to the service. To ensure + data is permanently removed, suspend the device first by calling ''POST /v3/devices/{id}/suspend''. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo + -H ''Authorization: Bearer '' + + ```' + operationId: deleteDeviceEchoObject + parameters: + - description: The device ID generated by Device Management. + format: UUID, 32 hexadecimal characters + in: path + name: device-id + required: true + type: string + produces: + - application/json + responses: + 200: + description: Device found and deleted. + 401: + description: Authentication failure. + 404: + description: Device not found from Device Echo. + summary: Delete the Device Echo object. + tags: + - Device Echo + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + get: + description: 'Retrieve the Device Echo object, which represents the last known + state of the device. The state includes the resources and their reported values + with the desired state of the device. + + Auto-observable and subscribed resources are stored as the reported state + of the device. To change the desired state, issue write commands with `/v2/device-requests/{device-id}`. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/{device-id}/echo + -H ''Authorization: Bearer '' + + ```' + operationId: getDeviceEchoObject + parameters: + - description: The device ID generated by Device Management. + format: UUID, 32 hexadecimal characters + in: path + name: device-id + required: true + type: string + produces: + - application/json + responses: + 200: + description: Device found and returned. + schema: + $ref: '#/definitions/EchoDevice' + 401: + description: Authentication failure. + 404: + description: Device not found from Device Echo. + summary: Get the Device Echo object. + tags: + - Device Echo + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-server\public\swagger.yaml + /v3/devices/{device_id}/logs: + get: + description: 'Retrieve logs for a given device based on a combination of filters. + + + **Example usage:** + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/devices/{device_id}/logs + + ``` + + ' + operationId: ListSingleGatewayDeviceLogs + parameters: + - description: The id of the device + in: path + name: device_id + required: true + type: string + - default: 100 + description: Limit the number of returned results. The default value is 100. + in: query + maximum: 1000 + minimum: 2 + name: limit + required: false + type: integer + - description: The entity ID to fetch after the given one. + in: query + name: after + required: false + type: string + - default: DESC + description: 'Record order. Acceptable values: ASC, DESC.' + enum: *id032 + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count' + in: query + name: include + required: false + type: string + - description: RFC 3339 UTC timestamp range upper limit. + format: date-time + in: query + name: timestamp__lte + required: false + type: string + - description: RFC 3339 UTC timestamp range lower limit. + format: date-time + in: query + name: timestamp__gte + required: false + type: string + - description: Name of the application on a device that generated logs. + in: query + name: app_name__eq + required: false + type: string + - description: Device log type filter. + in: query + name: type__eq + required: false + type: string + - description: Device log message filter. + in: query + name: message__eq + required: false + type: string + - description: Minimum severity level of logs to retrieve. + enum: *id033 + in: query + name: level__gte + required: false type: string responses: - '201': - description: Created. + '200': + description: Retrieved logs successfully schema: - $ref: '#/definitions/CertificateEnrollment' + $ref: '#/definitions/LogsPage' '400': - description: 'Validation error: There is no certificate issuer configured - for this certificate.' + description: Bad request schema: - $ref: '#/definitions/ErrorObjectResponse' + $ref: '#/definitions/ErrorResponse' '401': - description: You are not authorized to perform the action. - schema: - $ref: '#/definitions/ErrorObjectResponse' - '403': - description: Forbidden. + description: Not authenticated schema: - $ref: '#/definitions/ErrorObjectResponse' + $ref: '#/definitions/ErrorResponse' '404': - description: The device ID or certificate name is not found. - schema: - $ref: '#/definitions/ErrorObjectResponse' - '409': - description: Conflict. A renewal request for this certificate is in progress. - schema: - $ref: '#/definitions/ErrorObjectResponse' - '423': - description: 'Either: - - - Operation not supported for this device. - - - The device is not connected.' + description: Not found schema: - $ref: '#/definitions/ErrorObjectResponse' - summary: Request certificate renewal. + $ref: '#/definitions/ErrorResponse' + summary: Return the logs for a specific device. tags: - - Device security - device certificate renewals - x-origin: /home/circleci/project/certificate-enrollment/public/swagger.yaml + - Gateway Logs Public API + x-filter: + app_name: + - eq + level: + - gte + message: + - eq + timestamp: + - lte + - gte + type: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\gateway\public\logs.yaml /v3/devices/{id}/: delete: description: Delete device. Only available for devices with a developer certificate. - Attempting to delete a device with a production certicate returns a 400 response. + Attempting to delete a device with a production certificate returns a 400 + response. operationId: Device_destroy parameters: - - description: The ID of the device. + - description: The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. in: path name: id required: true @@ -21852,9 +27005,12 @@ paths: summary: Delete a device. tags: - Device directory - devices - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml get: - description: 'Retrieve information about a specific device. + description: 'Retrieve information about a specific device. This API returns + [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). + If you want to see the structure of resources in the device or the actual + resource values, use the [Connect API](https://developer.pelion.com/docs/device-management-api/connect/). **Example:** @@ -21871,7 +27027,8 @@ paths: ```' operationId: Device_retrieve parameters: - - description: The ID of the device. + - description: The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. in: path name: id required: true @@ -21890,7 +27047,7 @@ paths: summary: Get a device. tags: - Device directory - devices - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml put: description: 'Update a specific device. @@ -21913,7 +27070,8 @@ paths: ```' operationId: Device_update parameters: - - description: The ID of the device. + - description: The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. in: path name: id required: true @@ -21938,25 +27096,175 @@ paths: summary: Update a device. tags: - Device directory - devices - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml + /v3/devices/{id}/console: + get: + description: "This WebSocket-based API establishes a console session with a\ + \ gateway device.\n
\nUse this endpoint to establish a WebSocket connection\ + \ to the device console. Once the connection is in place, you can use the\ + \ protocol below to exchange messages related to the console session.\nYou\ + \ must provide the api key as bearer token to authenticate the request.\n\ + All messages sent between the server and the client are contained inside a\ + \ message envelope. The envelope contains a type field describing what format\ + \ the payload is in and how to interpret the message:\n\n```json\n{\n \"\ + type\": [string],\n \"payload\": [any],\n \"sessionID\": [string]\n}\n```\n\ +
\n## Message types and payload formats\n\n| Message Type | Payload Format\ + \ | Description |\n|:------------- |:------------- |:------------- |\n|\ + \ **resize** | `ResizePayload` | Can be sent by the client to the server to\ + \ notify the device that the console window size has changed. |\n| **input**\ + \ | `string` | Sent from the client to the server when keyboard input is provided\ + \ to the console. stdin |\n| **output** | `string` | Sent from the server\ + \ to the client when console output is produced. stdout + stderr |\n\n###\ + \ `ResizePayload`\n```json\n{\n \"width\": [integer], // number of columns\n\ + \ \"height\": [integer] // number of rows\n}\n```\n| Field Name | Format\ + \ | Description |\n|:------------- |:------------- |:------------- |\n|\ + \ width | integer | The width of the console window in columns. |\n| height\ + \ | integer | The height of the console window in rows. |\n
\n\n## Protocol\ + \ Sequence Diagram\n\nThe diagram shows how messages are passed between the\ + \ client and the server after initiating a console session:\n```\nClient \ + \ Pelion Cloud (/v3/devices/{id}/console) \ + \ Device\n | | \ + \ |\n | \ + \ | |\n |-----------------[Input]------------------>|\ + \ |\n | \ + \ |-----------------[Input]------------------>|\n | \ + \ |<----------------[Output]------------------|\n\ + \ |<----------------[Output]------------------| \ + \ |\n |-----------------[Input]------------------>| \ + \ |\n | \ + \ |-----------------[Input]------------------>|\n | \ + \ |<----------------[Output]------------------|\n\ + \ |<----------------[Output]------------------| \ + \ |\n | | \ + \ |\n |-----------------[Resize]----------------->|\ + \ |\n | \ + \ |-----------------[Resize]----------------->|\n | \ + \ | \ + \ |\n | |<----------------[Output]------------------|\n\ + \ |<----------------[Output]------------------| \ + \ |\n | | \ + \ |\n | \ + \ | |\n | \ + \ | \ + \ |\n\nInput is always forwarded from the client to the console session\ + \ on the relevant device to be passed to the stdin stream. The client does\ + \ not need to provide a session ID for input messages.\nOuptut is forwarded\ + \ from the device console session's stdout and stderr streams to the client.\n\ + Resize messages are forwarded from the client to the console session on the\ + \ device.\n```\n
\nIf the console session is terminated by the device disconnecting,\ + \ the WebSocket connection is closed.\n
\nAll communication is text-based.\n\ +
\n## Errors and Close Codes\n- If you send binary data instead of text\ + \ data over the websocket connection, the socket closes with code 1003.\n\ + - If you send text data that is not valid JSON, the socket closes with code\ + \ 1002 and error message 'Data could not be parsed as JSON'.\n- If you send\ + \ text data that is valid JSON but does not follow a valid message schema,\ + \ the socket closes with code 1002 and error message 'Object format invalid'.\n\ + - If you try to establish a console session with a device that is not prepared\ + \ for console, the socket closes with code 1011 and error message 'The device\ + \ console is not working'.\n- If your client fails to respond to ping messages\ + \ from the server with a matching pong message, the server disconnects the\ + \ client, assuming the connection has timed out.\n" + operationId: establishGatewayDeviceConsoleSession + parameters: + - description: The id of the device + in: path + name: id + required: true + type: string + - default: Upgrade + description: The websocket connection header. Must be 'Upgrade'. + in: header + name: Connection + required: true + type: string + - default: websocket + description: The protocol upgrade header. Must be 'websocket'. + in: header + name: Upgrade + required: true + type: string + - description: 'Access key or user token must be present in the `Sec-WebSocket-Protocol` + header **if Authorization header cannot be provided**: `Sec-WebSocket-Protocol:wss,pelion_ak_{access_key}`.' + in: header + name: Sec-WebSocket-Protocol + required: false + type: string + - description: Originating host of the request. + in: header + name: Origin + required: false + type: string + - default: 13 + description: WebSocket version. Must be 13. + in: header + name: Sec-WebSocket-Version + required: true + type: integer + - description: The value of this header field must be a nonce consisting of + a randomly selected 16-byte value that has been base64-encoded (see Section + 4 of [RFC4648]). The nonce must be selected randomly for each connection. + format: byte + in: header + name: Sec-WebSocket-Key + required: true + type: string + responses: + '101': + description: Connection established. + headers: + Upgrade: + description: Always 'websocket' in accordance with the WebSocket specification. + type: string + '400': + description: Bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Access denied. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Not found. + schema: + $ref: '#/definitions/ErrorResponse' + '500': + description: Internal server error. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Establish a console session + tags: + - Gateway Terminal Public API + x-origin: C:\Source\mbed\mbed-cloud-api-contract\gateway\public\terminal.yaml /v3/devices/{id}/resume: post: - description: 'Returning a device to service restores connectivity to the device. - All API functionality is restored. + description: '[Returning a device to service](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#using-the-api-suspending-and-resuming-devices) + allows the device to connect to Device Management again. The connection is + established according to the device''s reconnection logic. The device reports + a [registration event](https://developer.pelion.com/docs/device-management-api/connect/) + through a [notification channel](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html). + + + The default reconnection logic is a progressive back-off for 2, 4, 8, or 16 + seconds, up to one week. All API functionality is restored. **Example:** - Following example enables device to connect again to Pelion Device Management. - Note that the category must match the reason why device was suspended. This - device was reported stolen but was now found. + + The following example enables a device to reconnect to Pelion Device Management. + The category must match the reason device was suspended. This device was reported + stolen, but was found: ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices//resume \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -21975,7 +27283,7 @@ paths: in: body name: Block required: true - schema: &id027 + schema: &id034 properties: category: description: The reference of the block category. @@ -22001,36 +27309,28 @@ paths: summary: Return a device to service. tags: - Device directory - lifecycle - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/devices/{id}/suspend: post: - description: 'Suspending a device prevents it from connecting to Device Management. - If a device is currently connected, it will be disconnected. Some API operations - will fail while a device is suspended. - - - ***Example:* - - Following example suspends a device with category "Lost or stolen". You can - see available categories with ''/v3/device-block-categories/''. - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices//suspend - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "category": "lost_or_stolen", "description": "EXAMPLE: Customer contacted - via phone and reported device being stolen. Specific time of the theft was - not know. Device last used in May/2019"}'' - - ```' + description: "[Suspending a device](https://developer.pelion.com/docs/device-management/current/device-management/managing-devices-in-your-account.html#suspending-and-resuming-devices)\ + \ prevents it from connecting to Device Management. If a device is currently\ + \ connected, it disconnects and shows as deregistered.\n\nYou can also receive\ + \ [deregistration events](https://developer.pelion.com/docs/device-management-api/connect/)\ + \ in [notification channels](https://developer.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html).\n\ + \nAPI operations needing device transactions fail while a device is suspended.\n\ + \nExample use case to use suspending is that device is reported lost or stolen.\ + \ You can block the device to connect and this way prevent device to cause\ + \ unreliable data to your system.\n\n ***Example:*\n\n The following example\ + \ suspends a device with category \"Lost or stolen\". You can see available\ + \ categories with '/v3/device-block-categories/'.\n ```\n curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices//suspend\ + \ \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ + \ \\\n -d '{ \"category\": \"lost_or_stolen\", \"description\": \"EXAMPLE:\ + \ Customer contacted via phone and reported device being stolen. Specific\ + \ time of the theft was not know. Device last used in May/2019\"}'\n ```" operationId: Device_suspend parameters: - - description: The ID of the device. + - description: The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. in: path name: id required: true @@ -22039,7 +27339,7 @@ paths: in: body name: Block required: true - schema: *id027 + schema: *id034 responses: '204': description: Ok - Device suspended. @@ -22052,7 +27352,7 @@ paths: summary: Suspend a device. tags: - Device directory - lifecycle - x-origin: /home/circleci/project/device-directory/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\device-directory\public\swagger.yml /v3/firmware-images: get: description: 'List all firmware images. @@ -22065,7 +27365,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -22093,7 +27393,7 @@ paths: in: query name: include type: string - - description: "URL-encoded query string parameter to filter returned data\n\ + - description: "URL-encoded query string parameter to filter returned data.\n\ \n`?filter={URL-encoded query string}`\n\n###### Filterable fields:\n\n\ The table lists all the fields that can be filtered on with certain filters:\n\ \n\n \n \n \n * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_MECHANISM * * * @@ -52,9 +52,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_NET_ID * * * @@ -64,21 +64,21 @@ * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ENDPOINT_NAME * * * + * + * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_CREATED_AT * * * @@ -88,10 +88,9 @@ * * * + * * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEVICE_EXECUTION_MODE * * * @@ -101,21 +100,21 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_OPERATOR_SUSPENDED * * * * * - * - * + * + * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEPLOYED_STATE * * * @@ -137,21 +136,21 @@ * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_NAME * * * + * + * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DESCRIPTION * * * @@ -161,9 +160,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP * * * @@ -173,21 +172,21 @@ * * * - * + * * - * - * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP * * + * + * * + * + * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_VENDOR_ID * * * @@ -197,9 +196,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ACCOUNT_ID * * * @@ -209,21 +208,21 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_AUTO_UPDATE * * * * * - * - * + * + * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEVICE_KEY * * * @@ -233,9 +232,10 @@ * * * - * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px">lastOperatorSuspendedCategory + * * * * @@ -245,47 +245,45 @@ * * * + * * - * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_CA_ID * * * + * + * * * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEVICE_CLASS * * * + * + * * * * * - * + * * - * - * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_UPDATED_AT * * + * + * * + * + * * * + * * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE * * * @@ -307,21 +305,21 @@ * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ENDPOINT_TYPE * * * + * + * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_HOST_GATEWAY * * * @@ -331,9 +329,10 @@ * * * - * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px">lastSystemSuspendedCategory + * * * * @@ -343,9 +342,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_FIRMWARE_CHECKSUM * * * @@ -355,33 +354,33 @@ * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_MANIFEST_TIMESTAMP * * + * + * * * * * * - * + * * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE * * + * + * * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_SERIAL_NUMBER * * * @@ -391,9 +390,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_MECHANISM_URL * * * @@ -403,21 +402,22 @@ * * * - * * - * - * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px">lastOperatorSuspendedUpdatedAt + * * * + * + * * + * + * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_LIFECYCLE_STATUS * * * @@ -428,21 +428,21 @@ * * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px">lastSystemSuspendedUpdatedAt * - * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT * * + * + * * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEPLOYMENT * * * @@ -452,14 +452,26 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_SYSTEM_SUSPENDED + * + * + * + * * * + * + * + * + * + * * * * + * + * * * * @@ -615,6 +627,11 @@ public class DeviceListOptions extends ListOptions { */ public static final String TAG_FILTER_BY_NAME = "name"; + /** + * Tag for filter by netId. + */ + public static final String TAG_FILTER_BY_NET_ID = "netId"; + /** * Tag for filter by operatorSuspended. */ @@ -722,1037 +739,993 @@ public DeviceListOptions(String after, Filters filter) { } /** - * Gets all the filters defined on field {@code autoUpdate}. + * Gets all the filters defined on field {@code lastOperatorSuspendedUpdatedAt}. * - * @return All the filters by {@code autoUpdate} + * @return All the filters by {@code lastOperatorSuspendedUpdatedAt} */ - public List getAutoUpdateFilters() { - return fetchFilters(TAG_FILTER_BY_AUTO_UPDATE); + public List getLastOperatorSuspendedUpdatedAtFilters() { + return fetchFilters(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT); } /** - * Sets "an equal to" filter by {@code autoUpdate}. + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByAutoUpdate + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addEqualToAutoUpdateFilter(boolean filterByAutoUpdate) { - addEqualFilter(TAG_FILTER_BY_AUTO_UPDATE, Boolean.valueOf(filterByAutoUpdate)); + public void addInLastOperatorSuspendedUpdatedAtsFilter(String filterByLastOperatorSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "an equal to" filter by {@code autoUpdate}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToAutoUpdateFilter(boolean)} + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByAutoUpdate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T equalToAutoUpdate(boolean filterByAutoUpdate) { - addEqualToAutoUpdateFilter(filterByAutoUpdate); - return (T) this; + public void addInLastOperatorSuspendedUpdatedAtsFilter(List filterByLastOperatorSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a not equal to" filter by {@code autoUpdate}. + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByAutoUpdate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addNotEqualToAutoUpdateFilter(boolean filterByAutoUpdate) { - addNotEqualFilter(TAG_FILTER_BY_AUTO_UPDATE, Boolean.valueOf(filterByAutoUpdate)); - } - - /** - * Sets "a not equal to" filter by {@code autoUpdate}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToAutoUpdateFilter(boolean)} - * - * @param filterByAutoUpdate - * filter value. - * @param - * type of a device list options - * @return These list options - */ - @SuppressWarnings("unchecked") - public T notEqualToAutoUpdate(boolean filterByAutoUpdate) { - addNotEqualToAutoUpdateFilter(filterByAutoUpdate); - return (T) this; - } - - /** - * Gets all the filters defined on field {@code bootstrapExpirationDate}. - * - * @return All the filters by {@code bootstrapExpirationDate} - */ - public List getBootstrapExpirationDateFilters() { - return fetchFilters(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE); - } - - /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByBootstrapExpirationDate - * filter value. - */ - public void addInBootstrapExpirationDatesFilter(String filterByBootstrapExpirationDate) { - addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); - } - - /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. - * - * @param filterByBootstrapExpirationDate - * filter value. - */ - public void addInBootstrapExpirationDatesFilter(List filterByBootstrapExpirationDate) { - addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); - } - - /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. - * - * @param filterByBootstrapExpirationDate - * filter value. - */ - public void addInBootstrapExpirationDatesFilter(Date... filterByBootstrapExpirationDate) { - addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addInLastOperatorSuspendedUpdatedAtsFilter(Date... filterByLastOperatorSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(String)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inBootstrapExpirationDates(String filterByBootstrapExpirationDate) { - addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + inLastOperatorSuspendedUpdatedAts(String filterByLastOperatorSuspendedUpdatedAt) { + addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(java.util.List)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inBootstrapExpirationDates(List filterByBootstrapExpirationDate) { - addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + inLastOperatorSuspendedUpdatedAts(List filterByLastOperatorSuspendedUpdatedAt) { + addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code bootstrapExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(java.util.Date[])} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inBootstrapExpirationDates(Date... filterByBootstrapExpirationDate) { - addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + inLastOperatorSuspendedUpdatedAts(Date... filterByLastOperatorSuspendedUpdatedAt) { + addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addNotInBootstrapExpirationDatesFilter(String filterByBootstrapExpirationDate) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addNotInLastOperatorSuspendedUpdatedAtsFilter(String filterByLastOperatorSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addNotInBootstrapExpirationDatesFilter(List filterByBootstrapExpirationDate) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addNotInLastOperatorSuspendedUpdatedAtsFilter(List filterByLastOperatorSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addNotInBootstrapExpirationDatesFilter(Date... filterByBootstrapExpirationDate) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addNotInLastOperatorSuspendedUpdatedAtsFilter(Date... filterByLastOperatorSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(String)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrapExpirationDates(String filterByBootstrapExpirationDate) { - addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + notInLastOperatorSuspendedUpdatedAts(String filterByLastOperatorSuspendedUpdatedAt) { + addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(java.util.List)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrapExpirationDates(List filterByBootstrapExpirationDate) { - addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + notInLastOperatorSuspendedUpdatedAts(List filterByLastOperatorSuspendedUpdatedAt) { + addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrapExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(java.util.Date[])} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrapExpirationDates(Date... filterByBootstrapExpirationDate) { - addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + public T + notInLastOperatorSuspendedUpdatedAts(Date... filterByLastOperatorSuspendedUpdatedAt) { + addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "a less than" filter by {@code bootstrapExpirationDate}. + * Sets "a less than" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addLessThanBootstrapExpirationDateFilter(Date filterByBootstrapExpirationDate) { - addLessThanFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addLessThanLastOperatorSuspendedUpdatedAtFilter(Date filterByLastOperatorSuspendedUpdatedAt) { + addLessThanFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a less than" filter by {@code bootstrapExpirationDate}. + * Sets "a less than" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanBootstrapExpirationDateFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanLastOperatorSuspendedUpdatedAtFilter(java.util.Date)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T lessThanBootstrapExpirationDate(Date filterByBootstrapExpirationDate) { - addLessThanBootstrapExpirationDateFilter(filterByBootstrapExpirationDate); + public T + lessThanLastOperatorSuspendedUpdatedAt(Date filterByLastOperatorSuspendedUpdatedAt) { + addLessThanLastOperatorSuspendedUpdatedAtFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Sets "a greater than" filter by {@code bootstrapExpirationDate}. + * Sets "a greater than" filter by {@code lastOperatorSuspendedUpdatedAt}. * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. */ - public void addGreaterThanBootstrapExpirationDateFilter(Date filterByBootstrapExpirationDate) { - addGreaterThanFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); + public void addGreaterThanLastOperatorSuspendedUpdatedAtFilter(Date filterByLastOperatorSuspendedUpdatedAt) { + addGreaterThanFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); } /** - * Sets "a greater than" filter by {@code bootstrapExpirationDate}. + * Sets "a greater than" filter by {@code lastOperatorSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanBootstrapExpirationDateFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanLastOperatorSuspendedUpdatedAtFilter(java.util.Date)} * - * @param filterByBootstrapExpirationDate + * @param filterByLastOperatorSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T greaterThanBootstrapExpirationDate(Date filterByBootstrapExpirationDate) { - addGreaterThanBootstrapExpirationDateFilter(filterByBootstrapExpirationDate); + public T + greaterThanLastOperatorSuspendedUpdatedAt(Date filterByLastOperatorSuspendedUpdatedAt) { + addGreaterThanLastOperatorSuspendedUpdatedAtFilter(filterByLastOperatorSuspendedUpdatedAt); return (T) this; } /** - * Gets all the filters defined on field {@code createdAt}. + * Gets all the filters defined on field {@code enrolmentListTimestamp}. * - * @return All the filters by {@code createdAt} + * @return All the filters by {@code enrolmentListTimestamp} */ - public List getCreatedAtFilters() { - return fetchFilters(TAG_FILTER_BY_CREATED_AT); + public List getEnrolmentListTimestampFilters() { + return fetchFilters(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP); } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addInCreatedAtsFilter(String filterByCreatedAt) { - addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addInEnrolmentListTimestampsFilter(String filterByEnrolmentListTimestamp) { + addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addInCreatedAtsFilter(List filterByCreatedAt) { - addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addInEnrolmentListTimestampsFilter(List filterByEnrolmentListTimestamp) { + addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addInCreatedAtsFilter(Date... filterByCreatedAt) { - addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addInEnrolmentListTimestampsFilter(Date... filterByEnrolmentListTimestamp) { + addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(String)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCreatedAts(String filterByCreatedAt) { - addInCreatedAtsFilter(filterByCreatedAt); + public T inEnrolmentListTimestamps(String filterByEnrolmentListTimestamp) { + addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(java.util.List)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCreatedAts(List filterByCreatedAt) { - addInCreatedAtsFilter(filterByCreatedAt); + public T inEnrolmentListTimestamps(List filterByEnrolmentListTimestamp) { + addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code createdAt}. + * Sets "an in" filter by {@code enrolmentListTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(java.util.Date[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(java.util.Date[])} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCreatedAts(Date... filterByCreatedAt) { - addInCreatedAtsFilter(filterByCreatedAt); + public T inEnrolmentListTimestamps(Date... filterByEnrolmentListTimestamp) { + addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addNotInCreatedAtsFilter(String filterByCreatedAt) { - addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addNotInEnrolmentListTimestampsFilter(String filterByEnrolmentListTimestamp) { + addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addNotInCreatedAtsFilter(List filterByCreatedAt) { - addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addNotInEnrolmentListTimestampsFilter(List filterByEnrolmentListTimestamp) { + addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addNotInCreatedAtsFilter(Date... filterByCreatedAt) { - addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addNotInEnrolmentListTimestampsFilter(Date... filterByEnrolmentListTimestamp) { + addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(String)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCreatedAts(String filterByCreatedAt) { - addNotInCreatedAtsFilter(filterByCreatedAt); + public T notInEnrolmentListTimestamps(String filterByEnrolmentListTimestamp) { + addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(java.util.List)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCreatedAts(List filterByCreatedAt) { - addNotInCreatedAtsFilter(filterByCreatedAt); + public T notInEnrolmentListTimestamps(List filterByEnrolmentListTimestamp) { + addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code createdAt}. + * Sets "a not in" filter by {@code enrolmentListTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(java.util.Date[])} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCreatedAts(Date... filterByCreatedAt) { - addNotInCreatedAtsFilter(filterByCreatedAt); + public T notInEnrolmentListTimestamps(Date... filterByEnrolmentListTimestamp) { + addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "a less than" filter by {@code createdAt}. + * Sets "a less than" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addLessThanCreatedAtFilter(Date filterByCreatedAt) { - addLessThanFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addLessThanEnrolmentListTimestampFilter(Date filterByEnrolmentListTimestamp) { + addLessThanFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "a less than" filter by {@code createdAt}. + * Sets "a less than" filter by {@code enrolmentListTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanCreatedAtFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanEnrolmentListTimestampFilter(java.util.Date)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T lessThanCreatedAt(Date filterByCreatedAt) { - addLessThanCreatedAtFilter(filterByCreatedAt); + public T lessThanEnrolmentListTimestamp(Date filterByEnrolmentListTimestamp) { + addLessThanEnrolmentListTimestampFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Sets "a greater than" filter by {@code createdAt}. + * Sets "a greater than" filter by {@code enrolmentListTimestamp}. * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. */ - public void addGreaterThanCreatedAtFilter(Date filterByCreatedAt) { - addGreaterThanFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); + public void addGreaterThanEnrolmentListTimestampFilter(Date filterByEnrolmentListTimestamp) { + addGreaterThanFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); } /** - * Sets "a greater than" filter by {@code createdAt}. + * Sets "a greater than" filter by {@code enrolmentListTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanCreatedAtFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanEnrolmentListTimestampFilter(java.util.Date)} * - * @param filterByCreatedAt + * @param filterByEnrolmentListTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T greaterThanCreatedAt(Date filterByCreatedAt) { - addGreaterThanCreatedAtFilter(filterByCreatedAt); + public T greaterThanEnrolmentListTimestamp(Date filterByEnrolmentListTimestamp) { + addGreaterThanEnrolmentListTimestampFilter(filterByEnrolmentListTimestamp); return (T) this; } /** - * Gets all the filters defined on field {@code manifest}. + * Gets all the filters defined on field {@code deployedState}. * - * @return All the filters by {@code manifest} + * @return All the filters by {@code deployedState} */ - public List getManifestFilters() { - return fetchFilters(TAG_FILTER_BY_MANIFEST); + public List getDeployedStateFilters() { + return fetchFilters(TAG_FILTER_BY_DEPLOYED_STATE); } /** - * Sets "an equal to" filter by {@code manifest}. + * Sets "an equal to" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addEqualToManifestFilter(String filterByManifest) { - addEqualFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addEqualToDeployedStateFilter(DeviceDeployedState filterByDeployedState) { + addEqualFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "an equal to" filter by {@code manifest}. + * Sets "an equal to" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToManifestFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeployedStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToManifest(String filterByManifest) { - addEqualToManifestFilter(filterByManifest); + public T equalToDeployedState(DeviceDeployedState filterByDeployedState) { + addEqualToDeployedStateFilter(filterByDeployedState); return (T) this; } /** - * Sets "a not equal to" filter by {@code manifest}. + * Sets "a not equal to" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addNotEqualToManifestFilter(String filterByManifest) { - addNotEqualFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addNotEqualToDeployedStateFilter(DeviceDeployedState filterByDeployedState) { + addNotEqualFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "a not equal to" filter by {@code manifest}. + * Sets "a not equal to" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToManifestFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeployedStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToManifest(String filterByManifest) { - addNotEqualToManifestFilter(filterByManifest); + public T notEqualToDeployedState(DeviceDeployedState filterByDeployedState) { + addNotEqualToDeployedStateFilter(filterByDeployedState); return (T) this; } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addInManifestsFilter(String filterByManifest) { - addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addInDeployedStatesFilter(String filterByDeployedState) { + addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addInManifestsFilter(List filterByManifest) { - addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addInDeployedStatesFilter(List filterByDeployedState) { + addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addInManifestsFilter(String... filterByManifest) { - addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addInDeployedStatesFilter(DeviceDeployedState... filterByDeployedState) { + addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(String)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifests(String filterByManifest) { - addInManifestsFilter(filterByManifest); + public T inDeployedStates(String filterByDeployedState) { + addInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(java.util.List)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifests(List filterByManifest) { - addInManifestsFilter(filterByManifest); + public T inDeployedStates(List filterByDeployedState) { + addInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Sets "an in" filter by {@code manifest}. + * Sets "an in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState[])} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifests(String... filterByManifest) { - addInManifestsFilter(filterByManifest); + public T inDeployedStates(DeviceDeployedState... filterByDeployedState) { + addInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addNotInManifestsFilter(String filterByManifest) { - addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addNotInDeployedStatesFilter(String filterByDeployedState) { + addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addNotInManifestsFilter(List filterByManifest) { - addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addNotInDeployedStatesFilter(List filterByDeployedState) { + addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * - * @param filterByManifest + * @param filterByDeployedState * filter value. */ - public void addNotInManifestsFilter(String... filterByManifest) { - addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + public void addNotInDeployedStatesFilter(DeviceDeployedState... filterByDeployedState) { + addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(String)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifests(String filterByManifest) { - addNotInManifestsFilter(filterByManifest); + public T notInDeployedStates(String filterByDeployedState) { + addNotInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(java.util.List)} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifests(List filterByManifest) { - addNotInManifestsFilter(filterByManifest); + public T notInDeployedStates(List filterByDeployedState) { + addNotInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Sets "a not in" filter by {@code manifest}. + * Sets "a not in" filter by {@code deployedState}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState[])} * - * @param filterByManifest + * @param filterByDeployedState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifests(String... filterByManifest) { - addNotInManifestsFilter(filterByManifest); + public T notInDeployedStates(DeviceDeployedState... filterByDeployedState) { + addNotInDeployedStatesFilter(filterByDeployedState); return (T) this; } /** - * Gets all the filters defined on field {@code endpointType}. + * Gets all the filters defined on field {@code mechanism}. * - * @return All the filters by {@code endpointType} + * @return All the filters by {@code mechanism} */ - public List getEndpointTypeFilters() { - return fetchFilters(TAG_FILTER_BY_ENDPOINT_TYPE); + public List getMechanismFilters() { + return fetchFilters(TAG_FILTER_BY_MECHANISM); } /** - * Sets "an equal to" filter by {@code endpointType}. + * Sets "an equal to" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addEqualToEndpointTypeFilter(String filterByEndpointType) { - addEqualFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addEqualToMechanismFilter(DeviceMechanism filterByMechanism) { + addEqualFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "an equal to" filter by {@code endpointType}. + * Sets "an equal to" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToEndpointTypeFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToMechanismFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToEndpointType(String filterByEndpointType) { - addEqualToEndpointTypeFilter(filterByEndpointType); + public T equalToMechanism(DeviceMechanism filterByMechanism) { + addEqualToMechanismFilter(filterByMechanism); return (T) this; } /** - * Sets "a not equal to" filter by {@code endpointType}. + * Sets "a not equal to" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addNotEqualToEndpointTypeFilter(String filterByEndpointType) { - addNotEqualFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addNotEqualToMechanismFilter(DeviceMechanism filterByMechanism) { + addNotEqualFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "a not equal to" filter by {@code endpointType}. + * Sets "a not equal to" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToEndpointTypeFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToMechanismFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToEndpointType(String filterByEndpointType) { - addNotEqualToEndpointTypeFilter(filterByEndpointType); + public T notEqualToMechanism(DeviceMechanism filterByMechanism) { + addNotEqualToMechanismFilter(filterByMechanism); return (T) this; } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addInEndpointTypesFilter(String filterByEndpointType) { - addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addInMechanismsFilter(String filterByMechanism) { + addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addInEndpointTypesFilter(List filterByEndpointType) { - addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addInMechanismsFilter(List filterByMechanism) { + addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addInEndpointTypesFilter(String... filterByEndpointType) { - addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addInMechanismsFilter(DeviceMechanism... filterByMechanism) { + addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(String)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointTypes(String filterByEndpointType) { - addInEndpointTypesFilter(filterByEndpointType); + public T inMechanisms(String filterByMechanism) { + addInMechanismsFilter(filterByMechanism); return (T) this; } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(java.util.List)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointTypes(List filterByEndpointType) { - addInEndpointTypesFilter(filterByEndpointType); + public T inMechanisms(List filterByMechanism) { + addInMechanismsFilter(filterByMechanism); return (T) this; } /** - * Sets "an in" filter by {@code endpointType}. + * Sets "an in" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism[])} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointTypes(String... filterByEndpointType) { - addInEndpointTypesFilter(filterByEndpointType); + public T inMechanisms(DeviceMechanism... filterByMechanism) { + addInMechanismsFilter(filterByMechanism); return (T) this; } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addNotInEndpointTypesFilter(String filterByEndpointType) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addNotInMechanismsFilter(String filterByMechanism) { + addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addNotInEndpointTypesFilter(List filterByEndpointType) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addNotInMechanismsFilter(List filterByMechanism) { + addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * - * @param filterByEndpointType + * @param filterByMechanism * filter value. */ - public void addNotInEndpointTypesFilter(String... filterByEndpointType) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + public void addNotInMechanismsFilter(DeviceMechanism... filterByMechanism) { + addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(String)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointTypes(String filterByEndpointType) { - addNotInEndpointTypesFilter(filterByEndpointType); + public T notInMechanisms(String filterByMechanism) { + addNotInMechanismsFilter(filterByMechanism); return (T) this; } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(java.util.List)} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointTypes(List filterByEndpointType) { - addNotInEndpointTypesFilter(filterByEndpointType); + public T notInMechanisms(List filterByMechanism) { + addNotInMechanismsFilter(filterByMechanism); return (T) this; } /** - * Sets "a not in" filter by {@code endpointType}. + * Sets "a not in" filter by {@code mechanism}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism[])} * - * @param filterByEndpointType + * @param filterByMechanism * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointTypes(String... filterByEndpointType) { - addNotInEndpointTypesFilter(filterByEndpointType); + public T notInMechanisms(DeviceMechanism... filterByMechanism) { + addNotInMechanismsFilter(filterByMechanism); return (T) this; } @@ -1997,6731 +1970,7014 @@ public T notInDeviceKeys(String... filterByDeviceK } /** - * Gets all the filters defined on field {@code firmwareChecksum}. + * Gets all the filters defined on field {@code vendorId}. * - * @return All the filters by {@code firmwareChecksum} + * @return All the filters by {@code vendorId} */ - public List getFirmwareChecksumFilters() { - return fetchFilters(TAG_FILTER_BY_FIRMWARE_CHECKSUM); + public List getVendorIdFilters() { + return fetchFilters(TAG_FILTER_BY_VENDOR_ID); } /** - * Sets "an equal to" filter by {@code firmwareChecksum}. + * Sets "an equal to" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addEqualToFirmwareChecksumFilter(String filterByFirmwareChecksum) { - addEqualFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addEqualToVendorIdFilter(String filterByVendorId) { + addEqualFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "an equal to" filter by {@code firmwareChecksum}. + * Sets "an equal to" filter by {@code vendorId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToFirmwareChecksumFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToVendorIdFilter(String)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToFirmwareChecksum(String filterByFirmwareChecksum) { - addEqualToFirmwareChecksumFilter(filterByFirmwareChecksum); + public T equalToVendorId(String filterByVendorId) { + addEqualToVendorIdFilter(filterByVendorId); return (T) this; } /** - * Sets "a not equal to" filter by {@code firmwareChecksum}. + * Sets "a not equal to" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addNotEqualToFirmwareChecksumFilter(String filterByFirmwareChecksum) { - addNotEqualFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addNotEqualToVendorIdFilter(String filterByVendorId) { + addNotEqualFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "a not equal to" filter by {@code firmwareChecksum}. + * Sets "a not equal to" filter by {@code vendorId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToFirmwareChecksumFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToVendorIdFilter(String)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToFirmwareChecksum(String filterByFirmwareChecksum) { - addNotEqualToFirmwareChecksumFilter(filterByFirmwareChecksum); + public T notEqualToVendorId(String filterByVendorId) { + addNotEqualToVendorIdFilter(filterByVendorId); return (T) this; } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addInFirmwareChecksumsFilter(String filterByFirmwareChecksum) { - addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addInVendorIdsFilter(String filterByVendorId) { + addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addInFirmwareChecksumsFilter(List filterByFirmwareChecksum) { - addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addInVendorIdsFilter(List filterByVendorId) { + addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addInFirmwareChecksumsFilter(String... filterByFirmwareChecksum) { - addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addInVendorIdsFilter(String... filterByVendorId) { + addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(String)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inFirmwareChecksums(String filterByFirmwareChecksum) { - addInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T inVendorIds(String filterByVendorId) { + addInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(java.util.List)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inFirmwareChecksums(List filterByFirmwareChecksum) { - addInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T inVendorIds(List filterByVendorId) { + addInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Sets "an in" filter by {@code firmwareChecksum}. + * Sets "an in" filter by {@code vendorId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(String[])} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inFirmwareChecksums(String... filterByFirmwareChecksum) { - addInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T inVendorIds(String... filterByVendorId) { + addInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addNotInFirmwareChecksumsFilter(String filterByFirmwareChecksum) { - addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addNotInVendorIdsFilter(String filterByVendorId) { + addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addNotInFirmwareChecksumsFilter(List filterByFirmwareChecksum) { - addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addNotInVendorIdsFilter(List filterByVendorId) { + addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. */ - public void addNotInFirmwareChecksumsFilter(String... filterByFirmwareChecksum) { - addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); + public void addNotInVendorIdsFilter(String... filterByVendorId) { + addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(String)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInFirmwareChecksums(String filterByFirmwareChecksum) { - addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T notInVendorIds(String filterByVendorId) { + addNotInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(java.util.List)} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInFirmwareChecksums(List filterByFirmwareChecksum) { - addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T notInVendorIds(List filterByVendorId) { + addNotInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Sets "a not in" filter by {@code firmwareChecksum}. + * Sets "a not in" filter by {@code vendorId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(String[])} * - * @param filterByFirmwareChecksum + * @param filterByVendorId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInFirmwareChecksums(String... filterByFirmwareChecksum) { - addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); + public T notInVendorIds(String... filterByVendorId) { + addNotInVendorIdsFilter(filterByVendorId); return (T) this; } /** - * Gets all the filters defined on field {@code state}. + * Gets all the filters defined on field {@code lastSystemSuspendedUpdatedAt}. * - * @return All the filters by {@code state} + * @return All the filters by {@code lastSystemSuspendedUpdatedAt} */ - public List getStateFilters() { - return fetchFilters(TAG_FILTER_BY_STATE); + public List getLastSystemSuspendedUpdatedAtFilters() { + return fetchFilters(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT); } /** - * Sets "an equal to" filter by {@code state}. + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addEqualToStateFilter(DeviceState filterByState) { - addEqualFilter(TAG_FILTER_BY_STATE, filterByState); + public void addInLastSystemSuspendedUpdatedAtsFilter(String filterByLastSystemSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "an equal to" filter by {@code state}. + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * + * @param filterByLastSystemSuspendedUpdatedAt + * filter value. + */ + public void addInLastSystemSuspendedUpdatedAtsFilter(List filterByLastSystemSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + } + + /** + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * + * @param filterByLastSystemSuspendedUpdatedAt + * filter value. + */ + public void addInLastSystemSuspendedUpdatedAtsFilter(Date... filterByLastSystemSuspendedUpdatedAt) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + } + + /** + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(String)} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToState(DeviceState filterByState) { - addEqualToStateFilter(filterByState); + public T + inLastSystemSuspendedUpdatedAts(String filterByLastSystemSuspendedUpdatedAt) { + addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not equal to" filter by {@code state}. + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(java.util.List)} + * + * @param filterByLastSystemSuspendedUpdatedAt * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addNotEqualToStateFilter(DeviceState filterByState) { - addNotEqualFilter(TAG_FILTER_BY_STATE, filterByState); + @SuppressWarnings("unchecked") + public T + inLastSystemSuspendedUpdatedAts(List filterByLastSystemSuspendedUpdatedAt) { + addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + return (T) this; } /** - * Sets "a not equal to" filter by {@code state}. + * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(java.util.Date[])} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToState(DeviceState filterByState) { - addNotEqualToStateFilter(filterByState); + public T + inLastSystemSuspendedUpdatedAts(Date... filterByLastSystemSuspendedUpdatedAt) { + addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addInStatesFilter(String filterByState) { - addInFilter(TAG_FILTER_BY_STATE, filterByState); + public void addNotInLastSystemSuspendedUpdatedAtsFilter(String filterByLastSystemSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addInStatesFilter(List filterByState) { - addInFilter(TAG_FILTER_BY_STATE, filterByState); + public void addNotInLastSystemSuspendedUpdatedAtsFilter(List filterByLastSystemSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addInStatesFilter(DeviceState... filterByState) { - addInFilter(TAG_FILTER_BY_STATE, filterByState); + public void addNotInLastSystemSuspendedUpdatedAtsFilter(Date... filterByLastSystemSuspendedUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(String)} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inStates(String filterByState) { - addInStatesFilter(filterByState); + public T + notInLastSystemSuspendedUpdatedAts(String filterByLastSystemSuspendedUpdatedAt) { + addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(java.util.List)} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inStates(List filterByState) { - addInStatesFilter(filterByState); + public T + notInLastSystemSuspendedUpdatedAts(List filterByLastSystemSuspendedUpdatedAt) { + addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code state}. + * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(java.util.Date[])} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inStates(DeviceState... filterByState) { - addInStatesFilter(filterByState); + public T + notInLastSystemSuspendedUpdatedAts(Date... filterByLastSystemSuspendedUpdatedAt) { + addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code state}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * Sets "a less than" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addNotInStatesFilter(String filterByState) { - addNotInFilter(TAG_FILTER_BY_STATE, filterByState); + public void addLessThanLastSystemSuspendedUpdatedAtFilter(Date filterByLastSystemSuspendedUpdatedAt) { + addLessThanFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "a not in" filter by {@code state}. + * Sets "a less than" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanLastSystemSuspendedUpdatedAtFilter(java.util.Date)} + * + * @param filterByLastSystemSuspendedUpdatedAt * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addNotInStatesFilter(List filterByState) { - addNotInFilter(TAG_FILTER_BY_STATE, filterByState); + @SuppressWarnings("unchecked") + public T + lessThanLastSystemSuspendedUpdatedAt(Date filterByLastSystemSuspendedUpdatedAt) { + addLessThanLastSystemSuspendedUpdatedAtFilter(filterByLastSystemSuspendedUpdatedAt); + return (T) this; } /** - * Sets "a not in" filter by {@code state}. + * Sets "a greater than" filter by {@code lastSystemSuspendedUpdatedAt}. * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. */ - public void addNotInStatesFilter(DeviceState... filterByState) { - addNotInFilter(TAG_FILTER_BY_STATE, filterByState); + public void addGreaterThanLastSystemSuspendedUpdatedAtFilter(Date filterByLastSystemSuspendedUpdatedAt) { + addGreaterThanFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); } /** - * Sets "a not in" filter by {@code state}. + * Sets "a greater than" filter by {@code lastSystemSuspendedUpdatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanLastSystemSuspendedUpdatedAtFilter(java.util.Date)} * - * @param filterByState + * @param filterByLastSystemSuspendedUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInStates(String filterByState) { - addNotInStatesFilter(filterByState); + public T + greaterThanLastSystemSuspendedUpdatedAt(Date filterByLastSystemSuspendedUpdatedAt) { + addGreaterThanLastSystemSuspendedUpdatedAtFilter(filterByLastSystemSuspendedUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code state}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(java.util.List)} + * Gets all the filters defined on field {@code operatorSuspended}. * - * @param filterByState - * filter value. - * @param - * type of a device list options - * @return These list options + * @return All the filters by {@code operatorSuspended} */ - @SuppressWarnings("unchecked") - public T notInStates(List filterByState) { - addNotInStatesFilter(filterByState); - return (T) this; + public List getOperatorSuspendedFilters() { + return fetchFilters(TAG_FILTER_BY_OPERATOR_SUSPENDED); } /** - * Sets "a not in" filter by {@code state}. + * Sets "an equal to" filter by {@code operatorSuspended}. + * + * @param filterByOperatorSuspended + * filter value. + */ + public void addEqualToOperatorSuspendedFilter(boolean filterByOperatorSuspended) { + addEqualFilter(TAG_FILTER_BY_OPERATOR_SUSPENDED, Boolean.valueOf(filterByOperatorSuspended)); + } + + /** + * Sets "an equal to" filter by {@code operatorSuspended}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToOperatorSuspendedFilter(boolean)} * - * @param filterByState + * @param filterByOperatorSuspended * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInStates(DeviceState... filterByState) { - addNotInStatesFilter(filterByState); + public T equalToOperatorSuspended(boolean filterByOperatorSuspended) { + addEqualToOperatorSuspendedFilter(filterByOperatorSuspended); return (T) this; } /** - * Gets all the filters defined on field {@code deviceExecutionMode}. + * Sets "a not equal to" filter by {@code operatorSuspended}. * - * @return All the filters by {@code deviceExecutionMode} + * @param filterByOperatorSuspended + * filter value. */ - public List getDeviceExecutionModeFilters() { - return fetchFilters(TAG_FILTER_BY_DEVICE_EXECUTION_MODE); + public void addNotEqualToOperatorSuspendedFilter(boolean filterByOperatorSuspended) { + addNotEqualFilter(TAG_FILTER_BY_OPERATOR_SUSPENDED, Boolean.valueOf(filterByOperatorSuspended)); } /** - * Sets "an equal to" filter by {@code deviceExecutionMode}. + * Sets "a not equal to" filter by {@code operatorSuspended}. * - * @param filterByDeviceExecutionMode + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToOperatorSuspendedFilter(boolean)} + * + * @param filterByOperatorSuspended * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode) { - addEqualFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.valueOf(filterByDeviceExecutionMode)); + @SuppressWarnings("unchecked") + public T notEqualToOperatorSuspended(boolean filterByOperatorSuspended) { + addNotEqualToOperatorSuspendedFilter(filterByOperatorSuspended); + return (T) this; } /** - * Sets "an equal to" filter by {@code deviceExecutionMode}. + * Gets all the filters defined on field {@code manifest}. + * + * @return All the filters by {@code manifest} + */ + public List getManifestFilters() { + return fetchFilters(TAG_FILTER_BY_MANIFEST); + } + + /** + * Sets "an equal to" filter by {@code manifest}. + * + * @param filterByManifest + * filter value. + */ + public void addEqualToManifestFilter(String filterByManifest) { + addEqualFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); + } + + /** + * Sets "an equal to" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeviceExecutionModeFilter(int)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToManifestFilter(String)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToDeviceExecutionMode(int filterByDeviceExecutionMode) { - addEqualToDeviceExecutionModeFilter(filterByDeviceExecutionMode); + public T equalToManifest(String filterByManifest) { + addEqualToManifestFilter(filterByManifest); return (T) this; } /** - * Sets "a not equal to" filter by {@code deviceExecutionMode}. + * Sets "a not equal to" filter by {@code manifest}. * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode) { - addNotEqualFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.valueOf(filterByDeviceExecutionMode)); + public void addNotEqualToManifestFilter(String filterByManifest) { + addNotEqualFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "a not equal to" filter by {@code deviceExecutionMode}. + * Sets "a not equal to" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeviceExecutionModeFilter(int)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToManifestFilter(String)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode) { - addNotEqualToDeviceExecutionModeFilter(filterByDeviceExecutionMode); + public T notEqualToManifest(String filterByManifest) { + addNotEqualToManifestFilter(filterByManifest); return (T) this; } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addInDeviceExecutionModesFilter(String filterByDeviceExecutionMode) { - addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addInManifestsFilter(String filterByManifest) { + addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addInDeviceExecutionModesFilter(List filterByDeviceExecutionMode) { - addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addInManifestsFilter(List filterByManifest) { + addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addInDeviceExecutionModesFilter(Integer... filterByDeviceExecutionMode) { - addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addInManifestsFilter(String... filterByManifest) { + addInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(String)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceExecutionModes(String filterByDeviceExecutionMode) { - addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T inManifests(String filterByManifest) { + addInManifestsFilter(filterByManifest); return (T) this; } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(java.util.List)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceExecutionModes(List filterByDeviceExecutionMode) { - addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T inManifests(List filterByManifest) { + addInManifestsFilter(filterByManifest); return (T) this; } /** - * Sets "an in" filter by {@code deviceExecutionMode}. + * Sets "an in" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(Integer[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestsFilter(String[])} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceExecutionModes(Integer... filterByDeviceExecutionMode) { - addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T inManifests(String... filterByManifest) { + addInManifestsFilter(filterByManifest); return (T) this; } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addNotInDeviceExecutionModesFilter(String filterByDeviceExecutionMode) { - addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addNotInManifestsFilter(String filterByManifest) { + addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addNotInDeviceExecutionModesFilter(List filterByDeviceExecutionMode) { - addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addNotInManifestsFilter(List filterByManifest) { + addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. */ - public void addNotInDeviceExecutionModesFilter(Integer... filterByDeviceExecutionMode) { - addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); + public void addNotInManifestsFilter(String... filterByManifest) { + addNotInFilter(TAG_FILTER_BY_MANIFEST, filterByManifest); } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(String)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeviceExecutionModes(String filterByDeviceExecutionMode) { - addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T notInManifests(String filterByManifest) { + addNotInManifestsFilter(filterByManifest); return (T) this; } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(java.util.List)} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeviceExecutionModes(List filterByDeviceExecutionMode) { - addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T notInManifests(List filterByManifest) { + addNotInManifestsFilter(filterByManifest); return (T) this; } /** - * Sets "a not in" filter by {@code deviceExecutionMode}. + * Sets "a not in" filter by {@code manifest}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(Integer[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestsFilter(String[])} * - * @param filterByDeviceExecutionMode + * @param filterByManifest * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeviceExecutionModes(Integer... filterByDeviceExecutionMode) { - addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); + public T notInManifests(String... filterByManifest) { + addNotInManifestsFilter(filterByManifest); return (T) this; } /** - * Gets all the filters defined on field {@code accountId}. + * Gets all the filters defined on field {@code name}. * - * @return All the filters by {@code accountId} + * @return All the filters by {@code name} */ - public List getAccountIdFilters() { - return fetchFilters(TAG_FILTER_BY_ACCOUNT_ID); + public List getNameFilters() { + return fetchFilters(TAG_FILTER_BY_NAME); } /** - * Sets "an equal to" filter by {@code accountId}. + * Sets "an equal to" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addEqualToAccountIdFilter(String filterByAccountId) { - addEqualFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addEqualToNameFilter(String filterByName) { + addEqualFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "an equal to" filter by {@code accountId}. + * Sets "an equal to" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToAccountIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToNameFilter(String)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToAccountId(String filterByAccountId) { - addEqualToAccountIdFilter(filterByAccountId); + public T equalToName(String filterByName) { + addEqualToNameFilter(filterByName); return (T) this; } /** - * Sets "a not equal to" filter by {@code accountId}. + * Sets "a not equal to" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addNotEqualToAccountIdFilter(String filterByAccountId) { - addNotEqualFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addNotEqualToNameFilter(String filterByName) { + addNotEqualFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "a not equal to" filter by {@code accountId}. + * Sets "a not equal to" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToAccountIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToNameFilter(String)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToAccountId(String filterByAccountId) { - addNotEqualToAccountIdFilter(filterByAccountId); + public T notEqualToName(String filterByName) { + addNotEqualToNameFilter(filterByName); return (T) this; } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addInAccountIdsFilter(String filterByAccountId) { - addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addInNamesFilter(String filterByName) { + addInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addInAccountIdsFilter(List filterByAccountId) { - addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addInNamesFilter(List filterByName) { + addInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addInAccountIdsFilter(String... filterByAccountId) { - addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addInNamesFilter(String... filterByName) { + addInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(String)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inAccountIds(String filterByAccountId) { - addInAccountIdsFilter(filterByAccountId); + public T inNames(String filterByName) { + addInNamesFilter(filterByName); return (T) this; } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(java.util.List)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inAccountIds(List filterByAccountId) { - addInAccountIdsFilter(filterByAccountId); + public T inNames(List filterByName) { + addInNamesFilter(filterByName); return (T) this; } /** - * Sets "an in" filter by {@code accountId}. + * Sets "an in" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(String[])} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inAccountIds(String... filterByAccountId) { - addInAccountIdsFilter(filterByAccountId); + public T inNames(String... filterByName) { + addInNamesFilter(filterByName); return (T) this; } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addNotInAccountIdsFilter(String filterByAccountId) { - addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addNotInNamesFilter(String filterByName) { + addNotInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addNotInAccountIdsFilter(List filterByAccountId) { - addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addNotInNamesFilter(List filterByName) { + addNotInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * - * @param filterByAccountId + * @param filterByName * filter value. */ - public void addNotInAccountIdsFilter(String... filterByAccountId) { - addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + public void addNotInNamesFilter(String... filterByName) { + addNotInFilter(TAG_FILTER_BY_NAME, filterByName); } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(String)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInAccountIds(String filterByAccountId) { - addNotInAccountIdsFilter(filterByAccountId); + public T notInNames(String filterByName) { + addNotInNamesFilter(filterByName); return (T) this; } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(java.util.List)} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInAccountIds(List filterByAccountId) { - addNotInAccountIdsFilter(filterByAccountId); + public T notInNames(List filterByName) { + addNotInNamesFilter(filterByName); return (T) this; } /** - * Sets "a not in" filter by {@code accountId}. + * Sets "a not in" filter by {@code name}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(String[])} * - * @param filterByAccountId + * @param filterByName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInAccountIds(String... filterByAccountId) { - addNotInAccountIdsFilter(filterByAccountId); + public T notInNames(String... filterByName) { + addNotInNamesFilter(filterByName); return (T) this; } /** - * Gets all the filters defined on field {@code lifecycleStatus}. + * Gets all the filters defined on field {@code description}. * - * @return All the filters by {@code lifecycleStatus} + * @return All the filters by {@code description} */ - public List getLifecycleStatusFilters() { - return fetchFilters(TAG_FILTER_BY_LIFECYCLE_STATUS); + public List getDescriptionFilters() { + return fetchFilters(TAG_FILTER_BY_DESCRIPTION); } /** - * Sets "an equal to" filter by {@code lifecycleStatus}. + * Sets "an equal to" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addEqualToLifecycleStatusFilter(DeviceLifecycleStatus filterByLifecycleStatus) { - addEqualFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addEqualToDescriptionFilter(String filterByDescription) { + addEqualFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "an equal to" filter by {@code lifecycleStatus}. + * Sets "an equal to" filter by {@code description}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDescriptionFilter(String)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToLifecycleStatus(DeviceLifecycleStatus filterByLifecycleStatus) { - addEqualToLifecycleStatusFilter(filterByLifecycleStatus); + public T equalToDescription(String filterByDescription) { + addEqualToDescriptionFilter(filterByDescription); return (T) this; } /** - * Sets "a not equal to" filter by {@code lifecycleStatus}. + * Sets "a not equal to" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addNotEqualToLifecycleStatusFilter(DeviceLifecycleStatus filterByLifecycleStatus) { - addNotEqualFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addNotEqualToDescriptionFilter(String filterByDescription) { + addNotEqualFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "a not equal to" filter by {@code lifecycleStatus}. + * Sets "a not equal to" filter by {@code description}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDescriptionFilter(String)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToLifecycleStatus(DeviceLifecycleStatus filterByLifecycleStatus) { - addNotEqualToLifecycleStatusFilter(filterByLifecycleStatus); + public T notEqualToDescription(String filterByDescription) { + addNotEqualToDescriptionFilter(filterByDescription); return (T) this; } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addInLifecycleStatusFilter(String filterByLifecycleStatus) { - addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addInDescriptionsFilter(String filterByDescription) { + addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addInLifecycleStatusFilter(List filterByLifecycleStatus) { - addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addInDescriptionsFilter(List filterByDescription) { + addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addInLifecycleStatusFilter(DeviceLifecycleStatus... filterByLifecycleStatus) { - addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addInDescriptionsFilter(String... filterByDescription) { + addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(String)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inLifecycleStatus(String filterByLifecycleStatus) { - addInLifecycleStatusFilter(filterByLifecycleStatus); + public T inDescriptions(String filterByDescription) { + addInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(java.util.List)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inLifecycleStatus(List filterByLifecycleStatus) { - addInLifecycleStatusFilter(filterByLifecycleStatus); + public T inDescriptions(List filterByDescription) { + addInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Sets "an in" filter by {@code lifecycleStatus}. + * Sets "an in" filter by {@code description}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(String[])} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inLifecycleStatus(DeviceLifecycleStatus... filterByLifecycleStatus) { - addInLifecycleStatusFilter(filterByLifecycleStatus); + public T inDescriptions(String... filterByDescription) { + addInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addNotInLifecycleStatusFilter(String filterByLifecycleStatus) { - addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addNotInDescriptionsFilter(String filterByDescription) { + addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addNotInLifecycleStatusFilter(List filterByLifecycleStatus) { - addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addNotInDescriptionsFilter(List filterByDescription) { + addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. */ - public void addNotInLifecycleStatusFilter(DeviceLifecycleStatus... filterByLifecycleStatus) { - addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); + public void addNotInDescriptionsFilter(String... filterByDescription) { + addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(String)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInLifecycleStatus(String filterByLifecycleStatus) { - addNotInLifecycleStatusFilter(filterByLifecycleStatus); + public T notInDescriptions(String filterByDescription) { + addNotInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(java.util.List)} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInLifecycleStatus(List filterByLifecycleStatus) { - addNotInLifecycleStatusFilter(filterByLifecycleStatus); + public T notInDescriptions(List filterByDescription) { + addNotInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Sets "a not in" filter by {@code lifecycleStatus}. + * Sets "a not in" filter by {@code description}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(String[])} * - * @param filterByLifecycleStatus + * @param filterByDescription * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInLifecycleStatus(DeviceLifecycleStatus... filterByLifecycleStatus) { - addNotInLifecycleStatusFilter(filterByLifecycleStatus); + public T notInDescriptions(String... filterByDescription) { + addNotInDescriptionsFilter(filterByDescription); return (T) this; } /** - * Gets all the filters defined on field {@code mechanismUrl}. + * Gets all the filters defined on field {@code caId}. * - * @return All the filters by {@code mechanismUrl} + * @return All the filters by {@code caId} */ - public List getMechanismUrlFilters() { - return fetchFilters(TAG_FILTER_BY_MECHANISM_URL); + public List getCaIdFilters() { + return fetchFilters(TAG_FILTER_BY_CA_ID); } /** - * Sets "an equal to" filter by {@code mechanismUrl}. + * Sets "an equal to" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addEqualToMechanismUrlFilter(String filterByMechanismUrl) { - addEqualFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addEqualToCaIdFilter(String filterByCaId) { + addEqualFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "an equal to" filter by {@code mechanismUrl}. + * Sets "an equal to" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToMechanismUrlFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToCaIdFilter(String)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToMechanismUrl(String filterByMechanismUrl) { - addEqualToMechanismUrlFilter(filterByMechanismUrl); + public T equalToCaId(String filterByCaId) { + addEqualToCaIdFilter(filterByCaId); return (T) this; } /** - * Sets "a not equal to" filter by {@code mechanismUrl}. + * Sets "a not equal to" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addNotEqualToMechanismUrlFilter(String filterByMechanismUrl) { - addNotEqualFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addNotEqualToCaIdFilter(String filterByCaId) { + addNotEqualFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "a not equal to" filter by {@code mechanismUrl}. + * Sets "a not equal to" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToMechanismUrlFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToCaIdFilter(String)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToMechanismUrl(String filterByMechanismUrl) { - addNotEqualToMechanismUrlFilter(filterByMechanismUrl); + public T notEqualToCaId(String filterByCaId) { + addNotEqualToCaIdFilter(filterByCaId); return (T) this; } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addInMechanismUrlsFilter(String filterByMechanismUrl) { - addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addInCaIdsFilter(String filterByCaId) { + addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addInMechanismUrlsFilter(List filterByMechanismUrl) { - addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addInCaIdsFilter(List filterByCaId) { + addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addInMechanismUrlsFilter(String... filterByMechanismUrl) { - addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addInCaIdsFilter(String... filterByCaId) { + addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(String)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanismUrls(String filterByMechanismUrl) { - addInMechanismUrlsFilter(filterByMechanismUrl); + public T inCaIds(String filterByCaId) { + addInCaIdsFilter(filterByCaId); return (T) this; } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(java.util.List)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanismUrls(List filterByMechanismUrl) { - addInMechanismUrlsFilter(filterByMechanismUrl); + public T inCaIds(List filterByCaId) { + addInCaIdsFilter(filterByCaId); return (T) this; } /** - * Sets "an in" filter by {@code mechanismUrl}. + * Sets "an in" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(String[])} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanismUrls(String... filterByMechanismUrl) { - addInMechanismUrlsFilter(filterByMechanismUrl); + public T inCaIds(String... filterByCaId) { + addInCaIdsFilter(filterByCaId); return (T) this; } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addNotInMechanismUrlsFilter(String filterByMechanismUrl) { - addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addNotInCaIdsFilter(String filterByCaId) { + addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addNotInMechanismUrlsFilter(List filterByMechanismUrl) { - addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addNotInCaIdsFilter(List filterByCaId) { + addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. */ - public void addNotInMechanismUrlsFilter(String... filterByMechanismUrl) { - addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); + public void addNotInCaIdsFilter(String... filterByCaId) { + addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(String)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanismUrls(String filterByMechanismUrl) { - addNotInMechanismUrlsFilter(filterByMechanismUrl); + public T notInCaIds(String filterByCaId) { + addNotInCaIdsFilter(filterByCaId); return (T) this; } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(java.util.List)} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanismUrls(List filterByMechanismUrl) { - addNotInMechanismUrlsFilter(filterByMechanismUrl); + public T notInCaIds(List filterByCaId) { + addNotInCaIdsFilter(filterByCaId); return (T) this; } /** - * Sets "a not in" filter by {@code mechanismUrl}. + * Sets "a not in" filter by {@code caId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(String[])} * - * @param filterByMechanismUrl + * @param filterByCaId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanismUrls(String... filterByMechanismUrl) { - addNotInMechanismUrlsFilter(filterByMechanismUrl); + public T notInCaIds(String... filterByCaId) { + addNotInCaIdsFilter(filterByCaId); return (T) this; } /** - * Gets all the filters defined on field {@code vendorId}. + * Gets all the filters defined on field {@code netId}. * - * @return All the filters by {@code vendorId} + * @return All the filters by {@code netId} */ - public List getVendorIdFilters() { - return fetchFilters(TAG_FILTER_BY_VENDOR_ID); + public List getNetIdFilters() { + return fetchFilters(TAG_FILTER_BY_NET_ID); } /** - * Sets "an equal to" filter by {@code vendorId}. + * Sets "an equal to" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addEqualToVendorIdFilter(String filterByVendorId) { - addEqualFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addEqualToNetIdFilter(String filterByNetId) { + addEqualFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "an equal to" filter by {@code vendorId}. + * Sets "an equal to" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToVendorIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToNetIdFilter(String)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToVendorId(String filterByVendorId) { - addEqualToVendorIdFilter(filterByVendorId); + public T equalToNetId(String filterByNetId) { + addEqualToNetIdFilter(filterByNetId); return (T) this; } /** - * Sets "a not equal to" filter by {@code vendorId}. + * Sets "a not equal to" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addNotEqualToVendorIdFilter(String filterByVendorId) { - addNotEqualFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addNotEqualToNetIdFilter(String filterByNetId) { + addNotEqualFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "a not equal to" filter by {@code vendorId}. + * Sets "a not equal to" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToVendorIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToNetIdFilter(String)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToVendorId(String filterByVendorId) { - addNotEqualToVendorIdFilter(filterByVendorId); + public T notEqualToNetId(String filterByNetId) { + addNotEqualToNetIdFilter(filterByNetId); return (T) this; } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addInVendorIdsFilter(String filterByVendorId) { - addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addInNetIdsFilter(String filterByNetId) { + addInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addInVendorIdsFilter(List filterByVendorId) { - addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addInNetIdsFilter(List filterByNetId) { + addInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addInVendorIdsFilter(String... filterByVendorId) { - addInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addInNetIdsFilter(String... filterByNetId) { + addInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNetIdsFilter(String)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inVendorIds(String filterByVendorId) { - addInVendorIdsFilter(filterByVendorId); + public T inNetIds(String filterByNetId) { + addInNetIdsFilter(filterByNetId); return (T) this; } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNetIdsFilter(java.util.List)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inVendorIds(List filterByVendorId) { - addInVendorIdsFilter(filterByVendorId); + public T inNetIds(List filterByNetId) { + addInNetIdsFilter(filterByNetId); return (T) this; } /** - * Sets "an in" filter by {@code vendorId}. + * Sets "an in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInVendorIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNetIdsFilter(String[])} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inVendorIds(String... filterByVendorId) { - addInVendorIdsFilter(filterByVendorId); + public T inNetIds(String... filterByNetId) { + addInNetIdsFilter(filterByNetId); return (T) this; } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addNotInVendorIdsFilter(String filterByVendorId) { - addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addNotInNetIdsFilter(String filterByNetId) { + addNotInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addNotInVendorIdsFilter(List filterByVendorId) { - addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addNotInNetIdsFilter(List filterByNetId) { + addNotInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * - * @param filterByVendorId + * @param filterByNetId * filter value. */ - public void addNotInVendorIdsFilter(String... filterByVendorId) { - addNotInFilter(TAG_FILTER_BY_VENDOR_ID, filterByVendorId); + public void addNotInNetIdsFilter(String... filterByNetId) { + addNotInFilter(TAG_FILTER_BY_NET_ID, filterByNetId); } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNetIdsFilter(String)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInVendorIds(String filterByVendorId) { - addNotInVendorIdsFilter(filterByVendorId); + public T notInNetIds(String filterByNetId) { + addNotInNetIdsFilter(filterByNetId); return (T) this; } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNetIdsFilter(java.util.List)} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInVendorIds(List filterByVendorId) { - addNotInVendorIdsFilter(filterByVendorId); + public T notInNetIds(List filterByNetId) { + addNotInNetIdsFilter(filterByNetId); return (T) this; } /** - * Sets "a not in" filter by {@code vendorId}. + * Sets "a not in" filter by {@code netId}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInVendorIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNetIdsFilter(String[])} * - * @param filterByVendorId + * @param filterByNetId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInVendorIds(String... filterByVendorId) { - addNotInVendorIdsFilter(filterByVendorId); + public T notInNetIds(String... filterByNetId) { + addNotInNetIdsFilter(filterByNetId); return (T) this; } /** - * Gets all the filters defined on field {@code deviceClass}. + * Gets all the filters defined on field {@code updatedAt}. * - * @return All the filters by {@code deviceClass} + * @return All the filters by {@code updatedAt} */ - public List getDeviceClassFilters() { - return fetchFilters(TAG_FILTER_BY_DEVICE_CLASS); + public List getUpdatedAtFilters() { + return fetchFilters(TAG_FILTER_BY_UPDATED_AT); } /** - * Sets "an equal to" filter by {@code deviceClass}. + * Sets "an in" filter by {@code updatedAt}. * - * @param filterByDeviceClass + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByUpdatedAt * filter value. */ - public void addEqualToDeviceClassFilter(String filterByDeviceClass) { - addEqualFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + public void addInUpdatedAtsFilter(String filterByUpdatedAt) { + addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "an equal to" filter by {@code deviceClass}. + * Sets "an in" filter by {@code updatedAt}. * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeviceClassFilter(String)} + * @param filterByUpdatedAt + * filter value. + */ + public void addInUpdatedAtsFilter(List filterByUpdatedAt) { + addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + } + + /** + * Sets "an in" filter by {@code updatedAt}. * - * @param filterByDeviceClass + * @param filterByUpdatedAt + * filter value. + */ + public void addInUpdatedAtsFilter(Date... filterByUpdatedAt) { + addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + } + + /** + * Sets "an in" filter by {@code updatedAt}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(String)} + * + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToDeviceClass(String filterByDeviceClass) { - addEqualToDeviceClassFilter(filterByDeviceClass); + public T inUpdatedAts(String filterByUpdatedAt) { + addInUpdatedAtsFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "a not equal to" filter by {@code deviceClass}. + * Sets "an in" filter by {@code updatedAt}. * - * @param filterByDeviceClass + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(java.util.List)} + * + * @param filterByUpdatedAt * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addNotEqualToDeviceClassFilter(String filterByDeviceClass) { - addNotEqualFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + @SuppressWarnings("unchecked") + public T inUpdatedAts(List filterByUpdatedAt) { + addInUpdatedAtsFilter(filterByUpdatedAt); + return (T) this; } /** - * Sets "a not equal to" filter by {@code deviceClass}. + * Sets "an in" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeviceClassFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(java.util.Date[])} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToDeviceClass(String filterByDeviceClass) { - addNotEqualToDeviceClassFilter(filterByDeviceClass); + public T inUpdatedAts(Date... filterByUpdatedAt) { + addInUpdatedAtsFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. */ - public void addInDeviceClassFilter(String filterByDeviceClass) { - addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + public void addNotInUpdatedAtsFilter(String filterByUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. */ - public void addInDeviceClassFilter(List filterByDeviceClass) { - addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + public void addNotInUpdatedAtsFilter(List filterByUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. */ - public void addInDeviceClassFilter(String... filterByDeviceClass) { - addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + public void addNotInUpdatedAtsFilter(Date... filterByUpdatedAt) { + addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(String)} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceClass(String filterByDeviceClass) { - addInDeviceClassFilter(filterByDeviceClass); + public T notInUpdatedAts(String filterByUpdatedAt) { + addNotInUpdatedAtsFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(java.util.List)} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceClass(List filterByDeviceClass) { - addInDeviceClassFilter(filterByDeviceClass); + public T notInUpdatedAts(List filterByUpdatedAt) { + addNotInUpdatedAtsFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "an in" filter by {@code deviceClass}. + * Sets "a not in" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(java.util.Date[])} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeviceClass(String... filterByDeviceClass) { - addInDeviceClassFilter(filterByDeviceClass); + public T notInUpdatedAts(Date... filterByUpdatedAt) { + addNotInUpdatedAtsFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code deviceClass}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByDeviceClass - * filter value. - */ - public void addNotInDeviceClassFilter(String filterByDeviceClass) { - addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); - } - - /** - * Sets "a not in" filter by {@code deviceClass}. - * - * @param filterByDeviceClass - * filter value. - */ - public void addNotInDeviceClassFilter(List filterByDeviceClass) { - addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); - } - - /** - * Sets "a not in" filter by {@code deviceClass}. + * Sets "a less than" filter by {@code updatedAt}. * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. */ - public void addNotInDeviceClassFilter(String... filterByDeviceClass) { - addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); + public void addLessThanUpdatedAtFilter(Date filterByUpdatedAt) { + addLessThanFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "a not in" filter by {@code deviceClass}. + * Sets "a less than" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanUpdatedAtFilter(java.util.Date)} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeviceClass(String filterByDeviceClass) { - addNotInDeviceClassFilter(filterByDeviceClass); + public T lessThanUpdatedAt(Date filterByUpdatedAt) { + addLessThanUpdatedAtFilter(filterByUpdatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code deviceClass}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(java.util.List)} + * Sets "a greater than" filter by {@code updatedAt}. * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T notInDeviceClass(List filterByDeviceClass) { - addNotInDeviceClassFilter(filterByDeviceClass); - return (T) this; + public void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt) { + addGreaterThanFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); } /** - * Sets "a not in" filter by {@code deviceClass}. + * Sets "a greater than" filter by {@code updatedAt}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanUpdatedAtFilter(java.util.Date)} * - * @param filterByDeviceClass + * @param filterByUpdatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeviceClass(String... filterByDeviceClass) { - addNotInDeviceClassFilter(filterByDeviceClass); + public T greaterThanUpdatedAt(Date filterByUpdatedAt) { + addGreaterThanUpdatedAtFilter(filterByUpdatedAt); return (T) this; } /** - * Gets all the filters defined on field {@code hostGateway}. + * Gets all the filters defined on field {@code mechanismUrl}. * - * @return All the filters by {@code hostGateway} + * @return All the filters by {@code mechanismUrl} */ - public List getHostGatewayFilters() { - return fetchFilters(TAG_FILTER_BY_HOST_GATEWAY); + public List getMechanismUrlFilters() { + return fetchFilters(TAG_FILTER_BY_MECHANISM_URL); } /** - * Sets "an equal to" filter by {@code hostGateway}. + * Sets "an equal to" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addEqualToHostGatewayFilter(String filterByHostGateway) { - addEqualFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addEqualToMechanismUrlFilter(String filterByMechanismUrl) { + addEqualFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "an equal to" filter by {@code hostGateway}. + * Sets "an equal to" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToHostGatewayFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToMechanismUrlFilter(String)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToHostGateway(String filterByHostGateway) { - addEqualToHostGatewayFilter(filterByHostGateway); + public T equalToMechanismUrl(String filterByMechanismUrl) { + addEqualToMechanismUrlFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "a not equal to" filter by {@code hostGateway}. + * Sets "a not equal to" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addNotEqualToHostGatewayFilter(String filterByHostGateway) { - addNotEqualFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addNotEqualToMechanismUrlFilter(String filterByMechanismUrl) { + addNotEqualFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "a not equal to" filter by {@code hostGateway}. + * Sets "a not equal to" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToHostGatewayFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToMechanismUrlFilter(String)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToHostGateway(String filterByHostGateway) { - addNotEqualToHostGatewayFilter(filterByHostGateway); + public T notEqualToMechanismUrl(String filterByMechanismUrl) { + addNotEqualToMechanismUrlFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addInHostGatewaysFilter(String filterByHostGateway) { - addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addInMechanismUrlsFilter(String filterByMechanismUrl) { + addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addInHostGatewaysFilter(List filterByHostGateway) { - addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addInMechanismUrlsFilter(List filterByMechanismUrl) { + addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addInHostGatewaysFilter(String... filterByHostGateway) { - addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addInMechanismUrlsFilter(String... filterByMechanismUrl) { + addInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(String)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inHostGateways(String filterByHostGateway) { - addInHostGatewaysFilter(filterByHostGateway); + public T inMechanismUrls(String filterByMechanismUrl) { + addInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(java.util.List)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inHostGateways(List filterByHostGateway) { - addInHostGatewaysFilter(filterByHostGateway); + public T inMechanismUrls(List filterByMechanismUrl) { + addInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "an in" filter by {@code hostGateway}. + * Sets "an in" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismUrlsFilter(String[])} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inHostGateways(String... filterByHostGateway) { - addInHostGatewaysFilter(filterByHostGateway); + public T inMechanismUrls(String... filterByMechanismUrl) { + addInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addNotInHostGatewaysFilter(String filterByHostGateway) { - addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addNotInMechanismUrlsFilter(String filterByMechanismUrl) { + addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addNotInHostGatewaysFilter(List filterByHostGateway) { - addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addNotInMechanismUrlsFilter(List filterByMechanismUrl) { + addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. */ - public void addNotInHostGatewaysFilter(String... filterByHostGateway) { - addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); + public void addNotInMechanismUrlsFilter(String... filterByMechanismUrl) { + addNotInFilter(TAG_FILTER_BY_MECHANISM_URL, filterByMechanismUrl); } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(String)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInHostGateways(String filterByHostGateway) { - addNotInHostGatewaysFilter(filterByHostGateway); + public T notInMechanismUrls(String filterByMechanismUrl) { + addNotInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(java.util.List)} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInHostGateways(List filterByHostGateway) { - addNotInHostGatewaysFilter(filterByHostGateway); + public T notInMechanismUrls(List filterByMechanismUrl) { + addNotInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Sets "a not in" filter by {@code hostGateway}. + * Sets "a not in" filter by {@code mechanismUrl}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismUrlsFilter(String[])} * - * @param filterByHostGateway + * @param filterByMechanismUrl * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInHostGateways(String... filterByHostGateway) { - addNotInHostGatewaysFilter(filterByHostGateway); + public T notInMechanismUrls(String... filterByMechanismUrl) { + addNotInMechanismUrlsFilter(filterByMechanismUrl); return (T) this; } /** - * Gets all the filters defined on field {@code bootstrappedTimestamp}. - * - * @return All the filters by {@code bootstrappedTimestamp} - */ - public List getBootstrappedTimestampFilters() { - return fetchFilters(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP); - } - - /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByBootstrappedTimestamp - * filter value. - */ - public void addInBootstrappedTimestampsFilter(String filterByBootstrappedTimestamp) { - addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); - } - - /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. + * Gets all the filters defined on field {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp - * filter value. + * @return All the filters by {@code lastSystemSuspendedCategory} */ - public void addInBootstrappedTimestampsFilter(List filterByBootstrappedTimestamp) { - addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public List getLastSystemSuspendedCategoryFilters() { + return fetchFilters(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY); } /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. + * Sets "an equal to" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addInBootstrappedTimestampsFilter(Date... filterByBootstrappedTimestamp) { - addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addEqualToLastSystemSuspendedCategoryFilter(String filterByLastSystemSuspendedCategory) { + addEqualFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. + * Sets "an equal to" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLastSystemSuspendedCategoryFilter(String)} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inBootstrappedTimestamps(String filterByBootstrappedTimestamp) { - addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); + public T + equalToLastSystemSuspendedCategory(String filterByLastSystemSuspendedCategory) { + addEqualToLastSystemSuspendedCategoryFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(java.util.List)} + * Sets "a not equal to" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T inBootstrappedTimestamps(List filterByBootstrappedTimestamp) { - addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); - return (T) this; + public void addNotEqualToLastSystemSuspendedCategoryFilter(String filterByLastSystemSuspendedCategory) { + addNotEqualFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "an in" filter by {@code bootstrappedTimestamp}. + * Sets "a not equal to" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLastSystemSuspendedCategoryFilter(String)} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inBootstrappedTimestamps(Date... filterByBootstrappedTimestamp) { - addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); + public T + notEqualToLastSystemSuspendedCategory(String filterByLastSystemSuspendedCategory) { + addNotEqualToLastSystemSuspendedCategoryFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addNotInBootstrappedTimestampsFilter(String filterByBootstrappedTimestamp) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addInLastSystemSuspendedCategoriesFilter(String filterByLastSystemSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addNotInBootstrappedTimestampsFilter(List filterByBootstrappedTimestamp) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addInLastSystemSuspendedCategoriesFilter(List filterByLastSystemSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addNotInBootstrappedTimestampsFilter(Date... filterByBootstrappedTimestamp) { - addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addInLastSystemSuspendedCategoriesFilter(String... filterByLastSystemSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(String)} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrappedTimestamps(String filterByBootstrappedTimestamp) { - addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); + public T inLastSystemSuspendedCategories(String filterByLastSystemSuspendedCategory) { + addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(java.util.List)} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrappedTimestamps(List filterByBootstrappedTimestamp) { - addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); + public T + inLastSystemSuspendedCategories(List filterByLastSystemSuspendedCategory) { + addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code bootstrappedTimestamp}. + * Sets "an in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(String[])} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInBootstrappedTimestamps(Date... filterByBootstrappedTimestamp) { - addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); + public T + inLastSystemSuspendedCategories(String... filterByLastSystemSuspendedCategory) { + addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "a less than" filter by {@code bootstrappedTimestamp}. + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addLessThanBootstrappedTimestampFilter(Date filterByBootstrappedTimestamp) { - addLessThanFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addNotInLastSystemSuspendedCategoriesFilter(String filterByLastSystemSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a less than" filter by {@code bootstrappedTimestamp}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanBootstrappedTimestampFilter(java.util.Date)} + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T lessThanBootstrappedTimestamp(Date filterByBootstrappedTimestamp) { - addLessThanBootstrappedTimestampFilter(filterByBootstrappedTimestamp); - return (T) this; + public void addNotInLastSystemSuspendedCategoriesFilter(List filterByLastSystemSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a greater than" filter by {@code bootstrappedTimestamp}. + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. */ - public void addGreaterThanBootstrappedTimestampFilter(Date filterByBootstrappedTimestamp) { - addGreaterThanFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); + public void addNotInLastSystemSuspendedCategoriesFilter(String... filterByLastSystemSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); } /** - * Sets "a greater than" filter by {@code bootstrappedTimestamp}. + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanBootstrappedTimestampFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(String)} * - * @param filterByBootstrappedTimestamp + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T greaterThanBootstrappedTimestamp(Date filterByBootstrappedTimestamp) { - addGreaterThanBootstrappedTimestampFilter(filterByBootstrappedTimestamp); + public T + notInLastSystemSuspendedCategories(String filterByLastSystemSuspendedCategory) { + addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Gets all the filters defined on field {@code systemSuspended}. - * - * @return All the filters by {@code systemSuspended} - */ - public List getSystemSuspendedFilters() { - return fetchFilters(TAG_FILTER_BY_SYSTEM_SUSPENDED); - } - - /** - * Sets "an equal to" filter by {@code systemSuspended}. - * - * @param filterBySystemSuspended - * filter value. - */ - public void addEqualToSystemSuspendedFilter(boolean filterBySystemSuspended) { - addEqualFilter(TAG_FILTER_BY_SYSTEM_SUSPENDED, Boolean.valueOf(filterBySystemSuspended)); - } - - /** - * Sets "an equal to" filter by {@code systemSuspended}. + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToSystemSuspendedFilter(boolean)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(java.util.List)} * - * @param filterBySystemSuspended + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToSystemSuspended(boolean filterBySystemSuspended) { - addEqualToSystemSuspendedFilter(filterBySystemSuspended); + public T + notInLastSystemSuspendedCategories(List filterByLastSystemSuspendedCategory) { + addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Sets "a not equal to" filter by {@code systemSuspended}. - * - * @param filterBySystemSuspended - * filter value. - */ - public void addNotEqualToSystemSuspendedFilter(boolean filterBySystemSuspended) { - addNotEqualFilter(TAG_FILTER_BY_SYSTEM_SUSPENDED, Boolean.valueOf(filterBySystemSuspended)); - } - - /** - * Sets "a not equal to" filter by {@code systemSuspended}. + * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToSystemSuspendedFilter(boolean)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(String[])} * - * @param filterBySystemSuspended + * @param filterByLastSystemSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToSystemSuspended(boolean filterBySystemSuspended) { - addNotEqualToSystemSuspendedFilter(filterBySystemSuspended); + public T + notInLastSystemSuspendedCategories(String... filterByLastSystemSuspendedCategory) { + addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); return (T) this; } /** - * Gets all the filters defined on field {@code lastSystemSuspendedCategory}. + * Gets all the filters defined on field {@code deviceClass}. * - * @return All the filters by {@code lastSystemSuspendedCategory} + * @return All the filters by {@code deviceClass} */ - public List getLastSystemSuspendedCategoryFilters() { - return fetchFilters(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY); + public List getDeviceClassFilters() { + return fetchFilters(TAG_FILTER_BY_DEVICE_CLASS); } /** - * Sets "an equal to" filter by {@code lastSystemSuspendedCategory}. + * Sets "an equal to" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addEqualToLastSystemSuspendedCategoryFilter(String filterByLastSystemSuspendedCategory) { - addEqualFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addEqualToDeviceClassFilter(String filterByDeviceClass) { + addEqualFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "an equal to" filter by {@code lastSystemSuspendedCategory}. + * Sets "an equal to" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLastSystemSuspendedCategoryFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeviceClassFilter(String)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - equalToLastSystemSuspendedCategory(String filterByLastSystemSuspendedCategory) { - addEqualToLastSystemSuspendedCategoryFilter(filterByLastSystemSuspendedCategory); + public T equalToDeviceClass(String filterByDeviceClass) { + addEqualToDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "a not equal to" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not equal to" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addNotEqualToLastSystemSuspendedCategoryFilter(String filterByLastSystemSuspendedCategory) { - addNotEqualFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addNotEqualToDeviceClassFilter(String filterByDeviceClass) { + addNotEqualFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "a not equal to" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not equal to" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLastSystemSuspendedCategoryFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeviceClassFilter(String)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notEqualToLastSystemSuspendedCategory(String filterByLastSystemSuspendedCategory) { - addNotEqualToLastSystemSuspendedCategoryFilter(filterByLastSystemSuspendedCategory); + public T notEqualToDeviceClass(String filterByDeviceClass) { + addNotEqualToDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addInLastSystemSuspendedCategoriesFilter(String filterByLastSystemSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addInDeviceClassFilter(String filterByDeviceClass) { + addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addInLastSystemSuspendedCategoriesFilter(List filterByLastSystemSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addInDeviceClassFilter(List filterByDeviceClass) { + addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addInLastSystemSuspendedCategoriesFilter(String... filterByLastSystemSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addInDeviceClassFilter(String... filterByDeviceClass) { + addInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(String)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inLastSystemSuspendedCategories(String filterByLastSystemSuspendedCategory) { - addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T inDeviceClass(String filterByDeviceClass) { + addInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(java.util.List)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastSystemSuspendedCategories(List filterByLastSystemSuspendedCategory) { - addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T inDeviceClass(List filterByDeviceClass) { + addInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedCategory}. + * Sets "an in" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedCategoriesFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceClassFilter(String[])} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastSystemSuspendedCategories(String... filterByLastSystemSuspendedCategory) { - addInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T inDeviceClass(String... filterByDeviceClass) { + addInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addNotInLastSystemSuspendedCategoriesFilter(String filterByLastSystemSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addNotInDeviceClassFilter(String filterByDeviceClass) { + addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addNotInLastSystemSuspendedCategoriesFilter(List filterByLastSystemSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addNotInDeviceClassFilter(List filterByDeviceClass) { + addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. */ - public void addNotInLastSystemSuspendedCategoriesFilter(String... filterByLastSystemSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, filterByLastSystemSuspendedCategory); + public void addNotInDeviceClassFilter(String... filterByDeviceClass) { + addNotInFilter(TAG_FILTER_BY_DEVICE_CLASS, filterByDeviceClass); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(String)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedCategories(String filterByLastSystemSuspendedCategory) { - addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T notInDeviceClass(String filterByDeviceClass) { + addNotInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(java.util.List)} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedCategories(List filterByLastSystemSuspendedCategory) { - addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T notInDeviceClass(List filterByDeviceClass) { + addNotInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedCategory}. + * Sets "a not in" filter by {@code deviceClass}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedCategoriesFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceClassFilter(String[])} * - * @param filterByLastSystemSuspendedCategory + * @param filterByDeviceClass * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedCategories(String... filterByLastSystemSuspendedCategory) { - addNotInLastSystemSuspendedCategoriesFilter(filterByLastSystemSuspendedCategory); + public T notInDeviceClass(String... filterByDeviceClass) { + addNotInDeviceClassFilter(filterByDeviceClass); return (T) this; } /** - * Gets all the filters defined on field {@code serialNumber}. + * Gets all the filters defined on field {@code hostGateway}. * - * @return All the filters by {@code serialNumber} + * @return All the filters by {@code hostGateway} */ - public List getSerialNumberFilters() { - return fetchFilters(TAG_FILTER_BY_SERIAL_NUMBER); + public List getHostGatewayFilters() { + return fetchFilters(TAG_FILTER_BY_HOST_GATEWAY); } /** - * Sets "an equal to" filter by {@code serialNumber}. + * Sets "an equal to" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addEqualToSerialNumberFilter(String filterBySerialNumber) { - addEqualFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addEqualToHostGatewayFilter(String filterByHostGateway) { + addEqualFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "an equal to" filter by {@code serialNumber}. + * Sets "an equal to" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToSerialNumberFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToHostGatewayFilter(String)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToSerialNumber(String filterBySerialNumber) { - addEqualToSerialNumberFilter(filterBySerialNumber); + public T equalToHostGateway(String filterByHostGateway) { + addEqualToHostGatewayFilter(filterByHostGateway); return (T) this; } /** - * Sets "a not equal to" filter by {@code serialNumber}. + * Sets "a not equal to" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addNotEqualToSerialNumberFilter(String filterBySerialNumber) { - addNotEqualFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addNotEqualToHostGatewayFilter(String filterByHostGateway) { + addNotEqualFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "a not equal to" filter by {@code serialNumber}. + * Sets "a not equal to" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToSerialNumberFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToHostGatewayFilter(String)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToSerialNumber(String filterBySerialNumber) { - addNotEqualToSerialNumberFilter(filterBySerialNumber); + public T notEqualToHostGateway(String filterByHostGateway) { + addNotEqualToHostGatewayFilter(filterByHostGateway); return (T) this; } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addInSerialNumbersFilter(String filterBySerialNumber) { - addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addInHostGatewaysFilter(String filterByHostGateway) { + addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addInSerialNumbersFilter(List filterBySerialNumber) { - addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addInHostGatewaysFilter(List filterByHostGateway) { + addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addInSerialNumbersFilter(String... filterBySerialNumber) { - addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addInHostGatewaysFilter(String... filterByHostGateway) { + addInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(String)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inSerialNumbers(String filterBySerialNumber) { - addInSerialNumbersFilter(filterBySerialNumber); + public T inHostGateways(String filterByHostGateway) { + addInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(java.util.List)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inSerialNumbers(List filterBySerialNumber) { - addInSerialNumbersFilter(filterBySerialNumber); + public T inHostGateways(List filterByHostGateway) { + addInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Sets "an in" filter by {@code serialNumber}. + * Sets "an in" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInHostGatewaysFilter(String[])} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inSerialNumbers(String... filterBySerialNumber) { - addInSerialNumbersFilter(filterBySerialNumber); + public T inHostGateways(String... filterByHostGateway) { + addInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addNotInSerialNumbersFilter(String filterBySerialNumber) { - addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addNotInHostGatewaysFilter(String filterByHostGateway) { + addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addNotInSerialNumbersFilter(List filterBySerialNumber) { - addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addNotInHostGatewaysFilter(List filterByHostGateway) { + addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. */ - public void addNotInSerialNumbersFilter(String... filterBySerialNumber) { - addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); + public void addNotInHostGatewaysFilter(String... filterByHostGateway) { + addNotInFilter(TAG_FILTER_BY_HOST_GATEWAY, filterByHostGateway); } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(String)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInSerialNumbers(String filterBySerialNumber) { - addNotInSerialNumbersFilter(filterBySerialNumber); + public T notInHostGateways(String filterByHostGateway) { + addNotInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(java.util.List)} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInSerialNumbers(List filterBySerialNumber) { - addNotInSerialNumbersFilter(filterBySerialNumber); + public T notInHostGateways(List filterByHostGateway) { + addNotInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Sets "a not in" filter by {@code serialNumber}. + * Sets "a not in" filter by {@code hostGateway}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInHostGatewaysFilter(String[])} * - * @param filterBySerialNumber + * @param filterByHostGateway * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInSerialNumbers(String... filterBySerialNumber) { - addNotInSerialNumbersFilter(filterBySerialNumber); + public T notInHostGateways(String... filterByHostGateway) { + addNotInHostGatewaysFilter(filterByHostGateway); return (T) this; } /** - * Gets all the filters defined on field {@code id}. + * Gets all the filters defined on field {@code serialNumber}. * - * @return All the filters by {@code id} + * @return All the filters by {@code serialNumber} */ - public List getIdFilters() { - return fetchFilters(TAG_FILTER_BY_ID); + public List getSerialNumberFilters() { + return fetchFilters(TAG_FILTER_BY_SERIAL_NUMBER); } /** - * Sets "an equal to" filter by {@code id}. + * Sets "an equal to" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addEqualToIdFilter(String filterById) { - addEqualFilter(TAG_FILTER_BY_ID, filterById); + public void addEqualToSerialNumberFilter(String filterBySerialNumber) { + addEqualFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "an equal to" filter by {@code id}. + * Sets "an equal to" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToSerialNumberFilter(String)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToId(String filterById) { - addEqualToIdFilter(filterById); + public T equalToSerialNumber(String filterBySerialNumber) { + addEqualToSerialNumberFilter(filterBySerialNumber); return (T) this; } /** - * Sets "a not equal to" filter by {@code id}. + * Sets "a not equal to" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addNotEqualToIdFilter(String filterById) { - addNotEqualFilter(TAG_FILTER_BY_ID, filterById); + public void addNotEqualToSerialNumberFilter(String filterBySerialNumber) { + addNotEqualFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "a not equal to" filter by {@code id}. + * Sets "a not equal to" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToSerialNumberFilter(String)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToId(String filterById) { - addNotEqualToIdFilter(filterById); + public T notEqualToSerialNumber(String filterBySerialNumber) { + addNotEqualToSerialNumberFilter(filterBySerialNumber); return (T) this; } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addInIdsFilter(String filterById) { - addInFilter(TAG_FILTER_BY_ID, filterById); + public void addInSerialNumbersFilter(String filterBySerialNumber) { + addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addInIdsFilter(List filterById) { - addInFilter(TAG_FILTER_BY_ID, filterById); + public void addInSerialNumbersFilter(List filterBySerialNumber) { + addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addInIdsFilter(String... filterById) { - addInFilter(TAG_FILTER_BY_ID, filterById); + public void addInSerialNumbersFilter(String... filterBySerialNumber) { + addInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(String)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inIds(String filterById) { - addInIdsFilter(filterById); + public T inSerialNumbers(String filterBySerialNumber) { + addInSerialNumbersFilter(filterBySerialNumber); return (T) this; } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(java.util.List)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inIds(List filterById) { - addInIdsFilter(filterById); + public T inSerialNumbers(List filterBySerialNumber) { + addInSerialNumbersFilter(filterBySerialNumber); return (T) this; } /** - * Sets "an in" filter by {@code id}. + * Sets "an in" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInSerialNumbersFilter(String[])} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inIds(String... filterById) { - addInIdsFilter(filterById); + public T inSerialNumbers(String... filterBySerialNumber) { + addInSerialNumbersFilter(filterBySerialNumber); return (T) this; } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addNotInIdsFilter(String filterById) { - addNotInFilter(TAG_FILTER_BY_ID, filterById); + public void addNotInSerialNumbersFilter(String filterBySerialNumber) { + addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addNotInIdsFilter(List filterById) { - addNotInFilter(TAG_FILTER_BY_ID, filterById); + public void addNotInSerialNumbersFilter(List filterBySerialNumber) { + addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. * - * @param filterById + * @param filterBySerialNumber * filter value. */ - public void addNotInIdsFilter(String... filterById) { - addNotInFilter(TAG_FILTER_BY_ID, filterById); + public void addNotInSerialNumbersFilter(String... filterBySerialNumber) { + addNotInFilter(TAG_FILTER_BY_SERIAL_NUMBER, filterBySerialNumber); } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(String)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInIds(String filterById) { - addNotInIdsFilter(filterById); + public T notInSerialNumbers(String filterBySerialNumber) { + addNotInSerialNumbersFilter(filterBySerialNumber); return (T) this; } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(java.util.List)} * - * @param filterById + * @param filterBySerialNumber * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInIds(List filterById) { - addNotInIdsFilter(filterById); + public T notInSerialNumbers(List filterBySerialNumber) { + addNotInSerialNumbersFilter(filterBySerialNumber); return (T) this; } /** - * Sets "a not in" filter by {@code id}. + * Sets "a not in" filter by {@code serialNumber}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInSerialNumbersFilter(String[])} + * + * @param filterBySerialNumber + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notInSerialNumbers(String... filterBySerialNumber) { + addNotInSerialNumbersFilter(filterBySerialNumber); + return (T) this; + } + + /** + * Gets all the filters defined on field {@code systemSuspended}. + * + * @return All the filters by {@code systemSuspended} + */ + public List getSystemSuspendedFilters() { + return fetchFilters(TAG_FILTER_BY_SYSTEM_SUSPENDED); + } + + /** + * Sets "an equal to" filter by {@code systemSuspended}. + * + * @param filterBySystemSuspended + * filter value. + */ + public void addEqualToSystemSuspendedFilter(boolean filterBySystemSuspended) { + addEqualFilter(TAG_FILTER_BY_SYSTEM_SUSPENDED, Boolean.valueOf(filterBySystemSuspended)); + } + + /** + * Sets "an equal to" filter by {@code systemSuspended}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToSystemSuspendedFilter(boolean)} + * + * @param filterBySystemSuspended + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T equalToSystemSuspended(boolean filterBySystemSuspended) { + addEqualToSystemSuspendedFilter(filterBySystemSuspended); + return (T) this; + } + + /** + * Sets "a not equal to" filter by {@code systemSuspended}. + * + * @param filterBySystemSuspended + * filter value. + */ + public void addNotEqualToSystemSuspendedFilter(boolean filterBySystemSuspended) { + addNotEqualFilter(TAG_FILTER_BY_SYSTEM_SUSPENDED, Boolean.valueOf(filterBySystemSuspended)); + } + + /** + * Sets "a not equal to" filter by {@code systemSuspended}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToSystemSuspendedFilter(boolean)} + * + * @param filterBySystemSuspended + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notEqualToSystemSuspended(boolean filterBySystemSuspended) { + addNotEqualToSystemSuspendedFilter(filterBySystemSuspended); + return (T) this; + } + + /** + * Gets all the filters defined on field {@code endpointType}. + * + * @return All the filters by {@code endpointType} + */ + public List getEndpointTypeFilters() { + return fetchFilters(TAG_FILTER_BY_ENDPOINT_TYPE); + } + + /** + * Sets "an equal to" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addEqualToEndpointTypeFilter(String filterByEndpointType) { + addEqualFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "an equal to" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToEndpointTypeFilter(String)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T equalToEndpointType(String filterByEndpointType) { + addEqualToEndpointTypeFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "a not equal to" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addNotEqualToEndpointTypeFilter(String filterByEndpointType) { + addNotEqualFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "a not equal to" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToEndpointTypeFilter(String)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notEqualToEndpointType(String filterByEndpointType) { + addNotEqualToEndpointTypeFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByEndpointType + * filter value. + */ + public void addInEndpointTypesFilter(String filterByEndpointType) { + addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addInEndpointTypesFilter(List filterByEndpointType) { + addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addInEndpointTypesFilter(String... filterByEndpointType) { + addInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(String)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T inEndpointTypes(String filterByEndpointType) { + addInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(java.util.List)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T inEndpointTypes(List filterByEndpointType) { + addInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "an in" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointTypesFilter(String[])} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T inEndpointTypes(String... filterByEndpointType) { + addInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByEndpointType + * filter value. + */ + public void addNotInEndpointTypesFilter(String filterByEndpointType) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addNotInEndpointTypesFilter(List filterByEndpointType) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + * @param filterByEndpointType + * filter value. + */ + public void addNotInEndpointTypesFilter(String... filterByEndpointType) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_TYPE, filterByEndpointType); + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(String)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notInEndpointTypes(String filterByEndpointType) { + addNotInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(java.util.List)} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notInEndpointTypes(List filterByEndpointType) { + addNotInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Sets "a not in" filter by {@code endpointType}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointTypesFilter(String[])} + * + * @param filterByEndpointType + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notInEndpointTypes(String... filterByEndpointType) { + addNotInEndpointTypesFilter(filterByEndpointType); + return (T) this; + } + + /** + * Gets all the filters defined on field {@code autoUpdate}. + * + * @return All the filters by {@code autoUpdate} + */ + public List getAutoUpdateFilters() { + return fetchFilters(TAG_FILTER_BY_AUTO_UPDATE); + } + + /** + * Sets "an equal to" filter by {@code autoUpdate}. + * + * @param filterByAutoUpdate + * filter value. + */ + public void addEqualToAutoUpdateFilter(boolean filterByAutoUpdate) { + addEqualFilter(TAG_FILTER_BY_AUTO_UPDATE, Boolean.valueOf(filterByAutoUpdate)); + } + + /** + * Sets "an equal to" filter by {@code autoUpdate}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToAutoUpdateFilter(boolean)} + * + * @param filterByAutoUpdate + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T equalToAutoUpdate(boolean filterByAutoUpdate) { + addEqualToAutoUpdateFilter(filterByAutoUpdate); + return (T) this; + } + + /** + * Sets "a not equal to" filter by {@code autoUpdate}. + * + * @param filterByAutoUpdate + * filter value. + */ + public void addNotEqualToAutoUpdateFilter(boolean filterByAutoUpdate) { + addNotEqualFilter(TAG_FILTER_BY_AUTO_UPDATE, Boolean.valueOf(filterByAutoUpdate)); + } + + /** + * Sets "a not equal to" filter by {@code autoUpdate}. + * + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToAutoUpdateFilter(boolean)} + * + * @param filterByAutoUpdate + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T notEqualToAutoUpdate(boolean filterByAutoUpdate) { + addNotEqualToAutoUpdateFilter(filterByAutoUpdate); + return (T) this; + } + + /** + * Gets all the filters defined on field {@code lastOperatorSuspendedCategory}. + * + * @return All the filters by {@code lastOperatorSuspendedCategory} + */ + public List getLastOperatorSuspendedCategoryFilters() { + return fetchFilters(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY); + } + + /** + * Sets "an equal to" filter by {@code lastOperatorSuspendedCategory}. + * + * @param filterByLastOperatorSuspendedCategory + * filter value. + */ + public void addEqualToLastOperatorSuspendedCategoryFilter(String filterByLastOperatorSuspendedCategory) { + addEqualFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + } + + /** + * Sets "an equal to" filter by {@code lastOperatorSuspendedCategory}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLastOperatorSuspendedCategoryFilter(String)} + * + * @param filterByLastOperatorSuspendedCategory + * filter value. + * @param + * type of a device list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T + equalToLastOperatorSuspendedCategory(String filterByLastOperatorSuspendedCategory) { + addEqualToLastOperatorSuspendedCategoryFilter(filterByLastOperatorSuspendedCategory); + return (T) this; + } + + /** + * Sets "a not equal to" filter by {@code lastOperatorSuspendedCategory}. + * + * @param filterByLastOperatorSuspendedCategory + * filter value. + */ + public void addNotEqualToLastOperatorSuspendedCategoryFilter(String filterByLastOperatorSuspendedCategory) { + addNotEqualFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + } + + /** + * Sets "a not equal to" filter by {@code lastOperatorSuspendedCategory}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLastOperatorSuspendedCategoryFilter(String)} * - * @param filterById + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInIds(String... filterById) { - addNotInIdsFilter(filterById); + public T + notEqualToLastOperatorSuspendedCategory(String filterByLastOperatorSuspendedCategory) { + addNotEqualToLastOperatorSuspendedCategoryFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Gets all the filters defined on field {@code connectorExpirationDate}. - * - * @return All the filters by {@code connectorExpirationDate} - */ - public List getConnectorExpirationDateFilters() { - return fetchFilters(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE); - } - - /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addInConnectorExpirationDatesFilter(String filterByConnectorExpirationDate) { - addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addInLastOperatorSuspendedCategoriesFilter(String filterByLastOperatorSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addInConnectorExpirationDatesFilter(List filterByConnectorExpirationDate) { - addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addInLastOperatorSuspendedCategoriesFilter(List filterByLastOperatorSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addInConnectorExpirationDatesFilter(Date... filterByConnectorExpirationDate) { - addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addInLastOperatorSuspendedCategoriesFilter(String... filterByLastOperatorSuspendedCategory) { + addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(String)} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inConnectorExpirationDates(String filterByConnectorExpirationDate) { - addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + inLastOperatorSuspendedCategories(String filterByLastOperatorSuspendedCategory) { + addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(java.util.List)} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inConnectorExpirationDates(List filterByConnectorExpirationDate) { - addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + inLastOperatorSuspendedCategories(List filterByLastOperatorSuspendedCategory) { + addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "an in" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(String[])} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inConnectorExpirationDates(Date... filterByConnectorExpirationDate) { - addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + inLastOperatorSuspendedCategories(String... filterByLastOperatorSuspendedCategory) { + addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addNotInConnectorExpirationDatesFilter(String filterByConnectorExpirationDate) { - addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addNotInLastOperatorSuspendedCategoriesFilter(String filterByLastOperatorSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addNotInConnectorExpirationDatesFilter(List filterByConnectorExpirationDate) { - addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addNotInLastOperatorSuspendedCategoriesFilter(List filterByLastOperatorSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. */ - public void addNotInConnectorExpirationDatesFilter(Date... filterByConnectorExpirationDate) { - addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addNotInLastOperatorSuspendedCategoriesFilter(String... filterByLastOperatorSuspendedCategory) { + addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(String)} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInConnectorExpirationDates(String filterByConnectorExpirationDate) { - addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + notInLastOperatorSuspendedCategories(String filterByLastOperatorSuspendedCategory) { + addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(java.util.List)} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInConnectorExpirationDates(List filterByConnectorExpirationDate) { - addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + notInLastOperatorSuspendedCategories(List filterByLastOperatorSuspendedCategory) { + addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "a not in" filter by {@code connectorExpirationDate}. + * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(String[])} * - * @param filterByConnectorExpirationDate + * @param filterByLastOperatorSuspendedCategory * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInConnectorExpirationDates(Date... filterByConnectorExpirationDate) { - addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); + public T + notInLastOperatorSuspendedCategories(String... filterByLastOperatorSuspendedCategory) { + addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); return (T) this; } /** - * Sets "a less than" filter by {@code connectorExpirationDate}. + * Gets all the filters defined on field {@code createdAt}. * - * @param filterByConnectorExpirationDate - * filter value. + * @return All the filters by {@code createdAt} */ - public void addLessThanConnectorExpirationDateFilter(Date filterByConnectorExpirationDate) { - addLessThanFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public List getCreatedAtFilters() { + return fetchFilters(TAG_FILTER_BY_CREATED_AT); } /** - * Sets "a less than" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code createdAt}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanConnectorExpirationDateFilter(java.util.Date)} + * Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByConnectorExpirationDate + * @param filterByCreatedAt * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T lessThanConnectorExpirationDate(Date filterByConnectorExpirationDate) { - addLessThanConnectorExpirationDateFilter(filterByConnectorExpirationDate); - return (T) this; + public void addInCreatedAtsFilter(String filterByCreatedAt) { + addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "a greater than" filter by {@code connectorExpirationDate}. + * Sets "an in" filter by {@code createdAt}. * - * @param filterByConnectorExpirationDate + * @param filterByCreatedAt * filter value. */ - public void addGreaterThanConnectorExpirationDateFilter(Date filterByConnectorExpirationDate) { - addGreaterThanFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); + public void addInCreatedAtsFilter(List filterByCreatedAt) { + addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "a greater than" filter by {@code connectorExpirationDate}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanConnectorExpirationDateFilter(java.util.Date)} + * Sets "an in" filter by {@code createdAt}. * - * @param filterByConnectorExpirationDate + * @param filterByCreatedAt * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T greaterThanConnectorExpirationDate(Date filterByConnectorExpirationDate) { - addGreaterThanConnectorExpirationDateFilter(filterByConnectorExpirationDate); - return (T) this; + public void addInCreatedAtsFilter(Date... filterByCreatedAt) { + addInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Gets all the filters defined on field {@code lastOperatorSuspendedCategory}. + * Sets "an in" filter by {@code createdAt}. * - * @return All the filters by {@code lastOperatorSuspendedCategory} - */ - public List getLastOperatorSuspendedCategoryFilters() { - return fetchFilters(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY); - } - - /** - * Sets "an equal to" filter by {@code lastOperatorSuspendedCategory}. + *

+ * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(String)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addEqualToLastOperatorSuspendedCategoryFilter(String filterByLastOperatorSuspendedCategory) { - addEqualFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + @SuppressWarnings("unchecked") + public T inCreatedAts(String filterByCreatedAt) { + addInCreatedAtsFilter(filterByCreatedAt); + return (T) this; } /** - * Sets "an equal to" filter by {@code lastOperatorSuspendedCategory}. + * Sets "an in" filter by {@code createdAt}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLastOperatorSuspendedCategoryFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(java.util.List)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - equalToLastOperatorSuspendedCategory(String filterByLastOperatorSuspendedCategory) { - addEqualToLastOperatorSuspendedCategoryFilter(filterByLastOperatorSuspendedCategory); + public T inCreatedAts(List filterByCreatedAt) { + addInCreatedAtsFilter(filterByCreatedAt); return (T) this; } /** - * Sets "a not equal to" filter by {@code lastOperatorSuspendedCategory}. - * - * @param filterByLastOperatorSuspendedCategory - * filter value. - */ - public void addNotEqualToLastOperatorSuspendedCategoryFilter(String filterByLastOperatorSuspendedCategory) { - addNotEqualFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); - } - - /** - * Sets "a not equal to" filter by {@code lastOperatorSuspendedCategory}. + * Sets "an in" filter by {@code createdAt}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLastOperatorSuspendedCategoryFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCreatedAtsFilter(java.util.Date[])} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notEqualToLastOperatorSuspendedCategory(String filterByLastOperatorSuspendedCategory) { - addNotEqualToLastOperatorSuspendedCategoryFilter(filterByLastOperatorSuspendedCategory); + public T inCreatedAts(Date... filterByCreatedAt) { + addInCreatedAtsFilter(filterByCreatedAt); return (T) this; } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. */ - public void addInLastOperatorSuspendedCategoriesFilter(String filterByLastOperatorSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + public void addNotInCreatedAtsFilter(String filterByCreatedAt) { + addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. */ - public void addInLastOperatorSuspendedCategoriesFilter(List filterByLastOperatorSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + public void addNotInCreatedAtsFilter(List filterByCreatedAt) { + addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. */ - public void addInLastOperatorSuspendedCategoriesFilter(String... filterByLastOperatorSuspendedCategory) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + public void addNotInCreatedAtsFilter(Date... filterByCreatedAt) { + addNotInFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(String)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedCategories(String filterByLastOperatorSuspendedCategory) { - addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); + public T notInCreatedAts(String filterByCreatedAt) { + addNotInCreatedAtsFilter(filterByCreatedAt); return (T) this; } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(java.util.List)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedCategories(List filterByLastOperatorSuspendedCategory) { - addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); + public T notInCreatedAts(List filterByCreatedAt) { + addNotInCreatedAtsFilter(filterByCreatedAt); return (T) this; } /** - * Sets "an in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a not in" filter by {@code createdAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedCategoriesFilter(String[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCreatedAtsFilter(java.util.Date[])} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedCategories(String... filterByLastOperatorSuspendedCategory) { - addInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); + public T notInCreatedAts(Date... filterByCreatedAt) { + addNotInCreatedAtsFilter(filterByCreatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByLastOperatorSuspendedCategory - * filter value. - */ - public void addNotInLastOperatorSuspendedCategoriesFilter(String filterByLastOperatorSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); - } - - /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. - * - * @param filterByLastOperatorSuspendedCategory - * filter value. - */ - public void addNotInLastOperatorSuspendedCategoriesFilter(List filterByLastOperatorSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); - } - - /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a less than" filter by {@code createdAt}. * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. */ - public void addNotInLastOperatorSuspendedCategoriesFilter(String... filterByLastOperatorSuspendedCategory) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, filterByLastOperatorSuspendedCategory); + public void addLessThanCreatedAtFilter(Date filterByCreatedAt) { + addLessThanFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a less than" filter by {@code createdAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanCreatedAtFilter(java.util.Date)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedCategories(String filterByLastOperatorSuspendedCategory) { - addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); + public T lessThanCreatedAt(Date filterByCreatedAt) { + addLessThanCreatedAtFilter(filterByCreatedAt); return (T) this; } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(java.util.List)} + * Sets "a greater than" filter by {@code createdAt}. * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedCategories(List filterByLastOperatorSuspendedCategory) { - addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); - return (T) this; + public void addGreaterThanCreatedAtFilter(Date filterByCreatedAt) { + addGreaterThanFilter(TAG_FILTER_BY_CREATED_AT, filterByCreatedAt); } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedCategory}. + * Sets "a greater than" filter by {@code createdAt}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedCategoriesFilter(String[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanCreatedAtFilter(java.util.Date)} * - * @param filterByLastOperatorSuspendedCategory + * @param filterByCreatedAt * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedCategories(String... filterByLastOperatorSuspendedCategory) { - addNotInLastOperatorSuspendedCategoriesFilter(filterByLastOperatorSuspendedCategory); + public T greaterThanCreatedAt(Date filterByCreatedAt) { + addGreaterThanCreatedAtFilter(filterByCreatedAt); return (T) this; } /** - * Gets all the filters defined on field {@code caId}. + * Gets all the filters defined on field {@code id}. * - * @return All the filters by {@code caId} + * @return All the filters by {@code id} */ - public List getCaIdFilters() { - return fetchFilters(TAG_FILTER_BY_CA_ID); + public List getIdFilters() { + return fetchFilters(TAG_FILTER_BY_ID); } /** - * Sets "an equal to" filter by {@code caId}. + * Sets "an equal to" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addEqualToCaIdFilter(String filterByCaId) { - addEqualFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addEqualToIdFilter(String filterById) { + addEqualFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "an equal to" filter by {@code caId}. + * Sets "an equal to" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToCaIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToIdFilter(String)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToCaId(String filterByCaId) { - addEqualToCaIdFilter(filterByCaId); + public T equalToId(String filterById) { + addEqualToIdFilter(filterById); return (T) this; } /** - * Sets "a not equal to" filter by {@code caId}. + * Sets "a not equal to" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addNotEqualToCaIdFilter(String filterByCaId) { - addNotEqualFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addNotEqualToIdFilter(String filterById) { + addNotEqualFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "a not equal to" filter by {@code caId}. + * Sets "a not equal to" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToCaIdFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToIdFilter(String)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToCaId(String filterByCaId) { - addNotEqualToCaIdFilter(filterByCaId); + public T notEqualToId(String filterById) { + addNotEqualToIdFilter(filterById); return (T) this; } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByCaId + * @param filterById * filter value. */ - public void addInCaIdsFilter(String filterByCaId) { - addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addInIdsFilter(String filterById) { + addInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addInCaIdsFilter(List filterByCaId) { - addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addInIdsFilter(List filterById) { + addInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addInCaIdsFilter(String... filterByCaId) { - addInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addInIdsFilter(String... filterById) { + addInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(String)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCaIds(String filterByCaId) { - addInCaIdsFilter(filterByCaId); + public T inIds(String filterById) { + addInIdsFilter(filterById); return (T) this; } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(java.util.List)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCaIds(List filterByCaId) { - addInCaIdsFilter(filterByCaId); + public T inIds(List filterById) { + addInIdsFilter(filterById); return (T) this; } /** - * Sets "an in" filter by {@code caId}. + * Sets "an in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInCaIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInIdsFilter(String[])} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inCaIds(String... filterByCaId) { - addInCaIdsFilter(filterByCaId); + public T inIds(String... filterById) { + addInIdsFilter(filterById); return (T) this; } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByCaId + * @param filterById * filter value. */ - public void addNotInCaIdsFilter(String filterByCaId) { - addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addNotInIdsFilter(String filterById) { + addNotInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addNotInCaIdsFilter(List filterByCaId) { - addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addNotInIdsFilter(List filterById) { + addNotInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * - * @param filterByCaId + * @param filterById * filter value. */ - public void addNotInCaIdsFilter(String... filterByCaId) { - addNotInFilter(TAG_FILTER_BY_CA_ID, filterByCaId); + public void addNotInIdsFilter(String... filterById) { + addNotInFilter(TAG_FILTER_BY_ID, filterById); } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(String)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCaIds(String filterByCaId) { - addNotInCaIdsFilter(filterByCaId); + public T notInIds(String filterById) { + addNotInIdsFilter(filterById); return (T) this; } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(java.util.List)} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCaIds(List filterByCaId) { - addNotInCaIdsFilter(filterByCaId); + public T notInIds(List filterById) { + addNotInIdsFilter(filterById); return (T) this; } /** - * Sets "a not in" filter by {@code caId}. + * Sets "a not in" filter by {@code id}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInCaIdsFilter(String[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInIdsFilter(String[])} * - * @param filterByCaId + * @param filterById * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInCaIds(String... filterByCaId) { - addNotInCaIdsFilter(filterByCaId); + public T notInIds(String... filterById) { + addNotInIdsFilter(filterById); return (T) this; } /** - * Gets all the filters defined on field {@code operatorSuspended}. + * Gets all the filters defined on field {@code lifecycleStatus}. * - * @return All the filters by {@code operatorSuspended} + * @return All the filters by {@code lifecycleStatus} */ - public List getOperatorSuspendedFilters() { - return fetchFilters(TAG_FILTER_BY_OPERATOR_SUSPENDED); + public List getLifecycleStatusFilters() { + return fetchFilters(TAG_FILTER_BY_LIFECYCLE_STATUS); } /** - * Sets "an equal to" filter by {@code operatorSuspended}. + * Sets "an equal to" filter by {@code lifecycleStatus}. * - * @param filterByOperatorSuspended + * @param filterByLifecycleStatus * filter value. */ - public void addEqualToOperatorSuspendedFilter(boolean filterByOperatorSuspended) { - addEqualFilter(TAG_FILTER_BY_OPERATOR_SUSPENDED, Boolean.valueOf(filterByOperatorSuspended)); + public void addEqualToLifecycleStatusFilter(DeviceLifecycleStatus filterByLifecycleStatus) { + addEqualFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "an equal to" filter by {@code operatorSuspended}. + * Sets "an equal to" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToOperatorSuspendedFilter(boolean)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus)} * - * @param filterByOperatorSuspended + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToOperatorSuspended(boolean filterByOperatorSuspended) { - addEqualToOperatorSuspendedFilter(filterByOperatorSuspended); + public T equalToLifecycleStatus(DeviceLifecycleStatus filterByLifecycleStatus) { + addEqualToLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "a not equal to" filter by {@code operatorSuspended}. + * Sets "a not equal to" filter by {@code lifecycleStatus}. * - * @param filterByOperatorSuspended + * @param filterByLifecycleStatus * filter value. */ - public void addNotEqualToOperatorSuspendedFilter(boolean filterByOperatorSuspended) { - addNotEqualFilter(TAG_FILTER_BY_OPERATOR_SUSPENDED, Boolean.valueOf(filterByOperatorSuspended)); + public void addNotEqualToLifecycleStatusFilter(DeviceLifecycleStatus filterByLifecycleStatus) { + addNotEqualFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "a not equal to" filter by {@code operatorSuspended}. + * Sets "a not equal to" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToOperatorSuspendedFilter(boolean)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus)} * - * @param filterByOperatorSuspended + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToOperatorSuspended(boolean filterByOperatorSuspended) { - addNotEqualToOperatorSuspendedFilter(filterByOperatorSuspended); + public T notEqualToLifecycleStatus(DeviceLifecycleStatus filterByLifecycleStatus) { + addNotEqualToLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Gets all the filters defined on field {@code enrolmentListTimestamp}. - * - * @return All the filters by {@code enrolmentListTimestamp} - */ - public List getEnrolmentListTimestampFilters() { - return fetchFilters(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP); - } - - /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addInEnrolmentListTimestampsFilter(String filterByEnrolmentListTimestamp) { - addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addInLifecycleStatusFilter(String filterByLifecycleStatus) { + addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addInEnrolmentListTimestampsFilter(List filterByEnrolmentListTimestamp) { - addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addInLifecycleStatusFilter(List filterByLifecycleStatus) { + addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addInEnrolmentListTimestampsFilter(Date... filterByEnrolmentListTimestamp) { - addInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addInLifecycleStatusFilter(DeviceLifecycleStatus... filterByLifecycleStatus) { + addInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(String)} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEnrolmentListTimestamps(String filterByEnrolmentListTimestamp) { - addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T inLifecycleStatus(String filterByLifecycleStatus) { + addInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(java.util.List)} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEnrolmentListTimestamps(List filterByEnrolmentListTimestamp) { - addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T inLifecycleStatus(List filterByLifecycleStatus) { + addInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "an in" filter by {@code enrolmentListTimestamp}. + * Sets "an in" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEnrolmentListTimestampsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus[])} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEnrolmentListTimestamps(Date... filterByEnrolmentListTimestamp) { - addInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T inLifecycleStatus(DeviceLifecycleStatus... filterByLifecycleStatus) { + addInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addNotInEnrolmentListTimestampsFilter(String filterByEnrolmentListTimestamp) { - addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addNotInLifecycleStatusFilter(String filterByLifecycleStatus) { + addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addNotInEnrolmentListTimestampsFilter(List filterByEnrolmentListTimestamp) { - addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addNotInLifecycleStatusFilter(List filterByLifecycleStatus) { + addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. */ - public void addNotInEnrolmentListTimestampsFilter(Date... filterByEnrolmentListTimestamp) { - addNotInFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addNotInLifecycleStatusFilter(DeviceLifecycleStatus... filterByLifecycleStatus) { + addNotInFilter(TAG_FILTER_BY_LIFECYCLE_STATUS, filterByLifecycleStatus); } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(String)} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEnrolmentListTimestamps(String filterByEnrolmentListTimestamp) { - addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T notInLifecycleStatus(String filterByLifecycleStatus) { + addNotInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(java.util.List)} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEnrolmentListTimestamps(List filterByEnrolmentListTimestamp) { - addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T notInLifecycleStatus(List filterByLifecycleStatus) { + addNotInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "a not in" filter by {@code enrolmentListTimestamp}. + * Sets "a not in" filter by {@code lifecycleStatus}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEnrolmentListTimestampsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLifecycleStatusFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceLifecycleStatus[])} * - * @param filterByEnrolmentListTimestamp + * @param filterByLifecycleStatus * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEnrolmentListTimestamps(Date... filterByEnrolmentListTimestamp) { - addNotInEnrolmentListTimestampsFilter(filterByEnrolmentListTimestamp); + public T notInLifecycleStatus(DeviceLifecycleStatus... filterByLifecycleStatus) { + addNotInLifecycleStatusFilter(filterByLifecycleStatus); return (T) this; } /** - * Sets "a less than" filter by {@code enrolmentListTimestamp}. - * - * @param filterByEnrolmentListTimestamp - * filter value. - */ - public void addLessThanEnrolmentListTimestampFilter(Date filterByEnrolmentListTimestamp) { - addLessThanFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); - } - - /** - * Sets "a less than" filter by {@code enrolmentListTimestamp}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanEnrolmentListTimestampFilter(java.util.Date)} + * Gets all the filters defined on field {@code deviceExecutionMode}. * - * @param filterByEnrolmentListTimestamp - * filter value. - * @param - * type of a device list options - * @return These list options + * @return All the filters by {@code deviceExecutionMode} */ - @SuppressWarnings("unchecked") - public T lessThanEnrolmentListTimestamp(Date filterByEnrolmentListTimestamp) { - addLessThanEnrolmentListTimestampFilter(filterByEnrolmentListTimestamp); - return (T) this; + public List getDeviceExecutionModeFilters() { + return fetchFilters(TAG_FILTER_BY_DEVICE_EXECUTION_MODE); } /** - * Sets "a greater than" filter by {@code enrolmentListTimestamp}. + * Sets "an equal to" filter by {@code deviceExecutionMode}. * - * @param filterByEnrolmentListTimestamp + * @param filterByDeviceExecutionMode * filter value. */ - public void addGreaterThanEnrolmentListTimestampFilter(Date filterByEnrolmentListTimestamp) { - addGreaterThanFilter(TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, filterByEnrolmentListTimestamp); + public void addEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode) { + addEqualFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.valueOf(filterByDeviceExecutionMode)); } /** - * Sets "a greater than" filter by {@code enrolmentListTimestamp}. + * Sets "an equal to" filter by {@code deviceExecutionMode}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanEnrolmentListTimestampFilter(java.util.Date)} - * - * @param filterByEnrolmentListTimestamp - * filter value. - * @param - * type of a device list options - * @return These list options - */ - @SuppressWarnings("unchecked") - public T greaterThanEnrolmentListTimestamp(Date filterByEnrolmentListTimestamp) { - addGreaterThanEnrolmentListTimestampFilter(filterByEnrolmentListTimestamp); - return (T) this; - } - - /** - * Gets all the filters defined on field {@code description}. - * - * @return All the filters by {@code description} - */ - public List getDescriptionFilters() { - return fetchFilters(TAG_FILTER_BY_DESCRIPTION); - } - - /** - * Sets "an equal to" filter by {@code description}. - * - * @param filterByDescription - * filter value. - */ - public void addEqualToDescriptionFilter(String filterByDescription) { - addEqualFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); - } - - /** - * Sets "an equal to" filter by {@code description}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDescriptionFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeviceExecutionModeFilter(int)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToDescription(String filterByDescription) { - addEqualToDescriptionFilter(filterByDescription); + public T equalToDeviceExecutionMode(int filterByDeviceExecutionMode) { + addEqualToDeviceExecutionModeFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "a not equal to" filter by {@code description}. + * Sets "a not equal to" filter by {@code deviceExecutionMode}. * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addNotEqualToDescriptionFilter(String filterByDescription) { - addNotEqualFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addNotEqualToDeviceExecutionModeFilter(int filterByDeviceExecutionMode) { + addNotEqualFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.valueOf(filterByDeviceExecutionMode)); } /** - * Sets "a not equal to" filter by {@code description}. + * Sets "a not equal to" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDescriptionFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeviceExecutionModeFilter(int)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToDescription(String filterByDescription) { - addNotEqualToDescriptionFilter(filterByDescription); + public T notEqualToDeviceExecutionMode(int filterByDeviceExecutionMode) { + addNotEqualToDeviceExecutionModeFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addInDescriptionsFilter(String filterByDescription) { - addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addInDeviceExecutionModesFilter(String filterByDeviceExecutionMode) { + addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addInDescriptionsFilter(List filterByDescription) { - addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addInDeviceExecutionModesFilter(List filterByDeviceExecutionMode) { + addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addInDescriptionsFilter(String... filterByDescription) { - addInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addInDeviceExecutionModesFilter(Integer... filterByDeviceExecutionMode) { + addInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(String)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDescriptions(String filterByDescription) { - addInDescriptionsFilter(filterByDescription); + public T inDeviceExecutionModes(String filterByDeviceExecutionMode) { + addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(java.util.List)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDescriptions(List filterByDescription) { - addInDescriptionsFilter(filterByDescription); + public T inDeviceExecutionModes(List filterByDeviceExecutionMode) { + addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "an in" filter by {@code description}. + * Sets "an in" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDescriptionsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeviceExecutionModesFilter(Integer[])} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDescriptions(String... filterByDescription) { - addInDescriptionsFilter(filterByDescription); + public T inDeviceExecutionModes(Integer... filterByDeviceExecutionMode) { + addInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addNotInDescriptionsFilter(String filterByDescription) { - addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addNotInDeviceExecutionModesFilter(String filterByDeviceExecutionMode) { + addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addNotInDescriptionsFilter(List filterByDescription) { - addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addNotInDeviceExecutionModesFilter(List filterByDeviceExecutionMode) { + addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. */ - public void addNotInDescriptionsFilter(String... filterByDescription) { - addNotInFilter(TAG_FILTER_BY_DESCRIPTION, filterByDescription); + public void addNotInDeviceExecutionModesFilter(Integer... filterByDeviceExecutionMode) { + addNotInFilter(TAG_FILTER_BY_DEVICE_EXECUTION_MODE, filterByDeviceExecutionMode); } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(String)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDescriptions(String filterByDescription) { - addNotInDescriptionsFilter(filterByDescription); + public T notInDeviceExecutionModes(String filterByDeviceExecutionMode) { + addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(java.util.List)} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDescriptions(List filterByDescription) { - addNotInDescriptionsFilter(filterByDescription); + public T notInDeviceExecutionModes(List filterByDeviceExecutionMode) { + addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Sets "a not in" filter by {@code description}. + * Sets "a not in" filter by {@code deviceExecutionMode}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDescriptionsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeviceExecutionModesFilter(Integer[])} * - * @param filterByDescription + * @param filterByDeviceExecutionMode * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDescriptions(String... filterByDescription) { - addNotInDescriptionsFilter(filterByDescription); + public T notInDeviceExecutionModes(Integer... filterByDeviceExecutionMode) { + addNotInDeviceExecutionModesFilter(filterByDeviceExecutionMode); return (T) this; } /** - * Gets all the filters defined on field {@code lastOperatorSuspendedUpdatedAt}. - * - * @return All the filters by {@code lastOperatorSuspendedUpdatedAt} - */ - public List getLastOperatorSuspendedUpdatedAtFilters() { - return fetchFilters(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT); - } - - /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByLastOperatorSuspendedUpdatedAt - * filter value. - */ - public void addInLastOperatorSuspendedUpdatedAtsFilter(String filterByLastOperatorSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); - } - - /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Gets all the filters defined on field {@code firmwareChecksum}. * - * @param filterByLastOperatorSuspendedUpdatedAt - * filter value. + * @return All the filters by {@code firmwareChecksum} */ - public void addInLastOperatorSuspendedUpdatedAtsFilter(List filterByLastOperatorSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); + public List getFirmwareChecksumFilters() { + return fetchFilters(TAG_FILTER_BY_FIRMWARE_CHECKSUM); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an equal to" filter by {@code firmwareChecksum}. * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. */ - public void addInLastOperatorSuspendedUpdatedAtsFilter(Date... filterByLastOperatorSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); + public void addEqualToFirmwareChecksumFilter(String filterByFirmwareChecksum) { + addEqualFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an equal to" filter by {@code firmwareChecksum}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToFirmwareChecksumFilter(String)} * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedUpdatedAts(String filterByLastOperatorSuspendedUpdatedAt) { - addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); + public T equalToFirmwareChecksum(String filterByFirmwareChecksum) { + addEqualToFirmwareChecksumFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(java.util.List)} + * Sets "a not equal to" filter by {@code firmwareChecksum}. * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedUpdatedAts(List filterByLastOperatorSuspendedUpdatedAt) { - addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); - return (T) this; + public void addNotEqualToFirmwareChecksumFilter(String filterByFirmwareChecksum) { + addNotEqualFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "an in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "a not equal to" filter by {@code firmwareChecksum}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastOperatorSuspendedUpdatedAtsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToFirmwareChecksumFilter(String)} * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastOperatorSuspendedUpdatedAts(Date... filterByLastOperatorSuspendedUpdatedAt) { - addInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); + public T notEqualToFirmwareChecksum(String filterByFirmwareChecksum) { + addNotEqualToFirmwareChecksumFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an in" filter by {@code firmwareChecksum}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastOperatorSuspendedUpdatedAt - * filter value. - */ - public void addNotInLastOperatorSuspendedUpdatedAtsFilter(String filterByLastOperatorSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); - } - - /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. */ - public void addNotInLastOperatorSuspendedUpdatedAtsFilter(List filterByLastOperatorSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); + public void addInFirmwareChecksumsFilter(String filterByFirmwareChecksum) { + addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an in" filter by {@code firmwareChecksum}. * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. */ - public void addNotInLastOperatorSuspendedUpdatedAtsFilter(Date... filterByLastOperatorSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); + public void addInFirmwareChecksumsFilter(List filterByFirmwareChecksum) { + addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(String)} + * Sets "an in" filter by {@code firmwareChecksum}. * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedUpdatedAts(String filterByLastOperatorSuspendedUpdatedAt) { - addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); - return (T) this; + public void addInFirmwareChecksumsFilter(String... filterByFirmwareChecksum) { + addInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an in" filter by {@code firmwareChecksum}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(String)} * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedUpdatedAts(List filterByLastOperatorSuspendedUpdatedAt) { - addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); + public T inFirmwareChecksums(String filterByFirmwareChecksum) { + addInFirmwareChecksumsFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "a not in" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an in" filter by {@code firmwareChecksum}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastOperatorSuspendedUpdatedAtsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(java.util.List)} * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastOperatorSuspendedUpdatedAts(Date... filterByLastOperatorSuspendedUpdatedAt) { - addNotInLastOperatorSuspendedUpdatedAtsFilter(filterByLastOperatorSuspendedUpdatedAt); + public T inFirmwareChecksums(List filterByFirmwareChecksum) { + addInFirmwareChecksumsFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "a less than" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - * @param filterByLastOperatorSuspendedUpdatedAt - * filter value. - */ - public void addLessThanLastOperatorSuspendedUpdatedAtFilter(Date filterByLastOperatorSuspendedUpdatedAt) { - addLessThanFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); - } - - /** - * Sets "a less than" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "an in" filter by {@code firmwareChecksum}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanLastOperatorSuspendedUpdatedAtFilter(java.util.Date)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInFirmwareChecksumsFilter(String[])} * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - lessThanLastOperatorSuspendedUpdatedAt(Date filterByLastOperatorSuspendedUpdatedAt) { - addLessThanLastOperatorSuspendedUpdatedAtFilter(filterByLastOperatorSuspendedUpdatedAt); + public T inFirmwareChecksums(String... filterByFirmwareChecksum) { + addInFirmwareChecksumsFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "a greater than" filter by {@code lastOperatorSuspendedUpdatedAt}. - * - * @param filterByLastOperatorSuspendedUpdatedAt - * filter value. - */ - public void addGreaterThanLastOperatorSuspendedUpdatedAtFilter(Date filterByLastOperatorSuspendedUpdatedAt) { - addGreaterThanFilter(TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, filterByLastOperatorSuspendedUpdatedAt); - } - - /** - * Sets "a greater than" filter by {@code lastOperatorSuspendedUpdatedAt}. + * Sets "a not in" filter by {@code firmwareChecksum}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanLastOperatorSuspendedUpdatedAtFilter(java.util.Date)} + * Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastOperatorSuspendedUpdatedAt + * @param filterByFirmwareChecksum * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T - greaterThanLastOperatorSuspendedUpdatedAt(Date filterByLastOperatorSuspendedUpdatedAt) { - addGreaterThanLastOperatorSuspendedUpdatedAtFilter(filterByLastOperatorSuspendedUpdatedAt); - return (T) this; + public void addNotInFirmwareChecksumsFilter(String filterByFirmwareChecksum) { + addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Gets all the filters defined on field {@code deployment}. + * Sets "a not in" filter by {@code firmwareChecksum}. * - * @return All the filters by {@code deployment} + * @param filterByFirmwareChecksum + * filter value. */ - public List getDeploymentFilters() { - return fetchFilters(TAG_FILTER_BY_DEPLOYMENT); + public void addNotInFirmwareChecksumsFilter(List filterByFirmwareChecksum) { + addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "an equal to" filter by {@code deployment}. + * Sets "a not in" filter by {@code firmwareChecksum}. * - * @param filterByDeployment + * @param filterByFirmwareChecksum * filter value. */ - public void addEqualToDeploymentFilter(String filterByDeployment) { - addEqualFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addNotInFirmwareChecksumsFilter(String... filterByFirmwareChecksum) { + addNotInFilter(TAG_FILTER_BY_FIRMWARE_CHECKSUM, filterByFirmwareChecksum); } /** - * Sets "an equal to" filter by {@code deployment}. + * Sets "a not in" filter by {@code firmwareChecksum}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeploymentFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(String)} * - * @param filterByDeployment + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToDeployment(String filterByDeployment) { - addEqualToDeploymentFilter(filterByDeployment); + public T notInFirmwareChecksums(String filterByFirmwareChecksum) { + addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "a not equal to" filter by {@code deployment}. + * Sets "a not in" filter by {@code firmwareChecksum}. * - * @param filterByDeployment + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(java.util.List)} + * + * @param filterByFirmwareChecksum * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addNotEqualToDeploymentFilter(String filterByDeployment) { - addNotEqualFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + @SuppressWarnings("unchecked") + public T notInFirmwareChecksums(List filterByFirmwareChecksum) { + addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); + return (T) this; } /** - * Sets "a not equal to" filter by {@code deployment}. + * Sets "a not in" filter by {@code firmwareChecksum}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeploymentFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInFirmwareChecksumsFilter(String[])} * - * @param filterByDeployment + * @param filterByFirmwareChecksum * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToDeployment(String filterByDeployment) { - addNotEqualToDeploymentFilter(filterByDeployment); + public T notInFirmwareChecksums(String... filterByFirmwareChecksum) { + addNotInFirmwareChecksumsFilter(filterByFirmwareChecksum); return (T) this; } /** - * Sets "an in" filter by {@code deployment}. + * Gets all the filters defined on field {@code bootstrapExpirationDate}. + * + * @return All the filters by {@code bootstrapExpirationDate} + */ + public List getBootstrapExpirationDateFilters() { + return fetchFilters(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE); + } + + /** + * Sets "an in" filter by {@code bootstrapExpirationDate}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addInDeploymentsFilter(String filterByDeployment) { - addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addInBootstrapExpirationDatesFilter(String filterByBootstrapExpirationDate) { + addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "an in" filter by {@code deployment}. + * Sets "an in" filter by {@code bootstrapExpirationDate}. * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addInDeploymentsFilter(List filterByDeployment) { - addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addInBootstrapExpirationDatesFilter(List filterByBootstrapExpirationDate) { + addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "an in" filter by {@code deployment}. + * Sets "an in" filter by {@code bootstrapExpirationDate}. * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addInDeploymentsFilter(String... filterByDeployment) { - addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addInBootstrapExpirationDatesFilter(Date... filterByBootstrapExpirationDate) { + addInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "an in" filter by {@code deployment}. + * Sets "an in" filter by {@code bootstrapExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(String)} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployments(String filterByDeployment) { - addInDeploymentsFilter(filterByDeployment); + public T inBootstrapExpirationDates(String filterByBootstrapExpirationDate) { + addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "an in" filter by {@code deployment}. + * Sets "an in" filter by {@code bootstrapExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(java.util.List)} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployments(List filterByDeployment) { - addInDeploymentsFilter(filterByDeployment); + public T inBootstrapExpirationDates(List filterByBootstrapExpirationDate) { + addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "an in" filter by {@code deployment}. + * Sets "an in" filter by {@code bootstrapExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrapExpirationDatesFilter(java.util.Date[])} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployments(String... filterByDeployment) { - addInDeploymentsFilter(filterByDeployment); + public T inBootstrapExpirationDates(Date... filterByBootstrapExpirationDate) { + addInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addNotInDeploymentsFilter(String filterByDeployment) { - addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addNotInBootstrapExpirationDatesFilter(String filterByBootstrapExpirationDate) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addNotInDeploymentsFilter(List filterByDeployment) { - addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addNotInBootstrapExpirationDatesFilter(List filterByBootstrapExpirationDate) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. */ - public void addNotInDeploymentsFilter(String... filterByDeployment) { - addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); + public void addNotInBootstrapExpirationDatesFilter(Date... filterByBootstrapExpirationDate) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(String)} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployments(String filterByDeployment) { - addNotInDeploymentsFilter(filterByDeployment); + public T notInBootstrapExpirationDates(String filterByBootstrapExpirationDate) { + addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(java.util.List)} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployments(List filterByDeployment) { - addNotInDeploymentsFilter(filterByDeployment); + public T notInBootstrapExpirationDates(List filterByBootstrapExpirationDate) { + addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "a not in" filter by {@code deployment}. + * Sets "a not in" filter by {@code bootstrapExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrapExpirationDatesFilter(java.util.Date[])} * - * @param filterByDeployment + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployments(String... filterByDeployment) { - addNotInDeploymentsFilter(filterByDeployment); - return (T) this; - } - - /** - * Gets all the filters defined on field {@code mechanism}. - * - * @return All the filters by {@code mechanism} - */ - public List getMechanismFilters() { - return fetchFilters(TAG_FILTER_BY_MECHANISM); + public T notInBootstrapExpirationDates(Date... filterByBootstrapExpirationDate) { + addNotInBootstrapExpirationDatesFilter(filterByBootstrapExpirationDate); + return (T) this; } /** - * Sets "an equal to" filter by {@code mechanism}. + * Sets "a less than" filter by {@code bootstrapExpirationDate}. * - * @param filterByMechanism + * @param filterByBootstrapExpirationDate * filter value. */ - public void addEqualToMechanismFilter(DeviceMechanism filterByMechanism) { - addEqualFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addLessThanBootstrapExpirationDateFilter(Date filterByBootstrapExpirationDate) { + addLessThanFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "an equal to" filter by {@code mechanism}. + * Sets "a less than" filter by {@code bootstrapExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToMechanismFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanBootstrapExpirationDateFilter(java.util.Date)} * - * @param filterByMechanism + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToMechanism(DeviceMechanism filterByMechanism) { - addEqualToMechanismFilter(filterByMechanism); + public T lessThanBootstrapExpirationDate(Date filterByBootstrapExpirationDate) { + addLessThanBootstrapExpirationDateFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "a not equal to" filter by {@code mechanism}. + * Sets "a greater than" filter by {@code bootstrapExpirationDate}. * - * @param filterByMechanism + * @param filterByBootstrapExpirationDate * filter value. */ - public void addNotEqualToMechanismFilter(DeviceMechanism filterByMechanism) { - addNotEqualFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addGreaterThanBootstrapExpirationDateFilter(Date filterByBootstrapExpirationDate) { + addGreaterThanFilter(TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, filterByBootstrapExpirationDate); } /** - * Sets "a not equal to" filter by {@code mechanism}. + * Sets "a greater than" filter by {@code bootstrapExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToMechanismFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanBootstrapExpirationDateFilter(java.util.Date)} * - * @param filterByMechanism + * @param filterByBootstrapExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToMechanism(DeviceMechanism filterByMechanism) { - addNotEqualToMechanismFilter(filterByMechanism); + public T greaterThanBootstrapExpirationDate(Date filterByBootstrapExpirationDate) { + addGreaterThanBootstrapExpirationDateFilter(filterByBootstrapExpirationDate); return (T) this; } /** - * Sets "an in" filter by {@code mechanism}. + * Gets all the filters defined on field {@code manifestTimestamp}. + * + * @return All the filters by {@code manifestTimestamp} + */ + public List getManifestTimestampFilters() { + return fetchFilters(TAG_FILTER_BY_MANIFEST_TIMESTAMP); + } + + /** + * Sets "an in" filter by {@code manifestTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addInMechanismsFilter(String filterByMechanism) { - addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addInManifestTimestampsFilter(String filterByManifestTimestamp) { + addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "an in" filter by {@code mechanism}. + * Sets "an in" filter by {@code manifestTimestamp}. * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addInMechanismsFilter(List filterByMechanism) { - addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addInManifestTimestampsFilter(List filterByManifestTimestamp) { + addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "an in" filter by {@code mechanism}. + * Sets "an in" filter by {@code manifestTimestamp}. * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addInMechanismsFilter(DeviceMechanism... filterByMechanism) { - addInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addInManifestTimestampsFilter(Date... filterByManifestTimestamp) { + addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "an in" filter by {@code mechanism}. + * Sets "an in" filter by {@code manifestTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(String)} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanisms(String filterByMechanism) { - addInMechanismsFilter(filterByMechanism); + public T inManifestTimestamps(String filterByManifestTimestamp) { + addInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code mechanism}. + * Sets "an in" filter by {@code manifestTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(java.util.List)} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanisms(List filterByMechanism) { - addInMechanismsFilter(filterByMechanism); + public T inManifestTimestamps(List filterByManifestTimestamp) { + addInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code mechanism}. + * Sets "an in" filter by {@code manifestTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInMechanismsFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(java.util.Date[])} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inMechanisms(DeviceMechanism... filterByMechanism) { - addInMechanismsFilter(filterByMechanism); + public T inManifestTimestamps(Date... filterByManifestTimestamp) { + addInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addNotInMechanismsFilter(String filterByMechanism) { - addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addNotInManifestTimestampsFilter(String filterByManifestTimestamp) { + addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addNotInMechanismsFilter(List filterByMechanism) { - addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addNotInManifestTimestampsFilter(List filterByManifestTimestamp) { + addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. */ - public void addNotInMechanismsFilter(DeviceMechanism... filterByMechanism) { - addNotInFilter(TAG_FILTER_BY_MECHANISM, filterByMechanism); + public void addNotInManifestTimestampsFilter(Date... filterByManifestTimestamp) { + addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(String)} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanisms(String filterByMechanism) { - addNotInMechanismsFilter(filterByMechanism); + public T notInManifestTimestamps(String filterByManifestTimestamp) { + addNotInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(java.util.List)} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanisms(List filterByMechanism) { - addNotInMechanismsFilter(filterByMechanism); + public T notInManifestTimestamps(List filterByManifestTimestamp) { + addNotInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code mechanism}. + * Sets "a not in" filter by {@code manifestTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInMechanismsFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(java.util.Date[])} * - * @param filterByMechanism + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInMechanisms(DeviceMechanism... filterByMechanism) { - addNotInMechanismsFilter(filterByMechanism); + public T notInManifestTimestamps(Date... filterByManifestTimestamp) { + addNotInManifestTimestampsFilter(filterByManifestTimestamp); return (T) this; } /** - * Gets all the filters defined on field {@code lastSystemSuspendedUpdatedAt}. + * Sets "a less than" filter by {@code manifestTimestamp}. * - * @return All the filters by {@code lastSystemSuspendedUpdatedAt} + * @param filterByManifestTimestamp + * filter value. */ - public List getLastSystemSuspendedUpdatedAtFilters() { - return fetchFilters(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT); + public void addLessThanManifestTimestampFilter(Date filterByManifestTimestamp) { + addLessThanFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a less than" filter by {@code manifestTimestamp}. * *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByLastSystemSuspendedUpdatedAt - * filter value. - */ - public void addInLastSystemSuspendedUpdatedAtsFilter(String filterByLastSystemSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); - } - - /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanManifestTimestampFilter(java.util.Date)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByManifestTimestamp * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addInLastSystemSuspendedUpdatedAtsFilter(List filterByLastSystemSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + @SuppressWarnings("unchecked") + public T lessThanManifestTimestamp(Date filterByManifestTimestamp) { + addLessThanManifestTimestampFilter(filterByManifestTimestamp); + return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a greater than" filter by {@code manifestTimestamp}. * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByManifestTimestamp * filter value. */ - public void addInLastSystemSuspendedUpdatedAtsFilter(Date... filterByLastSystemSuspendedUpdatedAt) { - addInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + public void addGreaterThanManifestTimestampFilter(Date filterByManifestTimestamp) { + addGreaterThanFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); } /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a greater than" filter by {@code manifestTimestamp}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(String)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanManifestTimestampFilter(java.util.Date)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByManifestTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastSystemSuspendedUpdatedAts(String filterByLastSystemSuspendedUpdatedAt) { - addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T greaterThanManifestTimestamp(Date filterByManifestTimestamp) { + addGreaterThanManifestTimestampFilter(filterByManifestTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Gets all the filters defined on field {@code endpointName}. + * + * @return All the filters by {@code endpointName} + */ + public List getEndpointNameFilters() { + return fetchFilters(TAG_FILTER_BY_ENDPOINT_NAME); + } + + /** + * Sets "an equal to" filter by {@code endpointName}. + * + * @param filterByEndpointName + * filter value. + */ + public void addEqualToEndpointNameFilter(String filterByEndpointName) { + addEqualFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + } + + /** + * Sets "an equal to" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToEndpointNameFilter(String)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastSystemSuspendedUpdatedAts(List filterByLastSystemSuspendedUpdatedAt) { - addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T equalToEndpointName(String filterByEndpointName) { + addEqualToEndpointNameFilter(filterByEndpointName); return (T) this; } /** - * Sets "an in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a not equal to" filter by {@code endpointName}. + * + * @param filterByEndpointName + * filter value. + */ + public void addNotEqualToEndpointNameFilter(String filterByEndpointName) { + addNotEqualFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + } + + /** + * Sets "a not equal to" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInLastSystemSuspendedUpdatedAtsFilter(java.util.Date[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToEndpointNameFilter(String)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - inLastSystemSuspendedUpdatedAts(Date... filterByLastSystemSuspendedUpdatedAt) { - addInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T notEqualToEndpointName(String filterByEndpointName) { + addNotEqualToEndpointNameFilter(filterByEndpointName); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. */ - public void addNotInLastSystemSuspendedUpdatedAtsFilter(String filterByLastSystemSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + public void addInEndpointNamesFilter(String filterByEndpointName) { + addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. */ - public void addNotInLastSystemSuspendedUpdatedAtsFilter(List filterByLastSystemSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + public void addInEndpointNamesFilter(List filterByEndpointName) { + addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. */ - public void addNotInLastSystemSuspendedUpdatedAtsFilter(Date... filterByLastSystemSuspendedUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + public void addInEndpointNamesFilter(String... filterByEndpointName) { + addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(String)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedUpdatedAts(String filterByLastSystemSuspendedUpdatedAt) { - addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T inEndpointNames(String filterByEndpointName) { + addInEndpointNamesFilter(filterByEndpointName); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(java.util.List)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedUpdatedAts(List filterByLastSystemSuspendedUpdatedAt) { - addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T inEndpointNames(List filterByEndpointName) { + addInEndpointNamesFilter(filterByEndpointName); return (T) this; } /** - * Sets "a not in" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "an in" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInLastSystemSuspendedUpdatedAtsFilter(java.util.Date[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(String[])} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - notInLastSystemSuspendedUpdatedAts(Date... filterByLastSystemSuspendedUpdatedAt) { - addNotInLastSystemSuspendedUpdatedAtsFilter(filterByLastSystemSuspendedUpdatedAt); + public T inEndpointNames(String... filterByEndpointName) { + addInEndpointNamesFilter(filterByEndpointName); return (T) this; } /** - * Sets "a less than" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a not in" filter by {@code endpointName}. * - * @param filterByLastSystemSuspendedUpdatedAt + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByEndpointName * filter value. */ - public void addLessThanLastSystemSuspendedUpdatedAtFilter(Date filterByLastSystemSuspendedUpdatedAt) { - addLessThanFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + public void addNotInEndpointNamesFilter(String filterByEndpointName) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); } /** - * Sets "a less than" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a not in" filter by {@code endpointName}. + * + * @param filterByEndpointName + * filter value. + */ + public void addNotInEndpointNamesFilter(List filterByEndpointName) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + } + + /** + * Sets "a not in" filter by {@code endpointName}. + * + * @param filterByEndpointName + * filter value. + */ + public void addNotInEndpointNamesFilter(String... filterByEndpointName) { + addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + } + + /** + * Sets "a not in" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanLastSystemSuspendedUpdatedAtFilter(java.util.Date)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(String)} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - lessThanLastSystemSuspendedUpdatedAt(Date filterByLastSystemSuspendedUpdatedAt) { - addLessThanLastSystemSuspendedUpdatedAtFilter(filterByLastSystemSuspendedUpdatedAt); + public T notInEndpointNames(String filterByEndpointName) { + addNotInEndpointNamesFilter(filterByEndpointName); return (T) this; } /** - * Sets "a greater than" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a not in" filter by {@code endpointName}. * - * @param filterByLastSystemSuspendedUpdatedAt + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(java.util.List)} + * + * @param filterByEndpointName * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addGreaterThanLastSystemSuspendedUpdatedAtFilter(Date filterByLastSystemSuspendedUpdatedAt) { - addGreaterThanFilter(TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, filterByLastSystemSuspendedUpdatedAt); + @SuppressWarnings("unchecked") + public T notInEndpointNames(List filterByEndpointName) { + addNotInEndpointNamesFilter(filterByEndpointName); + return (T) this; } /** - * Sets "a greater than" filter by {@code lastSystemSuspendedUpdatedAt}. + * Sets "a not in" filter by {@code endpointName}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanLastSystemSuspendedUpdatedAtFilter(java.util.Date)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(String[])} * - * @param filterByLastSystemSuspendedUpdatedAt + * @param filterByEndpointName * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T - greaterThanLastSystemSuspendedUpdatedAt(Date filterByLastSystemSuspendedUpdatedAt) { - addGreaterThanLastSystemSuspendedUpdatedAtFilter(filterByLastSystemSuspendedUpdatedAt); + public T notInEndpointNames(String... filterByEndpointName) { + addNotInEndpointNamesFilter(filterByEndpointName); return (T) this; } /** - * Gets all the filters defined on field {@code deployedState}. + * Gets all the filters defined on field {@code deployment}. * - * @return All the filters by {@code deployedState} + * @return All the filters by {@code deployment} */ - public List getDeployedStateFilters() { - return fetchFilters(TAG_FILTER_BY_DEPLOYED_STATE); + public List getDeploymentFilters() { + return fetchFilters(TAG_FILTER_BY_DEPLOYMENT); } /** - * Sets "an equal to" filter by {@code deployedState}. + * Sets "an equal to" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addEqualToDeployedStateFilter(DeviceDeployedState filterByDeployedState) { - addEqualFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addEqualToDeploymentFilter(String filterByDeployment) { + addEqualFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "an equal to" filter by {@code deployedState}. + * Sets "an equal to" filter by {@code deployment}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeployedStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToDeploymentFilter(String)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToDeployedState(DeviceDeployedState filterByDeployedState) { - addEqualToDeployedStateFilter(filterByDeployedState); + public T equalToDeployment(String filterByDeployment) { + addEqualToDeploymentFilter(filterByDeployment); return (T) this; } /** - * Sets "a not equal to" filter by {@code deployedState}. + * Sets "a not equal to" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addNotEqualToDeployedStateFilter(DeviceDeployedState filterByDeployedState) { - addNotEqualFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addNotEqualToDeploymentFilter(String filterByDeployment) { + addNotEqualFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "a not equal to" filter by {@code deployedState}. + * Sets "a not equal to" filter by {@code deployment}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeployedStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToDeploymentFilter(String)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToDeployedState(DeviceDeployedState filterByDeployedState) { - addNotEqualToDeployedStateFilter(filterByDeployedState); + public T notEqualToDeployment(String filterByDeployment) { + addNotEqualToDeploymentFilter(filterByDeployment); return (T) this; } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addInDeployedStatesFilter(String filterByDeployedState) { - addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addInDeploymentsFilter(String filterByDeployment) { + addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addInDeployedStatesFilter(List filterByDeployedState) { - addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addInDeploymentsFilter(List filterByDeployment) { + addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addInDeployedStatesFilter(DeviceDeployedState... filterByDeployedState) { - addInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addInDeploymentsFilter(String... filterByDeployment) { + addInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(String)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployedStates(String filterByDeployedState) { - addInDeployedStatesFilter(filterByDeployedState); + public T inDeployments(String filterByDeployment) { + addInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(java.util.List)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployedStates(List filterByDeployedState) { - addInDeployedStatesFilter(filterByDeployedState); + public T inDeployments(List filterByDeployment) { + addInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Sets "an in" filter by {@code deployedState}. + * Sets "an in" filter by {@code deployment}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeployedStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInDeploymentsFilter(String[])} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inDeployedStates(DeviceDeployedState... filterByDeployedState) { - addInDeployedStatesFilter(filterByDeployedState); + public T inDeployments(String... filterByDeployment) { + addInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addNotInDeployedStatesFilter(String filterByDeployedState) { - addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addNotInDeploymentsFilter(String filterByDeployment) { + addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. - */ - public void addNotInDeployedStatesFilter(List filterByDeployedState) { - addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + */ + public void addNotInDeploymentsFilter(List filterByDeployment) { + addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * - * @param filterByDeployedState + * @param filterByDeployment * filter value. */ - public void addNotInDeployedStatesFilter(DeviceDeployedState... filterByDeployedState) { - addNotInFilter(TAG_FILTER_BY_DEPLOYED_STATE, filterByDeployedState); + public void addNotInDeploymentsFilter(String... filterByDeployment) { + addNotInFilter(TAG_FILTER_BY_DEPLOYMENT, filterByDeployment); } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(String)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployedStates(String filterByDeployedState) { - addNotInDeployedStatesFilter(filterByDeployedState); + public T notInDeployments(String filterByDeployment) { + addNotInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(java.util.List)} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployedStates(List filterByDeployedState) { - addNotInDeployedStatesFilter(filterByDeployedState); + public T notInDeployments(List filterByDeployment) { + addNotInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Sets "a not in" filter by {@code deployedState}. + * Sets "a not in" filter by {@code deployment}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeployedStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceDeployedState[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInDeploymentsFilter(String[])} * - * @param filterByDeployedState + * @param filterByDeployment * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInDeployedStates(DeviceDeployedState... filterByDeployedState) { - addNotInDeployedStatesFilter(filterByDeployedState); + public T notInDeployments(String... filterByDeployment) { + addNotInDeploymentsFilter(filterByDeployment); return (T) this; } /** - * Gets all the filters defined on field {@code updatedAt}. + * Gets all the filters defined on field {@code connectorExpirationDate}. * - * @return All the filters by {@code updatedAt} + * @return All the filters by {@code connectorExpirationDate} */ - public List getUpdatedAtFilters() { - return fetchFilters(TAG_FILTER_BY_UPDATED_AT); + public List getConnectorExpirationDateFilters() { + return fetchFilters(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE); } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addInUpdatedAtsFilter(String filterByUpdatedAt) { - addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addInConnectorExpirationDatesFilter(String filterByConnectorExpirationDate) { + addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addInUpdatedAtsFilter(List filterByUpdatedAt) { - addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addInConnectorExpirationDatesFilter(List filterByConnectorExpirationDate) { + addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addInUpdatedAtsFilter(Date... filterByUpdatedAt) { - addInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addInConnectorExpirationDatesFilter(Date... filterByConnectorExpirationDate) { + addInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(String)} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inUpdatedAts(String filterByUpdatedAt) { - addInUpdatedAtsFilter(filterByUpdatedAt); + public T inConnectorExpirationDates(String filterByConnectorExpirationDate) { + addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(java.util.List)} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inUpdatedAts(List filterByUpdatedAt) { - addInUpdatedAtsFilter(filterByUpdatedAt); + public T inConnectorExpirationDates(List filterByConnectorExpirationDate) { + addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "an in" filter by {@code updatedAt}. + * Sets "an in" filter by {@code connectorExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInUpdatedAtsFilter(java.util.Date[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInConnectorExpirationDatesFilter(java.util.Date[])} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inUpdatedAts(Date... filterByUpdatedAt) { - addInUpdatedAtsFilter(filterByUpdatedAt); + public T inConnectorExpirationDates(Date... filterByConnectorExpirationDate) { + addInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "a not in" filter by {@code updatedAt}. + * Sets "a not in" filter by {@code connectorExpirationDate}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByUpdatedAt - * filter value. - */ - public void addNotInUpdatedAtsFilter(String filterByUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); - } - - /** - * Sets "a not in" filter by {@code updatedAt}. - * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addNotInUpdatedAtsFilter(List filterByUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addNotInConnectorExpirationDatesFilter(String filterByConnectorExpirationDate) { + addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "a not in" filter by {@code updatedAt}. + * Sets "a not in" filter by {@code connectorExpirationDate}. * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addNotInUpdatedAtsFilter(Date... filterByUpdatedAt) { - addNotInFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addNotInConnectorExpirationDatesFilter(List filterByConnectorExpirationDate) { + addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "a not in" filter by {@code updatedAt}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(String)} + * Sets "a not in" filter by {@code connectorExpirationDate}. * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. - * @param - * type of a device list options - * @return These list options */ - @SuppressWarnings("unchecked") - public T notInUpdatedAts(String filterByUpdatedAt) { - addNotInUpdatedAtsFilter(filterByUpdatedAt); - return (T) this; + public void addNotInConnectorExpirationDatesFilter(Date... filterByConnectorExpirationDate) { + addNotInFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "a not in" filter by {@code updatedAt}. + * Sets "a not in" filter by {@code connectorExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(java.util.List)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(String)} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInUpdatedAts(List filterByUpdatedAt) { - addNotInUpdatedAtsFilter(filterByUpdatedAt); + public T notInConnectorExpirationDates(String filterByConnectorExpirationDate) { + addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "a not in" filter by {@code updatedAt}. + * Sets "a not in" filter by {@code connectorExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInUpdatedAtsFilter(java.util.Date[])} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(java.util.List)} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInUpdatedAts(Date... filterByUpdatedAt) { - addNotInUpdatedAtsFilter(filterByUpdatedAt); + public T notInConnectorExpirationDates(List filterByConnectorExpirationDate) { + addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "a less than" filter by {@code updatedAt}. - * - * @param filterByUpdatedAt - * filter value. - */ - public void addLessThanUpdatedAtFilter(Date filterByUpdatedAt) { - addLessThanFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); - } - - /** - * Sets "a less than" filter by {@code updatedAt}. + * Sets "a not in" filter by {@code connectorExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanUpdatedAtFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInConnectorExpirationDatesFilter(java.util.Date[])} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T lessThanUpdatedAt(Date filterByUpdatedAt) { - addLessThanUpdatedAtFilter(filterByUpdatedAt); + public T notInConnectorExpirationDates(Date... filterByConnectorExpirationDate) { + addNotInConnectorExpirationDatesFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "a greater than" filter by {@code updatedAt}. + * Sets "a less than" filter by {@code connectorExpirationDate}. * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. */ - public void addGreaterThanUpdatedAtFilter(Date filterByUpdatedAt) { - addGreaterThanFilter(TAG_FILTER_BY_UPDATED_AT, filterByUpdatedAt); + public void addLessThanConnectorExpirationDateFilter(Date filterByConnectorExpirationDate) { + addLessThanFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "a greater than" filter by {@code updatedAt}. + * Sets "a less than" filter by {@code connectorExpirationDate}. * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanUpdatedAtFilter(java.util.Date)} + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanConnectorExpirationDateFilter(java.util.Date)} * - * @param filterByUpdatedAt + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T greaterThanUpdatedAt(Date filterByUpdatedAt) { - addGreaterThanUpdatedAtFilter(filterByUpdatedAt); + public T lessThanConnectorExpirationDate(Date filterByConnectorExpirationDate) { + addLessThanConnectorExpirationDateFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Gets all the filters defined on field {@code name}. - * - * @return All the filters by {@code name} - */ - public List getNameFilters() { - return fetchFilters(TAG_FILTER_BY_NAME); - } - - /** - * Sets "an equal to" filter by {@code name}. + * Sets "a greater than" filter by {@code connectorExpirationDate}. * - * @param filterByName + * @param filterByConnectorExpirationDate * filter value. */ - public void addEqualToNameFilter(String filterByName) { - addEqualFilter(TAG_FILTER_BY_NAME, filterByName); + public void addGreaterThanConnectorExpirationDateFilter(Date filterByConnectorExpirationDate) { + addGreaterThanFilter(TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, filterByConnectorExpirationDate); } /** - * Sets "an equal to" filter by {@code name}. + * Sets "a greater than" filter by {@code connectorExpirationDate}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToNameFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanConnectorExpirationDateFilter(java.util.Date)} * - * @param filterByName + * @param filterByConnectorExpirationDate * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToName(String filterByName) { - addEqualToNameFilter(filterByName); + public T greaterThanConnectorExpirationDate(Date filterByConnectorExpirationDate) { + addGreaterThanConnectorExpirationDateFilter(filterByConnectorExpirationDate); return (T) this; } /** - * Sets "a not equal to" filter by {@code name}. - * - * @param filterByName - * filter value. - */ - public void addNotEqualToNameFilter(String filterByName) { - addNotEqualFilter(TAG_FILTER_BY_NAME, filterByName); - } - - /** - * Sets "a not equal to" filter by {@code name}. - * - *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToNameFilter(String)} - * - * @param filterByName - * filter value. - * @param - * type of a device list options - * @return These list options + * Gets all the filters defined on field {@code bootstrappedTimestamp}. + * + * @return All the filters by {@code bootstrappedTimestamp} */ - @SuppressWarnings("unchecked") - public T notEqualToName(String filterByName) { - addNotEqualToNameFilter(filterByName); - return (T) this; + public List getBootstrappedTimestampFilters() { + return fetchFilters(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP); } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addInNamesFilter(String filterByName) { - addInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addInBootstrappedTimestampsFilter(String filterByBootstrappedTimestamp) { + addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addInNamesFilter(List filterByName) { - addInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addInBootstrappedTimestampsFilter(List filterByBootstrappedTimestamp) { + addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addInNamesFilter(String... filterByName) { - addInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addInBootstrappedTimestampsFilter(Date... filterByBootstrappedTimestamp) { + addInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(String)} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inNames(String filterByName) { - addInNamesFilter(filterByName); + public T inBootstrappedTimestamps(String filterByBootstrappedTimestamp) { + addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(java.util.List)} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inNames(List filterByName) { - addInNamesFilter(filterByName); + public T inBootstrappedTimestamps(List filterByBootstrappedTimestamp) { + addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code name}. + * Sets "an in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInNamesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInBootstrappedTimestampsFilter(java.util.Date[])} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inNames(String... filterByName) { - addInNamesFilter(filterByName); + public T inBootstrappedTimestamps(Date... filterByBootstrappedTimestamp) { + addInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addNotInNamesFilter(String filterByName) { - addNotInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addNotInBootstrappedTimestampsFilter(String filterByBootstrappedTimestamp) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addNotInNamesFilter(List filterByName) { - addNotInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addNotInBootstrappedTimestampsFilter(List filterByBootstrappedTimestamp) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. */ - public void addNotInNamesFilter(String... filterByName) { - addNotInFilter(TAG_FILTER_BY_NAME, filterByName); + public void addNotInBootstrappedTimestampsFilter(Date... filterByBootstrappedTimestamp) { + addNotInFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(String)} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInNames(String filterByName) { - addNotInNamesFilter(filterByName); + public T notInBootstrappedTimestamps(String filterByBootstrappedTimestamp) { + addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(java.util.List)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(java.util.List)} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInNames(List filterByName) { - addNotInNamesFilter(filterByName); + public T notInBootstrappedTimestamps(List filterByBootstrappedTimestamp) { + addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "a not in" filter by {@code name}. + * Sets "a not in" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInNamesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInBootstrappedTimestampsFilter(java.util.Date[])} * - * @param filterByName + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInNames(String... filterByName) { - addNotInNamesFilter(filterByName); + public T notInBootstrappedTimestamps(Date... filterByBootstrappedTimestamp) { + addNotInBootstrappedTimestampsFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Gets all the filters defined on field {@code manifestTimestamp}. + * Sets "a less than" filter by {@code bootstrappedTimestamp}. * - * @return All the filters by {@code manifestTimestamp} + * @param filterByBootstrappedTimestamp + * filter value. */ - public List getManifestTimestampFilters() { - return fetchFilters(TAG_FILTER_BY_MANIFEST_TIMESTAMP); + public void addLessThanBootstrappedTimestampFilter(Date filterByBootstrappedTimestamp) { + addLessThanFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Sets "a less than" filter by {@code bootstrappedTimestamp}. * *

- * Note: In this case, the filter is a string corresponding to a list of values separated by a comma - * - * @param filterByManifestTimestamp - * filter value. - */ - public void addInManifestTimestampsFilter(String filterByManifestTimestamp) { - addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); - } - - /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanBootstrappedTimestampFilter(java.util.Date)} * - * @param filterByManifestTimestamp + * @param filterByBootstrappedTimestamp * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addInManifestTimestampsFilter(List filterByManifestTimestamp) { - addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + @SuppressWarnings("unchecked") + public T lessThanBootstrappedTimestamp(Date filterByBootstrappedTimestamp) { + addLessThanBootstrappedTimestampFilter(filterByBootstrappedTimestamp); + return (T) this; } /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Sets "a greater than" filter by {@code bootstrappedTimestamp}. * - * @param filterByManifestTimestamp + * @param filterByBootstrappedTimestamp * filter value. */ - public void addInManifestTimestampsFilter(Date... filterByManifestTimestamp) { - addInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + public void addGreaterThanBootstrappedTimestampFilter(Date filterByBootstrappedTimestamp) { + addGreaterThanFilter(TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, filterByBootstrappedTimestamp); } /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Sets "a greater than" filter by {@code bootstrappedTimestamp}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanBootstrappedTimestampFilter(java.util.Date)} * - * @param filterByManifestTimestamp + * @param filterByBootstrappedTimestamp * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifestTimestamps(String filterByManifestTimestamp) { - addInManifestTimestampsFilter(filterByManifestTimestamp); + public T greaterThanBootstrappedTimestamp(Date filterByBootstrappedTimestamp) { + addGreaterThanBootstrappedTimestampFilter(filterByBootstrappedTimestamp); return (T) this; } /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Gets all the filters defined on field {@code accountId}. + * + * @return All the filters by {@code accountId} + */ + public List getAccountIdFilters() { + return fetchFilters(TAG_FILTER_BY_ACCOUNT_ID); + } + + /** + * Sets "an equal to" filter by {@code accountId}. + * + * @param filterByAccountId + * filter value. + */ + public void addEqualToAccountIdFilter(String filterByAccountId) { + addEqualFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + } + + /** + * Sets "an equal to" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToAccountIdFilter(String)} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifestTimestamps(List filterByManifestTimestamp) { - addInManifestTimestampsFilter(filterByManifestTimestamp); + public T equalToAccountId(String filterByAccountId) { + addEqualToAccountIdFilter(filterByAccountId); return (T) this; } /** - * Sets "an in" filter by {@code manifestTimestamp}. + * Sets "a not equal to" filter by {@code accountId}. + * + * @param filterByAccountId + * filter value. + */ + public void addNotEqualToAccountIdFilter(String filterByAccountId) { + addNotEqualFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + } + + /** + * Sets "a not equal to" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInManifestTimestampsFilter(java.util.Date[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToAccountIdFilter(String)} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inManifestTimestamps(Date... filterByManifestTimestamp) { - addInManifestTimestampsFilter(filterByManifestTimestamp); + public T notEqualToAccountId(String filterByAccountId) { + addNotEqualToAccountIdFilter(filterByAccountId); return (T) this; } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. */ - public void addNotInManifestTimestampsFilter(String filterByManifestTimestamp) { - addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + public void addInAccountIdsFilter(String filterByAccountId) { + addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. */ - public void addNotInManifestTimestampsFilter(List filterByManifestTimestamp) { - addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + public void addInAccountIdsFilter(List filterByAccountId) { + addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. */ - public void addNotInManifestTimestampsFilter(Date... filterByManifestTimestamp) { - addNotInFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + public void addInAccountIdsFilter(String... filterByAccountId) { + addInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(String)} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifestTimestamps(String filterByManifestTimestamp) { - addNotInManifestTimestampsFilter(filterByManifestTimestamp); + public T inAccountIds(String filterByAccountId) { + addInAccountIdsFilter(filterByAccountId); return (T) this; } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(java.util.List)} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifestTimestamps(List filterByManifestTimestamp) { - addNotInManifestTimestampsFilter(filterByManifestTimestamp); + public T inAccountIds(List filterByAccountId) { + addInAccountIdsFilter(filterByAccountId); return (T) this; } /** - * Sets "a not in" filter by {@code manifestTimestamp}. + * Sets "an in" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInManifestTimestampsFilter(java.util.Date[])} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInAccountIdsFilter(String[])} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInManifestTimestamps(Date... filterByManifestTimestamp) { - addNotInManifestTimestampsFilter(filterByManifestTimestamp); + public T inAccountIds(String... filterByAccountId) { + addInAccountIdsFilter(filterByAccountId); return (T) this; } /** - * Sets "a less than" filter by {@code manifestTimestamp}. + * Sets "a not in" filter by {@code accountId}. * - * @param filterByManifestTimestamp + *

+ * Note: In this case, the filter is a string corresponding to a list of values separated by a comma + * + * @param filterByAccountId * filter value. */ - public void addLessThanManifestTimestampFilter(Date filterByManifestTimestamp) { - addLessThanFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + public void addNotInAccountIdsFilter(String filterByAccountId) { + addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); } /** - * Sets "a less than" filter by {@code manifestTimestamp}. + * Sets "a not in" filter by {@code accountId}. + * + * @param filterByAccountId + * filter value. + */ + public void addNotInAccountIdsFilter(List filterByAccountId) { + addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + } + + /** + * Sets "a not in" filter by {@code accountId}. + * + * @param filterByAccountId + * filter value. + */ + public void addNotInAccountIdsFilter(String... filterByAccountId) { + addNotInFilter(TAG_FILTER_BY_ACCOUNT_ID, filterByAccountId); + } + + /** + * Sets "a not in" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addLessThanManifestTimestampFilter(java.util.Date)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(String)} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T lessThanManifestTimestamp(Date filterByManifestTimestamp) { - addLessThanManifestTimestampFilter(filterByManifestTimestamp); + public T notInAccountIds(String filterByAccountId) { + addNotInAccountIdsFilter(filterByAccountId); return (T) this; } /** - * Sets "a greater than" filter by {@code manifestTimestamp}. + * Sets "a not in" filter by {@code accountId}. * - * @param filterByManifestTimestamp + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(java.util.List)} + * + * @param filterByAccountId * filter value. + * @param + * type of a device list options + * @return These list options */ - public void addGreaterThanManifestTimestampFilter(Date filterByManifestTimestamp) { - addGreaterThanFilter(TAG_FILTER_BY_MANIFEST_TIMESTAMP, filterByManifestTimestamp); + @SuppressWarnings("unchecked") + public T notInAccountIds(List filterByAccountId) { + addNotInAccountIdsFilter(filterByAccountId); + return (T) this; } /** - * Sets "a greater than" filter by {@code manifestTimestamp}. + * Sets "a not in" filter by {@code accountId}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addGreaterThanManifestTimestampFilter(java.util.Date)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInAccountIdsFilter(String[])} * - * @param filterByManifestTimestamp + * @param filterByAccountId * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T greaterThanManifestTimestamp(Date filterByManifestTimestamp) { - addGreaterThanManifestTimestampFilter(filterByManifestTimestamp); + public T notInAccountIds(String... filterByAccountId) { + addNotInAccountIdsFilter(filterByAccountId); return (T) this; } /** - * Gets all the filters defined on field {@code endpointName}. + * Gets all the filters defined on field {@code state}. * - * @return All the filters by {@code endpointName} + * @return All the filters by {@code state} */ - public List getEndpointNameFilters() { - return fetchFilters(TAG_FILTER_BY_ENDPOINT_NAME); + public List getStateFilters() { + return fetchFilters(TAG_FILTER_BY_STATE); } /** - * Sets "an equal to" filter by {@code endpointName}. + * Sets "an equal to" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addEqualToEndpointNameFilter(String filterByEndpointName) { - addEqualFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addEqualToStateFilter(DeviceState filterByState) { + addEqualFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "an equal to" filter by {@code endpointName}. + * Sets "an equal to" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToEndpointNameFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addEqualToStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T equalToEndpointName(String filterByEndpointName) { - addEqualToEndpointNameFilter(filterByEndpointName); + public T equalToState(DeviceState filterByState) { + addEqualToStateFilter(filterByState); return (T) this; } /** - * Sets "a not equal to" filter by {@code endpointName}. + * Sets "a not equal to" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addNotEqualToEndpointNameFilter(String filterByEndpointName) { - addNotEqualFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addNotEqualToStateFilter(DeviceState filterByState) { + addNotEqualFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "a not equal to" filter by {@code endpointName}. + * Sets "a not equal to" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToEndpointNameFilter(String)} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotEqualToStateFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notEqualToEndpointName(String filterByEndpointName) { - addNotEqualToEndpointNameFilter(filterByEndpointName); + public T notEqualToState(DeviceState filterByState) { + addNotEqualToStateFilter(filterByState); return (T) this; } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addInEndpointNamesFilter(String filterByEndpointName) { - addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addInStatesFilter(String filterByState) { + addInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addInEndpointNamesFilter(List filterByEndpointName) { - addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addInStatesFilter(List filterByState) { + addInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addInEndpointNamesFilter(String... filterByEndpointName) { - addInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addInStatesFilter(DeviceState... filterByState) { + addInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(String)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointNames(String filterByEndpointName) { - addInEndpointNamesFilter(filterByEndpointName); + public T inStates(String filterByState) { + addInStatesFilter(filterByState); return (T) this; } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(java.util.List)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointNames(List filterByEndpointName) { - addInEndpointNamesFilter(filterByEndpointName); + public T inStates(List filterByState) { + addInStatesFilter(filterByState); return (T) this; } /** - * Sets "an in" filter by {@code endpointName}. + * Sets "an in" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInEndpointNamesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addInStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState[])} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T inEndpointNames(String... filterByEndpointName) { - addInEndpointNamesFilter(filterByEndpointName); + public T inStates(DeviceState... filterByState) { + addInStatesFilter(filterByState); return (T) this; } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * *

* Note: In this case, the filter is a string corresponding to a list of values separated by a comma * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addNotInEndpointNamesFilter(String filterByEndpointName) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addNotInStatesFilter(String filterByState) { + addNotInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addNotInEndpointNamesFilter(List filterByEndpointName) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addNotInStatesFilter(List filterByState) { + addNotInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * - * @param filterByEndpointName + * @param filterByState * filter value. */ - public void addNotInEndpointNamesFilter(String... filterByEndpointName) { - addNotInFilter(TAG_FILTER_BY_ENDPOINT_NAME, filterByEndpointName); + public void addNotInStatesFilter(DeviceState... filterByState) { + addNotInFilter(TAG_FILTER_BY_STATE, filterByState); } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(String)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(String)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointNames(String filterByEndpointName) { - addNotInEndpointNamesFilter(filterByEndpointName); + public T notInStates(String filterByState) { + addNotInStatesFilter(filterByState); return (T) this; } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(java.util.List)} + * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(java.util.List)} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointNames(List filterByEndpointName) { - addNotInEndpointNamesFilter(filterByEndpointName); + public T notInStates(List filterByState) { + addNotInStatesFilter(filterByState); return (T) this; } /** - * Sets "a not in" filter by {@code endpointName}. + * Sets "a not in" filter by {@code state}. * *

- * Similar to {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInEndpointNamesFilter(String[])} + * Similar to + * {@link com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions#addNotInStatesFilter(com.arm.mbed.cloud.sdk.devices.model.DeviceState[])} * - * @param filterByEndpointName + * @param filterByState * filter value. * @param * type of a device list options * @return These list options */ @SuppressWarnings("unchecked") - public T notInEndpointNames(String... filterByEndpointName) { - addNotInEndpointNamesFilter(filterByEndpointName); + public T notInStates(DeviceState... filterByState) { + addNotInStatesFilter(filterByState); return (T) this; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DevicesEndpoints.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DevicesEndpoints.java index 0560642dd..10b560b25 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DevicesEndpoints.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DevicesEndpoints.java @@ -9,9 +9,8 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryDevicesApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryEventsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceDirectoryGroupsApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceOwnershipEnrollmentsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceSecurityDeviceCertificateRenewalsApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.EnrollmentDenialsApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.PublicApiApi; /** * Endpoints for Devices APIs module. @@ -38,16 +37,10 @@ public class DevicesEndpoints extends AbstractEndpoints { private final DeviceSecurityDeviceCertificateRenewalsApi deviceSecurityDeviceCertificateRenewalsApi; /** - * Low level endpoints for public api apis. + * Low level endpoints for device ownership enrollments apis. */ @Internal - private final PublicApiApi publicApiApi; - - /** - * Low level endpoints for enrollment denials apis. - */ - @Internal - private final EnrollmentDenialsApi enrollmentDenialsApi; + private final DeviceOwnershipEnrollmentsApi deviceOwnershipEnrollmentsApi; /** * Low level endpoints for device directory events apis. @@ -66,29 +59,18 @@ public DevicesEndpoints(ServiceRegistry services) { this.deviceDirectoryGroupsApi = initialiseService(DeviceDirectoryGroupsApi.class); this.deviceDirectoryDevicesApi = initialiseService(DeviceDirectoryDevicesApi.class); this.deviceSecurityDeviceCertificateRenewalsApi = initialiseService(DeviceSecurityDeviceCertificateRenewalsApi.class); - this.publicApiApi = initialiseService(PublicApiApi.class); - this.enrollmentDenialsApi = initialiseService(EnrollmentDenialsApi.class); + this.deviceOwnershipEnrollmentsApi = initialiseService(DeviceOwnershipEnrollmentsApi.class); this.deviceDirectoryEventsApi = initialiseService(DeviceDirectoryEventsApi.class); } /** - * Gets low level endpoints for public api apis. - * - * @return publicApiApi - */ - @Internal - public PublicApiApi getPublicApiApi() { - return publicApiApi; - } - - /** - * Gets low level endpoints for enrollment denials apis. + * Gets low level endpoints for device ownership enrollments apis. * - * @return enrollmentDenialsApi + * @return deviceOwnershipEnrollmentsApi */ @Internal - public EnrollmentDenialsApi getEnrollmentDenialsApi() { - return enrollmentDenialsApi; + public DeviceOwnershipEnrollmentsApi getDeviceOwnershipEnrollmentsApi() { + return deviceOwnershipEnrollmentsApi; } /** diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/FirmwareManifestAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/FirmwareManifestAdapter.java index 41ff9a3e9..317284133 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/FirmwareManifestAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/FirmwareManifestAdapter.java @@ -8,6 +8,8 @@ import com.arm.mbed.cloud.sdk.common.TranslationUtils; import com.arm.mbed.cloud.sdk.common.listing.ListResponse; import com.arm.mbed.cloud.sdk.deviceupdate.model.FirmwareManifest; +import com.arm.mbed.cloud.sdk.deviceupdate.model.FirmwareManifestDeliveredPayloadType; +import com.arm.mbed.cloud.sdk.deviceupdate.model.FirmwareManifestSchemaVersion; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.FirmwareManifestPage; import java.util.List; @@ -42,9 +44,18 @@ private FirmwareManifestAdapter() { final FirmwareManifest firmwareManifest = new FirmwareManifest(TranslationUtils.toDate(toBeMapped.getCreatedAt()), TranslationUtils.toLong(toBeMapped.getDatafileSize()), toBeMapped.getDatafile(), - toBeMapped.getDeviceClass(), + toBeMapped.getDeliveredPayloadDigest(), + TranslationUtils.toLong(toBeMapped.getDeliveredPayloadSize()), + translateToFirmwareManifestDeliveredPayloadType(toBeMapped.getDeliveredPayloadType()), + toBeMapped.getDeliveredPayloadUrl(), + TranslationUtils.toString(toBeMapped.getDeviceClass()), + TranslationUtils.toString(toBeMapped.getDeviceVendor()), toBeMapped.getKeyTable(), + translateToFirmwareManifestSchemaVersion(toBeMapped.getManifestSchemaVersion()), + toBeMapped.getParsedRawManifest(), + toBeMapped.getPrecursorPayloadDigest(), TranslationUtils.toDate(toBeMapped.getTimestamp()), + TranslationUtils.toLong(toBeMapped.getUpdatePriority()), TranslationUtils.toDate(toBeMapped.getUpdatedAt())); firmwareManifest.setDescription(toBeMapped.getDescription()); firmwareManifest.setId(toBeMapped.getId()); @@ -184,4 +195,50 @@ public ListResponse map(FirmwareManifestPage toBeMapped) { } }; } + + /** + * Maps the enum value. + * + * @param toBeMapped + * a delivered payload type enum. + * @return mapped enum value + */ + @Internal + protected static FirmwareManifestDeliveredPayloadType + translateToFirmwareManifestDeliveredPayloadType(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.FirmwareManifest.DeliveredPayloadTypeEnum toBeMapped) { + if (toBeMapped == null) { + return FirmwareManifestDeliveredPayloadType.getUnknownEnum(); + } + switch (toBeMapped) { + case FULL: + return FirmwareManifestDeliveredPayloadType.FULL; + case DELTA: + return FirmwareManifestDeliveredPayloadType.DELTA; + default: + return FirmwareManifestDeliveredPayloadType.getUnknownEnum(); + } + } + + /** + * Maps the enum value. + * + * @param toBeMapped + * a manifest schema version enum. + * @return mapped enum value + */ + @Internal + protected static FirmwareManifestSchemaVersion + translateToFirmwareManifestSchemaVersion(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.FirmwareManifest.ManifestSchemaVersionEnum toBeMapped) { + if (toBeMapped == null) { + return FirmwareManifestSchemaVersion.getUnknownEnum(); + } + switch (toBeMapped) { + case _1: + return FirmwareManifestSchemaVersion._1; + case _3: + return FirmwareManifestSchemaVersion._3; + default: + return FirmwareManifestSchemaVersion.getUnknownEnum(); + } + } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/UpdateCampaignAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/UpdateCampaignAdapter.java index 7f7c2b8c5..c18821244 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/UpdateCampaignAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/adapters/UpdateCampaignAdapter.java @@ -52,6 +52,8 @@ public static UpdateCampaignPostRequest reverseMapAddRequest(UpdateCampaign toBe updateCampaignPostRequest.setDeviceFilter(toBeMapped.getDeviceFilter()); updateCampaignPostRequest.setName(toBeMapped.getName()); updateCampaignPostRequest.setRootManifestId(toBeMapped.getRootManifestId()); + // No field equivalent to state in UpdateCampaignPostRequest was found in UpdateCampaign + updateCampaignPostRequest.setWhen(TranslationUtils.toDateTime(toBeMapped.getWhen())); return updateCampaignPostRequest; } @@ -79,8 +81,7 @@ public static UpdateCampaignPostRequest reverseMapAddRequest(UpdateCampaign toBe TranslationUtils.toDate(toBeMapped.getStartingAt()), TranslationUtils.toDate(toBeMapped.getStoppedAt()), TranslationUtils.toDate(toBeMapped.getStoppingAt()), - TranslationUtils.toDate(toBeMapped.getUpdatedAt()), - TranslationUtils.toDate(toBeMapped.getWhen())); + TranslationUtils.toDate(toBeMapped.getUpdatedAt())); updateCampaign.setApprovalRequired(TranslationUtils.toBool(toBeMapped.isApprovalRequired())); updateCampaign.setAutostop(TranslationUtils.toBool(toBeMapped.isAutostop())); updateCampaign.setAutostopSuccessPercent(TranslationUtils.toLong(toBeMapped.getAutostopSuccessPercent())); @@ -92,6 +93,7 @@ public static UpdateCampaignPostRequest reverseMapAddRequest(UpdateCampaign toBe updateCampaign.setId(toBeMapped.getId()); updateCampaign.setName(toBeMapped.getName()); updateCampaign.setRootManifestId(toBeMapped.getRootManifestId()); + updateCampaign.setWhen(TranslationUtils.toDate(toBeMapped.getWhen())); return updateCampaign; } @@ -248,6 +250,8 @@ public static UpdateCampaignPutRequest reverseMapUpdateRequest(UpdateCampaign to updateCampaignPutRequest.setDeviceFilter(toBeMapped.getDeviceFilter()); updateCampaignPutRequest.setName(toBeMapped.getName()); updateCampaignPutRequest.setRootManifestId(toBeMapped.getRootManifestId()); + // No field equivalent to state in UpdateCampaignPutRequest was found in UpdateCampaign + updateCampaignPutRequest.setWhen(TranslationUtils.toDateTime(toBeMapped.getWhen())); return updateCampaignPutRequest; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadataDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadataDao.java index e956504f7..c5583eef2 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadataDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadataDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Apr 05 11:01:27 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -11,13 +11,13 @@ import com.arm.mbed.cloud.sdk.common.SdkContext; /** - * Data Access Object (DAO) for campaign device metadatas. + * Data Access Object (DAO) for campaign device metadata. *

* * @see Core J2EE Patterns - Data Access * Object */ -@Preamble(description = "Data Access Object (DAO) for campaign device metadatas.") +@Preamble(description = "Data Access Object (DAO) for campaign device metadata.") public class CampaignDeviceMetadataDao extends AbstractCampaignDeviceMetadataDao { /** * Constructor. diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsDao.java index 600340fdb..19d09a574 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue May 14 13:12:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public CampaignStatisticsDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsEventsDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsEventsDao.java index d61f649d3..856be5326 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsEventsDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsEventsDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue May 14 13:12:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public CampaignStatisticsEventsDao(SdkContext sdkContext) throws MbedCloudExcept /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsListDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsListDao.java index f86affbfe..46221a5b4 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsListDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignStatisticsListDao.java @@ -1,8 +1,7 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue May 14 13:12:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; -import com.arm.mbed.cloud.sdk.DeviceUpdate; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; @@ -11,7 +10,6 @@ import com.arm.mbed.cloud.sdk.common.NotImplementedException; import com.arm.mbed.cloud.sdk.common.SdkContext; import com.arm.mbed.cloud.sdk.common.listing.ListResponse; -import com.arm.mbed.cloud.sdk.common.listing.Paginator; /** * Data Access Object (DAO) for listing campaign statistics. @@ -70,7 +68,7 @@ public CampaignStatisticsListDao(SdkContext sdkContext) throws MbedCloudExceptio /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -89,7 +87,7 @@ public CampaignStatisticsListDao clone() { /** * Lists campaign statistics matching filter options. - * + * *

* Similar to * {@link com.arm.mbed.cloud.sdk.DeviceUpdate#listCampaignStatisticss(String, com.arm.mbed.cloud.sdk.deviceupdate.model.CampaignStatisticsListOptions)} @@ -104,28 +102,13 @@ public CampaignStatisticsListDao clone() { @NotImplemented protected ListResponse requestOnePage(CampaignStatisticsListOptions options) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); - } + // The following code is auto-generated and can be used if carrying out what requestOnePage() intends/is meant + // to do. - /** - * Lists campaign statistics matching filter options. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.DeviceUpdate#listAllCampaignStatisticss(String, com.arm.mbed.cloud.sdk.deviceupdate.model.CampaignStatisticsListOptions)} - * - * @param campaignId - * related campaign - * @param options - * list options. - * @return one page of campaign statistics - * @throws MbedCloudException - * if an error occurs during the process. - */ - public Paginator list(String campaignId, - CampaignStatisticsListOptions options) throws MbedCloudException, - NotImplementedException { - return ((DeviceUpdate) getModuleOrThrow()).listAllCampaignStatisticss(campaignId, options); + /* + * return ((DeviceUpdate)getModuleOrThrow()).listCampaignStatisticss((String) null, options); + */ } - } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImageDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImageDao.java index eb07a54f5..595ce08c4 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImageDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImageDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 10:47:50 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public FirmwareImageDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDao.java index 21611a90e..59f1d8e11 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 10:47:50 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public FirmwareManifestDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/foundation/DaoFactory.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/foundation/DaoFactory.java index 17c3618d0..dce83277b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/foundation/DaoFactory.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/foundation/DaoFactory.java @@ -12,9 +12,7 @@ import com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListDao; import com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyDao; import com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderDao; -import com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListDao; import com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupDao; -import com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListDao; import com.arm.mbed.cloud.sdk.accounts.model.SubtenantUserDao; import com.arm.mbed.cloud.sdk.accounts.model.SubtenantUserInvitationDao; import com.arm.mbed.cloud.sdk.accounts.model.UserDao; @@ -43,8 +41,6 @@ import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentBulkCreateDao; import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentBulkDeleteDao; import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentDao; -import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentDenialDao; -import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentDenialListDao; import com.arm.mbed.cloud.sdk.devices.model.DeviceEnrollmentListDao; import com.arm.mbed.cloud.sdk.devices.model.DeviceEventsDao; import com.arm.mbed.cloud.sdk.devices.model.DeviceEventsListDao; @@ -484,30 +480,6 @@ public DeviceEnrollmentDao getDeviceEnrollmentDao() throws MbedCloudException { return new DeviceEnrollmentDao().configureAndGet(context); } - /** - * Gets a device enrollment denial dao. - * - * @return a device enrollment denial dao - * @throws MbedCloudException - * if an error occurs during the process. - */ - @SuppressWarnings("resource") - public DeviceEnrollmentDenialDao getDeviceEnrollmentDenialDao() throws MbedCloudException { - return new DeviceEnrollmentDenialDao().configureAndGet(context); - } - - /** - * Gets a device enrollment denial list dao. - * - * @return a device enrollment denial list dao - * @throws MbedCloudException - * if an error occurs during the process. - */ - @SuppressWarnings("resource") - public DeviceEnrollmentDenialListDao getDeviceEnrollmentDenialListDao() throws MbedCloudException { - return new DeviceEnrollmentDenialListDao().configureAndGet(context); - } - /** * Gets a device enrollment list dao. * @@ -808,18 +780,6 @@ public SubtenantIdentityProviderDao getSubtenantIdentityProviderDao() throws Mbe return new SubtenantIdentityProviderDao().configureAndGet(context); } - /** - * Gets a subtenant identity provider list dao. - * - * @return a subtenant identity provider list dao - * @throws MbedCloudException - * if an error occurs during the process. - */ - @SuppressWarnings("resource") - public SubtenantIdentityProviderListDao getSubtenantIdentityProviderListDao() throws MbedCloudException { - return new SubtenantIdentityProviderListDao().configureAndGet(context); - } - /** * Gets a subtenant light theme color dao. * @@ -856,18 +816,6 @@ public SubtenantPolicyGroupDao getSubtenantPolicyGroupDao() throws MbedCloudExce return new SubtenantPolicyGroupDao().configureAndGet(context); } - /** - * Gets a subtenant policy group list dao. - * - * @return a subtenant policy group list dao - * @throws MbedCloudException - * if an error occurs during the process. - */ - @SuppressWarnings("resource") - public SubtenantPolicyGroupListDao getSubtenantPolicyGroupListDao() throws MbedCloudException { - return new SubtenantPolicyGroupListDao().configureAndGet(context); - } - /** * Gets a subtenant trusted certificate dao. * diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfigDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfigDao.java index d7688fc7e..ad6c90a4b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfigDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfigDao.java @@ -166,8 +166,7 @@ public void delete(@NonNull CertificateIssuerConfig certificateIssuerConfig) thr * Similar to {@link com.arm.mbed.cloud.sdk.Security#deleteCertificateIssuerConfig(String)} * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID configuration. * @throws MbedCloudException * if an error occurs during the process. */ @@ -284,8 +283,7 @@ public CertificateIssuerConfig read() throws MbedCloudException { * Similar to {@link com.arm.mbed.cloud.sdk.Security#readCertificateIssuerConfig(String)} * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @return something * @throws MbedCloudException * if an error occurs during the process. @@ -323,8 +321,7 @@ public CertificateIssuerConfig update() throws MbedCloudException { * @param certificateIssuerConfigRequest * a certificate issuer config. * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @return an updated certificate issuer config * @throws MbedCloudException * if an error occurs during the process. @@ -364,8 +361,7 @@ public CertificateIssuerConfig update(@NonNull CertificateIssuerConfig certifica * {@link com.arm.mbed.cloud.sdk.security.model.CertificateIssuerConfigDao#update(com.arm.mbed.cloud.sdk.security.model.CertificateIssuerConfig, String)} * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @return an updated certificate issuer config * @throws MbedCloudException * if an error occurs during the process. diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerDao.java index 45c92d891..546a11783 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 10:47:50 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.security.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public CertificateIssuerDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/DeveloperCertificateDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/DeveloperCertificateDao.java index dcdef852e..2898cab0f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/DeveloperCertificateDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/DeveloperCertificateDao.java @@ -178,7 +178,7 @@ public void delete(@NonNull String id) throws MbedCloudException { } /** - * Get trusted certificate by ID. + * Get a trusted certificate. * * *

@@ -196,7 +196,7 @@ public TrustedCertificate getTrustedCertificateInfo() throws MbedCloudException } /** - * Get trusted certificate by ID. + * Get a trusted certificate. * * *

@@ -215,7 +215,7 @@ public TrustedCertificate getTrustedCertificateInfo() throws MbedCloudException } /** - * Get trusted certificate by ID. + * Get a trusted certificate. * * *

diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKeyDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKeyDao.java index a1c78f213..43217132a 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKeyDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKeyDao.java @@ -1,13 +1,10 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 10:47:50 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.security.model; -import com.arm.mbed.cloud.sdk.Security; -import com.arm.mbed.cloud.sdk.annotations.NonNull; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; -import com.arm.mbed.cloud.sdk.common.ApiUtils; import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.MbedCloudException; import com.arm.mbed.cloud.sdk.common.NotImplementedException; @@ -70,7 +67,7 @@ public PreSharedKeyDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -116,39 +113,4 @@ public PreSharedKey create(PreSharedKey modelToCreate) throws MbedCloudException // TODO Auto-generated method stub.; throw new NotImplementedException(); } - - /** - * Adds a pre shared key. - * - *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.Security#createPreSharedKey(String, com.arm.mbed.cloud.sdk.security.model.PreSharedKey)} - * - * @param modelToCreate - * an sdk model. - * @param secretHex - * The secret of the PSK in hexadecimal. It is not case sensitive; 4a is same as 4A, and it is allowed - * with or without 0x in the beginning. The minimum length of the secret is 128 bits and maximum 256 - * bits. - * @throws MbedCloudException - * if an error occurs during the process. - */ - public void create(PreSharedKey modelToCreate, @NonNull String secretHex) throws MbedCloudException { - ((Security) getModuleOrThrow()).createPreSharedKey(secretHex, modelToCreate); - } - - /** - * Executes delete. - * - * @param modelToDelete - * an sdk model. - * @throws MbedCloudException - * if an error occurs during the process. - */ - @Override - @NotImplemented - public void delete(PreSharedKey modelToDelete) throws MbedCloudException { - ApiUtils.checkNotNull(getModuleOrThrow().getLogger(), modelToDelete, "modelToDelete"); - delete(modelToDelete.getEndpointName()); - } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SecurityEndpoints.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SecurityEndpoints.java index 61407a0a8..66cdc722b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SecurityEndpoints.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SecurityEndpoints.java @@ -6,14 +6,14 @@ import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.AbstractEndpoints; import com.arm.mbed.cloud.sdk.common.ServiceRegistry; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.CertificateIssuersActivationApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.CertificateIssuersApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceSecurityCertificatesApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceSecurityDeveloperClassCertificatesApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceSecurityDeviceCertificateRenewalsApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.PreSharedKeysApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.ServiceSecurityServerCredentialsApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantDeviceSecurityCertificatesApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuerConfigurationsApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificateIssuersApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityCertificatesApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityDeveloperClassCertificatesApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityPreSharedKeysApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.SecurityAndIdentityServerCredentialsApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; /** * Endpoints for Security APIs module. @@ -29,46 +29,46 @@ public class SecurityEndpoints extends AbstractEndpoints { private final DeviceSecurityDeviceCertificateRenewalsApi deviceSecurityDeviceCertificateRenewalsApi; /** - * Low level endpoints for certificate issuers apis. + * Low level endpoints for security and identity certificate issuers apis. */ @Internal - private final CertificateIssuersApi certificateIssuersApi; + private final SecurityAndIdentityCertificateIssuersApi securityAndIdentityCertificateIssuersApi; /** - * Low level endpoints for certificate issuers activation apis. + * Low level endpoints for security and identity certificate issuer configurations apis. */ @Internal - private final CertificateIssuersActivationApi certificateIssuersActivationApi; + private final SecurityAndIdentityCertificateIssuerConfigurationsApi securityAndIdentityCertificateIssuerConfigurationsApi; /** - * Low level endpoints for device security developer class certificates apis. + * Low level endpoints for security and identity developer class certificates apis. */ @Internal - private final DeviceSecurityDeveloperClassCertificatesApi deviceSecurityDeveloperClassCertificatesApi; + private final SecurityAndIdentityDeveloperClassCertificatesApi securityAndIdentityDeveloperClassCertificatesApi; /** - * Low level endpoints for device security certificates apis. + * Low level endpoints for security and identity certificates apis. */ @Internal - private final DeviceSecurityCertificatesApi deviceSecurityCertificatesApi; + private final SecurityAndIdentityCertificatesApi securityAndIdentityCertificatesApi; /** - * Low level endpoints for pre shared keys apis. + * Low level endpoints for security and identity pre shared keys apis. */ @Internal - private final PreSharedKeysApi preSharedKeysApi; + private final SecurityAndIdentityPreSharedKeysApi securityAndIdentityPreSharedKeysApi; /** - * Low level endpoints for service security server credentials apis. + * Low level endpoints for security and identity server credentials apis. */ @Internal - private final ServiceSecurityServerCredentialsApi serviceSecurityServerCredentialsApi; + private final SecurityAndIdentityServerCredentialsApi securityAndIdentityServerCredentialsApi; /** - * Low level endpoints for tenant device security certificates apis. + * Low level endpoints for tenant security and identity certificates apis. */ @Internal - private final TenantDeviceSecurityCertificatesApi tenantDeviceSecurityCertificatesApi; + private final TenantSecurityAndIdentityCertificatesApi tenantSecurityAndIdentityCertificatesApi; /** * Constructor. @@ -79,83 +79,84 @@ public class SecurityEndpoints extends AbstractEndpoints { public SecurityEndpoints(ServiceRegistry services) { super(services); this.deviceSecurityDeviceCertificateRenewalsApi = initialiseService(DeviceSecurityDeviceCertificateRenewalsApi.class); - this.certificateIssuersApi = initialiseService(CertificateIssuersApi.class); - this.certificateIssuersActivationApi = initialiseService(CertificateIssuersActivationApi.class); - this.deviceSecurityDeveloperClassCertificatesApi = initialiseService(DeviceSecurityDeveloperClassCertificatesApi.class); - this.deviceSecurityCertificatesApi = initialiseService(DeviceSecurityCertificatesApi.class); - this.preSharedKeysApi = initialiseService(PreSharedKeysApi.class); - this.serviceSecurityServerCredentialsApi = initialiseService(ServiceSecurityServerCredentialsApi.class); - this.tenantDeviceSecurityCertificatesApi = initialiseService(TenantDeviceSecurityCertificatesApi.class); + this.securityAndIdentityCertificateIssuersApi = initialiseService(SecurityAndIdentityCertificateIssuersApi.class); + this.securityAndIdentityCertificateIssuerConfigurationsApi = initialiseService(SecurityAndIdentityCertificateIssuerConfigurationsApi.class); + this.securityAndIdentityDeveloperClassCertificatesApi = initialiseService(SecurityAndIdentityDeveloperClassCertificatesApi.class); + this.securityAndIdentityCertificatesApi = initialiseService(SecurityAndIdentityCertificatesApi.class); + this.securityAndIdentityPreSharedKeysApi = initialiseService(SecurityAndIdentityPreSharedKeysApi.class); + this.securityAndIdentityServerCredentialsApi = initialiseService(SecurityAndIdentityServerCredentialsApi.class); + this.tenantSecurityAndIdentityCertificatesApi = initialiseService(TenantSecurityAndIdentityCertificatesApi.class); } /** - * Gets low level endpoints for certificate issuers apis. + * Gets low level endpoints for security and identity certificate issuers apis. * - * @return certificateIssuersApi + * @return securityAndIdentityCertificateIssuersApi */ @Internal - public CertificateIssuersApi getCertificateIssuersApi() { - return certificateIssuersApi; + public SecurityAndIdentityCertificateIssuersApi getSecurityAndIdentityCertificateIssuersApi() { + return securityAndIdentityCertificateIssuersApi; } /** - * Gets low level endpoints for certificate issuers activation apis. + * Gets low level endpoints for security and identity certificate issuer configurations apis. * - * @return certificateIssuersActivationApi + * @return securityAndIdentityCertificateIssuerConfigurationsApi */ @Internal - public CertificateIssuersActivationApi getCertificateIssuersActivationApi() { - return certificateIssuersActivationApi; + public SecurityAndIdentityCertificateIssuerConfigurationsApi + getSecurityAndIdentityCertificateIssuerConfigurationsApi() { + return securityAndIdentityCertificateIssuerConfigurationsApi; } /** - * Gets low level endpoints for device security developer class certificates apis. + * Gets low level endpoints for security and identity developer class certificates apis. * - * @return deviceSecurityDeveloperClassCertificatesApi + * @return securityAndIdentityDeveloperClassCertificatesApi */ @Internal - public DeviceSecurityDeveloperClassCertificatesApi getDeviceSecurityDeveloperClassCertificatesApi() { - return deviceSecurityDeveloperClassCertificatesApi; + public SecurityAndIdentityDeveloperClassCertificatesApi getSecurityAndIdentityDeveloperClassCertificatesApi() { + return securityAndIdentityDeveloperClassCertificatesApi; } /** - * Gets low level endpoints for device security certificates apis. + * Gets low level endpoints for security and identity certificates apis. * - * @return deviceSecurityCertificatesApi + * @return securityAndIdentityCertificatesApi */ @Internal - public DeviceSecurityCertificatesApi getDeviceSecurityCertificatesApi() { - return deviceSecurityCertificatesApi; + public SecurityAndIdentityCertificatesApi getSecurityAndIdentityCertificatesApi() { + return securityAndIdentityCertificatesApi; } /** - * Gets low level endpoints for pre shared keys apis. + * Gets low level endpoints for security and identity pre shared keys apis. * - * @return preSharedKeysApi + * @return securityAndIdentityPreSharedKeysApi */ @Internal - public PreSharedKeysApi getPreSharedKeysApi() { - return preSharedKeysApi; + public SecurityAndIdentityPreSharedKeysApi getSecurityAndIdentityPreSharedKeysApi() { + return securityAndIdentityPreSharedKeysApi; } /** - * Gets low level endpoints for service security server credentials apis. + * Gets low level endpoints for security and identity server credentials apis. * - * @return serviceSecurityServerCredentialsApi + * @return securityAndIdentityServerCredentialsApi */ @Internal - public ServiceSecurityServerCredentialsApi getServiceSecurityServerCredentialsApi() { - return serviceSecurityServerCredentialsApi; + public SecurityAndIdentityServerCredentialsApi getSecurityAndIdentityServerCredentialsApi() { + return securityAndIdentityServerCredentialsApi; } /** - * Gets low level endpoints for tenant device security certificates apis. + * Gets low level endpoints for tenant security and identity certificates apis. * - * @return tenantDeviceSecurityCertificatesApi + * @return tenantSecurityAndIdentityCertificatesApi */ @Internal - public TenantDeviceSecurityCertificatesApi getTenantDeviceSecurityCertificatesApi() { - return tenantDeviceSecurityCertificatesApi; + public TenantSecurityAndIdentityCertificatesApi getTenantSecurityAndIdentityCertificatesApi() { + return tenantSecurityAndIdentityCertificatesApi; } /** diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateDao.java index 20719b678..ae6f1f2ee 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Apr 05 10:55:58 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.security.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateListOptions.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateListOptions.java index a9d8ea632..e9d20acce 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateListOptions.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificateListOptions.java @@ -39,9 +39,9 @@ *

* * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_VALID * * * @@ -51,9 +51,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_NAME * * * @@ -63,9 +63,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_CERTIFICATE_FINGERPRINT * * * @@ -75,34 +75,34 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ENROLLMENT_MODE * + * * * * - * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_STATUS * + * * * * - * * * * * - * + * * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEVICE_EXECUTION_MODE + * * * * @@ -111,10 +111,22 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ISSUER + * + * + * + * * + * + * + * + * + * + * + * * * * @@ -123,14 +135,14 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_SUBJECT * - * * * * + * * * * @@ -141,6 +153,11 @@ @Preamble(description = "Options to use when listing subtenant trusted certificates.") @SuppressWarnings("PMD.AvoidDuplicateLiterals") public class SubtenantTrustedCertificateListOptions extends ListOptions { + /** + * Tag for filter by certificateFingerprint. + */ + public static final String TAG_FILTER_BY_CERTIFICATE_FINGERPRINT = "certificateFingerprint"; + /** * Tag for filter by deviceExecutionMode. */ @@ -333,6 +350,45 @@ public T equalToName(String f return (T) this; } + /** + * Gets all the filters defined on field {@code certificateFingerprint}. + * + * @return All the filters by {@code certificateFingerprint} + */ + public List getCertificateFingerprintFilters() { + return fetchFilters(TAG_FILTER_BY_CERTIFICATE_FINGERPRINT); + } + + /** + * Sets "an equal to" filter by {@code certificateFingerprint}. + * + * @param filterByCertificateFingerprint + * filter value. + */ + public void addEqualToCertificateFingerprintFilter(String filterByCertificateFingerprint) { + addEqualFilter(TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, filterByCertificateFingerprint); + } + + /** + * Sets "an equal to" filter by {@code certificateFingerprint}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.security.model.SubtenantTrustedCertificateListOptions#addEqualToCertificateFingerprintFilter(String)} + * + * @param filterByCertificateFingerprint + * filter value. + * @param + * type of a subtenant trusted certificate list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T + equalToCertificateFingerprint(String filterByCertificateFingerprint) { + addEqualToCertificateFingerprintFilter(filterByCertificateFingerprint); + return (T) this; + } + /** * Gets all the filters defined on field {@code status}. * diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificateListOptions.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificateListOptions.java index bda03e0c8..d0f83ce7f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificateListOptions.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificateListOptions.java @@ -39,9 +39,9 @@ *

* * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_VALID * * * @@ -51,9 +51,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_NAME * * * @@ -63,9 +63,9 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_CERTIFICATE_FINGERPRINT * * * @@ -75,34 +75,34 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ENROLLMENT_MODE * + * * * * - * * * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_STATUS * + * * * * - * * * * * - * + * * - * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_DEVICE_EXECUTION_MODE + * * * * @@ -111,10 +111,22 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_ISSUER + * + * + * + * * + * + * + * + * + * + * + * * * * @@ -123,14 +135,14 @@ * * * - * + * * + * "border-color:inherit;text-align:left;padding-left:15px;padding-right:15px;font-weight:bold">TAG_FILTER_BY_SUBJECT * - * * * * + * * * * @@ -141,6 +153,11 @@ @Preamble(description = "Options to use when listing trusted certificates.") @SuppressWarnings("PMD.AvoidDuplicateLiterals") public class TrustedCertificateListOptions extends ListOptions { + /** + * Tag for filter by certificateFingerprint. + */ + public static final String TAG_FILTER_BY_CERTIFICATE_FINGERPRINT = "certificateFingerprint"; + /** * Tag for filter by deviceExecutionMode. */ @@ -333,6 +350,45 @@ public T equalToName(String filterByNa return (T) this; } + /** + * Gets all the filters defined on field {@code certificateFingerprint}. + * + * @return All the filters by {@code certificateFingerprint} + */ + public List getCertificateFingerprintFilters() { + return fetchFilters(TAG_FILTER_BY_CERTIFICATE_FINGERPRINT); + } + + /** + * Sets "an equal to" filter by {@code certificateFingerprint}. + * + * @param filterByCertificateFingerprint + * filter value. + */ + public void addEqualToCertificateFingerprintFilter(String filterByCertificateFingerprint) { + addEqualFilter(TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, filterByCertificateFingerprint); + } + + /** + * Sets "an equal to" filter by {@code certificateFingerprint}. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.security.model.TrustedCertificateListOptions#addEqualToCertificateFingerprintFilter(String)} + * + * @param filterByCertificateFingerprint + * filter value. + * @param + * type of a trusted certificate list options + * @return These list options + */ + @SuppressWarnings("unchecked") + public T + equalToCertificateFingerprint(String filterByCertificateFingerprint) { + addEqualToCertificateFingerprintFilter(filterByCertificateFingerprint); + return (T) this; + } + /** * Gets all the filters defined on field {@code status}. * diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountListOptions.java index b47733ef9..8716a3e5a 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountListOptions.java @@ -23,9 +23,9 @@ public class TestAccountListOptions { @Test public void testClone() { try { - AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(28), Long.valueOf(-60), + AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(-11), Long.valueOf(-119), Order.getDefault(), - "378225d3-a485-4fb7-b500-7a64d201d0e2", + "bb95bb8f-3a44-4268-97f5-e9230611612c", null, null); AccountListOptions accountlistoptions2 = accountlistoptions1.clone(); assertNotNull(accountlistoptions1); @@ -44,7 +44,7 @@ public void testClone() { @Test public void testFilters() { try { - AccountListOptions option = new AccountListOptions().equalToTier("c3ffb3ea-7acc-4e17-9883-65a57333a704") + AccountListOptions option = new AccountListOptions().equalToTier("095ced12-6656-4b66-b8a1-5bfec5a59eb7") .equalToStatus(AccountStatus.getDefault()) .inStatuses(Arrays.asList(AccountStatus.getDefault(), AccountStatus.getDefault(), @@ -52,16 +52,23 @@ public void testFilters() { AccountStatus.getDefault(), AccountStatus.getDefault(), AccountStatus.getDefault(), + AccountStatus.getDefault(), AccountStatus.getDefault())) .notInStatuses(Arrays.asList(AccountStatus.getDefault(), + AccountStatus.getDefault(), + AccountStatus.getDefault(), + AccountStatus.getDefault(), + AccountStatus.getDefault(), + AccountStatus.getDefault(), + AccountStatus.getDefault(), AccountStatus.getDefault())) - .equalToEndMarket("ad22b650-c496-4110-bd2a-ac1783825264") - .likeCountry("310a542f-52b2-46b2-8c07-ecae9f786afb"); + .equalToEndMarket("aee9369a-d9a2-4526-9416-e8407ab56cca") + .likeCountry("f9047272-1ecf-4d38-bf96-bbc0f18630c4"); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(AccountListOptions.TAG_FILTER_BY_TIER)); assertTrue(option.hasFilter(AccountListOptions.TAG_FILTER_BY_TIER, FilterOperator.EQUAL)); assertNotNull(option.getTierFilters()); - assertEquals("c3ffb3ea-7acc-4e17-9883-65a57333a704", + assertEquals("095ced12-6656-4b66-b8a1-5bfec5a59eb7", ListOptionsEncoder.encodeSingleEqualFilter(AccountListOptions.TAG_FILTER_BY_TIER, String.class, option)); assertTrue(option.hasFilters(AccountListOptions.TAG_FILTER_BY_STATUS)); @@ -76,25 +83,28 @@ public void testFilters() { assertEquals(Arrays.asList(AccountStatus.getDefault(), AccountStatus.getDefault(), AccountStatus.getDefault(), AccountStatus.getDefault(), AccountStatus.getDefault(), AccountStatus.getDefault(), - AccountStatus.getDefault()), + AccountStatus.getDefault(), AccountStatus.getDefault()), ListOptionsEncoder.encodeSingleInFilter(AccountListOptions.TAG_FILTER_BY_STATUS, List.class, option)); assertTrue(option.hasFilters(AccountListOptions.TAG_FILTER_BY_STATUS)); assertTrue(option.hasFilter(AccountListOptions.TAG_FILTER_BY_STATUS, FilterOperator.NOT_IN)); assertNotNull(option.getStatusFilters()); - assertEquals(Arrays.asList(AccountStatus.getDefault(), AccountStatus.getDefault()), + assertEquals(Arrays.asList(AccountStatus.getDefault(), AccountStatus.getDefault(), + AccountStatus.getDefault(), AccountStatus.getDefault(), + AccountStatus.getDefault(), AccountStatus.getDefault(), + AccountStatus.getDefault(), AccountStatus.getDefault()), ListOptionsEncoder.encodeSingleNotInFilter(AccountListOptions.TAG_FILTER_BY_STATUS, List.class, option)); assertTrue(option.hasFilters(AccountListOptions.TAG_FILTER_BY_END_MARKET)); assertTrue(option.hasFilter(AccountListOptions.TAG_FILTER_BY_END_MARKET, FilterOperator.EQUAL)); assertNotNull(option.getEndMarketFilters()); - assertEquals("ad22b650-c496-4110-bd2a-ac1783825264", + assertEquals("aee9369a-d9a2-4526-9416-e8407ab56cca", ListOptionsEncoder.encodeSingleEqualFilter(AccountListOptions.TAG_FILTER_BY_END_MARKET, String.class, option)); assertTrue(option.hasFilters(AccountListOptions.TAG_FILTER_BY_COUNTRY)); assertTrue(option.hasFilter(AccountListOptions.TAG_FILTER_BY_COUNTRY, FilterOperator.LIKE)); assertNotNull(option.getCountryFilters()); - assertEquals("310a542f-52b2-46b2-8c07-ecae9f786afb", + assertEquals("f9047272-1ecf-4d38-bf96-bbc0f18630c4", ListOptionsEncoder.encodeSingleLikeFilter(AccountListOptions.TAG_FILTER_BY_COUNTRY, String.class, option)); } catch (Exception exception) { @@ -109,13 +119,13 @@ public void testFilters() { @Test public void testHashCode() { try { - AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(-116), Long.valueOf(10), + AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(-57), Long.valueOf(-118), Order.getDefault(), - "3001a1b4-f5b6-4d85-90aa-95b898610db9", + "b0f3935f-8b2b-457d-a9e0-53778010588a", null, null); - AccountListOptions accountlistoptions2 = new AccountListOptions(Integer.valueOf(-116), Long.valueOf(10), + AccountListOptions accountlistoptions2 = new AccountListOptions(Integer.valueOf(-57), Long.valueOf(-118), Order.getDefault(), - "3001a1b4-f5b6-4d85-90aa-95b898610db9", + "b0f3935f-8b2b-457d-a9e0-53778010588a", null, null); assertNotNull(accountlistoptions1); assertNotNull(accountlistoptions2); @@ -138,17 +148,17 @@ public void testHashCode() { @Test public void testEquals() { try { - AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(-27), Long.valueOf(-21), + AccountListOptions accountlistoptions1 = new AccountListOptions(Integer.valueOf(-110), Long.valueOf(91), Order.getDefault(), - "8432ac1c-4e0c-4f3e-8b29-979bde7e57d1", + "41cc99c9-c088-49f0-aac1-75c516cb1e4b", null, null); - AccountListOptions accountlistoptions2 = new AccountListOptions(Integer.valueOf(-27), Long.valueOf(-21), + AccountListOptions accountlistoptions2 = new AccountListOptions(Integer.valueOf(-110), Long.valueOf(91), Order.getDefault(), - "8432ac1c-4e0c-4f3e-8b29-979bde7e57d1", + "41cc99c9-c088-49f0-aac1-75c516cb1e4b", null, null); - AccountListOptions accountlistoptions3 = new AccountListOptions(Integer.valueOf(5), Long.valueOf(66), + AccountListOptions accountlistoptions3 = new AccountListOptions(Integer.valueOf(-1), Long.valueOf(52), Order.getDefault(), - "89227477-b45f-49e3-978d-00edd61ec04f", + "bf3bc4a7-a60c-42a7-97c6-d99940f51ff8", null, null); assertNotNull(accountlistoptions1); assertNotNull(accountlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyListOptions.java index 16bf55a21..d06164a47 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyListOptions.java @@ -19,9 +19,9 @@ public class TestApiKeyListOptions { @Test public void testClone() { try { - ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(0), Long.valueOf(-98), + ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(-6), Long.valueOf(-79), Order.getDefault(), - "0e0f2855-e5cb-45b8-8b0e-5c5d3f7873de", null, + "4627de63-cb7a-4d69-b502-7e7e644fc881", null, null); ApiKeyListOptions apikeylistoptions2 = apikeylistoptions1.clone(); assertNotNull(apikeylistoptions1); @@ -40,13 +40,13 @@ public void testClone() { @Test public void testHashCode() { try { - ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(-28), Long.valueOf(110), + ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(40), Long.valueOf(-52), Order.getDefault(), - "dc5971ae-9343-451a-bf95-541dee920182", null, + "3139833c-14e5-4d2d-a051-edc30e278f7a", null, null); - ApiKeyListOptions apikeylistoptions2 = new ApiKeyListOptions(Integer.valueOf(-28), Long.valueOf(110), + ApiKeyListOptions apikeylistoptions2 = new ApiKeyListOptions(Integer.valueOf(40), Long.valueOf(-52), Order.getDefault(), - "dc5971ae-9343-451a-bf95-541dee920182", null, + "3139833c-14e5-4d2d-a051-edc30e278f7a", null, null); assertNotNull(apikeylistoptions1); assertNotNull(apikeylistoptions2); @@ -69,17 +69,17 @@ public void testHashCode() { @Test public void testEquals() { try { - ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(93), Long.valueOf(85), + ApiKeyListOptions apikeylistoptions1 = new ApiKeyListOptions(Integer.valueOf(32), Long.valueOf(99), Order.getDefault(), - "58e43002-1b78-4bf4-ab70-f5618938d683", null, + "9b463038-1336-4585-bec6-4dd49eb6e061", null, null); - ApiKeyListOptions apikeylistoptions2 = new ApiKeyListOptions(Integer.valueOf(93), Long.valueOf(85), + ApiKeyListOptions apikeylistoptions2 = new ApiKeyListOptions(Integer.valueOf(32), Long.valueOf(99), Order.getDefault(), - "58e43002-1b78-4bf4-ab70-f5618938d683", null, + "9b463038-1336-4585-bec6-4dd49eb6e061", null, null); - ApiKeyListOptions apikeylistoptions3 = new ApiKeyListOptions(Integer.valueOf(107), Long.valueOf(-32), + ApiKeyListOptions apikeylistoptions3 = new ApiKeyListOptions(Integer.valueOf(-76), Long.valueOf(-123), Order.getDefault(), - "7c241edb-798f-474e-9140-ebc4a96e397e", null, + "04f6a65f-3406-4482-88bd-c3ec236b5cc3", null, null); assertNotNull(apikeylistoptions1); assertNotNull(apikeylistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderListOptions.java index 9f2e6fd74..6f98e19c2 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderListOptions.java @@ -19,10 +19,10 @@ public class TestIdentityProviderListOptions { @Test public void testClone() { try { - IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(32), - Long.valueOf(126), + IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(-109), + Long.valueOf(-81), Order.getDefault(), - "ff96ce8b-a1f6-4a4f-b58b-3ce84e48d530", + "eec10f51-c627-45c7-9d79-761bd98e6f21", null, null); IdentityProviderListOptions identityproviderlistoptions2 = identityproviderlistoptions1.clone(); assertNotNull(identityproviderlistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(-104), - Long.valueOf(101), + IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(61), + Long.valueOf(110), Order.getDefault(), - "b9d02487-86b9-43eb-b4a8-409c434ce34d", + "b98dce66-90e5-4015-aac1-3ce49f8d3afb", null, null); - IdentityProviderListOptions identityproviderlistoptions2 = new IdentityProviderListOptions(Integer.valueOf(-104), - Long.valueOf(101), + IdentityProviderListOptions identityproviderlistoptions2 = new IdentityProviderListOptions(Integer.valueOf(61), + Long.valueOf(110), Order.getDefault(), - "b9d02487-86b9-43eb-b4a8-409c434ce34d", + "b98dce66-90e5-4015-aac1-3ce49f8d3afb", null, null); assertNotNull(identityproviderlistoptions1); assertNotNull(identityproviderlistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(41), - Long.valueOf(-97), + IdentityProviderListOptions identityproviderlistoptions1 = new IdentityProviderListOptions(Integer.valueOf(-65), + Long.valueOf(26), Order.getDefault(), - "4239e087-141b-469a-b1be-f722b89b1359", + "4d9e7301-4fb1-428e-88eb-ab487987297e", null, null); - IdentityProviderListOptions identityproviderlistoptions2 = new IdentityProviderListOptions(Integer.valueOf(41), - Long.valueOf(-97), + IdentityProviderListOptions identityproviderlistoptions2 = new IdentityProviderListOptions(Integer.valueOf(-65), + Long.valueOf(26), Order.getDefault(), - "4239e087-141b-469a-b1be-f722b89b1359", + "4d9e7301-4fb1-428e-88eb-ab487987297e", null, null); - IdentityProviderListOptions identityproviderlistoptions3 = new IdentityProviderListOptions(Integer.valueOf(-28), - Long.valueOf(-31), + IdentityProviderListOptions identityproviderlistoptions3 = new IdentityProviderListOptions(Integer.valueOf(42), + Long.valueOf(67), Order.getDefault(), - "65dc9b3e-1b38-48a6-aa89-420f37da8437", + "9bc31234-1776-44ee-b650-3452a986e7ba", null, null); assertNotNull(identityproviderlistoptions1); assertNotNull(identityproviderlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroupListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroupListOptions.java index a66af3e63..9a43419d8 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroupListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroupListOptions.java @@ -19,10 +19,10 @@ public class TestPolicyGroupListOptions { @Test public void testClone() { try { - PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(-78), - Long.valueOf(42), + PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(-66), + Long.valueOf(-114), Order.getDefault(), - "c7115cf9-bcb1-4052-8d94-756b560f1697", + "fd7cd53d-3eb1-4c80-9568-ec54e2d2f625", null, null); PolicyGroupListOptions policygrouplistoptions2 = policygrouplistoptions1.clone(); assertNotNull(policygrouplistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(30), - Long.valueOf(7), + PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(-94), + Long.valueOf(35), Order.getDefault(), - "b9eb75e4-50b3-4aba-86e7-ba3d0c2b91ac", + "8f51ac03-c161-465d-bbb5-7621bed18daa", null, null); - PolicyGroupListOptions policygrouplistoptions2 = new PolicyGroupListOptions(Integer.valueOf(30), - Long.valueOf(7), + PolicyGroupListOptions policygrouplistoptions2 = new PolicyGroupListOptions(Integer.valueOf(-94), + Long.valueOf(35), Order.getDefault(), - "b9eb75e4-50b3-4aba-86e7-ba3d0c2b91ac", + "8f51ac03-c161-465d-bbb5-7621bed18daa", null, null); assertNotNull(policygrouplistoptions1); assertNotNull(policygrouplistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(-90), - Long.valueOf(-34), + PolicyGroupListOptions policygrouplistoptions1 = new PolicyGroupListOptions(Integer.valueOf(77), + Long.valueOf(21), Order.getDefault(), - "2f1d891a-988e-4876-a38e-e82eec4ab763", + "532f69d7-9088-4007-b078-34a90a2d6105", null, null); - PolicyGroupListOptions policygrouplistoptions2 = new PolicyGroupListOptions(Integer.valueOf(-90), - Long.valueOf(-34), + PolicyGroupListOptions policygrouplistoptions2 = new PolicyGroupListOptions(Integer.valueOf(77), + Long.valueOf(21), Order.getDefault(), - "2f1d891a-988e-4876-a38e-e82eec4ab763", + "532f69d7-9088-4007-b078-34a90a2d6105", null, null); - PolicyGroupListOptions policygrouplistoptions3 = new PolicyGroupListOptions(Integer.valueOf(-98), - Long.valueOf(10), + PolicyGroupListOptions policygrouplistoptions3 = new PolicyGroupListOptions(Integer.valueOf(12), + Long.valueOf(-127), Order.getDefault(), - "85a3d77a-0121-48d1-9dcd-c9d3fed54647", + "c41ea24e-754f-404a-8d54-12010249e1a9", null, null); assertNotNull(policygrouplistoptions1); assertNotNull(policygrouplistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyListOptions.java index 9e7f8026b..a186beedd 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantApiKeyListOptions { @Test public void testClone() { try { - SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(100), - Long.valueOf(114), + SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(-92), + Long.valueOf(-83), Order.getDefault(), - "50dd932a-2946-4e5d-a540-727eba3259da", + "a78ab9fc-c11f-4400-9a5e-8ea939966553", null, null); SubtenantApiKeyListOptions subtenantapikeylistoptions2 = subtenantapikeylistoptions1.clone(); assertNotNull(subtenantapikeylistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(-87), - Long.valueOf(89), + SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(28), + Long.valueOf(66), Order.getDefault(), - "9437ef87-ccb2-4b9d-87e3-eebd2f755dd6", + "41fc97b6-0968-406b-ab32-bfa423e9d12c", null, null); - SubtenantApiKeyListOptions subtenantapikeylistoptions2 = new SubtenantApiKeyListOptions(Integer.valueOf(-87), - Long.valueOf(89), + SubtenantApiKeyListOptions subtenantapikeylistoptions2 = new SubtenantApiKeyListOptions(Integer.valueOf(28), + Long.valueOf(66), Order.getDefault(), - "9437ef87-ccb2-4b9d-87e3-eebd2f755dd6", + "41fc97b6-0968-406b-ab32-bfa423e9d12c", null, null); assertNotNull(subtenantapikeylistoptions1); assertNotNull(subtenantapikeylistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(-62), - Long.valueOf(33), + SubtenantApiKeyListOptions subtenantapikeylistoptions1 = new SubtenantApiKeyListOptions(Integer.valueOf(30), + Long.valueOf(38), Order.getDefault(), - "d9f4119a-647e-47aa-9dab-f3ad8605cc9c", + "47c783e6-14d7-4a12-b06b-5b2328fc6a53", null, null); - SubtenantApiKeyListOptions subtenantapikeylistoptions2 = new SubtenantApiKeyListOptions(Integer.valueOf(-62), - Long.valueOf(33), + SubtenantApiKeyListOptions subtenantapikeylistoptions2 = new SubtenantApiKeyListOptions(Integer.valueOf(30), + Long.valueOf(38), Order.getDefault(), - "d9f4119a-647e-47aa-9dab-f3ad8605cc9c", + "47c783e6-14d7-4a12-b06b-5b2328fc6a53", null, null); - SubtenantApiKeyListOptions subtenantapikeylistoptions3 = new SubtenantApiKeyListOptions(Integer.valueOf(123), - Long.valueOf(32), + SubtenantApiKeyListOptions subtenantapikeylistoptions3 = new SubtenantApiKeyListOptions(Integer.valueOf(45), + Long.valueOf(-99), Order.getDefault(), - "1cf7c00d-a478-48c5-9dc5-758125f981a1", + "e47d5d74-af8b-4af0-9e30-8181a01601bd", null, null); assertNotNull(subtenantapikeylistoptions1); assertNotNull(subtenantapikeylistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderListOptions.java index c550f770e..7c85c01e1 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantIdentityProviderListOptions { @Test public void testClone() { try { - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(115), - Long.valueOf(-105), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(3), + Long.valueOf(88), Order.getDefault(), - "b17f717b-ea07-4b1f-8f6b-5b0d4d727a72", + "81e235df-22f2-48f4-b62e-4eddb9c31928", null, null); SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions2 = subtenantidentityproviderlistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(35), - Long.valueOf(-90), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(36), + Long.valueOf(-121), Order.getDefault(), - "e8d0da9c-c88b-45fe-89e9-6509741aef23", + "5bf31e61-6cff-4e39-86a7-abb3aea8a916", null, null); - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions2 = new SubtenantIdentityProviderListOptions(Integer.valueOf(35), - Long.valueOf(-90), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions2 = new SubtenantIdentityProviderListOptions(Integer.valueOf(36), + Long.valueOf(-121), Order.getDefault(), - "e8d0da9c-c88b-45fe-89e9-6509741aef23", + "5bf31e61-6cff-4e39-86a7-abb3aea8a916", null, null); assertNotNull(subtenantidentityproviderlistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(-107), - Long.valueOf(-106), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions1 = new SubtenantIdentityProviderListOptions(Integer.valueOf(-22), + Long.valueOf(57), Order.getDefault(), - "9c749b49-2a71-49ee-b068-ee815fec79e8", + "92e1c975-6860-4e7b-b88c-638f0efe732f", null, null); - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions2 = new SubtenantIdentityProviderListOptions(Integer.valueOf(-107), - Long.valueOf(-106), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions2 = new SubtenantIdentityProviderListOptions(Integer.valueOf(-22), + Long.valueOf(57), Order.getDefault(), - "9c749b49-2a71-49ee-b068-ee815fec79e8", + "92e1c975-6860-4e7b-b88c-638f0efe732f", null, null); - SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions3 = new SubtenantIdentityProviderListOptions(Integer.valueOf(15), - Long.valueOf(-102), + SubtenantIdentityProviderListOptions subtenantidentityproviderlistoptions3 = new SubtenantIdentityProviderListOptions(Integer.valueOf(80), + Long.valueOf(47), Order.getDefault(), - "f8eb9baa-588d-4be4-be98-06a336c36a73", + "5fe9ea2f-9a59-4321-8ca8-f10b37e0c5fc", null, null); assertNotNull(subtenantidentityproviderlistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroupListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroupListOptions.java index 319f6aca8..b743e33b5 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroupListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroupListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantPolicyGroupListOptions { @Test public void testClone() { try { - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-110), - Long.valueOf(78), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-77), + Long.valueOf(-116), Order.getDefault(), - "08618abe-660a-4e54-bad6-818ca0dfef42", + "a336bfe5-8de1-4c02-9a89-1eeca21c3b2d", null, null); SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = subtenantpolicygrouplistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94), - Long.valueOf(71), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-42), + Long.valueOf(5), Order.getDefault(), - "8dc5a82a-6167-4538-8ded-4ce5f9a7634b", + "b713949c-03d5-4f2f-ac5a-b59997408487", null, null); - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(94), - Long.valueOf(71), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-42), + Long.valueOf(5), Order.getDefault(), - "8dc5a82a-6167-4538-8ded-4ce5f9a7634b", + "b713949c-03d5-4f2f-ac5a-b59997408487", null, null); assertNotNull(subtenantpolicygrouplistoptions1); @@ -75,22 +75,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51), - Long.valueOf(105), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(12), + Long.valueOf(-49), Order.getDefault(), - "efc9e20d-db05-4f2f-b41f-016029d4faff", + "bacfbb56-831b-447c-b4e3-3ed6afaa6d2d", null, null); - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51), - Long.valueOf(105), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(12), + Long.valueOf(-49), Order.getDefault(), - "efc9e20d-db05-4f2f-b41f-016029d4faff", + "bacfbb56-831b-447c-b4e3-3ed6afaa6d2d", null, null); - SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101), - Long.valueOf(87), + SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(124), + Long.valueOf(-31), Order.getDefault(), - "99c3b952-8e9d-4dd1-9075-8be04a5e58e8", + "75a94d2b-29ce-4e0b-a568-8915944d5d1d", null, null); assertNotNull(subtenantpolicygrouplistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitationListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitationListOptions.java index cb220a4af..c7c0c2666 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitationListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitationListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantUserInvitationListOptions { @Test public void testClone() { try { - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(-6), - Long.valueOf(92), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(108), + Long.valueOf(-16), Order.getDefault(), - "102d8bcc-88af-4be9-8d0a-ca60bdf1bc69", + "dadfedf4-a95d-4b8f-9f8f-4f079b38e351", null, null); SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions2 = subtenantuserinvitationlistoptions1.clone(); @@ -62,16 +62,16 @@ public void testFilters() { @Test public void testHashCode() { try { - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(72), - Long.valueOf(-122), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(-34), + Long.valueOf(100), Order.getDefault(), - "6b69709a-c23e-4178-aff4-f02b9e8ba7dd", + "1dd4ef75-a8a4-48c7-82a1-3eae98bfc559", null, null); - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions2 = new SubtenantUserInvitationListOptions(Integer.valueOf(72), - Long.valueOf(-122), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions2 = new SubtenantUserInvitationListOptions(Integer.valueOf(-34), + Long.valueOf(100), Order.getDefault(), - "6b69709a-c23e-4178-aff4-f02b9e8ba7dd", + "1dd4ef75-a8a4-48c7-82a1-3eae98bfc559", null, null); assertNotNull(subtenantuserinvitationlistoptions1); @@ -96,22 +96,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(24), - Long.valueOf(-35), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions1 = new SubtenantUserInvitationListOptions(Integer.valueOf(-43), + Long.valueOf(-12), Order.getDefault(), - "0f721c65-1647-42ab-82e0-2bbd8e977be9", + "bcea020d-39f7-4398-88d7-c43fd70de81b", null, null); - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions2 = new SubtenantUserInvitationListOptions(Integer.valueOf(24), - Long.valueOf(-35), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions2 = new SubtenantUserInvitationListOptions(Integer.valueOf(-43), + Long.valueOf(-12), Order.getDefault(), - "0f721c65-1647-42ab-82e0-2bbd8e977be9", + "bcea020d-39f7-4398-88d7-c43fd70de81b", null, null); - SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions3 = new SubtenantUserInvitationListOptions(Integer.valueOf(-65), - Long.valueOf(-83), + SubtenantUserInvitationListOptions subtenantuserinvitationlistoptions3 = new SubtenantUserInvitationListOptions(Integer.valueOf(2), + Long.valueOf(64), Order.getDefault(), - "3033148c-2806-4f88-8c97-6292a8d9d66f", + "2c12343a-f10f-4ca6-a28a-7c694e19bb43", null, null); assertNotNull(subtenantuserinvitationlistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserListOptions.java index a448221ab..d8c8078fd 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserListOptions.java @@ -23,10 +23,10 @@ public class TestSubtenantUserListOptions { @Test public void testClone() { try { - SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(33), - Long.valueOf(11), + SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(-72), + Long.valueOf(-3), Order.getDefault(), - "e9d8d145-3d87-4a2a-901f-80efc1f72bfd", + "752ae591-efd2-4d2d-ae95-6e9fd2fecc17", null, null); SubtenantUserListOptions subtenantuserlistoptions2 = subtenantuserlistoptions1.clone(); assertNotNull(subtenantuserlistoptions1); @@ -51,12 +51,12 @@ public void testFilters() { SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), - SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault())) .notInStatuses(Arrays.asList(SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), + SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault())); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(SubtenantUserListOptions.TAG_FILTER_BY_STATUS)); @@ -70,8 +70,7 @@ public void testFilters() { assertNotNull(option.getStatusFilters()); assertEquals(Arrays.asList(SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), - SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), - SubtenantUserStatus.getDefault()), + SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault()), ListOptionsEncoder.encodeSingleInFilter(SubtenantUserListOptions.TAG_FILTER_BY_STATUS, List.class, option)); assertTrue(option.hasFilters(SubtenantUserListOptions.TAG_FILTER_BY_STATUS)); @@ -79,7 +78,7 @@ public void testFilters() { assertNotNull(option.getStatusFilters()); assertEquals(Arrays.asList(SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault(), - SubtenantUserStatus.getDefault()), + SubtenantUserStatus.getDefault(), SubtenantUserStatus.getDefault()), ListOptionsEncoder.encodeSingleNotInFilter(SubtenantUserListOptions.TAG_FILTER_BY_STATUS, List.class, option)); } catch (Exception exception) { @@ -94,15 +93,15 @@ public void testFilters() { @Test public void testHashCode() { try { - SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(77), - Long.valueOf(-72), + SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(29), + Long.valueOf(-96), Order.getDefault(), - "8b3c1c6e-dfbc-42c8-a27e-4063c4824f29", + "79b5c0f4-65d4-4e40-bb4d-d4faf80f39e3", null, null); - SubtenantUserListOptions subtenantuserlistoptions2 = new SubtenantUserListOptions(Integer.valueOf(77), - Long.valueOf(-72), + SubtenantUserListOptions subtenantuserlistoptions2 = new SubtenantUserListOptions(Integer.valueOf(29), + Long.valueOf(-96), Order.getDefault(), - "8b3c1c6e-dfbc-42c8-a27e-4063c4824f29", + "79b5c0f4-65d4-4e40-bb4d-d4faf80f39e3", null, null); assertNotNull(subtenantuserlistoptions1); assertNotNull(subtenantuserlistoptions2); @@ -125,20 +124,20 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(-11), - Long.valueOf(48), + SubtenantUserListOptions subtenantuserlistoptions1 = new SubtenantUserListOptions(Integer.valueOf(54), + Long.valueOf(-96), Order.getDefault(), - "b31ca2fe-9fb2-46ee-992e-f83f7a66f85b", + "a281fddb-5559-4e93-8fb6-580afa409ee7", null, null); - SubtenantUserListOptions subtenantuserlistoptions2 = new SubtenantUserListOptions(Integer.valueOf(-11), - Long.valueOf(48), + SubtenantUserListOptions subtenantuserlistoptions2 = new SubtenantUserListOptions(Integer.valueOf(54), + Long.valueOf(-96), Order.getDefault(), - "b31ca2fe-9fb2-46ee-992e-f83f7a66f85b", + "a281fddb-5559-4e93-8fb6-580afa409ee7", null, null); - SubtenantUserListOptions subtenantuserlistoptions3 = new SubtenantUserListOptions(Integer.valueOf(7), - Long.valueOf(-17), + SubtenantUserListOptions subtenantuserlistoptions3 = new SubtenantUserListOptions(Integer.valueOf(78), + Long.valueOf(-80), Order.getDefault(), - "44906984-7063-425c-bc45-b94073fbedc2", + "b8db1fd4-9a2a-4da3-8d52-27af735c16f1", null, null); assertNotNull(subtenantuserlistoptions1); assertNotNull(subtenantuserlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitationListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitationListOptions.java index 3d5ba4619..d36ab7db3 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitationListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitationListOptions.java @@ -19,10 +19,10 @@ public class TestUserInvitationListOptions { @Test public void testClone() { try { - UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(-5), - Long.valueOf(-102), + UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(-37), + Long.valueOf(-108), Order.getDefault(), - "4497049c-f021-423b-91fb-3125652d0333", + "20eaf6c7-6601-458c-8d9c-109a7f1968ed", null, null); UserInvitationListOptions userinvitationlistoptions2 = userinvitationlistoptions1.clone(); assertNotNull(userinvitationlistoptions1); @@ -61,15 +61,15 @@ public void testFilters() { @Test public void testHashCode() { try { - UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(22), - Long.valueOf(-22), + UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(-30), + Long.valueOf(48), Order.getDefault(), - "03e6a3f8-b0ae-4075-8af0-344f02517fcc", + "f1c7811d-3124-426f-9d59-ec17c3399873", null, null); - UserInvitationListOptions userinvitationlistoptions2 = new UserInvitationListOptions(Integer.valueOf(22), - Long.valueOf(-22), + UserInvitationListOptions userinvitationlistoptions2 = new UserInvitationListOptions(Integer.valueOf(-30), + Long.valueOf(48), Order.getDefault(), - "03e6a3f8-b0ae-4075-8af0-344f02517fcc", + "f1c7811d-3124-426f-9d59-ec17c3399873", null, null); assertNotNull(userinvitationlistoptions1); assertNotNull(userinvitationlistoptions2); @@ -92,20 +92,20 @@ public void testHashCode() { @Test public void testEquals() { try { - UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(-38), - Long.valueOf(62), + UserInvitationListOptions userinvitationlistoptions1 = new UserInvitationListOptions(Integer.valueOf(-75), + Long.valueOf(-7), Order.getDefault(), - "cdd23c3c-f7bc-45b4-93e8-6b5a69efa811", + "97b2b33c-6bb0-45aa-a3c7-4000908fb7f5", null, null); - UserInvitationListOptions userinvitationlistoptions2 = new UserInvitationListOptions(Integer.valueOf(-38), - Long.valueOf(62), + UserInvitationListOptions userinvitationlistoptions2 = new UserInvitationListOptions(Integer.valueOf(-75), + Long.valueOf(-7), Order.getDefault(), - "cdd23c3c-f7bc-45b4-93e8-6b5a69efa811", + "97b2b33c-6bb0-45aa-a3c7-4000908fb7f5", null, null); - UserInvitationListOptions userinvitationlistoptions3 = new UserInvitationListOptions(Integer.valueOf(20), - Long.valueOf(-125), + UserInvitationListOptions userinvitationlistoptions3 = new UserInvitationListOptions(Integer.valueOf(43), + Long.valueOf(110), Order.getDefault(), - "43ed5791-6f4b-41f9-b5ab-aa66ce00c13c", + "ebb7517d-adaf-41cf-9bcc-6d6217fc0c16", null, null); assertNotNull(userinvitationlistoptions1); assertNotNull(userinvitationlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserListOptions.java index b09097962..09a470037 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserListOptions.java @@ -23,9 +23,9 @@ public class TestUserListOptions { @Test public void testClone() { try { - UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(-50), Long.valueOf(-8), + UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(-122), Long.valueOf(-100), Order.getDefault(), - "04f83d7e-af2f-4448-ac8c-40247968b74e", null, null); + "1b04b5fb-dea4-4b80-8683-2bd8603865e6", null, null); UserListOptions userlistoptions2 = userlistoptions1.clone(); assertNotNull(userlistoptions1); assertNotNull(userlistoptions2); @@ -48,17 +48,13 @@ public void testFilters() { // only accepts single values UserListOptions option = new UserListOptions().equalToStatus(UserStatus.getDefault()) .inStatuses(Arrays.asList(UserStatus.getDefault(), - UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault())) .notInStatuses(Arrays.asList(UserStatus.getDefault(), - UserStatus.getDefault(), - UserStatus.getDefault(), - UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault())) - .equalToEmail("cb77d.46311@20ec3.me"); + .equalToEmail("853e6.2c7e7@71c64.me"); assertTrue(option.hasFilters()); // Cannot test Filter [field=loginProfiles, spec field=loginProfiles, tag=TAG_FILTER_BY_LOGIN_PROFILES, // operator=equal to, type=List, isVerified=true] because the field is a list and the filter @@ -72,22 +68,20 @@ public void testFilters() { assertTrue(option.hasFilters(UserListOptions.TAG_FILTER_BY_STATUS)); assertTrue(option.hasFilter(UserListOptions.TAG_FILTER_BY_STATUS, FilterOperator.IN)); assertNotNull(option.getStatusFilters()); - assertEquals(Arrays.asList(UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault(), - UserStatus.getDefault()), + assertEquals(Arrays.asList(UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault()), ListOptionsEncoder.encodeSingleInFilter(UserListOptions.TAG_FILTER_BY_STATUS, List.class, option)); assertTrue(option.hasFilters(UserListOptions.TAG_FILTER_BY_STATUS)); assertTrue(option.hasFilter(UserListOptions.TAG_FILTER_BY_STATUS, FilterOperator.NOT_IN)); assertNotNull(option.getStatusFilters()); assertEquals(Arrays.asList(UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault(), - UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault(), UserStatus.getDefault()), ListOptionsEncoder.encodeSingleNotInFilter(UserListOptions.TAG_FILTER_BY_STATUS, List.class, option)); assertTrue(option.hasFilters(UserListOptions.TAG_FILTER_BY_EMAIL)); assertTrue(option.hasFilter(UserListOptions.TAG_FILTER_BY_EMAIL, FilterOperator.EQUAL)); assertNotNull(option.getEmailFilters()); - assertEquals("cb77d.46311@20ec3.me", + assertEquals("853e6.2c7e7@71c64.me", ListOptionsEncoder.encodeSingleEqualFilter(UserListOptions.TAG_FILTER_BY_EMAIL, String.class, option)); } catch (Exception exception) { @@ -102,12 +96,12 @@ public void testFilters() { @Test public void testHashCode() { try { - UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(63), Long.valueOf(-5), + UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(-33), Long.valueOf(-55), Order.getDefault(), - "450f98d0-0dc3-410a-bec5-21b12dd5c4dc", null, null); - UserListOptions userlistoptions2 = new UserListOptions(Integer.valueOf(63), Long.valueOf(-5), + "173352e4-bff0-46de-b8c3-75f03627d759", null, null); + UserListOptions userlistoptions2 = new UserListOptions(Integer.valueOf(-33), Long.valueOf(-55), Order.getDefault(), - "450f98d0-0dc3-410a-bec5-21b12dd5c4dc", null, null); + "173352e4-bff0-46de-b8c3-75f03627d759", null, null); assertNotNull(userlistoptions1); assertNotNull(userlistoptions2); assertNotSame(userlistoptions2, userlistoptions1); @@ -129,15 +123,15 @@ public void testHashCode() { @Test public void testEquals() { try { - UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(-106), Long.valueOf(-14), + UserListOptions userlistoptions1 = new UserListOptions(Integer.valueOf(-54), Long.valueOf(117), Order.getDefault(), - "cd6f8e52-5702-4f76-bd50-bde97305f83a", null, null); - UserListOptions userlistoptions2 = new UserListOptions(Integer.valueOf(-106), Long.valueOf(-14), + "dfd1b127-1497-44d5-a318-a79f803ff291", null, null); + UserListOptions userlistoptions2 = new UserListOptions(Integer.valueOf(-54), Long.valueOf(117), Order.getDefault(), - "cd6f8e52-5702-4f76-bd50-bde97305f83a", null, null); - UserListOptions userlistoptions3 = new UserListOptions(Integer.valueOf(55), Long.valueOf(-68), + "dfd1b127-1497-44d5-a318-a79f803ff291", null, null); + UserListOptions userlistoptions3 = new UserListOptions(Integer.valueOf(13), Long.valueOf(-118), Order.getDefault(), - "11b0edc1-aaa8-4f91-a10c-2ab7926245ea", null, null); + "304553d3-35b3-49da-9452-23950446ebf7", null, null); assertNotNull(userlistoptions1); assertNotNull(userlistoptions2); assertNotNull(userlistoptions3); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorListOptions.java index 415131a5f..3bb049403 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorListOptions.java @@ -19,10 +19,10 @@ public class TestDarkThemeColorListOptions { @Test public void testClone() { try { - DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(117), - Long.valueOf(-22), + DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(118), + Long.valueOf(119), Order.getDefault(), - "115103fc-9fcb-4357-83c9-761c19556a69", + "d8e60ae2-2f7d-4d2c-a4c4-3be836bbcf0d", null, null); DarkThemeColorListOptions darkthemecolorlistoptions2 = darkthemecolorlistoptions1.clone(); assertNotNull(darkthemecolorlistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(54), - Long.valueOf(33), + DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(-6), + Long.valueOf(-16), Order.getDefault(), - "8e09201d-2459-4d6d-ad4a-5e9fd9e79d9e", + "481a71d3-c161-4eff-a3c8-267c35e2c5b7", null, null); - DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(54), - Long.valueOf(33), + DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(-6), + Long.valueOf(-16), Order.getDefault(), - "8e09201d-2459-4d6d-ad4a-5e9fd9e79d9e", + "481a71d3-c161-4eff-a3c8-267c35e2c5b7", null, null); assertNotNull(darkthemecolorlistoptions1); assertNotNull(darkthemecolorlistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(-45), - Long.valueOf(121), + DarkThemeColorListOptions darkthemecolorlistoptions1 = new DarkThemeColorListOptions(Integer.valueOf(86), + Long.valueOf(-60), Order.getDefault(), - "866af6f2-a6f0-4ebb-9340-6dadd9e7a098", + "4777815c-dfee-4516-8f0d-4666260ff179", null, null); - DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(-45), - Long.valueOf(121), + DarkThemeColorListOptions darkthemecolorlistoptions2 = new DarkThemeColorListOptions(Integer.valueOf(86), + Long.valueOf(-60), Order.getDefault(), - "866af6f2-a6f0-4ebb-9340-6dadd9e7a098", + "4777815c-dfee-4516-8f0d-4666260ff179", null, null); - DarkThemeColorListOptions darkthemecolorlistoptions3 = new DarkThemeColorListOptions(Integer.valueOf(60), - Long.valueOf(58), + DarkThemeColorListOptions darkthemecolorlistoptions3 = new DarkThemeColorListOptions(Integer.valueOf(-66), + Long.valueOf(-121), Order.getDefault(), - "99ad924d-e4ff-4346-bdef-6500b176a1ca", + "df451a38-2fa5-489f-b5ba-040c4b7ccf33", null, null); assertNotNull(darkthemecolorlistoptions1); assertNotNull(darkthemecolorlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageListOptions.java index 86f584d59..990d436c1 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageListOptions.java @@ -19,10 +19,10 @@ public class TestDarkThemeImageListOptions { @Test public void testClone() { try { - DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(83), - Long.valueOf(-47), + DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(-83), + Long.valueOf(32), Order.getDefault(), - "48cfac6f-839a-473f-8758-d508923bf51a", + "9ecbd923-d8f8-498a-b240-ed2d1a158fb5", null, null); DarkThemeImageListOptions darkthemeimagelistoptions2 = darkthemeimagelistoptions1.clone(); assertNotNull(darkthemeimagelistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(0), - Long.valueOf(80), + DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(-39), + Long.valueOf(-13), Order.getDefault(), - "9932fffe-29c3-42ff-8483-e578b75847e1", + "9dd01f1e-3207-400f-ac98-9a602263c4fc", null, null); - DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(0), - Long.valueOf(80), + DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(-39), + Long.valueOf(-13), Order.getDefault(), - "9932fffe-29c3-42ff-8483-e578b75847e1", + "9dd01f1e-3207-400f-ac98-9a602263c4fc", null, null); assertNotNull(darkthemeimagelistoptions1); assertNotNull(darkthemeimagelistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(46), - Long.valueOf(3), + DarkThemeImageListOptions darkthemeimagelistoptions1 = new DarkThemeImageListOptions(Integer.valueOf(64), + Long.valueOf(108), Order.getDefault(), - "85e99437-3b6d-479e-b531-ebab72bbf20f", + "06fc5db2-02a9-4502-8247-5b62a80c0a58", null, null); - DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(46), - Long.valueOf(3), + DarkThemeImageListOptions darkthemeimagelistoptions2 = new DarkThemeImageListOptions(Integer.valueOf(64), + Long.valueOf(108), Order.getDefault(), - "85e99437-3b6d-479e-b531-ebab72bbf20f", + "06fc5db2-02a9-4502-8247-5b62a80c0a58", null, null); - DarkThemeImageListOptions darkthemeimagelistoptions3 = new DarkThemeImageListOptions(Integer.valueOf(-64), - Long.valueOf(-103), + DarkThemeImageListOptions darkthemeimagelistoptions3 = new DarkThemeImageListOptions(Integer.valueOf(-38), + Long.valueOf(-79), Order.getDefault(), - "5fad5c74-dd14-4f50-b6a5-d5033ab1ec6f", + "c8667735-bfb4-42c7-ab39-1ec86eab438f", null, null); assertNotNull(darkthemeimagelistoptions1); assertNotNull(darkthemeimagelistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorListOptions.java index 0b52f1e44..5ffcc91e5 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorListOptions.java @@ -19,10 +19,10 @@ public class TestLightThemeColorListOptions { @Test public void testClone() { try { - LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(-106), - Long.valueOf(-16), + LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(82), + Long.valueOf(86), Order.getDefault(), - "dfd4f456-3350-41d8-a26d-47379f58b050", + "aadd93e4-75e5-4281-8f92-5fc6c2261e93", null, null); LightThemeColorListOptions lightthemecolorlistoptions2 = lightthemecolorlistoptions1.clone(); assertNotNull(lightthemecolorlistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(-124), - Long.valueOf(-70), + LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(-17), + Long.valueOf(42), Order.getDefault(), - "20240cfb-5178-4824-b701-e9aa650faa74", + "40458480-a5ab-4d97-9662-5842bab3afca", null, null); - LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(-124), - Long.valueOf(-70), + LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(-17), + Long.valueOf(42), Order.getDefault(), - "20240cfb-5178-4824-b701-e9aa650faa74", + "40458480-a5ab-4d97-9662-5842bab3afca", null, null); assertNotNull(lightthemecolorlistoptions1); assertNotNull(lightthemecolorlistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(55), - Long.valueOf(54), + LightThemeColorListOptions lightthemecolorlistoptions1 = new LightThemeColorListOptions(Integer.valueOf(59), + Long.valueOf(86), Order.getDefault(), - "9f2ff365-c85c-48cb-9165-0dc875d58f3f", + "7831f98b-45b1-4188-954f-0391ac57da27", null, null); - LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(55), - Long.valueOf(54), + LightThemeColorListOptions lightthemecolorlistoptions2 = new LightThemeColorListOptions(Integer.valueOf(59), + Long.valueOf(86), Order.getDefault(), - "9f2ff365-c85c-48cb-9165-0dc875d58f3f", + "7831f98b-45b1-4188-954f-0391ac57da27", null, null); - LightThemeColorListOptions lightthemecolorlistoptions3 = new LightThemeColorListOptions(Integer.valueOf(-120), - Long.valueOf(59), + LightThemeColorListOptions lightthemecolorlistoptions3 = new LightThemeColorListOptions(Integer.valueOf(-78), + Long.valueOf(-70), Order.getDefault(), - "b1b9ed32-470c-4f13-a8af-9616d6f053d2", + "660b79ae-10b8-4b43-8d0f-5c963fa6f437", null, null); assertNotNull(lightthemecolorlistoptions1); assertNotNull(lightthemecolorlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageListOptions.java index 01b66baf4..e7a9208b9 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageListOptions.java @@ -19,10 +19,10 @@ public class TestLightThemeImageListOptions { @Test public void testClone() { try { - LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(-37), - Long.valueOf(-122), + LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(-126), + Long.valueOf(-27), Order.getDefault(), - "d8afcaaf-2d6d-486d-aacd-210c1e3694e4", + "49a5b448-61b7-4961-9e8a-ccfc1982e3f4", null, null); LightThemeImageListOptions lightthemeimagelistoptions2 = lightthemeimagelistoptions1.clone(); assertNotNull(lightthemeimagelistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(114), - Long.valueOf(-108), + LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(-52), + Long.valueOf(115), Order.getDefault(), - "6535f1da-8cb2-4169-aaee-8fcab42dd3e1", + "d05e6693-a91d-4099-9679-09aa5f42d692", null, null); - LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(114), - Long.valueOf(-108), + LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(-52), + Long.valueOf(115), Order.getDefault(), - "6535f1da-8cb2-4169-aaee-8fcab42dd3e1", + "d05e6693-a91d-4099-9679-09aa5f42d692", null, null); assertNotNull(lightthemeimagelistoptions1); assertNotNull(lightthemeimagelistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(116), - Long.valueOf(2), + LightThemeImageListOptions lightthemeimagelistoptions1 = new LightThemeImageListOptions(Integer.valueOf(-126), + Long.valueOf(26), Order.getDefault(), - "9390a0e9-4e11-4918-9db1-bbb6cbb88db2", + "0730839a-f986-424e-8d5b-b5407cd7547c", null, null); - LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(116), - Long.valueOf(2), + LightThemeImageListOptions lightthemeimagelistoptions2 = new LightThemeImageListOptions(Integer.valueOf(-126), + Long.valueOf(26), Order.getDefault(), - "9390a0e9-4e11-4918-9db1-bbb6cbb88db2", + "0730839a-f986-424e-8d5b-b5407cd7547c", null, null); - LightThemeImageListOptions lightthemeimagelistoptions3 = new LightThemeImageListOptions(Integer.valueOf(6), - Long.valueOf(102), + LightThemeImageListOptions lightthemeimagelistoptions3 = new LightThemeImageListOptions(Integer.valueOf(8), + Long.valueOf(-52), Order.getDefault(), - "87daa01d-ac61-47db-a77c-84f6ef8265ca", + "325e7aff-8df9-4bba-b30a-9dd87baa9599", null, null); assertNotNull(lightthemeimagelistoptions1); assertNotNull(lightthemeimagelistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorListOptions.java index f44d42e36..7a8a50e5a 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantDarkThemeColorListOptions { @Test public void testClone() { try { - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(103), - Long.valueOf(-48), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-22), + Long.valueOf(20), Order.getDefault(), - "e07ff200-7815-4ca2-b9f7-9d235cf8ade3", + "c2c49f1c-4a0a-4490-b9c4-513f043fdd34", null, null); SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = subtenantdarkthemecolorlistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-24), - Long.valueOf(-24), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-13), + Long.valueOf(51), Order.getDefault(), - "3b5cfa46-27cc-46a5-a3b9-c1b317aaeafd", + "98689091-ea12-4a18-bc8d-095fc27a9f96", null, null); - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-24), - Long.valueOf(-24), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-13), + Long.valueOf(51), Order.getDefault(), - "3b5cfa46-27cc-46a5-a3b9-c1b317aaeafd", + "98689091-ea12-4a18-bc8d-095fc27a9f96", null, null); assertNotNull(subtenantdarkthemecolorlistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-96), - Long.valueOf(-92), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions1 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-72), + Long.valueOf(79), Order.getDefault(), - "ad02212d-11b8-49e6-9533-b54f4902a5c3", + "5443c375-9c2a-487b-97bc-bf621522fac9", null, null); - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-96), - Long.valueOf(-92), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions2 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(-72), + Long.valueOf(79), Order.getDefault(), - "ad02212d-11b8-49e6-9533-b54f4902a5c3", + "5443c375-9c2a-487b-97bc-bf621522fac9", null, null); - SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions3 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(55), - Long.valueOf(-27), + SubtenantDarkThemeColorListOptions subtenantdarkthemecolorlistoptions3 = new SubtenantDarkThemeColorListOptions(Integer.valueOf(31), + Long.valueOf(120), Order.getDefault(), - "81973b2f-076f-40fb-9de0-6119b83ec9a2", + "e538e472-3183-40f3-810d-611bbebfc9e8", null, null); assertNotNull(subtenantdarkthemecolorlistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageListOptions.java index 1f19504a5..ac74c5da5 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantDarkThemeImageListOptions { @Test public void testClone() { try { - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(67), - Long.valueOf(70), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-127), + Long.valueOf(113), Order.getDefault(), - "9ccbb436-c74e-440e-b595-bfd773a81e92", + "0daef296-6d22-46e0-ba8d-d0cb13fda7c7", null, null); SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = subtenantdarkthemeimagelistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(10), - Long.valueOf(-27), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-22), + Long.valueOf(-35), Order.getDefault(), - "1b0884d9-4bb9-4a6d-adb6-b77819885630", + "8db9335e-63e8-4d77-a8dc-6641b15f08c0", null, null); - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(10), - Long.valueOf(-27), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-22), + Long.valueOf(-35), Order.getDefault(), - "1b0884d9-4bb9-4a6d-adb6-b77819885630", + "8db9335e-63e8-4d77-a8dc-6641b15f08c0", null, null); assertNotNull(subtenantdarkthemeimagelistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(109), - Long.valueOf(114), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions1 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-107), + Long.valueOf(-27), Order.getDefault(), - "7b022953-5c5a-4b9a-afe5-77e2507595cc", + "d7f29ad7-9650-460f-bda1-0b17d45fe242", null, null); - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(109), - Long.valueOf(114), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions2 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-107), + Long.valueOf(-27), Order.getDefault(), - "7b022953-5c5a-4b9a-afe5-77e2507595cc", + "d7f29ad7-9650-460f-bda1-0b17d45fe242", null, null); - SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions3 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(-66), - Long.valueOf(-40), + SubtenantDarkThemeImageListOptions subtenantdarkthemeimagelistoptions3 = new SubtenantDarkThemeImageListOptions(Integer.valueOf(115), + Long.valueOf(-55), Order.getDefault(), - "e9d43b78-2ee7-45d4-985d-393bd6599ee4", + "232add8b-342b-4ce4-ae97-fc7f5492bcb4", null, null); assertNotNull(subtenantdarkthemeimagelistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorListOptions.java index bed69f59f..89604dd75 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantLightThemeColorListOptions { @Test public void testClone() { try { - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(106), - Long.valueOf(25), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-12), + Long.valueOf(104), Order.getDefault(), - "fb967116-ebc9-434c-82dc-7a2c3efda67f", + "15a73354-d065-4b0f-b818-b6a4b9895824", null, null); SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = subtenantlightthemecolorlistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-98), - Long.valueOf(89), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(35), + Long.valueOf(64), Order.getDefault(), - "8b98408d-6160-4dfd-acc1-67ce4914d62f", + "8d2f2b95-835a-4bb3-9e9d-24a835af7137", null, null); - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-98), - Long.valueOf(89), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(35), + Long.valueOf(64), Order.getDefault(), - "8b98408d-6160-4dfd-acc1-67ce4914d62f", + "8d2f2b95-835a-4bb3-9e9d-24a835af7137", null, null); assertNotNull(subtenantlightthemecolorlistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(112), - Long.valueOf(-60), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions1 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-125), + Long.valueOf(71), Order.getDefault(), - "8dc9ddcb-1c2f-4adb-9b06-68a74f942338", + "fff0305b-b05f-439a-9f63-8dc764b93b45", null, null); - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(112), - Long.valueOf(-60), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions2 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-125), + Long.valueOf(71), Order.getDefault(), - "8dc9ddcb-1c2f-4adb-9b06-68a74f942338", + "fff0305b-b05f-439a-9f63-8dc764b93b45", null, null); - SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions3 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-106), - Long.valueOf(-79), + SubtenantLightThemeColorListOptions subtenantlightthemecolorlistoptions3 = new SubtenantLightThemeColorListOptions(Integer.valueOf(-17), + Long.valueOf(-87), Order.getDefault(), - "f6ad052f-30de-4f4f-bff2-54b8254f58e5", + "e8b3fab0-b1ee-4b1e-8e68-1fd26d87f65c", null, null); assertNotNull(subtenantlightthemecolorlistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageListOptions.java index bb081bc1b..e1477abc6 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageListOptions.java @@ -19,10 +19,10 @@ public class TestSubtenantLightThemeImageListOptions { @Test public void testClone() { try { - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(117), - Long.valueOf(-75), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(0), + Long.valueOf(-92), Order.getDefault(), - "99d8ea69-16e7-4650-b19b-d45723d03ece", + "9629d383-ca8c-4071-836a-73c08097c0c0", null, null); SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = subtenantlightthemeimagelistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(24), - Long.valueOf(-118), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(105), + Long.valueOf(90), Order.getDefault(), - "8bad2fa8-163f-4c57-8959-f6ea27f501d2", + "7184e957-dcac-46f4-b8ee-416bf8fe806c", null, null); - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(24), - Long.valueOf(-118), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(105), + Long.valueOf(90), Order.getDefault(), - "8bad2fa8-163f-4c57-8959-f6ea27f501d2", + "7184e957-dcac-46f4-b8ee-416bf8fe806c", null, null); assertNotNull(subtenantlightthemeimagelistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(57), - Long.valueOf(-24), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions1 = new SubtenantLightThemeImageListOptions(Integer.valueOf(-44), + Long.valueOf(-53), Order.getDefault(), - "364089fd-5c1c-41bc-a548-5481aed2bda9", + "73fa7fc6-b8b3-4317-a78d-cd009734b34d", null, null); - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(57), - Long.valueOf(-24), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions2 = new SubtenantLightThemeImageListOptions(Integer.valueOf(-44), + Long.valueOf(-53), Order.getDefault(), - "364089fd-5c1c-41bc-a548-5481aed2bda9", + "73fa7fc6-b8b3-4317-a78d-cd009734b34d", null, null); - SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions3 = new SubtenantLightThemeImageListOptions(Integer.valueOf(105), - Long.valueOf(-69), + SubtenantLightThemeImageListOptions subtenantlightthemeimagelistoptions3 = new SubtenantLightThemeImageListOptions(Integer.valueOf(4), + Long.valueOf(-123), Order.getDefault(), - "0c954604-2971-4833-8a17-34017ea68add", + "fc51538f-77d1-4466-9580-efb3247b4600", null, null); assertNotNull(subtenantlightthemeimagelistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentListOptions.java index ca233ef86..9333a14ef 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentListOptions.java @@ -19,10 +19,10 @@ public class TestDeviceEnrollmentListOptions { @Test public void testClone() { try { - DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(-101), - Long.valueOf(126), + DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(39), + Long.valueOf(17), Order.getDefault(), - "ebb30e09-5650-4c47-b79c-4e0585db44ef", + "a887a6b3-02af-452e-a26f-b03adb592961", null, null); DeviceEnrollmentListOptions deviceenrollmentlistoptions2 = deviceenrollmentlistoptions1.clone(); assertNotNull(deviceenrollmentlistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(62), - Long.valueOf(-82), + DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(110), + Long.valueOf(-62), Order.getDefault(), - "5a4aee78-89ab-46dd-aa20-2d301bf69576", + "479a2058-3695-49f1-bea9-a8c098c01f64", null, null); - DeviceEnrollmentListOptions deviceenrollmentlistoptions2 = new DeviceEnrollmentListOptions(Integer.valueOf(62), - Long.valueOf(-82), + DeviceEnrollmentListOptions deviceenrollmentlistoptions2 = new DeviceEnrollmentListOptions(Integer.valueOf(110), + Long.valueOf(-62), Order.getDefault(), - "5a4aee78-89ab-46dd-aa20-2d301bf69576", + "479a2058-3695-49f1-bea9-a8c098c01f64", null, null); assertNotNull(deviceenrollmentlistoptions1); assertNotNull(deviceenrollmentlistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(125), - Long.valueOf(58), + DeviceEnrollmentListOptions deviceenrollmentlistoptions1 = new DeviceEnrollmentListOptions(Integer.valueOf(-107), + Long.valueOf(-25), Order.getDefault(), - "8722d407-24aa-440e-b6bf-ec0bcd746b5e", + "c08b2464-a32d-4039-b9af-ab34447b26af", null, null); - DeviceEnrollmentListOptions deviceenrollmentlistoptions2 = new DeviceEnrollmentListOptions(Integer.valueOf(125), - Long.valueOf(58), + DeviceEnrollmentListOptions deviceenrollmentlistoptions2 = new DeviceEnrollmentListOptions(Integer.valueOf(-107), + Long.valueOf(-25), Order.getDefault(), - "8722d407-24aa-440e-b6bf-ec0bcd746b5e", + "c08b2464-a32d-4039-b9af-ab34447b26af", null, null); - DeviceEnrollmentListOptions deviceenrollmentlistoptions3 = new DeviceEnrollmentListOptions(Integer.valueOf(-85), - Long.valueOf(-55), + DeviceEnrollmentListOptions deviceenrollmentlistoptions3 = new DeviceEnrollmentListOptions(Integer.valueOf(26), + Long.valueOf(-17), Order.getDefault(), - "322171ef-d1b3-4480-9657-ac953a9ab4b1", + "46c9165e-fb5a-4c09-923d-247ed88bc7c5", null, null); assertNotNull(deviceenrollmentlistoptions1); assertNotNull(deviceenrollmentlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEventsListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEventsListOptions.java index 0a73306a3..2493d03d3 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEventsListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEventsListOptions.java @@ -24,10 +24,10 @@ public class TestDeviceEventsListOptions { @Test public void testClone() { try { - DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(-40), - Long.valueOf(-89), + DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(32), + Long.valueOf(47), Order.getDefault(), - "9896a128-6a0a-4954-9794-bf46f8747326", + "ee556c5d-77dc-4eee-94fb-ee8a8fa7332b", null, null); DeviceEventsListOptions deviceeventslistoptions2 = deviceeventslistoptions1.clone(); assertNotNull(deviceeventslistoptions1); @@ -46,206 +46,202 @@ public void testClone() { @Test public void testFilters() { try { - DeviceEventsListOptions option = new DeviceEventsListOptions().equalToDeviceId("00afcaef-85d8-4b3e-b518-404eeaaa92f9") - .notEqualToDeviceId("f78462ce-a33a-4311-ae94-b6daab86ff10") - .inDeviceIds(Arrays.asList("0d18f99e-0072-4ea6-b7ba-3db2970e7c74", - "b9fedf58-26df-4b7b-af3e-4e5d5dc373fa")) - .notInDeviceIds(Arrays.asList("199105b5-7453-4bad-81a0-d790a1d4af23", - "b262a3b3-6be0-4f05-92ac-67db3552a112")) - .equalToDescription("abdc8074-9a84-4369-b1a1-26d74d7d18aa") - .notEqualToDescription("164fec4d-6f6f-46a9-ba8a-7c2b502f8315") - .inDescriptions(Arrays.asList("4a5425a9-1564-45e9-b337-e2805a680b0f")) - .notInDescriptions(Arrays.asList("2badfae0-e831-46c9-aac5-a966f6bd15e6", - "1013ce83-a875-4e9e-a656-457961264d0d", - "ca2fcb35-32fb-48e6-87fd-6cb5727ddc7b", - "68366725-3e69-461f-83f4-0be6c040a359", - "3f0b8aa9-1204-45c1-86f8-6a27c46abcf8")) - .inDateTimes(Arrays.asList(new Date(1574704678422L), - new Date(1574704680489L), - new Date(1574704678736L), - new Date(1574704682113L), - new Date(1574704681035L))) - .notInDateTimes(Arrays.asList(new Date(1574704677500L), - new Date(1574704677407L), - new Date(1574704673960L), - new Date(1574704682050L), - new Date(1574704673683L), - new Date(1574704673090L), - new Date(1574704681632L))) - .lessThanDateTime(new Date(1574704675849L)) - .greaterThanDateTime(new Date(1574704680983L)) - .equalToStateChange(Boolean.TRUE) - .notEqualToStateChange(Boolean.FALSE) - .equalToId("9c0a7fab-a994-49f2-9070-04f8b64cd5c0") - .notEqualToId("b6c6816b-5f71-41e3-865a-eb5bbc1f2e1d") - .inIds(Arrays.asList("165e8226-46a0-4d18-b502-4a4ac5290e4b", - "739049e2-28c0-498f-8c9d-feaed3bc75e0")) - .notInIds(Arrays.asList("4376ed85-7707-42c6-ac3d-c4dee4f1ed6a", - "142090b0-f5e6-4260-aedc-0e2336f05445", - "86547264-4934-4093-a4da-af025e100074", - "cc95e658-89c0-46ec-8942-6d38b1671008", - "17c05835-ab30-4928-8c03-dc51691d6f49", - "e535dd55-2061-4d26-bc98-abc846b45d5d", - "443d7919-d77f-4b94-a499-d4ee685a08aa")) - .equalToEventType("7b1209db-c10d-4dc5-ab14-b40e9e80336e") - .notEqualToEventType("0b6e302f-8ee0-4dc4-bc00-af8b8348e722") - .inEventTypes(Arrays.asList("3f420fcc-b3e0-446d-9cad-3d4666f40203", - "ef79ccef-52dc-4749-81b7-1be547d4024b", - "a9479fbe-31a6-498c-a89e-b5f55bea74ca", - "61a3a7d4-fe80-47f2-a5e7-f3ba80c363d2", - "d9532928-a393-4b29-b2ef-0ec96450db48", - "d61e4bc5-c20c-464a-8e52-59867a98f6e4", - "33afbafb-c0d1-45ec-a5b7-34e700995dea", - "7e8418b8-409c-419c-abbf-2cfdec93d1d5", - "d52bd001-025d-4c40-bf57-c6dadc35b770")) - .notInEventTypes(Arrays.asList("faba97e5-c263-4f97-9565-dbff1042227d", - "9f4cdcdc-fc37-499b-94f9-02b6e5b0e7b8", - "99eb8fed-c916-4e1b-87c1-15a89ef4489c", - "e60ed118-ef2a-4127-98fc-c11e0a33d168")); + DeviceEventsListOptions option = new DeviceEventsListOptions().equalToDeviceId("20cbc605-58a4-40e8-b060-2ad53b6162f6") + .notEqualToDeviceId("8447a170-3962-404e-b61e-cd8ad0b8a62f") + .inDeviceIds(Arrays.asList("1b87deb7-a20a-4fa4-8fcc-33dac173a3cf", + "53c1cf11-e181-4322-b338-64649b0151dd", + "5573f456-6408-4abb-8a16-b13e440b0a12", + "bcf401a1-153c-4edb-9d11-a2bbef3d8a2b", + "2c746d8b-10ca-4cfe-ba5a-531ff99e1790")) + .notInDeviceIds(Arrays.asList("8be042a1-0dae-4602-bae2-a51b11f75d64")) + .equalToDescription("602e7d73-f015-4822-a0d3-d8abf4135ab7") + .notEqualToDescription("ed785729-5d05-4cc8-ad1b-764360515814") + .inDescriptions(Arrays.asList("0895a557-eb98-4e9b-88da-d5533a441241", + "79b9aaea-0247-482a-8a18-f9035cbe75cd", + "b0798a3d-8324-4bad-ae51-68de55a19d05", + "04ff700a-9359-4d84-89e7-3cf52074ff78", + "f22e90be-bfde-41f8-ba95-0500ba1727ec")) + .notInDescriptions(Arrays.asList("8d7720e0-4f14-484d-b7b0-2d649c5f743e")) + .inDateTimes(Arrays.asList(new Date(1609926592441L), + new Date(1609926587518L), + new Date(1609926590357L), + new Date(1609926589869L), + new Date(1609926587810L), + new Date(1609926588468L))) + .notInDateTimes(Arrays.asList(new Date(1609926586116L), + new Date(1609926588833L), + new Date(1609926587914L), + new Date(1609926594893L), + new Date(1609926592138L))) + .lessThanDateTime(new Date(1609926591928L)) + .greaterThanDateTime(new Date(1609926591927L)) + .equalToStateChange(Boolean.FALSE) + .notEqualToStateChange(Boolean.TRUE) + .equalToId("ca8246ce-d33d-44e4-8abc-b1252423d8d2") + .notEqualToId("dc413426-343c-4f2e-9f90-358bcdf3909e") + .inIds(Arrays.asList("436d039c-f888-4f91-bab6-5c76c67837bf", + "7b889703-45ee-4adf-9caf-354e1688f01c")) + .notInIds(Arrays.asList("047b88ca-8857-436f-93ca-ccbc2063fd0d", + "3f57aab2-0914-4644-9a38-444de5a13cd6", + "db98b808-c723-48df-919b-24b2354acce5", + "7bf176c3-52b6-4015-91a4-6675571e0318")) + .equalToEventType("f8c40cfa-dff0-450a-ba40-a802d596d584") + .notEqualToEventType("e64f6d0b-c5dd-4dde-965d-810d3a6d2da7") + .inEventTypes(Arrays.asList("6b8422f8-1fbf-4701-897c-166360ec5464", + "0900a1fd-dfcc-4d89-9804-f17b04000066", + "38b0f6a7-1433-482a-a31a-75b7245d175d", + "21995e59-51e9-40fd-92d1-ea373bb26ebb", + "2f054011-cdf8-4b45-baf4-17e845339836")) + .notInEventTypes(Arrays.asList("f7b81df7-3e12-4e0c-882c-84b5028b4639", + "a48784c7-16d2-4f8c-ab73-3de7e97a947c", + "39379ca7-4462-4e26-9468-27f51ea28a56", + "be09a1de-e526-4a81-8d3b-c5488f6662cb", + "a7530bd7-6e85-45e4-9504-a5620214d99c", + "91dde786-23b2-45d9-9dfa-c9a69177e901", + "d21b33c3-cd2f-45d3-b9c9-3ee9f4a2350d")); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, FilterOperator.EQUAL)); assertNotNull(option.getDeviceIdFilters()); - assertEquals("00afcaef-85d8-4b3e-b518-404eeaaa92f9", + assertEquals("20cbc605-58a4-40e8-b060-2ad53b6162f6", ListOptionsEncoder.encodeSingleEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceIdFilters()); - assertEquals("f78462ce-a33a-4311-ae94-b6daab86ff10", + assertEquals("8447a170-3962-404e-b61e-cd8ad0b8a62f", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, FilterOperator.IN)); assertNotNull(option.getDeviceIdFilters()); - assertEquals(Arrays.asList("0d18f99e-0072-4ea6-b7ba-3db2970e7c74", "b9fedf58-26df-4b7b-af3e-4e5d5dc373fa"), + assertEquals(Arrays.asList("1b87deb7-a20a-4fa4-8fcc-33dac173a3cf", "53c1cf11-e181-4322-b338-64649b0151dd", + "5573f456-6408-4abb-8a16-b13e440b0a12", "bcf401a1-153c-4edb-9d11-a2bbef3d8a2b", + "2c746d8b-10ca-4cfe-ba5a-531ff99e1790"), ListOptionsEncoder.encodeSingleInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, FilterOperator.NOT_IN)); assertNotNull(option.getDeviceIdFilters()); - assertEquals(Arrays.asList("199105b5-7453-4bad-81a0-d790a1d4af23", "b262a3b3-6be0-4f05-92ac-67db3552a112"), + assertEquals(Arrays.asList("8be042a1-0dae-4602-bae2-a51b11f75d64"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DEVICE_ID, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("abdc8074-9a84-4369-b1a1-26d74d7d18aa", + assertEquals("602e7d73-f015-4822-a0d3-d8abf4135ab7", ListOptionsEncoder.encodeSingleEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("164fec4d-6f6f-46a9-ba8a-7c2b502f8315", + assertEquals("ed785729-5d05-4cc8-ad1b-764360515814", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("4a5425a9-1564-45e9-b337-e2805a680b0f"), + assertEquals(Arrays.asList("0895a557-eb98-4e9b-88da-d5533a441241", "79b9aaea-0247-482a-8a18-f9035cbe75cd", + "b0798a3d-8324-4bad-ae51-68de55a19d05", "04ff700a-9359-4d84-89e7-3cf52074ff78", + "f22e90be-bfde-41f8-ba95-0500ba1727ec"), ListOptionsEncoder.encodeSingleInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("2badfae0-e831-46c9-aac5-a966f6bd15e6", "1013ce83-a875-4e9e-a656-457961264d0d", - "ca2fcb35-32fb-48e6-87fd-6cb5727ddc7b", "68366725-3e69-461f-83f4-0be6c040a359", - "3f0b8aa9-1204-45c1-86f8-6a27c46abcf8"), + assertEquals(Arrays.asList("8d7720e0-4f14-484d-b7b0-2d649c5f743e"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, FilterOperator.IN)); assertNotNull(option.getDateTimeFilters()); - assertEquals(Arrays.asList(new Date(1574704678422L), new Date(1574704680489L), new Date(1574704678736L), - new Date(1574704682113L), new Date(1574704681035L)), + assertEquals(Arrays.asList(new Date(1609926592441L), new Date(1609926587518L), new Date(1609926590357L), + new Date(1609926589869L), new Date(1609926587810L), new Date(1609926588468L)), ListOptionsEncoder.encodeSingleInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, FilterOperator.NOT_IN)); assertNotNull(option.getDateTimeFilters()); - assertEquals(Arrays.asList(new Date(1574704677500L), new Date(1574704677407L), new Date(1574704673960L), - new Date(1574704682050L), new Date(1574704673683L), new Date(1574704673090L), - new Date(1574704681632L)), + assertEquals(Arrays.asList(new Date(1609926586116L), new Date(1609926588833L), new Date(1609926587914L), + new Date(1609926594893L), new Date(1609926592138L)), ListOptionsEncoder.encodeSingleNotInFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, FilterOperator.LESS_THAN)); assertNotNull(option.getDateTimeFilters()); - assertEquals(new Date(1574704675849L), + assertEquals(new Date(1609926591928L), ListOptionsEncoder.encodeSingleLessThanFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, Date.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, FilterOperator.GREATER_THAN)); assertNotNull(option.getDateTimeFilters()); - assertEquals(new Date(1574704680983L), + assertEquals(new Date(1609926591927L), ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceEventsListOptions.TAG_FILTER_BY_DATE_TIME, Date.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE, FilterOperator.EQUAL)); assertNotNull(option.getStateChangeFilters()); - assertEquals(Boolean.TRUE, + assertEquals(Boolean.FALSE, ListOptionsEncoder.encodeSingleEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE, Boolean.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getStateChangeFilters()); - assertEquals(Boolean.FALSE, + assertEquals(Boolean.TRUE, ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_STATE_CHANGE, Boolean.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("9c0a7fab-a994-49f2-9070-04f8b64cd5c0", + assertEquals("ca8246ce-d33d-44e4-8abc-b1252423d8d2", ListOptionsEncoder.encodeSingleEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("b6c6816b-5f71-41e3-865a-eb5bbc1f2e1d", + assertEquals("dc413426-343c-4f2e-9f90-358bcdf3909e", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("165e8226-46a0-4d18-b502-4a4ac5290e4b", "739049e2-28c0-498f-8c9d-feaed3bc75e0"), + assertEquals(Arrays.asList("436d039c-f888-4f91-bab6-5c76c67837bf", "7b889703-45ee-4adf-9caf-354e1688f01c"), ListOptionsEncoder.encodeSingleInFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("4376ed85-7707-42c6-ac3d-c4dee4f1ed6a", "142090b0-f5e6-4260-aedc-0e2336f05445", - "86547264-4934-4093-a4da-af025e100074", "cc95e658-89c0-46ec-8942-6d38b1671008", - "17c05835-ab30-4928-8c03-dc51691d6f49", "e535dd55-2061-4d26-bc98-abc846b45d5d", - "443d7919-d77f-4b94-a499-d4ee685a08aa"), + assertEquals(Arrays.asList("047b88ca-8857-436f-93ca-ccbc2063fd0d", "3f57aab2-0914-4644-9a38-444de5a13cd6", + "db98b808-c723-48df-919b-24b2354acce5", "7bf176c3-52b6-4015-91a4-6675571e0318"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceEventsListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, FilterOperator.EQUAL)); assertNotNull(option.getEventTypeFilters()); - assertEquals("7b1209db-c10d-4dc5-ab14-b40e9e80336e", + assertEquals("f8c40cfa-dff0-450a-ba40-a802d596d584", ListOptionsEncoder.encodeSingleEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getEventTypeFilters()); - assertEquals("0b6e302f-8ee0-4dc4-bc00-af8b8348e722", + assertEquals("e64f6d0b-c5dd-4dde-965d-810d3a6d2da7", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, String.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, FilterOperator.IN)); assertNotNull(option.getEventTypeFilters()); - assertEquals(Arrays.asList("3f420fcc-b3e0-446d-9cad-3d4666f40203", "ef79ccef-52dc-4749-81b7-1be547d4024b", - "a9479fbe-31a6-498c-a89e-b5f55bea74ca", "61a3a7d4-fe80-47f2-a5e7-f3ba80c363d2", - "d9532928-a393-4b29-b2ef-0ec96450db48", "d61e4bc5-c20c-464a-8e52-59867a98f6e4", - "33afbafb-c0d1-45ec-a5b7-34e700995dea", "7e8418b8-409c-419c-abbf-2cfdec93d1d5", - "d52bd001-025d-4c40-bf57-c6dadc35b770"), + assertEquals(Arrays.asList("6b8422f8-1fbf-4701-897c-166360ec5464", "0900a1fd-dfcc-4d89-9804-f17b04000066", + "38b0f6a7-1433-482a-a31a-75b7245d175d", "21995e59-51e9-40fd-92d1-ea373bb26ebb", + "2f054011-cdf8-4b45-baf4-17e845339836"), ListOptionsEncoder.encodeSingleInFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, List.class, option)); assertTrue(option.hasFilters(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE)); assertTrue(option.hasFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, FilterOperator.NOT_IN)); assertNotNull(option.getEventTypeFilters()); - assertEquals(Arrays.asList("faba97e5-c263-4f97-9565-dbff1042227d", "9f4cdcdc-fc37-499b-94f9-02b6e5b0e7b8", - "99eb8fed-c916-4e1b-87c1-15a89ef4489c", "e60ed118-ef2a-4127-98fc-c11e0a33d168"), + assertEquals(Arrays.asList("f7b81df7-3e12-4e0c-882c-84b5028b4639", "a48784c7-16d2-4f8c-ab73-3de7e97a947c", + "39379ca7-4462-4e26-9468-27f51ea28a56", "be09a1de-e526-4a81-8d3b-c5488f6662cb", + "a7530bd7-6e85-45e4-9504-a5620214d99c", "91dde786-23b2-45d9-9dfa-c9a69177e901", + "d21b33c3-cd2f-45d3-b9c9-3ee9f4a2350d"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceEventsListOptions.TAG_FILTER_BY_EVENT_TYPE, List.class, option)); } catch (Exception exception) { @@ -260,15 +256,15 @@ public void testFilters() { @Test public void testHashCode() { try { - DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(82), - Long.valueOf(57), + DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(-8), + Long.valueOf(126), Order.getDefault(), - "ad745755-6673-40cd-82a2-4b9abc62f304", + "c730d9bc-c78c-4988-91c6-ef8da9272b9e", null, null); - DeviceEventsListOptions deviceeventslistoptions2 = new DeviceEventsListOptions(Integer.valueOf(82), - Long.valueOf(57), + DeviceEventsListOptions deviceeventslistoptions2 = new DeviceEventsListOptions(Integer.valueOf(-8), + Long.valueOf(126), Order.getDefault(), - "ad745755-6673-40cd-82a2-4b9abc62f304", + "c730d9bc-c78c-4988-91c6-ef8da9272b9e", null, null); assertNotNull(deviceeventslistoptions1); assertNotNull(deviceeventslistoptions2); @@ -291,20 +287,20 @@ public void testHashCode() { @Test public void testEquals() { try { - DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(-72), - Long.valueOf(-43), + DeviceEventsListOptions deviceeventslistoptions1 = new DeviceEventsListOptions(Integer.valueOf(41), + Long.valueOf(-7), Order.getDefault(), - "8b0b1d3a-afda-4201-b302-76a23a98f7fe", + "f4315be1-e1fc-4de1-a169-334ffbfb4c2e", null, null); - DeviceEventsListOptions deviceeventslistoptions2 = new DeviceEventsListOptions(Integer.valueOf(-72), - Long.valueOf(-43), + DeviceEventsListOptions deviceeventslistoptions2 = new DeviceEventsListOptions(Integer.valueOf(41), + Long.valueOf(-7), Order.getDefault(), - "8b0b1d3a-afda-4201-b302-76a23a98f7fe", + "f4315be1-e1fc-4de1-a169-334ffbfb4c2e", null, null); - DeviceEventsListOptions deviceeventslistoptions3 = new DeviceEventsListOptions(Integer.valueOf(-44), - Long.valueOf(3), + DeviceEventsListOptions deviceeventslistoptions3 = new DeviceEventsListOptions(Integer.valueOf(-95), + Long.valueOf(-16), Order.getDefault(), - "43687136-0775-4cbe-82d1-f7d0baae212e", + "954f4553-bb71-4626-bebd-172af363206b", null, null); assertNotNull(deviceeventslistoptions1); assertNotNull(deviceeventslistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroupListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroupListOptions.java index 1b44e895a..8c53637f8 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroupListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroupListOptions.java @@ -24,10 +24,10 @@ public class TestDeviceGroupListOptions { @Test public void testClone() { try { - DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(29), - Long.valueOf(-50), + DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(2), + Long.valueOf(-8), Order.getDefault(), - "3cf0757d-ce93-4c08-99fd-6fe2da04647b", + "e6f07b2c-4238-4368-a577-c92228758c00", null, null); DeviceGroupListOptions devicegrouplistoptions2 = devicegrouplistoptions1.clone(); assertNotNull(devicegrouplistoptions1); @@ -46,204 +46,233 @@ public void testClone() { @Test public void testFilters() { try { - DeviceGroupListOptions option = new DeviceGroupListOptions().inUpdatedAts(Arrays.asList(new Date(1574704679260L))) - .notInUpdatedAts(Arrays.asList(new Date(1574704675408L), - new Date(1574704681472L), - new Date(1574704680027L), - new Date(1574704680091L), - new Date(1574704679995L))) - .lessThanUpdatedAt(new Date(1574704680412L)) - .greaterThanUpdatedAt(new Date(1574704678821L)) - .equalToName("839a570c-dceb-4c4f-93a4-6e351ea7dc31") - .notEqualToName("bae5415d-dff8-432f-b166-a8cdae6881f5") - .inNames(Arrays.asList("bbaa2938-9a30-4b72-8c26-5f05c1dc8a91")) - .notInNames(Arrays.asList("18e1c44d-b5b7-41a2-8c2b-6d5c9e9c3ef4", - "cbd01f96-dc36-4812-97e7-7615f91535d4", - "77c47ea4-5dcc-4bfd-b60c-315cac4b34db", - "520e529c-12ec-407d-8aba-03037b8aca59", - "302e4fd7-6f29-4296-9877-b69b151afa23")) - .equalToDevicesCount(Integer.valueOf(75)) - .notEqualToDevicesCount(Integer.valueOf(43)) - .inDevicesCounts(Arrays.asList(Integer.valueOf(116), - Integer.valueOf(-11), - Integer.valueOf(-51), - Integer.valueOf(-29), - Integer.valueOf(108), - Integer.valueOf(-8), - Integer.valueOf(-16), - Integer.valueOf(84), - Integer.valueOf(80))) - .notInDevicesCounts(Arrays.asList(Integer.valueOf(-85), - Integer.valueOf(123), - Integer.valueOf(-3), + DeviceGroupListOptions option = new DeviceGroupListOptions().inUpdatedAts(Arrays.asList(new Date(1609926587807L), + new Date(1609926587737L), + new Date(1609926591553L), + new Date(1609926585963L), + new Date(1609926585988L), + new Date(1609926590434L), + new Date(1609926589890L))) + .notInUpdatedAts(Arrays.asList(new Date(1609926588410L), + new Date(1609926586884L), + new Date(1609926591383L), + new Date(1609926591606L), + new Date(1609926590617L), + new Date(1609926591191L))) + .lessThanUpdatedAt(new Date(1609926589198L)) + .greaterThanUpdatedAt(new Date(1609926588386L)) + .equalToName("a715c5d3-6e7a-4b2c-baef-34bd0fbe345b") + .notEqualToName("8e4085a4-95ca-419b-a92d-209b0fc41c99") + .inNames(Arrays.asList("abe99fa9-5ba1-45cc-a8e3-868ce3b7ab9d", + "23b13808-0b4f-4498-beb4-748e8d500c81", + "6cf145b7-d8d4-4b33-bff8-d6c824425f40", + "9ba764cf-8ce9-421d-873c-834a3ce64004", + "38d00941-34aa-4206-b89d-ae4ee3f54d0f", + "edbd5295-37b4-4822-b335-ccb47ddb0ca0", + "5e752abd-cc4c-4653-8862-49adef76be35")) + .notInNames(Arrays.asList("417fabd8-2a79-4415-839a-82b56afa8e13", + "3943e783-1297-48dc-910e-50fb0e06bd8e", + "cc9e4019-84f4-4f14-9f00-20f7e63eb89b", + "c6be5636-3bc9-44a5-b5ec-ecb1d3b3c72b", + "3b31165f-704f-44f5-83a6-c4b236c0e5c6")) + .equalToDevicesCount(Integer.valueOf(-69)) + .notEqualToDevicesCount(Integer.valueOf(60)) + .inDevicesCounts(Arrays.asList(Integer.valueOf(-43), + Integer.valueOf(71))) + .notInDevicesCounts(Arrays.asList(Integer.valueOf(46), + Integer.valueOf(13), + Integer.valueOf(8), + Integer.valueOf(119), + Integer.valueOf(-98), + Integer.valueOf(-98), Integer.valueOf(109), - Integer.valueOf(59), - Integer.valueOf(-70))) - .lessThanDevicesCount(Integer.valueOf(-32)) - .greaterThanDevicesCount(Integer.valueOf(24)) - .inCreatedAts(Arrays.asList(new Date(1574704677143L), - new Date(1574704676605L))) - .notInCreatedAts(Arrays.asList(new Date(1574704676531L), - new Date(1574704674465L), - new Date(1574704681867L), - new Date(1574704680739L))) - .lessThanCreatedAt(new Date(1574704675157L)) - .greaterThanCreatedAt(new Date(1574704673586L)) - .equalToId("a441b99d-e825-4397-9f2c-09e21f936707") - .notEqualToId("b9391ff8-5699-46a9-85ec-0acd4e3f47b3") - .inIds(Arrays.asList("f384e172-f8ff-440e-8374-b1f6b15034f7", - "c8102033-1928-43ea-bb7e-bacf0565a147", - "9eb6d611-48b6-46cc-958d-1ae0533d97fd")) - .notInIds(Arrays.asList("410f69af-104d-43f4-99c9-eea233f8caaf", - "643eb3a8-18d6-45a7-ad36-5210432278fd", - "a771d770-a202-4f8c-8324-69fa3e89a388", - "1175e6be-3489-4ed0-922b-7266880be4e7", - "646ee4c1-51a2-43c4-aa77-fa2b78ccffc7", - "6a4061a2-34ac-49b0-acab-2cff2b997169", - "464c6243-d66b-4207-b97c-a9ab3c9408d1")); + Integer.valueOf(-72))) + .lessThanDevicesCount(Integer.valueOf(85)) + .greaterThanDevicesCount(Integer.valueOf(-94)) + .inCreatedAts(Arrays.asList(new Date(1609926588752L), + new Date(1609926589304L), + new Date(1609926589086L), + new Date(1609926594260L), + new Date(1609926593628L), + new Date(1609926586469L), + new Date(1609926591409L), + new Date(1609926588353L), + new Date(1609926591506L))) + .notInCreatedAts(Arrays.asList(new Date(1609926594010L), + new Date(1609926595007L), + new Date(1609926592852L), + new Date(1609926593147L), + new Date(1609926590455L), + new Date(1609926595173L), + new Date(1609926587842L), + new Date(1609926589980L))) + .lessThanCreatedAt(new Date(1609926594816L)) + .greaterThanCreatedAt(new Date(1609926594186L)) + .equalToId("6401d632-c99a-4c13-b160-8eaa41aa654f") + .notEqualToId("dc72b1c4-606f-4857-bf77-26fe38762f48") + .inIds(Arrays.asList("0561c038-a7aa-4015-951a-5fe3f2e20160", + "11bb2043-775e-4ec6-bd9a-65e1977a686e", + "9e95b87a-0cf5-4b20-8598-ffef8f43a84f", + "ca3d40a6-7fbc-4dcd-9f19-3e2142a29c30", + "670487ce-afc7-4ad1-80d7-5a29ee9ccbd7", + "28f44fbb-dbfd-4b15-b74c-bc79b2ac29fd", + "d6dd425d-a526-4cca-a646-46da841f10bd")) + .notInIds(Arrays.asList("552f9080-f407-4a2e-8aa6-12877b62e8c9", + "7f6b5024-5c25-40f4-9cd1-fe86bbedd74f", + "0064e4df-19d0-48b9-8adb-43dbc88fbb6e", + "5a91855d-42bb-4af8-b444-3bac4f08043b", + "00149d17-386c-4df0-a522-7d4054d96ce5")); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704679260L)), + assertEquals(Arrays.asList(new Date(1609926587807L), new Date(1609926587737L), new Date(1609926591553L), + new Date(1609926585963L), new Date(1609926585988L), new Date(1609926590434L), + new Date(1609926589890L)), ListOptionsEncoder.encodeSingleInFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704675408L), new Date(1574704681472L), new Date(1574704680027L), - new Date(1574704680091L), new Date(1574704679995L)), + assertEquals(Arrays.asList(new Date(1609926588410L), new Date(1609926586884L), new Date(1609926591383L), + new Date(1609926591606L), new Date(1609926590617L), new Date(1609926591191L)), ListOptionsEncoder.encodeSingleNotInFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704680412L), + assertEquals(new Date(1609926589198L), ListOptionsEncoder.encodeSingleLessThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704678821L), + assertEquals(new Date(1609926588386L), ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("839a570c-dceb-4c4f-93a4-6e351ea7dc31", + assertEquals("a715c5d3-6e7a-4b2c-baef-34bd0fbe345b", ListOptionsEncoder.encodeSingleEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("bae5415d-dff8-432f-b166-a8cdae6881f5", + assertEquals("8e4085a4-95ca-419b-a92d-209b0fc41c99", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("bbaa2938-9a30-4b72-8c26-5f05c1dc8a91"), + assertEquals(Arrays.asList("abe99fa9-5ba1-45cc-a8e3-868ce3b7ab9d", "23b13808-0b4f-4498-beb4-748e8d500c81", + "6cf145b7-d8d4-4b33-bff8-d6c824425f40", "9ba764cf-8ce9-421d-873c-834a3ce64004", + "38d00941-34aa-4206-b89d-ae4ee3f54d0f", "edbd5295-37b4-4822-b335-ccb47ddb0ca0", + "5e752abd-cc4c-4653-8862-49adef76be35"), ListOptionsEncoder.encodeSingleInFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("18e1c44d-b5b7-41a2-8c2b-6d5c9e9c3ef4", "cbd01f96-dc36-4812-97e7-7615f91535d4", - "77c47ea4-5dcc-4bfd-b60c-315cac4b34db", "520e529c-12ec-407d-8aba-03037b8aca59", - "302e4fd7-6f29-4296-9877-b69b151afa23"), + assertEquals(Arrays.asList("417fabd8-2a79-4415-839a-82b56afa8e13", "3943e783-1297-48dc-910e-50fb0e06bd8e", + "cc9e4019-84f4-4f14-9f00-20f7e63eb89b", "c6be5636-3bc9-44a5-b5ec-ecb1d3b3c72b", + "3b31165f-704f-44f5-83a6-c4b236c0e5c6"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceGroupListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.EQUAL)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Integer.valueOf(75), + assertEquals(Integer.valueOf(-69), ListOptionsEncoder.encodeSingleEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, Integer.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Integer.valueOf(43), + assertEquals(Integer.valueOf(60), ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, Integer.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.IN)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Arrays.asList(Integer.valueOf(116), Integer.valueOf(-11), Integer.valueOf(-51), - Integer.valueOf(-29), Integer.valueOf(108), Integer.valueOf(-8), - Integer.valueOf(-16), Integer.valueOf(84), Integer.valueOf(80)), + assertEquals(Arrays.asList(Integer.valueOf(-43), Integer.valueOf(71)), ListOptionsEncoder.encodeSingleInFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.NOT_IN)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Arrays.asList(Integer.valueOf(-85), Integer.valueOf(123), Integer.valueOf(-3), - Integer.valueOf(109), Integer.valueOf(59), Integer.valueOf(-70)), + assertEquals(Arrays.asList(Integer.valueOf(46), Integer.valueOf(13), Integer.valueOf(8), + Integer.valueOf(119), Integer.valueOf(-98), Integer.valueOf(-98), + Integer.valueOf(109), Integer.valueOf(-72)), ListOptionsEncoder.encodeSingleNotInFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.LESS_THAN)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Integer.valueOf(-32), + assertEquals(Integer.valueOf(85), ListOptionsEncoder.encodeSingleLessThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, Integer.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, FilterOperator.GREATER_THAN)); assertNotNull(option.getDevicesCountFilters()); - assertEquals(Integer.valueOf(24), + assertEquals(Integer.valueOf(-94), ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_DEVICES_COUNT, Integer.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704677143L), new Date(1574704676605L)), + assertEquals(Arrays.asList(new Date(1609926588752L), new Date(1609926589304L), new Date(1609926589086L), + new Date(1609926594260L), new Date(1609926593628L), new Date(1609926586469L), + new Date(1609926591409L), new Date(1609926588353L), new Date(1609926591506L)), ListOptionsEncoder.encodeSingleInFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704676531L), new Date(1574704674465L), new Date(1574704681867L), - new Date(1574704680739L)), + assertEquals(Arrays.asList(new Date(1609926594010L), new Date(1609926595007L), new Date(1609926592852L), + new Date(1609926593147L), new Date(1609926590455L), new Date(1609926595173L), + new Date(1609926587842L), new Date(1609926589980L)), ListOptionsEncoder.encodeSingleNotInFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704675157L), + assertEquals(new Date(1609926594816L), ListOptionsEncoder.encodeSingleLessThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704673586L), + assertEquals(new Date(1609926594186L), ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceGroupListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("a441b99d-e825-4397-9f2c-09e21f936707", + assertEquals("6401d632-c99a-4c13-b160-8eaa41aa654f", ListOptionsEncoder.encodeSingleEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("b9391ff8-5699-46a9-85ec-0acd4e3f47b3", + assertEquals("dc72b1c4-606f-4857-bf77-26fe38762f48", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("f384e172-f8ff-440e-8374-b1f6b15034f7", "c8102033-1928-43ea-bb7e-bacf0565a147", - "9eb6d611-48b6-46cc-958d-1ae0533d97fd"), + assertEquals(Arrays.asList("0561c038-a7aa-4015-951a-5fe3f2e20160", "11bb2043-775e-4ec6-bd9a-65e1977a686e", + "9e95b87a-0cf5-4b20-8598-ffef8f43a84f", "ca3d40a6-7fbc-4dcd-9f19-3e2142a29c30", + "670487ce-afc7-4ad1-80d7-5a29ee9ccbd7", "28f44fbb-dbfd-4b15-b74c-bc79b2ac29fd", + "d6dd425d-a526-4cca-a646-46da841f10bd"), ListOptionsEncoder.encodeSingleInFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(DeviceGroupListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("410f69af-104d-43f4-99c9-eea233f8caaf", "643eb3a8-18d6-45a7-ad36-5210432278fd", - "a771d770-a202-4f8c-8324-69fa3e89a388", "1175e6be-3489-4ed0-922b-7266880be4e7", - "646ee4c1-51a2-43c4-aa77-fa2b78ccffc7", "6a4061a2-34ac-49b0-acab-2cff2b997169", - "464c6243-d66b-4207-b97c-a9ab3c9408d1"), + assertEquals(Arrays.asList("552f9080-f407-4a2e-8aa6-12877b62e8c9", "7f6b5024-5c25-40f4-9cd1-fe86bbedd74f", + "0064e4df-19d0-48b9-8adb-43dbc88fbb6e", "5a91855d-42bb-4af8-b444-3bac4f08043b", + "00149d17-386c-4df0-a522-7d4054d96ce5"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceGroupListOptions.TAG_FILTER_BY_ID, List.class, option)); } catch (Exception exception) { @@ -258,15 +287,15 @@ public void testFilters() { @Test public void testHashCode() { try { - DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(43), - Long.valueOf(-48), + DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(-24), + Long.valueOf(-73), Order.getDefault(), - "17ab952d-5e74-43d3-9051-8bf10cbf1b22", + "503cd55b-99a3-4ad2-8574-d04a15e201b4", null, null); - DeviceGroupListOptions devicegrouplistoptions2 = new DeviceGroupListOptions(Integer.valueOf(43), - Long.valueOf(-48), + DeviceGroupListOptions devicegrouplistoptions2 = new DeviceGroupListOptions(Integer.valueOf(-24), + Long.valueOf(-73), Order.getDefault(), - "17ab952d-5e74-43d3-9051-8bf10cbf1b22", + "503cd55b-99a3-4ad2-8574-d04a15e201b4", null, null); assertNotNull(devicegrouplistoptions1); assertNotNull(devicegrouplistoptions2); @@ -289,20 +318,20 @@ public void testHashCode() { @Test public void testEquals() { try { - DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(-24), - Long.valueOf(-88), + DeviceGroupListOptions devicegrouplistoptions1 = new DeviceGroupListOptions(Integer.valueOf(-85), + Long.valueOf(78), Order.getDefault(), - "1c99a9f9-7700-4b37-8339-52717b44119c", + "ce1b8a25-cd95-4584-9508-d02d2006af97", null, null); - DeviceGroupListOptions devicegrouplistoptions2 = new DeviceGroupListOptions(Integer.valueOf(-24), - Long.valueOf(-88), + DeviceGroupListOptions devicegrouplistoptions2 = new DeviceGroupListOptions(Integer.valueOf(-85), + Long.valueOf(78), Order.getDefault(), - "1c99a9f9-7700-4b37-8339-52717b44119c", + "ce1b8a25-cd95-4584-9508-d02d2006af97", null, null); - DeviceGroupListOptions devicegrouplistoptions3 = new DeviceGroupListOptions(Integer.valueOf(-112), - Long.valueOf(-76), + DeviceGroupListOptions devicegrouplistoptions3 = new DeviceGroupListOptions(Integer.valueOf(-95), + Long.valueOf(-12), Order.getDefault(), - "aa441dda-eb77-4ad4-a26c-f900e40f0682", + "dda01e92-abc6-4de6-b7ab-1d26c1d049f6", null, null); assertNotNull(devicegrouplistoptions1); assertNotNull(devicegrouplistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceListOptions.java index 13d7cb905..3cbc62740 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceListOptions.java @@ -24,9 +24,9 @@ public class TestDeviceListOptions { @Test public void testClone() { try { - DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(-17), Long.valueOf(108), + DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(-39), Long.valueOf(30), Order.getDefault(), - "946898d8-69ea-4ca1-88a0-5aa786dcbc91", null, + "92d35253-7cb9-4f9e-9909-cbdb77380ac2", null, null); DeviceListOptions devicelistoptions2 = devicelistoptions1.clone(); assertNotNull(devicelistoptions1); @@ -45,116 +45,268 @@ public void testClone() { @Test public void testFilters() { try { - DeviceListOptions option = new DeviceListOptions().equalToAutoUpdate(Boolean.FALSE) + DeviceListOptions option = new DeviceListOptions().inLastOperatorSuspendedUpdatedAts(Arrays.asList(new Date(1609926592834L), + new Date(1609926593000L), + new Date(1609926591737L), + new Date(1609926589060L), + new Date(1609926590547L), + new Date(1609926592132L), + new Date(1609926589559L), + new Date(1609926590324L))) + .notInLastOperatorSuspendedUpdatedAts(Arrays.asList(new Date(1609926587079L), + new Date(1609926590313L), + new Date(1609926590779L), + new Date(1609926587767L), + new Date(1609926589998L), + new Date(1609926589426L), + new Date(1609926593197L))) + .lessThanLastOperatorSuspendedUpdatedAt(new Date(1609926586678L)) + .greaterThanLastOperatorSuspendedUpdatedAt(new Date(1609926594438L)) + .inEnrolmentListTimestamps(Arrays.asList(new Date(1609926591835L), + new Date(1609926593198L), + new Date(1609926588343L), + new Date(1609926589923L), + new Date(1609926592995L), + new Date(1609926585971L))) + .notInEnrolmentListTimestamps(Arrays.asList(new Date(1609926594575L), + new Date(1609926594395L), + new Date(1609926586277L))) + .lessThanEnrolmentListTimestamp(new Date(1609926595249L)) + .greaterThanEnrolmentListTimestamp(new Date(1609926590949L)) + .equalToDeployedState(DeviceDeployedState.getDefault()) + .notEqualToDeployedState(DeviceDeployedState.getDefault()) + .inDeployedStates(Arrays.asList(DeviceDeployedState.getDefault(), + DeviceDeployedState.getDefault(), + DeviceDeployedState.getDefault(), + DeviceDeployedState.getDefault())) + .notInDeployedStates(Arrays.asList(DeviceDeployedState.getDefault(), + DeviceDeployedState.getDefault())) + .equalToMechanism(DeviceMechanism.getDefault()) + .notEqualToMechanism(DeviceMechanism.getDefault()) + .inMechanisms(Arrays.asList(DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault())) + .notInMechanisms(Arrays.asList(DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), + DeviceMechanism.getDefault())) + .equalToDeviceKey("3342d43c-cda3-485a-bad8-9ac0fa110025") + .notEqualToDeviceKey("7828eb7c-8a4f-48be-bebe-adb694e36405") + .inDeviceKeys(Arrays.asList("5db87c3c-2bb9-4d3b-8fc9-adf73ed28c25", + "12cd47a8-00d9-41ce-b855-67408d8089df", + "8bcd215b-afd4-4839-b190-dedc28ad739b", + "3c94eebb-3ca7-4200-8e34-6b426ee34e2f", + "38944d07-59b2-467c-90dc-a11a1924e244")) + .notInDeviceKeys(Arrays.asList("cceac43a-ecb5-4f75-8fb8-688e203e87bc", + "72a353ff-acbf-4304-9c7f-c9fa7a1f1d46")) + .equalToVendorId("26c7d896-0508-434e-a584-a1ce4dd3bdc4") + .notEqualToVendorId("dd684a83-1be1-406b-b60d-0c27e6252201") + .inVendorIds(Arrays.asList("126dba94-ef06-4c18-9e91-d471a2f8722a", + "0ef72867-09c4-496d-a29a-064c26a00fc2", + "e0ff9c21-7410-4a23-a22e-5d44d476345c", + "bb61ad24-d66c-4871-a59c-ef917ee35beb", + "0c25d731-a7d7-4a84-97e3-abc743966975", + "e749c2c4-78a5-422f-949a-068f41aecd34", + "3671db05-eeaf-4cbb-8c16-de78b9159dcd", + "498e2f54-581f-4316-b493-c5ab93477f8a")) + .notInVendorIds(Arrays.asList("6ba2fa2f-7c06-41b4-b8c0-c5bd3bdd9cae", + "ca940b8d-860a-44ae-877f-94bca2d49b53")) + .inLastSystemSuspendedUpdatedAts(Arrays.asList(new Date(1609926595405L), + new Date(1609926588554L), + new Date(1609926594679L), + new Date(1609926586421L), + new Date(1609926593751L), + new Date(1609926586257L), + new Date(1609926586595L))) + .notInLastSystemSuspendedUpdatedAts(Arrays.asList(new Date(1609926593515L), + new Date(1609926592450L))) + .lessThanLastSystemSuspendedUpdatedAt(new Date(1609926585780L)) + .greaterThanLastSystemSuspendedUpdatedAt(new Date(1609926592360L)) + .equalToOperatorSuspended(Boolean.FALSE) + .notEqualToOperatorSuspended(Boolean.FALSE) + .equalToManifest("1c213b0e-e71f-4f9c-a731-af8d3b8283f7") + .notEqualToManifest("fa3a657b-7f42-47be-8271-7925959eab6e") + .inManifests(Arrays.asList("75ebe283-3afd-40c0-8c80-d9b1fd901399", + "7662ccfe-8d47-4493-8396-0f66dc52dc88", + "94072b0b-98d3-4e8a-bca9-f69bfce5813b", + "1774e817-9111-4910-9457-370df84e2ff4", + "68b4eb48-e4b4-4871-bdc4-e8e23961667e", + "7c4e9038-8765-48a1-b09c-97e6eca36d85", + "b2190593-d34b-42d8-914c-2cb4639e57ca", + "893a7ca0-1a35-408d-a3f4-51457a1cc790")) + .notInManifests(Arrays.asList("b71f4ed3-9494-404a-ac94-0cad71506a88", + "4dc57ae7-8a7e-415c-8120-e6dcbd772321", + "27939b6c-aae5-461f-acd4-1a1e38d6f7a2", + "1c787732-b896-4c36-91d0-472dd7ab5b64")) + .equalToName("5f98343d-a77e-44b2-8942-5517b2de0ed4") + .notEqualToName("0de0514d-bffb-4183-96be-52480eae6c93") + .inNames(Arrays.asList("391f5e67-7ec7-4a20-bbf1-cc8a47e39d2e", + "55aba9ed-de6c-49f7-a02b-c5dec0180f20", + "94853495-768f-483c-a8db-f9db9ec4505d", + "8ae57b9b-f4e4-4213-b38d-281fef8c93b0", + "319f44ca-825b-4074-841c-ae9283dfe64f", + "23606a7f-6719-4570-b49c-79e5ec4d57c0")) + .notInNames(Arrays.asList("ca83ab9b-ed7f-4ff1-b0fc-7493521a4184", + "f662ba09-53ae-4b9d-8865-e93ab661f673")) + .equalToDescription("8c5c1f45-823e-434b-9cec-bfa6cc41f0c5") + .notEqualToDescription("1875eb9c-5bad-4bd5-8629-46299e619749") + .inDescriptions(Arrays.asList("27f35c5a-ac92-419e-adfe-f9e34ffd8441", + "2ee38690-d29d-408f-8f26-a3cf4f1656b5", + "1ae1f0aa-2d7e-4e79-8e7f-0bc506ed6f2f", + "f7dcb47d-6369-4b21-8b6b-21cd92816fe2", + "3a58f0a6-c942-4475-be60-f70cf97678e9")) + .notInDescriptions(Arrays.asList("9237ce49-51c6-4895-ba3e-12ee79837b78")) + .equalToCaId("5f89b4b0-404e-437f-ba93-f2ec6d4d3f9c") + .notEqualToCaId("0b4e0e3f-3cd2-4137-9fab-673edd8f98f8") + .inCaIds(Arrays.asList("8bf6b812-5a00-44f0-9ce7-161655e79eb0", + "74b3990e-e4dd-488c-a8e1-f974aab3d83a", + "ccdfdd55-50d0-448f-8fa0-df1bb79ade40", + "458eb81e-d51a-4fbd-b55b-0769665ce1c7", + "8f342d5f-5362-45a9-908a-61d829cab7ca", + "f5e4db80-c2e7-4b45-99cd-244f5b894541", + "85a4ce05-99ae-4846-bfe8-7cc58ef04fdf", + "7d64b924-cfc8-431c-a986-2f8cd3677af5")) + .notInCaIds(Arrays.asList("65bfe980-3374-49c4-b6e5-999293fa2554", + "ddb26820-dfff-4851-8e4c-c48c5f9f6fe7", + "3df574c4-5d65-4f92-881c-e992b02018b8")) + .equalToNetId("5c9f9579-a3bb-435a-974a-69fad7b092d8") + .notEqualToNetId("729c3672-bc6a-406e-8db4-6569f6d11baa") + .inNetIds(Arrays.asList("150d977f-7026-46c9-8709-58595f155d62", + "4ffa3dfb-3214-493f-b104-9a458df2dd81")) + .notInNetIds(Arrays.asList("ddfd9d43-7a1b-4486-a5c5-92c1bb2d6961", + "dd8e8a51-167a-4816-a3a6-f93976d07d2e", + "1ac62360-e684-4d3f-8c5b-16b159254d83", + "d32a0ef9-e91c-4b11-84ef-6d606de7f657", + "96bccaf7-a734-4e60-920e-cab02ee23475")) + .inUpdatedAts(Arrays.asList(new Date(1609926587281L))) + .notInUpdatedAts(Arrays.asList(new Date(1609926591548L), + new Date(1609926595171L), + new Date(1609926590773L))) + .lessThanUpdatedAt(new Date(1609926588753L)) + .greaterThanUpdatedAt(new Date(1609926587318L)) + .equalToMechanismUrl("c67db425-0c0d-40af-b9b3-0570b8e6454e") + .notEqualToMechanismUrl("3707a3a9-102c-4c76-873a-b54de6f75c1f") + .inMechanismUrls(Arrays.asList("944a5f3b-e073-450a-9ee2-ee251c68d4aa", + "5af072cc-ab01-40f2-a330-c9bc170234fd", + "5e1b1bbb-901a-4cc1-b6c0-c4ddd28d8cd9", + "881f78d3-2e19-462e-90dd-abf83c076571", + "93b39a48-52b9-412b-bed7-b1ab58cb015b")) + .notInMechanismUrls(Arrays.asList("df9abb11-9314-411f-ad90-1e401bb7fa3b", + "94c25a4d-fa65-4228-8f6c-1383b2e85b11", + "835bc7ff-cc33-49ed-b2a1-ee190927dc41", + "08638fb5-5a95-45c0-8159-ceddaa35ade0", + "ad55f1c8-3b59-49d4-a477-1a54e5241619", + "b26198f5-44f1-4618-a5a5-a332d1c90546", + "6af21300-312f-4d89-8fdc-13483576876d")) + .equalToLastSystemSuspendedCategory("64f6fd6b-081c-4610-97c7-d0154557e6db") + .notEqualToLastSystemSuspendedCategory("215d91f5-858e-4f76-9c7c-f90f8a7b1458") + .inLastSystemSuspendedCategories(Arrays.asList("6500d3e5-365e-444e-a21a-c40b97547a3b")) + .notInLastSystemSuspendedCategories(Arrays.asList("c4286fd5-e69a-4218-a95d-95024560c698", + "2cf0b7a3-0a57-4e6c-8963-4ddbe77626a2", + "ec2fdc5e-5205-45e7-97e0-c3ec7451c90b", + "28e52ca7-b06d-4b27-b4ee-0651f18fc936", + "88d38457-a645-469b-9a9b-325d139a3140", + "5444c6a2-4889-4e60-a7b7-029b208bc40a", + "440ee501-9e92-4f61-bf2c-0f19b68be207")) + .equalToDeviceClass("0b703ca1-6cca-4cfe-9e7c-8c0ca229aa0b") + .notEqualToDeviceClass("e4e44ab4-fd8e-4690-92e9-0d47d5e3dd67") + .inDeviceClass(Arrays.asList("4d0fc740-6e12-4df8-881f-7032e9df029e", + "71a0bcd9-e776-4420-ba63-3026d6d2c850", + "2c3a3fb5-38cf-487b-8c54-bc1eba8eae68", + "d21297fc-ffe4-4604-be4e-bf21fed2f2dc", + "e21a62b8-8e15-4407-a7a2-e0007c9aa7ec", + "707f1085-027d-4a96-8512-e8f90093ee45", + "0159ea34-3cec-4b8a-9573-b9074f087ec3", + "649e8c11-b90b-474e-ac66-73b9fe607ca2")) + .notInDeviceClass(Arrays.asList("0bd3ab28-7976-4c47-a6da-6911f33f0804", + "506ccf3e-2176-4dca-95c1-5e2fbc3e309a", + "effc1fc6-ddaf-42c8-a117-38a8774f6c79")) + .equalToHostGateway("d769db6d-869c-42c7-89cb-88481a395a94") + .notEqualToHostGateway("f27519ba-ed06-4e1e-9677-1c4c050f4a7c") + .inHostGateways(Arrays.asList("a7d37f31-c025-4d2b-b313-8f7f80a29ca6", + "a3386c20-d4ab-453e-b5ba-c32070e61dd7", + "604dc76b-0049-4d1b-b29c-3e39eaf4486a", + "03805da5-6026-4b98-9895-647ca7303f28", + "6d0f2844-7f3d-4ae4-af5f-458cdd544f94")) + .notInHostGateways(Arrays.asList("8792c426-0b33-4b39-9f51-ded34613a801", + "f960b3ab-ad76-4d52-a07f-42cf7e4739b1", + "617773b2-3332-45cf-9df2-356d544cfc26", + "a1370105-6546-43d7-9901-fb780834eded", + "39110400-844d-443b-a027-d484e5003428", + "15296d87-8aaa-41d0-b560-ef94323f4d83", + "1ed540dc-d5cb-48d2-8f41-e680c1aa2ab1", + "e389b221-1988-4de0-bee1-0cc3f122bda8", + "cc80c744-74e7-4c00-af36-dd6357491c52")) + .equalToSerialNumber("0f88abf1-630e-4a78-a520-31e03365b0f0") + .notEqualToSerialNumber("7e095ccc-6c96-43e6-99b8-77cce0e443d7") + .inSerialNumbers(Arrays.asList("a0fd6a03-f5fe-4232-b7a3-f3596bd2abc3", + "fdb5f5d0-b548-4c49-8180-29d418deee1d", + "e8a04bd1-1891-4833-9cd5-e2651c85500c", + "cf074ca5-11e7-4073-af01-a1baf602fd46", + "31e4a1b9-e74b-43cf-8e87-36ab54ea2d90", + "b5557b5d-580d-4353-8b86-96cbff71847d", + "d166e614-792b-433a-95bf-69f3225c3b9e")) + .notInSerialNumbers(Arrays.asList("0345ea77-a10d-4c81-b3a9-446c59dd327b", + "31ff3952-eb28-4f18-a34d-0c82c0619f7b", + "73304672-d563-47be-8c68-fd2805c33dfd", + "322cacd0-7dd2-4367-b936-92e24c972aaf", + "17ffe7c4-db3d-452e-af96-e7e0d6bb67f5", + "64c3188e-e032-4ee0-b021-598f4086ffbd")) + .equalToSystemSuspended(Boolean.TRUE) + .notEqualToSystemSuspended(Boolean.TRUE) + .equalToEndpointType("b3b1d5b0-cc65-44ac-9cc3-204dcb9e791b") + .notEqualToEndpointType("c7263ff4-3216-468a-a4d2-0d9bd525785d") + .inEndpointTypes(Arrays.asList("50bf100d-4478-49dd-b8cf-08d3dd8ccaaa")) + .notInEndpointTypes(Arrays.asList("9759192b-8fc3-4577-847b-700c58374c86", + "ca22a3ee-8352-48f5-abd7-9f442b0c66f2", + "54d4fb4b-b61a-40e7-ab91-359ed39bda9b", + "4a61bc1c-bacd-480b-ae2d-0a340ef54d10", + "fe917840-4f3b-47bf-b9ce-b1872087def8")) + .equalToAutoUpdate(Boolean.TRUE) .notEqualToAutoUpdate(Boolean.TRUE) - .inBootstrapExpirationDates(Arrays.asList(new Date(1574704675753L), - new Date(1574704677030L), - new Date(1574704679040L), - new Date(1574704679753L))) - .notInBootstrapExpirationDates(Arrays.asList(new Date(1574704673452L), - new Date(1574704676250L), - new Date(1574704678372L), - new Date(1574704673434L), - new Date(1574704681143L), - new Date(1574704682294L), - new Date(1574704678870L))) - .lessThanBootstrapExpirationDate(new Date(1574704672983L)) - .greaterThanBootstrapExpirationDate(new Date(1574704672759L)) - .inCreatedAts(Arrays.asList(new Date(1574704677389L), - new Date(1574704678640L))) - .notInCreatedAts(Arrays.asList(new Date(1574704674384L), - new Date(1574704676714L), - new Date(1574704681244L), - new Date(1574704680541L), - new Date(1574704676842L), - new Date(1574704673987L))) - .lessThanCreatedAt(new Date(1574704677008L)) - .greaterThanCreatedAt(new Date(1574704682317L)) - .equalToManifest("fbb60dd1-2383-4308-9422-58549aaa52fc") - .notEqualToManifest("a22aa134-7709-44f7-aa3e-c88a2447a3b1") - .inManifests(Arrays.asList("d26cfb52-0fd0-42b1-8efc-0acf2ac279ea", - "0c7a61bc-b1ef-4e9c-bdff-2b4d37fb53fb")) - .notInManifests(Arrays.asList("19efeff0-3f0d-4d03-adac-0dd71bc0a3e3", - "159496bd-a350-42c0-8699-a152bf5d8bc7", - "6ed2e9ee-4dac-4097-826f-61f350c816e6", - "8ee4ce5e-83f1-4ee0-9303-214857786419", - "e5656fd2-e00d-4607-ad1a-648d9e982895")) - .equalToEndpointType("6e6e631d-09fc-4e90-9431-4237eb4de6ae") - .notEqualToEndpointType("389f87aa-d124-4cff-83cf-f99ac2915e95") - .inEndpointTypes(Arrays.asList("6b496d8f-63f7-4619-8ba1-85feb985b1f5")) - .notInEndpointTypes(Arrays.asList("99280183-766d-4aca-8bc2-ac0b71b25aa1", - "ff3dae93-56fd-44ca-8828-e64523847c03", - "bc6d3560-68a0-48d8-b5b4-142b2ad7828e")) - .equalToDeviceKey("76276129-4d69-4f55-a3a3-a5d5f77642ed") - .notEqualToDeviceKey("aca684c9-d927-4b2f-a757-ea703c0ce96b") - .inDeviceKeys(Arrays.asList("ce6bc730-a504-4686-b0ff-6a35672f0064", - "b84904c2-99df-4fd7-a7e9-aad0961d0191", - "3b437016-0db5-4f0a-9417-404467d79f05", - "8743e16e-fdb8-4ab1-b850-2b25274cbfc9", - "35f317a7-d4d2-4210-8df5-c039a819377e", - "1ca094ce-fec9-4b2a-834e-86ae23478b0c", - "91369d0f-97db-49d8-8651-ce5e7bdb4414", - "bcc8003a-d901-42ec-ba56-8be2b6d0b230", - "ca15ff5c-ec1b-4cd4-956f-5934fd713021")) - .notInDeviceKeys(Arrays.asList("b6f9e94e-a3a7-4b83-8a7e-791e619280c6", - "01d1a71b-4959-4d35-a349-5030a4beea01", - "4d23c485-e7ca-4394-8197-467df286ea5e", - "b32d925b-c6d8-45cb-9bbb-63d44751a857", - "66d415b8-4162-4612-a2ec-e8baff658951", - "fe38edd0-e83d-45c3-8203-cb010e3bd0f1")) - .equalToFirmwareChecksum("d0b67adc-0ad8-47de-87cf-ed9160334ea6") - .notEqualToFirmwareChecksum("7a0c4fa2-9857-439c-af27-7bf15b497d21") - .inFirmwareChecksums(Arrays.asList("e36ec312-91d2-44cf-ad62-d0577f8855ff", - "63459edc-9437-45cb-bbdb-c8bce12d4fce", - "9734f34b-d9cc-4adc-a488-33b03f73cf2b", - "2747574a-fb17-48ef-adcd-1e9a092466d2", - "fbc0cffd-eabc-4b7e-951f-5bf1b3b68f7b", - "aba797f0-9f1b-45e4-b11c-37ec81d99d3e")) - .notInFirmwareChecksums(Arrays.asList("a6791e1d-feda-4f88-b37f-53a86ff267f9", - "f4e1a794-8ae8-4e7a-9cc9-46dfbc5635ee", - "eb4bdbfa-c14e-423d-8254-15ceb99736d6", - "8aada5fb-ca19-4983-9ab1-d4b0f82eab2a")) - .equalToState(DeviceState.getDefault()) - .notEqualToState(DeviceState.getDefault()) - .inStates(Arrays.asList(DeviceState.getDefault(), - DeviceState.getDefault(), - DeviceState.getDefault(), - DeviceState.getDefault(), - DeviceState.getDefault(), - DeviceState.getDefault())) - .notInStates(Arrays.asList(DeviceState.getDefault())) - .equalToDeviceExecutionMode(Integer.valueOf(-15)) - .notEqualToDeviceExecutionMode(Integer.valueOf(-128)) - .inDeviceExecutionModes(Arrays.asList(Integer.valueOf(95), - Integer.valueOf(18))) - .notInDeviceExecutionModes(Arrays.asList(Integer.valueOf(61), - Integer.valueOf(82))) - .equalToAccountId("ba8c237a-7e99-41b1-b4f5-7f50ac8142ac") - .notEqualToAccountId("a2f44465-1d0f-4d63-a142-45bb91fe45da") - .inAccountIds(Arrays.asList("13c10c21-8f24-4fe2-b7d6-67225e255513", - "eb70501d-d234-410c-832a-49d4589e6556", - "f21dae4c-9299-4530-937b-9a13b89433d6", - "f43c4b03-b36d-413d-b683-10f91628a687", - "270115a9-25c7-4917-96e3-0c960736576f", - "de32215f-696e-4e06-a77a-8e39ef0ae1a3", - "d975d26e-fb9e-41a2-bbe0-0ae2e8aa9b44")) - .notInAccountIds(Arrays.asList("6bfe7e6d-97ee-491a-bd63-2b6be0fc3dc8", - "9d875d27-d9fc-4ca1-8e5d-01c47444b713", - "25bd7dc2-8527-4c1f-b111-385a52d55448", - "6e22b1ad-ccd3-4f4b-9c22-3a10e7922bfc", - "73649d14-4f5a-4b2d-8634-1cac1610f791", - "39354c16-9088-4a65-9bb9-3c6c1d4fddca", - "3d6b5403-1aef-4a5a-8330-98839f7be3f4", - "9cb8a993-e980-4719-b311-7dcf4f05bd42")) + .equalToLastOperatorSuspendedCategory("45afd4ab-da2d-46ee-8a46-eaac4fe08f21") + .notEqualToLastOperatorSuspendedCategory("dd8359b6-5c13-41d8-b166-7d71abe02f92") + .inLastOperatorSuspendedCategories(Arrays.asList("89a5240b-64b9-4f08-b62b-a883824f7de7", + "251dd4ec-139b-4db6-904b-36c2b08477b4")) + .notInLastOperatorSuspendedCategories(Arrays.asList("3909e828-e026-4814-aad1-a8b54b9f0825", + "e8eade06-2842-4b90-afc0-41432727067f")) + .inCreatedAts(Arrays.asList(new Date(1609926589710L), + new Date(1609926587802L), + new Date(1609926586504L), + new Date(1609926592106L), + new Date(1609926586136L), + new Date(1609926590648L), + new Date(1609926592552L))) + .notInCreatedAts(Arrays.asList(new Date(1609926595440L), + new Date(1609926590344L), + new Date(1609926586664L), + new Date(1609926590290L), + new Date(1609926586087L), + new Date(1609926591221L), + new Date(1609926589277L), + new Date(1609926587402L))) + .lessThanCreatedAt(new Date(1609926587889L)) + .greaterThanCreatedAt(new Date(1609926595150L)) + .equalToId("37699955-33d4-4a90-8f4a-8cf935439d85") + .notEqualToId("4b34990f-14b8-4037-ad49-3c9fd31a73db") + .inIds(Arrays.asList("6064d23b-9ff4-4ab5-b2cf-f0b6be379861", + "8942747f-b206-4dfb-b00b-6d90e02d8eb9", + "1dbe619a-1036-4b13-b362-263ad75d952a")) + .notInIds(Arrays.asList("63b77add-872f-404d-9aac-f6d5a8bffef7", + "44720531-082d-4e36-a4a3-c84f7a4bc806", + "3e00bc46-485f-41cf-b316-0dde1fd954e5", + "f5c06a22-8bc2-4b47-a9ae-1d81d581e386", + "a50a245a-2f62-4ed2-a5d9-33f17ae98a6d", + "0c9414cc-3962-451b-9883-9c8d442bd412", + "a3e21d05-7b6b-4274-83c8-224c8984fbb5", + "8f445a67-e8e9-449c-8bd8-b8fb84af3786")) .equalToLifecycleStatus(DeviceLifecycleStatus.getDefault()) .notEqualToLifecycleStatus(DeviceLifecycleStatus.getDefault()) - .inLifecycleStatus(Arrays.asList(DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault())) + .inLifecycleStatus(Arrays.asList(DeviceLifecycleStatus.getDefault())) .notInLifecycleStatus(Arrays.asList(DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), @@ -163,1238 +315,1110 @@ public void testFilters() { DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault())) - .equalToMechanismUrl("3bc4789d-9a5e-4770-aaaa-1cb2390426d8") - .notEqualToMechanismUrl("478b9d18-7b34-4e2f-9cc2-afdaf838cbff") - .inMechanismUrls(Arrays.asList("5eb0ce88-aa9b-4809-aa18-b40b29a4740e", - "188a68bd-4cac-4fba-973b-4ccedd749cb7", - "46117cc9-091f-4dde-a635-08d41e58f531", - "f1e19046-1d5e-4937-9d92-8ec5d0c6abb8", - "7eaae1dd-115c-4d28-9fa5-4a4943229636", - "817f09f7-066a-47ac-9f6f-1d2eb2d8c3a8", - "12d662b0-4e10-4304-baf0-697c8771423d", - "e76d7529-3479-445b-b264-21c0fc4db614", - "b375f129-967c-4c5d-b91d-021b62925053")) - .notInMechanismUrls(Arrays.asList("b94c3a53-50df-4206-b21c-fc6bd531d480", - "4b28bc0a-fe37-4b76-89bf-cf5ef96a40b2", - "a658ae0e-2bd2-40e4-9f77-fa9f2f233785", - "d3778ea9-8de5-497d-9e90-6a469719e369")) - .equalToVendorId("9b9a702c-da60-49ca-840f-812bc34d8df9") - .notEqualToVendorId("394f849b-b89b-4ab9-a7cf-bdf13140d0d1") - .inVendorIds(Arrays.asList("875a0675-9ba8-4687-b469-cb8543f2cfb8")) - .notInVendorIds(Arrays.asList("2afdbf7b-7328-406e-b004-009baaffc9c3", - "bede7d47-63e3-4107-a51d-2f0a3968d1fa", - "ed829599-d782-471a-9dd5-86bd3b3ed5c2", - "4a2ce6f4-d4d3-430b-8b04-b91377ae74db", - "7b8906f0-dd0d-4ee2-b41e-2d26eeda7aae", - "2c388f74-7313-40cd-919f-312f819a9bc7", - "71684076-53af-406d-8440-366a781b9d4a", - "2954f596-5958-4836-ac40-93bb7a2b2663")) - .equalToDeviceClass("0f8563c7-8542-4f4b-8fd7-1d9d7108aeb9") - .notEqualToDeviceClass("80fcec10-d9ba-4e2c-b807-d6548fd817cd") - .inDeviceClass(Arrays.asList("0e24aabb-5571-4062-a33e-c8fdeb14a1f9", - "9c2e3dc7-b3c1-4b29-a873-3cc2612870e7", - "f6995f35-c283-4951-9297-a011951870ab", - "fcbd3282-152a-4ff7-8bcb-1d07b443e084", - "370348d0-1f28-4eba-a53b-6dc09cc0874b", - "be7043d7-02b6-4a22-9ae4-c09d7c5bcd48", - "80311017-e083-4ec3-84e7-0867fefbba4f", - "b7851437-4ce7-4dad-a213-4aae1f127e8e")) - .notInDeviceClass(Arrays.asList("f121bbad-0ce7-49ba-af18-1d561e91681a", - "2fed893e-1c51-4627-ac34-8dd6a5f0990d", - "968ca291-f43d-4920-b7b9-6c8069c65a5c", - "5d95d096-6591-4529-8d88-9080023174cf", - "099e3aab-cc16-4f56-8776-40a87528344d", - "439cf80a-af49-41a3-a962-126e8782a56d", - "ca36437f-73ad-4d31-a2f1-f8c1130bf704", - "c1e031ea-879f-40b2-a167-2f18b70089ef")) - .equalToHostGateway("37671e76-fff7-44b0-b9a3-7a3a6da2b031") - .notEqualToHostGateway("d4b3c531-b3ad-4cd2-9ceb-8e9dab5cb891") - .inHostGateways(Arrays.asList("82b50bac-7df0-41f3-b3c0-5e68ae0d7046", - "7f4a0c95-79e1-4b4d-8346-4b7a4f507147")) - .notInHostGateways(Arrays.asList("484b5f61-aedb-4cfb-8a0f-cdb5ca5e2249", - "39a37956-a03f-41c1-ac0f-c8707ef8953f", - "80de85b7-c1c6-4ef6-8213-803b19cf6e99", - "9be300a0-d776-4634-abf9-5a451703fd85", - "e980559d-02cb-44d9-9cf8-71eb50b50f18", - "48a7266b-5947-44e1-b9b6-8b3cc4ecc83d")) - .inBootstrappedTimestamps(Arrays.asList(new Date(1574704680445L), - new Date(1574704678334L), - new Date(1574704682295L), - new Date(1574704677867L), - new Date(1574704678621L), - new Date(1574704679819L), - new Date(1574704679502L), - new Date(1574704677703L))) - .notInBootstrappedTimestamps(Arrays.asList(new Date(1574704681567L), - new Date(1574704675711L), - new Date(1574704673780L), - new Date(1574704680435L), - new Date(1574704672429L))) - .lessThanBootstrappedTimestamp(new Date(1574704673219L)) - .greaterThanBootstrappedTimestamp(new Date(1574704680956L)) - .equalToSystemSuspended(Boolean.TRUE) - .notEqualToSystemSuspended(Boolean.FALSE) - .equalToLastSystemSuspendedCategory("fc845f1b-f543-46ff-9ecd-88c066b87040") - .notEqualToLastSystemSuspendedCategory("0f8079f3-0867-4537-b07c-aec2de1d0675") - .inLastSystemSuspendedCategories(Arrays.asList("18cad866-5524-46f1-bdee-15f61269c7bf", - "9cc197e5-a662-4d33-b552-c77e0b00529c", - "719c3ec0-4b32-4b02-99ef-7b513cc78ebc", - "063582bb-914f-4f31-99a7-ba9ba8ecc890", - "6e140803-bd5d-4640-9c2e-5edced9f5e9a", - "6fd718c5-2a9d-4747-bab2-328a9f5a9a02")) - .notInLastSystemSuspendedCategories(Arrays.asList("72097f47-f74f-48d1-ab6f-ed8df9c78cb0", - "bf10f6cd-389c-4cf9-8f17-cc70a16caf15", - "3b61de04-0b58-45fc-9f29-ae35e04b448e", - "addd6d9f-f48f-4360-944a-3ce603eb247a", - "340416c5-e7ac-4137-9ec9-cb636cf489e3")) - .equalToSerialNumber("6590c6fd-adff-4d57-b5fb-f3a072646690") - .notEqualToSerialNumber("b4597464-d4dc-48ad-a6cd-709f1892068f") - .inSerialNumbers(Arrays.asList("1a5a3c49-9014-4ac2-8dfe-2eadb9ed424e", - "4a8f60ba-3e7a-466f-bd56-1ca639bcfd03", - "2830a8d2-35b1-46b7-af5e-3ecf082c375d", - "3ea43679-20c1-4a2f-980d-1d90c92d3027", - "1ec3821e-2229-4d19-86fa-d9c3ee99d94f", - "e878f145-2586-4b0e-af56-9559aa41f6e3", - "b2fdf174-4a0b-4024-b0f0-79556665fa5e", - "020e4bd5-dbd5-4c77-ab55-b1f07daa3316")) - .notInSerialNumbers(Arrays.asList("fceb4409-4a40-4ffd-a8ba-98777b05e471", - "3f22b1c6-96a8-4086-a07f-b087928ad607", - "51ad2af0-a944-4aa7-80ad-aad276fb4848", - "646ae930-f54f-4255-ae71-f7deb19646d7")) - .equalToId("b7a4c245-7a62-4b28-a947-926b24cc6669") - .notEqualToId("22f39945-5570-4b21-aad0-9e85cdef6559") - .inIds(Arrays.asList("9619e100-7f8a-4d0d-baa0-b4fd031bc012", - "7fe7917c-1316-497a-a18a-2077263f5e0e")) - .notInIds(Arrays.asList("77b2cc7c-2f07-4a31-87ee-d1aff50de78e", - "b6cfbc96-f6f4-49e4-9f4e-1ae966635286", - "440fce81-1029-48d2-b4c7-c8f3e42513ee", - "0d2634ec-376f-4223-af88-b1b6a0c12ca9", - "97c3973a-0c1b-4448-a45f-5e4a753d8e9f", - "2305c12d-bf52-489a-a305-f2c67d553c6f", - "4ba9273a-66f8-430d-b524-0d73ec411f93", - "ba8c7657-0539-4428-be0d-74e210e62dfa")) - .inConnectorExpirationDates(Arrays.asList(new Date(1574704677860L), - new Date(1574704679577L), - new Date(1574704677871L), - new Date(1574704674175L), - new Date(1574704675881L), - new Date(1574704674119L), - new Date(1574704676036L), - new Date(1574704674228L), - new Date(1574704676661L))) - .notInConnectorExpirationDates(Arrays.asList(new Date(1574704681263L), - new Date(1574704678044L), - new Date(1574704677373L), - new Date(1574704678572L), - new Date(1574704672543L))) - .lessThanConnectorExpirationDate(new Date(1574704673400L)) - .greaterThanConnectorExpirationDate(new Date(1574704675873L)) - .equalToLastOperatorSuspendedCategory("9bdfa568-3263-43c4-b3bc-c2c152b7fbda") - .notEqualToLastOperatorSuspendedCategory("d3e8bcd5-71a4-4afe-ba8e-1d63fc1c6978") - .inLastOperatorSuspendedCategories(Arrays.asList("f56f4714-47ea-4ec6-8633-ec4a9606a7e4", - "cab7d041-f248-4b15-8dfb-eed0bbe3cf74", - "a6f75414-9d13-43f2-a3cb-125045b98987", - "94706b6e-14d4-4b06-a58d-77ddc2c00334", - "3304e93d-8804-4b9c-9111-b4a282ff3fc2", - "7c5b2364-7f97-45e1-be50-7399adb79e26", - "4499774e-568b-45cd-b74b-c80d90656bf8")) - .notInLastOperatorSuspendedCategories(Arrays.asList("c549e774-53bf-4e57-ab92-0440cf8c9c33", - "8b315cc0-5129-44aa-afe6-eb292b9a3d08", - "2cfbd151-c989-41e9-9295-ea7a8d4e1010", - "12ccdff1-c1ad-4465-ab58-ddbf5e2a317a", - "909b3a49-4ba8-47a3-902f-a01ddb792767", - "d393d567-6baa-49fc-8ab3-dc461ffec1a0", - "f5541eeb-5997-4831-9374-3613ce0cc0c3", - "5f25af6a-8011-4890-94a9-75a5859bd7cb")) - .equalToCaId("7dc19fdd-bc55-440a-a15f-14a3da198574") - .notEqualToCaId("321da1b9-5be9-4568-b3fc-49bb82c1137a") - .inCaIds(Arrays.asList("606e7c26-b702-442a-893c-c96d54286476", - "2482ef4d-21b7-44d1-b1f7-5312b0b0e230", - "7f328aff-2cd1-49ca-9fb1-a7f409feb2af", - "5e3ab530-dd7d-4ef4-a5e2-9c8c9f2c0bfd", - "5d5ea3b3-4d73-4aff-ae37-99989ce3464c")) - .notInCaIds(Arrays.asList("1d8badcc-a4e4-42ba-86cc-e7128126eb0f", - "040dc523-fc11-43b4-87cb-9da3e7afe6c2", - "aff56727-d2fb-4c0f-bdc7-63cf826bae99", - "951d75ba-4884-4326-b1f2-287f13904751", - "3779e255-df6a-4e97-9856-a088bf21752f", - "1ec064b9-1286-4568-960a-3595dae626ae", - "b37d38df-bbc9-4122-9540-d8d518c1645d", - "2fd1c220-46c4-4aa5-b347-08d60e0f82ca", - "2d5f392c-bcfd-4de3-9adb-e5360af1d6bc")) - .equalToOperatorSuspended(Boolean.TRUE) - .notEqualToOperatorSuspended(Boolean.TRUE) - .inEnrolmentListTimestamps(Arrays.asList(new Date(1574704674669L), - new Date(1574704673385L), - new Date(1574704678087L), - new Date(1574704676363L), - new Date(1574704676939L), - new Date(1574704681495L), - new Date(1574704678641L), - new Date(1574704675291L))) - .notInEnrolmentListTimestamps(Arrays.asList(new Date(1574704674823L), - new Date(1574704681376L), - new Date(1574704674918L), - new Date(1574704681759L))) - .lessThanEnrolmentListTimestamp(new Date(1574704673662L)) - .greaterThanEnrolmentListTimestamp(new Date(1574704680351L)) - .equalToDescription("b8392f95-095f-40e8-9840-1da0fe655e13") - .notEqualToDescription("138dac8d-af77-4d7c-994d-3ddbe7c3d3bb") - .inDescriptions(Arrays.asList("9a3f5542-553e-47a7-ab57-4ad9a8b1d4d2", - "a6e57739-80ac-40e7-a54b-facbee32d669", - "8f8bfa68-7e5a-498a-b157-365cebd378ae", - "44a87c59-1d25-4cc4-ade2-9834939a6b04")) - .notInDescriptions(Arrays.asList("64972493-e9c1-4148-9aa5-bf70eaed2671", - "6ba44074-0d13-4983-9c64-6019bc4e47de", - "467bb4b9-a23a-433a-b2d5-6dcaa20db05e", - "6e9a43ca-7c24-45a0-bd44-447f5b759c75")) - .inLastOperatorSuspendedUpdatedAts(Arrays.asList(new Date(1574704680927L), - new Date(1574704675806L), - new Date(1574704681607L), - new Date(1574704674384L), - new Date(1574704679018L))) - .notInLastOperatorSuspendedUpdatedAts(Arrays.asList(new Date(1574704675060L), - new Date(1574704675668L), - new Date(1574704676662L), - new Date(1574704676184L), - new Date(1574704679711L), - new Date(1574704673951L), - new Date(1574704679691L))) - .lessThanLastOperatorSuspendedUpdatedAt(new Date(1574704674826L)) - .greaterThanLastOperatorSuspendedUpdatedAt(new Date(1574704674629L)) - .equalToDeployment("32143d5f-3522-47d6-89c4-6694826689dc") - .notEqualToDeployment("72257188-3daa-44a9-9172-e3942bf76b2b") - .inDeployments(Arrays.asList("b3e9e75e-8e8b-40b5-b400-18a92df1b790")) - .notInDeployments(Arrays.asList("93b00ad9-0880-4520-8226-ad872ba27357", - "011fc808-0551-4af5-836a-db423cfb8fa5", - "5bdc5b5d-703e-43a3-bc8e-b11783f017cb")) - .equalToMechanism(DeviceMechanism.getDefault()) - .notEqualToMechanism(DeviceMechanism.getDefault()) - .inMechanisms(Arrays.asList(DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault())) - .notInMechanisms(Arrays.asList(DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), - DeviceMechanism.getDefault())) - .inLastSystemSuspendedUpdatedAts(Arrays.asList(new Date(1574704679440L), - new Date(1574704679555L))) - .notInLastSystemSuspendedUpdatedAts(Arrays.asList(new Date(1574704674585L), - new Date(1574704677017L), - new Date(1574704673406L), - new Date(1574704674501L), - new Date(1574704680246L))) - .lessThanLastSystemSuspendedUpdatedAt(new Date(1574704679840L)) - .greaterThanLastSystemSuspendedUpdatedAt(new Date(1574704675318L)) - .equalToDeployedState(DeviceDeployedState.getDefault()) - .notEqualToDeployedState(DeviceDeployedState.getDefault()) - .inDeployedStates(Arrays.asList(DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault())) - .notInDeployedStates(Arrays.asList(DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault())) - .inUpdatedAts(Arrays.asList(new Date(1574704678214L), - new Date(1574704676312L), - new Date(1574704674928L), - new Date(1574704682207L), - new Date(1574704674183L), - new Date(1574704677641L), - new Date(1574704673768L), - new Date(1574704676454L), - new Date(1574704675722L))) - .notInUpdatedAts(Arrays.asList(new Date(1574704674673L), - new Date(1574704679363L))) - .lessThanUpdatedAt(new Date(1574704679154L)) - .greaterThanUpdatedAt(new Date(1574704675738L)) - .equalToName("def18e9b-6fed-4457-9cc0-8b136ac47abb") - .notEqualToName("b4659109-336d-4d1f-b77c-529b862e355b") - .inNames(Arrays.asList("c08d961a-276d-4a4c-8c2a-e0a3e1a94323", - "807184da-2af2-4e7b-943c-de9657a50325", - "d50b347f-0694-48e6-a888-12f12441631c")) - .notInNames(Arrays.asList("bcb13725-5ac8-4953-9724-8a726535f027", - "62fcb596-30f3-4bb8-8353-d013a130564f", - "b9517eb1-1f58-4429-a309-526e3577fa30", - "1dac1b16-0d49-4cb7-a338-108affec1d01", - "d0e8b0f6-16f9-4b5a-a971-f321ba8d9afd", - "5cef0739-09f8-44e6-ab3c-3f5067df7aa7", - "100d02be-18fe-46a5-b722-d7df7dd04113", - "b7fccbfe-47bc-4624-83d9-4f2420b64d91")) - .inManifestTimestamps(Arrays.asList(new Date(1574704673220L), - new Date(1574704675022L))) - .notInManifestTimestamps(Arrays.asList(new Date(1574704680942L), - new Date(1574704673912L), - new Date(1574704679986L), - new Date(1574704675508L), - new Date(1574704681753L), - new Date(1574704673728L), - new Date(1574704680926L), - new Date(1574704676098L))) - .lessThanManifestTimestamp(new Date(1574704673551L)) - .greaterThanManifestTimestamp(new Date(1574704673424L)) - .equalToEndpointName("b7c5658d-b3d9-4ee4-8a12-c2ce88aa3cc9") - .notEqualToEndpointName("e7be704c-dcfd-4ae7-a417-568e7679dfd4") - .inEndpointNames(Arrays.asList("0a8c8dcc-c2e6-4eaa-bc36-10a839fb90cf", - "e583d807-2a90-435f-86db-ec078a11bef8", - "cf2feeea-5b58-412a-94e9-5776ba3b037b", - "980d8246-77d6-45c4-91ab-4ad8992eaab2", - "86929bad-5786-4e4a-98cc-341ed9070af5")) - .notInEndpointNames(Arrays.asList("849c5821-6413-4abf-af15-440ab4ebf7a0", - "c8a3dc6c-9c70-4e88-9e4c-8350b2eea0ac", - "0e8d018d-0b26-4927-bae2-1b37fe28ab69", - "b422597f-8fb5-4017-aacd-759e1dd51304")); + .equalToDeviceExecutionMode(Integer.valueOf(-118)) + .notEqualToDeviceExecutionMode(Integer.valueOf(-117)) + .inDeviceExecutionModes(Arrays.asList(Integer.valueOf(66), + Integer.valueOf(-113), + Integer.valueOf(-33), + Integer.valueOf(71), + Integer.valueOf(-49))) + .notInDeviceExecutionModes(Arrays.asList(Integer.valueOf(-41), + Integer.valueOf(25), + Integer.valueOf(-11), + Integer.valueOf(-125), + Integer.valueOf(17), + Integer.valueOf(-83), + Integer.valueOf(40))) + .equalToFirmwareChecksum("9f749e91-1393-4c50-a715-52e04bd9676d") + .notEqualToFirmwareChecksum("0d8f408d-6843-4453-82bb-a61e75f545ed") + .inFirmwareChecksums(Arrays.asList("03624a88-9ae4-4aed-b399-7a4e62485754", + "072695cc-2cee-49e8-9589-b82acf3760cb", + "a2bd8749-f897-40ba-9266-2ac1ab8cfc90", + "0a09cd10-b9e2-411c-8f0a-0b32e819761d", + "7e296b04-692f-4509-aab2-91bf7fe352bc", + "53da05e7-1d75-4e57-b647-50ad18f328a6")) + .notInFirmwareChecksums(Arrays.asList("83b259d7-7f91-47af-a5f3-ff8597d9562c", + "0bd3504c-687e-4b2c-8d34-341822ab316e", + "dc6778ac-19b7-4080-88cf-2ae355db83a3", + "5123643f-75cf-4da9-93a9-285ce3ff8dcc", + "b9207093-2f6d-4564-bbdb-5d737a3d09ea", + "ebfe32fe-4d06-413a-80f1-6d223a957ff6")) + .inBootstrapExpirationDates(Arrays.asList(new Date(1609926594375L), + new Date(1609926593394L))) + .notInBootstrapExpirationDates(Arrays.asList(new Date(1609926586539L), + new Date(1609926590472L), + new Date(1609926589975L), + new Date(1609926592378L), + new Date(1609926591541L), + new Date(1609926588219L))) + .lessThanBootstrapExpirationDate(new Date(1609926589480L)) + .greaterThanBootstrapExpirationDate(new Date(1609926594568L)) + .inManifestTimestamps(Arrays.asList(new Date(1609926593467L), + new Date(1609926593712L), + new Date(1609926587655L), + new Date(1609926595364L), + new Date(1609926595169L), + new Date(1609926587919L), + new Date(1609926595482L), + new Date(1609926595364L), + new Date(1609926591028L))) + .notInManifestTimestamps(Arrays.asList(new Date(1609926586816L), + new Date(1609926589353L), + new Date(1609926594896L), + new Date(1609926593508L), + new Date(1609926594160L))) + .lessThanManifestTimestamp(new Date(1609926588601L)) + .greaterThanManifestTimestamp(new Date(1609926592745L)) + .equalToEndpointName("5ad107e7-2a32-4281-b614-713c2a091ba5") + .notEqualToEndpointName("e3983c79-1c71-4222-9264-84153b0d7a95") + .inEndpointNames(Arrays.asList("3a5ecc96-8a0b-41aa-98a1-ae3318b6d215", + "3d3d4ce5-299f-4ceb-a4dd-3c8648fa781a", + "defd94c9-35b8-4eb7-b3c0-14fadccb3379", + "cfb15ddc-8773-4356-9c7c-1732db549a42", + "09efa5a3-fdee-406c-b24b-dd30cc132347", + "79f0bae9-e9a6-47be-9efc-435f3f751812")) + .notInEndpointNames(Arrays.asList("9f011686-42f5-42dc-9e6c-495b83fb5ae9", + "4eaf46d5-9ff3-4233-a495-46e99f254605", + "de58cb97-b32b-46e1-852f-bf2d0a6cf66f", + "950d5dd5-7f59-4755-b6aa-74720f98f577", + "d5f5f436-bd78-4e2b-ac16-5a0eaca07a41", + "015a97c9-0850-4f23-97df-639da36e9bdc", + "1ccdf6e0-2c22-4ed9-973c-3330d0d787db", + "3149164a-5026-47ba-ae4c-8cd9f5c9bf46", + "38134cf6-8354-45a2-96e2-97d6a2f6f7ad")) + .equalToDeployment("4204d20e-f88d-4025-829d-e4639355607f") + .notEqualToDeployment("9e5c3d9b-9c5c-4cd3-916a-972fe67bd483") + .inDeployments(Arrays.asList("4cec675a-2a01-4401-a988-f4114fc360bc", + "fbda179c-d243-4b3a-b94d-8c1966c41cd1", + "9bd0cadc-8ca5-4d85-a8f3-1693f94b3c88", + "99b413d2-bb69-4a02-87fb-518b08c6c716", + "14b69777-a5c4-4f56-81e3-5ddb447e1db2", + "11b2ed40-e7b6-4d02-962f-4aa2831df4ae", + "4b1b8532-6a2f-49a9-b7ae-deb9881229e0", + "559e3841-d7ed-48a9-ba10-1993f01dff1e")) + .notInDeployments(Arrays.asList("d99c1bc4-62b9-4364-9327-ae57f619a41d", + "174f2d89-e179-468f-a55a-cfb79358f93f", + "f77ea519-02d0-4b03-a284-d6d1badea7b7", + "edba717b-5bcf-43b4-b85d-c86bb9081343", + "4ac21d03-83d1-4050-9b90-e0ae53f31d8e", + "57c41c3f-d89e-4438-8a5c-68a0ba896fab", + "375c1e00-bc80-495e-ae70-e0a9bfc2b1a2", + "192b777c-2079-4efc-9dbc-13d7019b4f83", + "91b22d9e-3051-41b6-887a-0347bc249e8f")) + .inConnectorExpirationDates(Arrays.asList(new Date(1609926586006L), + new Date(1609926591219L), + new Date(1609926591352L), + new Date(1609926592266L), + new Date(1609926591471L), + new Date(1609926591837L), + new Date(1609926589579L), + new Date(1609926588292L))) + .notInConnectorExpirationDates(Arrays.asList(new Date(1609926586363L), + new Date(1609926589779L), + new Date(1609926593534L), + new Date(1609926586938L))) + .lessThanConnectorExpirationDate(new Date(1609926591181L)) + .greaterThanConnectorExpirationDate(new Date(1609926591926L)) + .inBootstrappedTimestamps(Arrays.asList(new Date(1609926591044L), + new Date(1609926589681L), + new Date(1609926595132L), + new Date(1609926593678L), + new Date(1609926590031L), + new Date(1609926585989L))) + .notInBootstrappedTimestamps(Arrays.asList(new Date(1609926586353L), + new Date(1609926588135L), + new Date(1609926587655L), + new Date(1609926595253L), + new Date(1609926590457L), + new Date(1609926592841L), + new Date(1609926595146L), + new Date(1609926589571L))) + .lessThanBootstrappedTimestamp(new Date(1609926594214L)) + .greaterThanBootstrappedTimestamp(new Date(1609926585931L)) + .equalToAccountId("870653ee-d479-463d-a694-56f4cb275c6e") + .notEqualToAccountId("ac7aa1fc-50eb-4dbb-8a77-e18aeee11213") + .inAccountIds(Arrays.asList("6fbd615d-f518-4413-9629-86dc98ef9f7f", + "76e7c808-01d0-487d-b03a-205053020d46", + "2c8158d3-3ed6-48e3-be54-71080ca356d8", + "cb25d655-1fb9-4380-9296-3c5ef5d87de5", + "d33a8ff4-dda0-4ed5-afeb-fba2aea37f76")) + .notInAccountIds(Arrays.asList("77ee3484-49ae-4c9d-8971-9bcfc1e33204")) + .equalToState(DeviceState.getDefault()) + .notEqualToState(DeviceState.getDefault()) + .inStates(Arrays.asList(DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault())) + .notInStates(Arrays.asList(DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault(), + DeviceState.getDefault())); assertTrue(option.hasFilters()); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, FilterOperator.EQUAL)); - assertNotNull(option.getAutoUpdateFilters()); - assertEquals(Boolean.FALSE, - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getAutoUpdateFilters()); - assertEquals(Boolean.TRUE, - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, FilterOperator.IN)); - assertNotNull(option.getBootstrapExpirationDateFilters()); - assertEquals(Arrays.asList(new Date(1574704675753L), new Date(1574704677030L), new Date(1574704679040L), - new Date(1574704679753L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, + FilterOperator.IN)); + assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926592834L), new Date(1609926593000L), new Date(1609926591737L), + new Date(1609926589060L), new Date(1609926590547L), new Date(1609926592132L), + new Date(1609926589559L), new Date(1609926590324L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, FilterOperator.NOT_IN)); - assertNotNull(option.getBootstrapExpirationDateFilters()); - assertEquals(Arrays.asList(new Date(1574704673452L), new Date(1574704676250L), new Date(1574704678372L), - new Date(1574704673434L), new Date(1574704681143L), new Date(1574704682294L), - new Date(1574704678870L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926587079L), new Date(1609926590313L), new Date(1609926590779L), + new Date(1609926587767L), new Date(1609926589998L), new Date(1609926589426L), + new Date(1609926593197L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, FilterOperator.LESS_THAN)); - assertNotNull(option.getBootstrapExpirationDateFilters()); - assertEquals(new Date(1574704672983L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); + assertEquals(new Date(1609926586678L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, FilterOperator.GREATER_THAN)); - assertNotNull(option.getBootstrapExpirationDateFilters()); - assertEquals(new Date(1574704672759L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, + assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); + assertEquals(new Date(1609926594438L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); - assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704677389L), new Date(1574704678640L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); - assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674384L), new Date(1574704676714L), new Date(1574704681244L), - new Date(1574704680541L), new Date(1574704676842L), new Date(1574704673987L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, FilterOperator.IN)); + assertNotNull(option.getEnrolmentListTimestampFilters()); + assertEquals(Arrays.asList(new Date(1609926591835L), new Date(1609926593198L), new Date(1609926588343L), + new Date(1609926589923L), new Date(1609926592995L), new Date(1609926585971L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + FilterOperator.NOT_IN)); + assertNotNull(option.getEnrolmentListTimestampFilters()); + assertEquals(Arrays.asList(new Date(1609926594575L), new Date(1609926594395L), new Date(1609926586277L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); - assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704677008L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + FilterOperator.LESS_THAN)); + assertNotNull(option.getEnrolmentListTimestampFilters()); + assertEquals(new Date(1609926595249L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); - assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704682317L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + FilterOperator.GREATER_THAN)); + assertNotNull(option.getEnrolmentListTimestampFilters()); + assertEquals(new Date(1609926590949L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.EQUAL)); - assertNotNull(option.getManifestFilters()); - assertEquals("fbb60dd1-2383-4308-9422-58549aaa52fc", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getManifestFilters()); - assertEquals("a22aa134-7709-44f7-aa3e-c88a2447a3b1", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.IN)); - assertNotNull(option.getManifestFilters()); - assertEquals(Arrays.asList("d26cfb52-0fd0-42b1-8efc-0acf2ac279ea", "0c7a61bc-b1ef-4e9c-bdff-2b4d37fb53fb"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.NOT_IN)); - assertNotNull(option.getManifestFilters()); - assertEquals(Arrays.asList("19efeff0-3f0d-4d03-adac-0dd71bc0a3e3", "159496bd-a350-42c0-8699-a152bf5d8bc7", - "6ed2e9ee-4dac-4097-826f-61f350c816e6", "8ee4ce5e-83f1-4ee0-9303-214857786419", - "e5656fd2-e00d-4607-ad1a-648d9e982895"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.EQUAL)); - assertNotNull(option.getEndpointTypeFilters()); - assertEquals("6e6e631d-09fc-4e90-9431-4237eb4de6ae", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getEndpointTypeFilters()); - assertEquals("389f87aa-d124-4cff-83cf-f99ac2915e95", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.IN)); - assertNotNull(option.getEndpointTypeFilters()); - assertEquals(Arrays.asList("6b496d8f-63f7-4619-8ba1-85feb985b1f5"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.EQUAL)); + assertNotNull(option.getDeployedStateFilters()); + assertEquals(DeviceDeployedState.getDefault(), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, + DeviceDeployedState.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getDeployedStateFilters()); + assertEquals(DeviceDeployedState.getDefault(), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, + DeviceDeployedState.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.IN)); + assertNotNull(option.getDeployedStateFilters()); + assertEquals(Arrays.asList(DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), + DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault()), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.NOT_IN)); - assertNotNull(option.getEndpointTypeFilters()); - assertEquals(Arrays.asList("99280183-766d-4aca-8bc2-ac0b71b25aa1", "ff3dae93-56fd-44ca-8828-e64523847c03", - "bc6d3560-68a0-48d8-b5b4-142b2ad7828e"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.NOT_IN)); + assertNotNull(option.getDeployedStateFilters()); + assertEquals(Arrays.asList(DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault()), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.EQUAL)); + assertNotNull(option.getMechanismFilters()); + assertEquals(DeviceMechanism.getDefault(), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, + DeviceMechanism.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getMechanismFilters()); + assertEquals(DeviceMechanism.getDefault(), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, + DeviceMechanism.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.IN)); + assertNotNull(option.getMechanismFilters()); + assertEquals(Arrays.asList(DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), + DeviceMechanism.getDefault()), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.NOT_IN)); + assertNotNull(option.getMechanismFilters()); + assertEquals(Arrays.asList(DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), + DeviceMechanism.getDefault(), DeviceMechanism.getDefault()), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, FilterOperator.EQUAL)); assertNotNull(option.getDeviceKeyFilters()); - assertEquals("76276129-4d69-4f55-a3a3-a5d5f77642ed", + assertEquals("3342d43c-cda3-485a-bad8-9ac0fa110025", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceKeyFilters()); - assertEquals("aca684c9-d927-4b2f-a757-ea703c0ce96b", + assertEquals("7828eb7c-8a4f-48be-bebe-adb694e36405", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, FilterOperator.IN)); assertNotNull(option.getDeviceKeyFilters()); - assertEquals(Arrays.asList("ce6bc730-a504-4686-b0ff-6a35672f0064", "b84904c2-99df-4fd7-a7e9-aad0961d0191", - "3b437016-0db5-4f0a-9417-404467d79f05", "8743e16e-fdb8-4ab1-b850-2b25274cbfc9", - "35f317a7-d4d2-4210-8df5-c039a819377e", "1ca094ce-fec9-4b2a-834e-86ae23478b0c", - "91369d0f-97db-49d8-8651-ce5e7bdb4414", "bcc8003a-d901-42ec-ba56-8be2b6d0b230", - "ca15ff5c-ec1b-4cd4-956f-5934fd713021"), + assertEquals(Arrays.asList("5db87c3c-2bb9-4d3b-8fc9-adf73ed28c25", "12cd47a8-00d9-41ce-b855-67408d8089df", + "8bcd215b-afd4-4839-b190-dedc28ad739b", "3c94eebb-3ca7-4200-8e34-6b426ee34e2f", + "38944d07-59b2-467c-90dc-a11a1924e244"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, FilterOperator.NOT_IN)); assertNotNull(option.getDeviceKeyFilters()); - assertEquals(Arrays.asList("b6f9e94e-a3a7-4b83-8a7e-791e619280c6", "01d1a71b-4959-4d35-a349-5030a4beea01", - "4d23c485-e7ca-4394-8197-467df286ea5e", "b32d925b-c6d8-45cb-9bbb-63d44751a857", - "66d415b8-4162-4612-a2ec-e8baff658951", "fe38edd0-e83d-45c3-8203-cb010e3bd0f1"), + assertEquals(Arrays.asList("cceac43a-ecb5-4f75-8fb8-688e203e87bc", "72a353ff-acbf-4304-9c7f-c9fa7a1f1d46"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_KEY, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.EQUAL)); - assertNotNull(option.getFirmwareChecksumFilters()); - assertEquals("d0b67adc-0ad8-47de-87cf-ed9160334ea6", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.EQUAL)); + assertNotNull(option.getVendorIdFilters()); + assertEquals("26c7d896-0508-434e-a584-a1ce4dd3bdc4", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getFirmwareChecksumFilters()); - assertEquals("7a0c4fa2-9857-439c-af27-7bf15b497d21", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getVendorIdFilters()); + assertEquals("dd684a83-1be1-406b-b60d-0c27e6252201", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.IN)); - assertNotNull(option.getFirmwareChecksumFilters()); - assertEquals(Arrays.asList("e36ec312-91d2-44cf-ad62-d0577f8855ff", "63459edc-9437-45cb-bbdb-c8bce12d4fce", - "9734f34b-d9cc-4adc-a488-33b03f73cf2b", "2747574a-fb17-48ef-adcd-1e9a092466d2", - "fbc0cffd-eabc-4b7e-951f-5bf1b3b68f7b", "aba797f0-9f1b-45e4-b11c-37ec81d99d3e"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.IN)); + assertNotNull(option.getVendorIdFilters()); + assertEquals(Arrays.asList("126dba94-ef06-4c18-9e91-d471a2f8722a", "0ef72867-09c4-496d-a29a-064c26a00fc2", + "e0ff9c21-7410-4a23-a22e-5d44d476345c", "bb61ad24-d66c-4871-a59c-ef917ee35beb", + "0c25d731-a7d7-4a84-97e3-abc743966975", "e749c2c4-78a5-422f-949a-068f41aecd34", + "3671db05-eeaf-4cbb-8c16-de78b9159dcd", "498e2f54-581f-4316-b493-c5ab93477f8a"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.NOT_IN)); + assertNotNull(option.getVendorIdFilters()); + assertEquals(Arrays.asList("6ba2fa2f-7c06-41b4-b8c0-c5bd3bdd9cae", "ca940b8d-860a-44ae-877f-94bca2d49b53"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + FilterOperator.IN)); + assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926595405L), new Date(1609926588554L), new Date(1609926594679L), + new Date(1609926586421L), new Date(1609926593751L), new Date(1609926586257L), + new Date(1609926586595L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.NOT_IN)); - assertNotNull(option.getFirmwareChecksumFilters()); - assertEquals(Arrays.asList("a6791e1d-feda-4f88-b37f-53a86ff267f9", "f4e1a794-8ae8-4e7a-9cc9-46dfbc5635ee", - "eb4bdbfa-c14e-423d-8254-15ceb99736d6", "8aada5fb-ca19-4983-9ab1-d4b0f82eab2a"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + FilterOperator.NOT_IN)); + assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926593515L), new Date(1609926592450L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.EQUAL)); - assertNotNull(option.getStateFilters()); - assertEquals(DeviceState.getDefault(), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_STATE, - DeviceState.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getStateFilters()); - assertEquals(DeviceState.getDefault(), - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_STATE, - DeviceState.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.IN)); - assertNotNull(option.getStateFilters()); - assertEquals(Arrays.asList(DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault(), - DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault()), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_STATE, List.class, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + FilterOperator.LESS_THAN)); + assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); + assertEquals(new Date(1609926585780L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + FilterOperator.GREATER_THAN)); + assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); + assertEquals(new Date(1609926592360L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, FilterOperator.EQUAL)); + assertNotNull(option.getOperatorSuspendedFilters()); + assertEquals(Boolean.FALSE, + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, + Boolean.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getOperatorSuspendedFilters()); + assertEquals(Boolean.FALSE, + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, + Boolean.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.EQUAL)); + assertNotNull(option.getManifestFilters()); + assertEquals("1c213b0e-e71f-4f9c-a731-af8d3b8283f7", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getManifestFilters()); + assertEquals("fa3a657b-7f42-47be-8271-7925959eab6e", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.IN)); + assertNotNull(option.getManifestFilters()); + assertEquals(Arrays.asList("75ebe283-3afd-40c0-8c80-d9b1fd901399", "7662ccfe-8d47-4493-8396-0f66dc52dc88", + "94072b0b-98d3-4e8a-bca9-f69bfce5813b", "1774e817-9111-4910-9457-370df84e2ff4", + "68b4eb48-e4b4-4871-bdc4-e8e23961667e", "7c4e9038-8765-48a1-b09c-97e6eca36d85", + "b2190593-d34b-42d8-914c-2cb4639e57ca", "893a7ca0-1a35-408d-a3f4-51457a1cc790"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.NOT_IN)); - assertNotNull(option.getStateFilters()); - assertEquals(Arrays.asList(DeviceState.getDefault()), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_STATE, List.class, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, FilterOperator.NOT_IN)); + assertNotNull(option.getManifestFilters()); + assertEquals(Arrays.asList("b71f4ed3-9494-404a-ac94-0cad71506a88", "4dc57ae7-8a7e-415c-8120-e6dcbd772321", + "27939b6c-aae5-461f-acd4-1a1e38d6f7a2", "1c787732-b896-4c36-91d0-472dd7ab5b64"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); + assertNotNull(option.getNameFilters()); + assertEquals("5f98343d-a77e-44b2-8942-5517b2de0ed4", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_NAME, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.EQUAL)); - assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(-15), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, - Integer.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, - FilterOperator.NOT_EQUAL)); - assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(-128), - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, - Integer.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.IN)); - assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Arrays.asList(Integer.valueOf(95), Integer.valueOf(18)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getNameFilters()); + assertEquals("0de0514d-bffb-4183-96be-52480eae6c93", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_NAME, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); + assertNotNull(option.getNameFilters()); + assertEquals(Arrays.asList("391f5e67-7ec7-4a20-bbf1-cc8a47e39d2e", "55aba9ed-de6c-49f7-a02b-c5dec0180f20", + "94853495-768f-483c-a8db-f9db9ec4505d", "8ae57b9b-f4e4-4213-b38d-281fef8c93b0", + "319f44ca-825b-4074-841c-ae9283dfe64f", "23606a7f-6719-4570-b49c-79e5ec4d57c0"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); + assertNotNull(option.getNameFilters()); + assertEquals(Arrays.asList("ca83ab9b-ed7f-4ff1-b0fc-7493521a4184", "f662ba09-53ae-4b9d-8865-e93ab661f673"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); + assertNotNull(option.getDescriptionFilters()); + assertEquals("8c5c1f45-823e-434b-9cec-bfa6cc41f0c5", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getDescriptionFilters()); + assertEquals("1875eb9c-5bad-4bd5-8629-46299e619749", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); + assertNotNull(option.getDescriptionFilters()); + assertEquals(Arrays.asList("27f35c5a-ac92-419e-adfe-f9e34ffd8441", "2ee38690-d29d-408f-8f26-a3cf4f1656b5", + "1ae1f0aa-2d7e-4e79-8e7f-0bc506ed6f2f", "f7dcb47d-6369-4b21-8b6b-21cd92816fe2", + "3a58f0a6-c942-4475-be60-f70cf97678e9"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.NOT_IN)); - assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Arrays.asList(Integer.valueOf(61), Integer.valueOf(82)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); + assertNotNull(option.getDescriptionFilters()); + assertEquals(Arrays.asList("9237ce49-51c6-4895-ba3e-12ee79837b78"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.EQUAL)); - assertNotNull(option.getAccountIdFilters()); - assertEquals("ba8c237a-7e99-41b1-b4f5-7f50ac8142ac", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.EQUAL)); + assertNotNull(option.getCaIdFilters()); + assertEquals("5f89b4b0-404e-437f-ba93-f2ec6d4d3f9c", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, String.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getCaIdFilters()); + assertEquals("0b4e0e3f-3cd2-4137-9fab-673edd8f98f8", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.IN)); + assertNotNull(option.getCaIdFilters()); + assertEquals(Arrays.asList("8bf6b812-5a00-44f0-9ce7-161655e79eb0", "74b3990e-e4dd-488c-a8e1-f974aab3d83a", + "ccdfdd55-50d0-448f-8fa0-df1bb79ade40", "458eb81e-d51a-4fbd-b55b-0769665ce1c7", + "8f342d5f-5362-45a9-908a-61d829cab7ca", "f5e4db80-c2e7-4b45-99cd-244f5b894541", + "85a4ce05-99ae-4846-bfe8-7cc58ef04fdf", "7d64b924-cfc8-431c-a986-2f8cd3677af5"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.NOT_IN)); + assertNotNull(option.getCaIdFilters()); + assertEquals(Arrays.asList("65bfe980-3374-49c4-b6e5-999293fa2554", "ddb26820-dfff-4851-8e4c-c48c5f9f6fe7", + "3df574c4-5d65-4f92-881c-e992b02018b8"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NET_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, FilterOperator.EQUAL)); + assertNotNull(option.getNetIdFilters()); + assertEquals("5c9f9579-a3bb-435a-974a-69fad7b092d8", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getAccountIdFilters()); - assertEquals("a2f44465-1d0f-4d63-a142-45bb91fe45da", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NET_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getNetIdFilters()); + assertEquals("729c3672-bc6a-406e-8db4-6569f6d11baa", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.IN)); - assertNotNull(option.getAccountIdFilters()); - assertEquals(Arrays.asList("13c10c21-8f24-4fe2-b7d6-67225e255513", "eb70501d-d234-410c-832a-49d4589e6556", - "f21dae4c-9299-4530-937b-9a13b89433d6", "f43c4b03-b36d-413d-b683-10f91628a687", - "270115a9-25c7-4917-96e3-0c960736576f", "de32215f-696e-4e06-a77a-8e39ef0ae1a3", - "d975d26e-fb9e-41a2-bbe0-0ae2e8aa9b44"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, List.class, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NET_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, FilterOperator.IN)); + assertNotNull(option.getNetIdFilters()); + assertEquals(Arrays.asList("150d977f-7026-46c9-8709-58595f155d62", "4ffa3dfb-3214-493f-b104-9a458df2dd81"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.NOT_IN)); - assertNotNull(option.getAccountIdFilters()); - assertEquals(Arrays.asList("6bfe7e6d-97ee-491a-bd63-2b6be0fc3dc8", "9d875d27-d9fc-4ca1-8e5d-01c47444b713", - "25bd7dc2-8527-4c1f-b111-385a52d55448", "6e22b1ad-ccd3-4f4b-9c22-3a10e7922bfc", - "73649d14-4f5a-4b2d-8634-1cac1610f791", "39354c16-9088-4a65-9bb9-3c6c1d4fddca", - "3d6b5403-1aef-4a5a-8330-98839f7be3f4", "9cb8a993-e980-4719-b311-7dcf4f05bd42"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.EQUAL)); - assertNotNull(option.getLifecycleStatusFilters()); - assertEquals(DeviceLifecycleStatus.getDefault(), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, - DeviceLifecycleStatus.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getLifecycleStatusFilters()); - assertEquals(DeviceLifecycleStatus.getDefault(), - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, - DeviceLifecycleStatus.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.IN)); - assertNotNull(option.getLifecycleStatusFilters()); - assertEquals(Arrays.asList(DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault()), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.NOT_IN)); - assertNotNull(option.getLifecycleStatusFilters()); - assertEquals(Arrays.asList(DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), - DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault()), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NET_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, FilterOperator.NOT_IN)); + assertNotNull(option.getNetIdFilters()); + assertEquals(Arrays.asList("ddfd9d43-7a1b-4486-a5c5-92c1bb2d6961", "dd8e8a51-167a-4816-a3a6-f93976d07d2e", + "1ac62360-e684-4d3f-8c5b-16b159254d83", "d32a0ef9-e91c-4b11-84ef-6d606de7f657", + "96bccaf7-a734-4e60-920e-cab02ee23475"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); + assertNotNull(option.getUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926587281L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); + assertNotNull(option.getUpdatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926591548L), new Date(1609926595171L), new Date(1609926590773L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); + assertNotNull(option.getUpdatedAtFilters()); + assertEquals(new Date(1609926588753L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); + assertNotNull(option.getUpdatedAtFilters()); + assertEquals(new Date(1609926587318L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, + Date.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, FilterOperator.EQUAL)); assertNotNull(option.getMechanismUrlFilters()); - assertEquals("3bc4789d-9a5e-4770-aaaa-1cb2390426d8", + assertEquals("c67db425-0c0d-40af-b9b3-0570b8e6454e", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, FilterOperator.NOT_EQUAL)); assertNotNull(option.getMechanismUrlFilters()); - assertEquals("478b9d18-7b34-4e2f-9cc2-afdaf838cbff", + assertEquals("3707a3a9-102c-4c76-873a-b54de6f75c1f", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, FilterOperator.IN)); assertNotNull(option.getMechanismUrlFilters()); - assertEquals(Arrays.asList("5eb0ce88-aa9b-4809-aa18-b40b29a4740e", "188a68bd-4cac-4fba-973b-4ccedd749cb7", - "46117cc9-091f-4dde-a635-08d41e58f531", "f1e19046-1d5e-4937-9d92-8ec5d0c6abb8", - "7eaae1dd-115c-4d28-9fa5-4a4943229636", "817f09f7-066a-47ac-9f6f-1d2eb2d8c3a8", - "12d662b0-4e10-4304-baf0-697c8771423d", "e76d7529-3479-445b-b264-21c0fc4db614", - "b375f129-967c-4c5d-b91d-021b62925053"), + assertEquals(Arrays.asList("944a5f3b-e073-450a-9ee2-ee251c68d4aa", "5af072cc-ab01-40f2-a330-c9bc170234fd", + "5e1b1bbb-901a-4cc1-b6c0-c4ddd28d8cd9", "881f78d3-2e19-462e-90dd-abf83c076571", + "93b39a48-52b9-412b-bed7-b1ab58cb015b"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, FilterOperator.NOT_IN)); assertNotNull(option.getMechanismUrlFilters()); - assertEquals(Arrays.asList("b94c3a53-50df-4206-b21c-fc6bd531d480", "4b28bc0a-fe37-4b76-89bf-cf5ef96a40b2", - "a658ae0e-2bd2-40e4-9f77-fa9f2f233785", "d3778ea9-8de5-497d-9e90-6a469719e369"), + assertEquals(Arrays.asList("df9abb11-9314-411f-ad90-1e401bb7fa3b", "94c25a4d-fa65-4228-8f6c-1383b2e85b11", + "835bc7ff-cc33-49ed-b2a1-ee190927dc41", "08638fb5-5a95-45c0-8159-ceddaa35ade0", + "ad55f1c8-3b59-49d4-a477-1a54e5241619", "b26198f5-44f1-4618-a5a5-a332d1c90546", + "6af21300-312f-4d89-8fdc-13483576876d"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM_URL, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.EQUAL)); - assertNotNull(option.getVendorIdFilters()); - assertEquals("9b9a702c-da60-49ca-840f-812bc34d8df9", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, + FilterOperator.EQUAL)); + assertNotNull(option.getLastSystemSuspendedCategoryFilters()); + assertEquals("64f6fd6b-081c-4610-97c7-d0154557e6db", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getVendorIdFilters()); - assertEquals("394f849b-b89b-4ab9-a7cf-bdf13140d0d1", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, + FilterOperator.NOT_EQUAL)); + assertNotNull(option.getLastSystemSuspendedCategoryFilters()); + assertEquals("215d91f5-858e-4f76-9c7c-f90f8a7b1458", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.IN)); - assertNotNull(option.getVendorIdFilters()); - assertEquals(Arrays.asList("875a0675-9ba8-4687-b469-cb8543f2cfb8"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, FilterOperator.NOT_IN)); - assertNotNull(option.getVendorIdFilters()); - assertEquals(Arrays.asList("2afdbf7b-7328-406e-b004-009baaffc9c3", "bede7d47-63e3-4107-a51d-2f0a3968d1fa", - "ed829599-d782-471a-9dd5-86bd3b3ed5c2", "4a2ce6f4-d4d3-430b-8b04-b91377ae74db", - "7b8906f0-dd0d-4ee2-b41e-2d26eeda7aae", "2c388f74-7313-40cd-919f-312f819a9bc7", - "71684076-53af-406d-8440-366a781b9d4a", "2954f596-5958-4836-ac40-93bb7a2b2663"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_VENDOR_ID, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, + FilterOperator.IN)); + assertNotNull(option.getLastSystemSuspendedCategoryFilters()); + assertEquals(Arrays.asList("6500d3e5-365e-444e-a21a-c40b97547a3b"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, + FilterOperator.NOT_IN)); + assertNotNull(option.getLastSystemSuspendedCategoryFilters()); + assertEquals(Arrays.asList("c4286fd5-e69a-4218-a95d-95024560c698", "2cf0b7a3-0a57-4e6c-8963-4ddbe77626a2", + "ec2fdc5e-5205-45e7-97e0-c3ec7451c90b", "28e52ca7-b06d-4b27-b4ee-0651f18fc936", + "88d38457-a645-469b-9a9b-325d139a3140", "5444c6a2-4889-4e60-a7b7-029b208bc40a", + "440ee501-9e92-4f61-bf2c-0f19b68be207"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.EQUAL)); assertNotNull(option.getDeviceClassFilters()); - assertEquals("0f8563c7-8542-4f4b-8fd7-1d9d7108aeb9", + assertEquals("0b703ca1-6cca-4cfe-9e7c-8c0ca229aa0b", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceClassFilters()); - assertEquals("80fcec10-d9ba-4e2c-b807-d6548fd817cd", + assertEquals("e4e44ab4-fd8e-4690-92e9-0d47d5e3dd67", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.IN)); assertNotNull(option.getDeviceClassFilters()); - assertEquals(Arrays.asList("0e24aabb-5571-4062-a33e-c8fdeb14a1f9", "9c2e3dc7-b3c1-4b29-a873-3cc2612870e7", - "f6995f35-c283-4951-9297-a011951870ab", "fcbd3282-152a-4ff7-8bcb-1d07b443e084", - "370348d0-1f28-4eba-a53b-6dc09cc0874b", "be7043d7-02b6-4a22-9ae4-c09d7c5bcd48", - "80311017-e083-4ec3-84e7-0867fefbba4f", "b7851437-4ce7-4dad-a213-4aae1f127e8e"), + assertEquals(Arrays.asList("4d0fc740-6e12-4df8-881f-7032e9df029e", "71a0bcd9-e776-4420-ba63-3026d6d2c850", + "2c3a3fb5-38cf-487b-8c54-bc1eba8eae68", "d21297fc-ffe4-4604-be4e-bf21fed2f2dc", + "e21a62b8-8e15-4407-a7a2-e0007c9aa7ec", "707f1085-027d-4a96-8512-e8f90093ee45", + "0159ea34-3cec-4b8a-9573-b9074f087ec3", "649e8c11-b90b-474e-ac66-73b9fe607ca2"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.NOT_IN)); assertNotNull(option.getDeviceClassFilters()); - assertEquals(Arrays.asList("f121bbad-0ce7-49ba-af18-1d561e91681a", "2fed893e-1c51-4627-ac34-8dd6a5f0990d", - "968ca291-f43d-4920-b7b9-6c8069c65a5c", "5d95d096-6591-4529-8d88-9080023174cf", - "099e3aab-cc16-4f56-8776-40a87528344d", "439cf80a-af49-41a3-a962-126e8782a56d", - "ca36437f-73ad-4d31-a2f1-f8c1130bf704", "c1e031ea-879f-40b2-a167-2f18b70089ef"), + assertEquals(Arrays.asList("0bd3ab28-7976-4c47-a6da-6911f33f0804", "506ccf3e-2176-4dca-95c1-5e2fbc3e309a", + "effc1fc6-ddaf-42c8-a117-38a8774f6c79"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_CLASS, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, FilterOperator.EQUAL)); assertNotNull(option.getHostGatewayFilters()); - assertEquals("37671e76-fff7-44b0-b9a3-7a3a6da2b031", + assertEquals("d769db6d-869c-42c7-89cb-88481a395a94", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, FilterOperator.NOT_EQUAL)); assertNotNull(option.getHostGatewayFilters()); - assertEquals("d4b3c531-b3ad-4cd2-9ceb-8e9dab5cb891", + assertEquals("f27519ba-ed06-4e1e-9677-1c4c050f4a7c", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, FilterOperator.IN)); assertNotNull(option.getHostGatewayFilters()); - assertEquals(Arrays.asList("82b50bac-7df0-41f3-b3c0-5e68ae0d7046", "7f4a0c95-79e1-4b4d-8346-4b7a4f507147"), + assertEquals(Arrays.asList("a7d37f31-c025-4d2b-b313-8f7f80a29ca6", "a3386c20-d4ab-453e-b5ba-c32070e61dd7", + "604dc76b-0049-4d1b-b29c-3e39eaf4486a", "03805da5-6026-4b98-9895-647ca7303f28", + "6d0f2844-7f3d-4ae4-af5f-458cdd544f94"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, FilterOperator.NOT_IN)); assertNotNull(option.getHostGatewayFilters()); - assertEquals(Arrays.asList("484b5f61-aedb-4cfb-8a0f-cdb5ca5e2249", "39a37956-a03f-41c1-ac0f-c8707ef8953f", - "80de85b7-c1c6-4ef6-8213-803b19cf6e99", "9be300a0-d776-4634-abf9-5a451703fd85", - "e980559d-02cb-44d9-9cf8-71eb50b50f18", "48a7266b-5947-44e1-b9b6-8b3cc4ecc83d"), + assertEquals(Arrays.asList("8792c426-0b33-4b39-9f51-ded34613a801", "f960b3ab-ad76-4d52-a07f-42cf7e4739b1", + "617773b2-3332-45cf-9df2-356d544cfc26", "a1370105-6546-43d7-9901-fb780834eded", + "39110400-844d-443b-a027-d484e5003428", "15296d87-8aaa-41d0-b560-ef94323f4d83", + "1ed540dc-d5cb-48d2-8f41-e680c1aa2ab1", "e389b221-1988-4de0-bee1-0cc3f122bda8", + "cc80c744-74e7-4c00-af36-dd6357491c52"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_HOST_GATEWAY, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, FilterOperator.IN)); - assertNotNull(option.getBootstrappedTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704680445L), new Date(1574704678334L), new Date(1574704682295L), - new Date(1574704677867L), new Date(1574704678621L), new Date(1574704679819L), - new Date(1574704679502L), new Date(1574704677703L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, FilterOperator.NOT_IN)); - assertNotNull(option.getBootstrappedTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704681567L), new Date(1574704675711L), new Date(1574704673780L), - new Date(1574704680435L), new Date(1574704672429L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - FilterOperator.LESS_THAN)); - assertNotNull(option.getBootstrappedTimestampFilters()); - assertEquals(new Date(1574704673219L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - FilterOperator.GREATER_THAN)); - assertNotNull(option.getBootstrappedTimestampFilters()); - assertEquals(new Date(1574704680956L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, FilterOperator.EQUAL)); - assertNotNull(option.getSystemSuspendedFilters()); - assertEquals(Boolean.TRUE, - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getSystemSuspendedFilters()); - assertEquals(Boolean.FALSE, - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - FilterOperator.EQUAL)); - assertNotNull(option.getLastSystemSuspendedCategoryFilters()); - assertEquals("fc845f1b-f543-46ff-9ecd-88c066b87040", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - FilterOperator.NOT_EQUAL)); - assertNotNull(option.getLastSystemSuspendedCategoryFilters()); - assertEquals("0f8079f3-0867-4537-b07c-aec2de1d0675", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - FilterOperator.IN)); - assertNotNull(option.getLastSystemSuspendedCategoryFilters()); - assertEquals(Arrays.asList("18cad866-5524-46f1-bdee-15f61269c7bf", "9cc197e5-a662-4d33-b552-c77e0b00529c", - "719c3ec0-4b32-4b02-99ef-7b513cc78ebc", "063582bb-914f-4f31-99a7-ba9ba8ecc890", - "6e140803-bd5d-4640-9c2e-5edced9f5e9a", "6fd718c5-2a9d-4747-bab2-328a9f5a9a02"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - FilterOperator.NOT_IN)); - assertNotNull(option.getLastSystemSuspendedCategoryFilters()); - assertEquals(Arrays.asList("72097f47-f74f-48d1-ab6f-ed8df9c78cb0", "bf10f6cd-389c-4cf9-8f17-cc70a16caf15", - "3b61de04-0b58-45fc-9f29-ae35e04b448e", "addd6d9f-f48f-4360-944a-3ce603eb247a", - "340416c5-e7ac-4137-9ec9-cb636cf489e3"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY, - List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.EQUAL)); assertNotNull(option.getSerialNumberFilters()); - assertEquals("6590c6fd-adff-4d57-b5fb-f3a072646690", + assertEquals("0f88abf1-630e-4a78-a520-31e03365b0f0", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.NOT_EQUAL)); assertNotNull(option.getSerialNumberFilters()); - assertEquals("b4597464-d4dc-48ad-a6cd-709f1892068f", + assertEquals("7e095ccc-6c96-43e6-99b8-77cce0e443d7", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.IN)); - assertNotNull(option.getSerialNumberFilters()); - assertEquals(Arrays.asList("1a5a3c49-9014-4ac2-8dfe-2eadb9ed424e", "4a8f60ba-3e7a-466f-bd56-1ca639bcfd03", - "2830a8d2-35b1-46b7-af5e-3ecf082c375d", "3ea43679-20c1-4a2f-980d-1d90c92d3027", - "1ec3821e-2229-4d19-86fa-d9c3ee99d94f", "e878f145-2586-4b0e-af56-9559aa41f6e3", - "b2fdf174-4a0b-4024-b0f0-79556665fa5e", "020e4bd5-dbd5-4c77-ab55-b1f07daa3316"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.NOT_IN)); - assertNotNull(option.getSerialNumberFilters()); - assertEquals(Arrays.asList("fceb4409-4a40-4ffd-a8ba-98777b05e471", "3f22b1c6-96a8-4086-a07f-b087928ad607", - "51ad2af0-a944-4aa7-80ad-aad276fb4848", "646ae930-f54f-4255-ae71-f7deb19646d7"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); - assertNotNull(option.getIdFilters()); - assertEquals("b7a4c245-7a62-4b28-a947-926b24cc6669", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ID, String.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getIdFilters()); - assertEquals("22f39945-5570-4b21-aad0-9e85cdef6559", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ID, String.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); - assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("9619e100-7f8a-4d0d-baa0-b4fd031bc012", "7fe7917c-1316-497a-a18a-2077263f5e0e"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ID, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); - assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("77b2cc7c-2f07-4a31-87ee-d1aff50de78e", "b6cfbc96-f6f4-49e4-9f4e-1ae966635286", - "440fce81-1029-48d2-b4c7-c8f3e42513ee", "0d2634ec-376f-4223-af88-b1b6a0c12ca9", - "97c3973a-0c1b-4448-a45f-5e4a753d8e9f", "2305c12d-bf52-489a-a305-f2c67d553c6f", - "4ba9273a-66f8-430d-b524-0d73ec411f93", "ba8c7657-0539-4428-be0d-74e210e62dfa"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ID, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, FilterOperator.IN)); - assertNotNull(option.getConnectorExpirationDateFilters()); - assertEquals(Arrays.asList(new Date(1574704677860L), new Date(1574704679577L), new Date(1574704677871L), - new Date(1574704674175L), new Date(1574704675881L), new Date(1574704674119L), - new Date(1574704676036L), new Date(1574704674228L), new Date(1574704676661L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.IN)); + assertNotNull(option.getSerialNumberFilters()); + assertEquals(Arrays.asList("a0fd6a03-f5fe-4232-b7a3-f3596bd2abc3", "fdb5f5d0-b548-4c49-8180-29d418deee1d", + "e8a04bd1-1891-4833-9cd5-e2651c85500c", "cf074ca5-11e7-4073-af01-a1baf602fd46", + "31e4a1b9-e74b-43cf-8e87-36ab54ea2d90", "b5557b5d-580d-4353-8b86-96cbff71847d", + "d166e614-792b-433a-95bf-69f3225c3b9e"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, - FilterOperator.NOT_IN)); - assertNotNull(option.getConnectorExpirationDateFilters()); - assertEquals(Arrays.asList(new Date(1574704681263L), new Date(1574704678044L), new Date(1574704677373L), - new Date(1574704678572L), new Date(1574704672543L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, FilterOperator.NOT_IN)); + assertNotNull(option.getSerialNumberFilters()); + assertEquals(Arrays.asList("0345ea77-a10d-4c81-b3a9-446c59dd327b", "31ff3952-eb28-4f18-a34d-0c82c0619f7b", + "73304672-d563-47be-8c68-fd2805c33dfd", "322cacd0-7dd2-4367-b936-92e24c972aaf", + "17ffe7c4-db3d-452e-af96-e7e0d6bb67f5", "64c3188e-e032-4ee0-b021-598f4086ffbd"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, - FilterOperator.LESS_THAN)); - assertNotNull(option.getConnectorExpirationDateFilters()); - assertEquals(new Date(1574704673400L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, - FilterOperator.GREATER_THAN)); - assertNotNull(option.getConnectorExpirationDateFilters()); - assertEquals(new Date(1574704675873L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, - Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, FilterOperator.EQUAL)); + assertNotNull(option.getSystemSuspendedFilters()); + assertEquals(Boolean.TRUE, + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, + Boolean.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getSystemSuspendedFilters()); + assertEquals(Boolean.TRUE, + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_SYSTEM_SUSPENDED, + Boolean.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.EQUAL)); + assertNotNull(option.getEndpointTypeFilters()); + assertEquals("b3b1d5b0-cc65-44ac-9cc3-204dcb9e791b", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getEndpointTypeFilters()); + assertEquals("c7263ff4-3216-468a-a4d2-0d9bd525785d", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.IN)); + assertNotNull(option.getEndpointTypeFilters()); + assertEquals(Arrays.asList("50bf100d-4478-49dd-b8cf-08d3dd8ccaaa"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, FilterOperator.NOT_IN)); + assertNotNull(option.getEndpointTypeFilters()); + assertEquals(Arrays.asList("9759192b-8fc3-4577-847b-700c58374c86", "ca22a3ee-8352-48f5-abd7-9f442b0c66f2", + "54d4fb4b-b61a-40e7-ab91-359ed39bda9b", "4a61bc1c-bacd-480b-ae2d-0a340ef54d10", + "fe917840-4f3b-47bf-b9ce-b1872087def8"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_TYPE, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, FilterOperator.EQUAL)); + assertNotNull(option.getAutoUpdateFilters()); + assertEquals(Boolean.TRUE, + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, + Boolean.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getAutoUpdateFilters()); + assertEquals(Boolean.TRUE, + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_AUTO_UPDATE, + Boolean.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, FilterOperator.EQUAL)); assertNotNull(option.getLastOperatorSuspendedCategoryFilters()); - assertEquals("9bdfa568-3263-43c4-b3bc-c2c152b7fbda", + assertEquals("45afd4ab-da2d-46ee-8a46-eaac4fe08f21", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, FilterOperator.NOT_EQUAL)); assertNotNull(option.getLastOperatorSuspendedCategoryFilters()); - assertEquals("d3e8bcd5-71a4-4afe-ba8e-1d63fc1c6978", + assertEquals("dd8359b6-5c13-41d8-b166-7d71abe02f92", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, FilterOperator.IN)); assertNotNull(option.getLastOperatorSuspendedCategoryFilters()); - assertEquals(Arrays.asList("f56f4714-47ea-4ec6-8633-ec4a9606a7e4", "cab7d041-f248-4b15-8dfb-eed0bbe3cf74", - "a6f75414-9d13-43f2-a3cb-125045b98987", "94706b6e-14d4-4b06-a58d-77ddc2c00334", - "3304e93d-8804-4b9c-9111-b4a282ff3fc2", "7c5b2364-7f97-45e1-be50-7399adb79e26", - "4499774e-568b-45cd-b74b-c80d90656bf8"), + assertEquals(Arrays.asList("89a5240b-64b9-4f08-b62b-a883824f7de7", "251dd4ec-139b-4db6-904b-36c2b08477b4"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, FilterOperator.NOT_IN)); assertNotNull(option.getLastOperatorSuspendedCategoryFilters()); - assertEquals(Arrays.asList("c549e774-53bf-4e57-ab92-0440cf8c9c33", "8b315cc0-5129-44aa-afe6-eb292b9a3d08", - "2cfbd151-c989-41e9-9295-ea7a8d4e1010", "12ccdff1-c1ad-4465-ab58-ddbf5e2a317a", - "909b3a49-4ba8-47a3-902f-a01ddb792767", "d393d567-6baa-49fc-8ab3-dc461ffec1a0", - "f5541eeb-5997-4831-9374-3613ce0cc0c3", "5f25af6a-8011-4890-94a9-75a5859bd7cb"), + assertEquals(Arrays.asList("3909e828-e026-4814-aad1-a8b54b9f0825", "e8eade06-2842-4b90-afc0-41432727067f"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.EQUAL)); - assertNotNull(option.getCaIdFilters()); - assertEquals("7dc19fdd-bc55-440a-a15f-14a3da198574", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, String.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getCaIdFilters()); - assertEquals("321da1b9-5be9-4568-b3fc-49bb82c1137a", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.IN)); - assertNotNull(option.getCaIdFilters()); - assertEquals(Arrays.asList("606e7c26-b702-442a-893c-c96d54286476", "2482ef4d-21b7-44d1-b1f7-5312b0b0e230", - "7f328aff-2cd1-49ca-9fb1-a7f409feb2af", "5e3ab530-dd7d-4ef4-a5e2-9c8c9f2c0bfd", - "5d5ea3b3-4d73-4aff-ae37-99989ce3464c"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, List.class, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); + assertNotNull(option.getCreatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926589710L), new Date(1609926587802L), new Date(1609926586504L), + new Date(1609926592106L), new Date(1609926586136L), new Date(1609926590648L), + new Date(1609926592552L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CA_ID)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, FilterOperator.NOT_IN)); - assertNotNull(option.getCaIdFilters()); - assertEquals(Arrays.asList("1d8badcc-a4e4-42ba-86cc-e7128126eb0f", "040dc523-fc11-43b4-87cb-9da3e7afe6c2", - "aff56727-d2fb-4c0f-bdc7-63cf826bae99", "951d75ba-4884-4326-b1f2-287f13904751", - "3779e255-df6a-4e97-9856-a088bf21752f", "1ec064b9-1286-4568-960a-3595dae626ae", - "b37d38df-bbc9-4122-9540-d8d518c1645d", "2fd1c220-46c4-4aa5-b347-08d60e0f82ca", - "2d5f392c-bcfd-4de3-9adb-e5360af1d6bc"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CA_ID, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, FilterOperator.EQUAL)); - assertNotNull(option.getOperatorSuspendedFilters()); - assertEquals(Boolean.TRUE, - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getOperatorSuspendedFilters()); - assertEquals(Boolean.TRUE, - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_OPERATOR_SUSPENDED, - Boolean.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, FilterOperator.IN)); - assertNotNull(option.getEnrolmentListTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704674669L), new Date(1574704673385L), new Date(1574704678087L), - new Date(1574704676363L), new Date(1574704676939L), new Date(1574704681495L), - new Date(1574704678641L), new Date(1574704675291L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, - FilterOperator.NOT_IN)); - assertNotNull(option.getEnrolmentListTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704674823L), new Date(1574704681376L), new Date(1574704674918L), - new Date(1574704681759L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); + assertNotNull(option.getCreatedAtFilters()); + assertEquals(Arrays.asList(new Date(1609926595440L), new Date(1609926590344L), new Date(1609926586664L), + new Date(1609926590290L), new Date(1609926586087L), new Date(1609926591221L), + new Date(1609926589277L), new Date(1609926587402L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, - FilterOperator.LESS_THAN)); - assertNotNull(option.getEnrolmentListTimestampFilters()); - assertEquals(new Date(1574704673662L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); + assertNotNull(option.getCreatedAtFilters()); + assertEquals(new Date(1609926587889L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, - FilterOperator.GREATER_THAN)); - assertNotNull(option.getEnrolmentListTimestampFilters()); - assertEquals(new Date(1574704680351L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CREATED_AT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); + assertNotNull(option.getCreatedAtFilters()); + assertEquals(new Date(1609926595150L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); - assertNotNull(option.getDescriptionFilters()); - assertEquals("b8392f95-095f-40e8-9840-1da0fe655e13", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getDescriptionFilters()); - assertEquals("138dac8d-af77-4d7c-994d-3ddbe7c3d3bb", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); - assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("9a3f5542-553e-47a7-ab57-4ad9a8b1d4d2", "a6e57739-80ac-40e7-a54b-facbee32d669", - "8f8bfa68-7e5a-498a-b157-365cebd378ae", "44a87c59-1d25-4cc4-ade2-9834939a6b04"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); + assertNotNull(option.getIdFilters()); + assertEquals("37699955-33d4-4a90-8f4a-8cf935439d85", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ID, String.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getIdFilters()); + assertEquals("4b34990f-14b8-4037-ad49-3c9fd31a73db", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ID, String.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); + assertNotNull(option.getIdFilters()); + assertEquals(Arrays.asList("6064d23b-9ff4-4ab5-b2cf-f0b6be379861", "8942747f-b206-4dfb-b00b-6d90e02d8eb9", + "1dbe619a-1036-4b13-b362-263ad75d952a"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); + assertNotNull(option.getIdFilters()); + assertEquals(Arrays.asList("63b77add-872f-404d-9aac-f6d5a8bffef7", "44720531-082d-4e36-a4a3-c84f7a4bc806", + "3e00bc46-485f-41cf-b316-0dde1fd954e5", "f5c06a22-8bc2-4b47-a9ae-1d81d581e386", + "a50a245a-2f62-4ed2-a5d9-33f17ae98a6d", "0c9414cc-3962-451b-9883-9c8d442bd412", + "a3e21d05-7b6b-4274-83c8-224c8984fbb5", "8f445a67-e8e9-449c-8bd8-b8fb84af3786"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.EQUAL)); + assertNotNull(option.getLifecycleStatusFilters()); + assertEquals(DeviceLifecycleStatus.getDefault(), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, + DeviceLifecycleStatus.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getLifecycleStatusFilters()); + assertEquals(DeviceLifecycleStatus.getDefault(), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, + DeviceLifecycleStatus.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.IN)); + assertNotNull(option.getLifecycleStatusFilters()); + assertEquals(Arrays.asList(DeviceLifecycleStatus.getDefault()), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); - assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("64972493-e9c1-4148-9aa5-bf70eaed2671", "6ba44074-0d13-4983-9c64-6019bc4e47de", - "467bb4b9-a23a-433a-b2d5-6dcaa20db05e", "6e9a43ca-7c24-45a0-bd44-447f5b759c75"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DESCRIPTION, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, FilterOperator.NOT_IN)); + assertNotNull(option.getLifecycleStatusFilters()); + assertEquals(Arrays.asList(DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), + DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), + DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault(), + DeviceLifecycleStatus.getDefault(), DeviceLifecycleStatus.getDefault()), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - FilterOperator.IN)); - assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704680927L), new Date(1574704675806L), new Date(1574704681607L), - new Date(1574704674384L), new Date(1574704679018L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.EQUAL)); + assertNotNull(option.getDeviceExecutionModeFilters()); + assertEquals(Integer.valueOf(-118), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, + Integer.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, + FilterOperator.NOT_EQUAL)); + assertNotNull(option.getDeviceExecutionModeFilters()); + assertEquals(Integer.valueOf(-117), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, + Integer.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.IN)); + assertNotNull(option.getDeviceExecutionModeFilters()); + assertEquals(Arrays.asList(Integer.valueOf(66), Integer.valueOf(-113), Integer.valueOf(-33), + Integer.valueOf(71), Integer.valueOf(-49)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - FilterOperator.NOT_IN)); - assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704675060L), new Date(1574704675668L), new Date(1574704676662L), - new Date(1574704676184L), new Date(1574704679711L), new Date(1574704673951L), - new Date(1574704679691L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - FilterOperator.LESS_THAN)); - assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); - assertEquals(new Date(1574704674826L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - FilterOperator.GREATER_THAN)); - assertNotNull(option.getLastOperatorSuspendedUpdatedAtFilters()); - assertEquals(new Date(1574704674629L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.EQUAL)); - assertNotNull(option.getDeploymentFilters()); - assertEquals("32143d5f-3522-47d6-89c4-6694826689dc", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getDeploymentFilters()); - assertEquals("72257188-3daa-44a9-9172-e3942bf76b2b", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.IN)); - assertNotNull(option.getDeploymentFilters()); - assertEquals(Arrays.asList("b3e9e75e-8e8b-40b5-b400-18a92df1b790"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.NOT_IN)); - assertNotNull(option.getDeploymentFilters()); - assertEquals(Arrays.asList("93b00ad9-0880-4520-8226-ad872ba27357", "011fc808-0551-4af5-836a-db423cfb8fa5", - "5bdc5b5d-703e-43a3-bc8e-b11783f017cb"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.NOT_IN)); + assertNotNull(option.getDeviceExecutionModeFilters()); + assertEquals(Arrays.asList(Integer.valueOf(-41), Integer.valueOf(25), Integer.valueOf(-11), + Integer.valueOf(-125), Integer.valueOf(17), Integer.valueOf(-83), + Integer.valueOf(40)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.EQUAL)); - assertNotNull(option.getMechanismFilters()); - assertEquals(DeviceMechanism.getDefault(), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, - DeviceMechanism.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getMechanismFilters()); - assertEquals(DeviceMechanism.getDefault(), - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, - DeviceMechanism.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.IN)); - assertNotNull(option.getMechanismFilters()); - assertEquals(Arrays.asList(DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), - DeviceMechanism.getDefault(), DeviceMechanism.getDefault()), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MECHANISM)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, FilterOperator.NOT_IN)); - assertNotNull(option.getMechanismFilters()); - assertEquals(Arrays.asList(DeviceMechanism.getDefault(), DeviceMechanism.getDefault(), - DeviceMechanism.getDefault()), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MECHANISM, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.EQUAL)); + assertNotNull(option.getFirmwareChecksumFilters()); + assertEquals("9f749e91-1393-4c50-a715-52e04bd9676d", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getFirmwareChecksumFilters()); + assertEquals("0d8f408d-6843-4453-82bb-a61e75f545ed", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.IN)); + assertNotNull(option.getFirmwareChecksumFilters()); + assertEquals(Arrays.asList("03624a88-9ae4-4aed-b399-7a4e62485754", "072695cc-2cee-49e8-9589-b82acf3760cb", + "a2bd8749-f897-40ba-9266-2ac1ab8cfc90", "0a09cd10-b9e2-411c-8f0a-0b32e819761d", + "7e296b04-692f-4509-aab2-91bf7fe352bc", "53da05e7-1d75-4e57-b647-50ad18f328a6"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, FilterOperator.NOT_IN)); + assertNotNull(option.getFirmwareChecksumFilters()); + assertEquals(Arrays.asList("83b259d7-7f91-47af-a5f3-ff8597d9562c", "0bd3504c-687e-4b2c-8d34-341822ab316e", + "dc6778ac-19b7-4080-88cf-2ae355db83a3", "5123643f-75cf-4da9-93a9-285ce3ff8dcc", + "b9207093-2f6d-4564-bbdb-5d737a3d09ea", "ebfe32fe-4d06-413a-80f1-6d223a957ff6"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_FIRMWARE_CHECKSUM, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, - FilterOperator.IN)); - assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704679440L), new Date(1574704679555L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, FilterOperator.IN)); + assertNotNull(option.getBootstrapExpirationDateFilters()); + assertEquals(Arrays.asList(new Date(1609926594375L), new Date(1609926593394L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, FilterOperator.NOT_IN)); - assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674585L), new Date(1574704677017L), new Date(1574704673406L), - new Date(1574704674501L), new Date(1574704680246L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertNotNull(option.getBootstrapExpirationDateFilters()); + assertEquals(Arrays.asList(new Date(1609926586539L), new Date(1609926590472L), new Date(1609926589975L), + new Date(1609926592378L), new Date(1609926591541L), new Date(1609926588219L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, FilterOperator.LESS_THAN)); - assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); - assertEquals(new Date(1574704679840L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertNotNull(option.getBootstrapExpirationDateFilters()); + assertEquals(new Date(1609926589480L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, FilterOperator.GREATER_THAN)); - assertNotNull(option.getLastSystemSuspendedUpdatedAtFilters()); - assertEquals(new Date(1574704675318L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.EQUAL)); - assertNotNull(option.getDeployedStateFilters()); - assertEquals(DeviceDeployedState.getDefault(), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, - DeviceDeployedState.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getDeployedStateFilters()); - assertEquals(DeviceDeployedState.getDefault(), - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, - DeviceDeployedState.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.IN)); - assertNotNull(option.getDeployedStateFilters()); - assertEquals(Arrays.asList(DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault()), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, FilterOperator.NOT_IN)); - assertNotNull(option.getDeployedStateFilters()); - assertEquals(Arrays.asList(DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault(), - DeviceDeployedState.getDefault(), DeviceDeployedState.getDefault()), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYED_STATE, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); - assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704678214L), new Date(1574704676312L), new Date(1574704674928L), - new Date(1574704682207L), new Date(1574704674183L), new Date(1574704677641L), - new Date(1574704673768L), new Date(1574704676454L), new Date(1574704675722L)), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); - assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674673L), new Date(1574704679363L)), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, - List.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); - assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704679154L), - ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, - Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); - assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704675738L), - ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_UPDATED_AT, + assertNotNull(option.getBootstrapExpirationDateFilters()); + assertEquals(new Date(1609926594568L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE, Date.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); - assertNotNull(option.getNameFilters()); - assertEquals("def18e9b-6fed-4457-9cc0-8b136ac47abb", - ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_NAME, String.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); - assertNotNull(option.getNameFilters()); - assertEquals("b4659109-336d-4d1f-b77c-529b862e355b", - ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_NAME, - String.class, option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); - assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("c08d961a-276d-4a4c-8c2a-e0a3e1a94323", "807184da-2af2-4e7b-943c-de9657a50325", - "d50b347f-0694-48e6-a888-12f12441631c"), - ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, List.class, - option)); - assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_NAME)); - assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); - assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("bcb13725-5ac8-4953-9724-8a726535f027", "62fcb596-30f3-4bb8-8353-d013a130564f", - "b9517eb1-1f58-4429-a309-526e3577fa30", "1dac1b16-0d49-4cb7-a338-108affec1d01", - "d0e8b0f6-16f9-4b5a-a971-f321ba8d9afd", "5cef0739-09f8-44e6-ab3c-3f5067df7aa7", - "100d02be-18fe-46a5-b722-d7df7dd04113", "b7fccbfe-47bc-4624-83d9-4f2420b64d91"), - ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, List.class, - option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, FilterOperator.IN)); assertNotNull(option.getManifestTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704673220L), new Date(1574704675022L)), + assertEquals(Arrays.asList(new Date(1609926593467L), new Date(1609926593712L), new Date(1609926587655L), + new Date(1609926595364L), new Date(1609926595169L), new Date(1609926587919L), + new Date(1609926595482L), new Date(1609926595364L), new Date(1609926591028L)), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, FilterOperator.NOT_IN)); assertNotNull(option.getManifestTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704680942L), new Date(1574704673912L), new Date(1574704679986L), - new Date(1574704675508L), new Date(1574704681753L), new Date(1574704673728L), - new Date(1574704680926L), new Date(1574704676098L)), + assertEquals(Arrays.asList(new Date(1609926586816L), new Date(1609926589353L), new Date(1609926594896L), + new Date(1609926593508L), new Date(1609926594160L)), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, FilterOperator.LESS_THAN)); assertNotNull(option.getManifestTimestampFilters()); - assertEquals(new Date(1574704673551L), + assertEquals(new Date(1609926588601L), ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, Date.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, FilterOperator.GREATER_THAN)); assertNotNull(option.getManifestTimestampFilters()); - assertEquals(new Date(1574704673424L), + assertEquals(new Date(1609926592745L), ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_MANIFEST_TIMESTAMP, Date.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, FilterOperator.EQUAL)); assertNotNull(option.getEndpointNameFilters()); - assertEquals("b7c5658d-b3d9-4ee4-8a12-c2ce88aa3cc9", + assertEquals("5ad107e7-2a32-4281-b614-713c2a091ba5", ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, FilterOperator.NOT_EQUAL)); assertNotNull(option.getEndpointNameFilters()); - assertEquals("e7be704c-dcfd-4ae7-a417-568e7679dfd4", + assertEquals("e3983c79-1c71-4222-9264-84153b0d7a95", ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, String.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, FilterOperator.IN)); assertNotNull(option.getEndpointNameFilters()); - assertEquals(Arrays.asList("0a8c8dcc-c2e6-4eaa-bc36-10a839fb90cf", "e583d807-2a90-435f-86db-ec078a11bef8", - "cf2feeea-5b58-412a-94e9-5776ba3b037b", "980d8246-77d6-45c4-91ab-4ad8992eaab2", - "86929bad-5786-4e4a-98cc-341ed9070af5"), + assertEquals(Arrays.asList("3a5ecc96-8a0b-41aa-98a1-ae3318b6d215", "3d3d4ce5-299f-4ceb-a4dd-3c8648fa781a", + "defd94c9-35b8-4eb7-b3c0-14fadccb3379", "cfb15ddc-8773-4356-9c7c-1732db549a42", + "09efa5a3-fdee-406c-b24b-dd30cc132347", "79f0bae9-e9a6-47be-9efc-435f3f751812"), ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, List.class, option)); assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME)); assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, FilterOperator.NOT_IN)); assertNotNull(option.getEndpointNameFilters()); - assertEquals(Arrays.asList("849c5821-6413-4abf-af15-440ab4ebf7a0", "c8a3dc6c-9c70-4e88-9e4c-8350b2eea0ac", - "0e8d018d-0b26-4927-bae2-1b37fe28ab69", "b422597f-8fb5-4017-aacd-759e1dd51304"), + assertEquals(Arrays.asList("9f011686-42f5-42dc-9e6c-495b83fb5ae9", "4eaf46d5-9ff3-4233-a495-46e99f254605", + "de58cb97-b32b-46e1-852f-bf2d0a6cf66f", "950d5dd5-7f59-4755-b6aa-74720f98f577", + "d5f5f436-bd78-4e2b-ac16-5a0eaca07a41", "015a97c9-0850-4f23-97df-639da36e9bdc", + "1ccdf6e0-2c22-4ed9-973c-3330d0d787db", "3149164a-5026-47ba-ae4c-8cd9f5c9bf46", + "38134cf6-8354-45a2-96e2-97d6a2f6f7ad"), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ENDPOINT_NAME, List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.EQUAL)); + assertNotNull(option.getDeploymentFilters()); + assertEquals("4204d20e-f88d-4025-829d-e4639355607f", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getDeploymentFilters()); + assertEquals("9e5c3d9b-9c5c-4cd3-916a-972fe67bd483", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.IN)); + assertNotNull(option.getDeploymentFilters()); + assertEquals(Arrays.asList("4cec675a-2a01-4401-a988-f4114fc360bc", "fbda179c-d243-4b3a-b94d-8c1966c41cd1", + "9bd0cadc-8ca5-4d85-a8f3-1693f94b3c88", "99b413d2-bb69-4a02-87fb-518b08c6c716", + "14b69777-a5c4-4f56-81e3-5ddb447e1db2", "11b2ed40-e7b6-4d02-962f-4aa2831df4ae", + "4b1b8532-6a2f-49a9-b7ae-deb9881229e0", "559e3841-d7ed-48a9-ba10-1993f01dff1e"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, FilterOperator.NOT_IN)); + assertNotNull(option.getDeploymentFilters()); + assertEquals(Arrays.asList("d99c1bc4-62b9-4364-9327-ae57f619a41d", "174f2d89-e179-468f-a55a-cfb79358f93f", + "f77ea519-02d0-4b03-a284-d6d1badea7b7", "edba717b-5bcf-43b4-b85d-c86bb9081343", + "4ac21d03-83d1-4050-9b90-e0ae53f31d8e", "57c41c3f-d89e-4438-8a5c-68a0ba896fab", + "375c1e00-bc80-495e-ae70-e0a9bfc2b1a2", "192b777c-2079-4efc-9dbc-13d7019b4f83", + "91b22d9e-3051-41b6-887a-0347bc249e8f"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_DEPLOYMENT, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, FilterOperator.IN)); + assertNotNull(option.getConnectorExpirationDateFilters()); + assertEquals(Arrays.asList(new Date(1609926586006L), new Date(1609926591219L), new Date(1609926591352L), + new Date(1609926592266L), new Date(1609926591471L), new Date(1609926591837L), + new Date(1609926589579L), new Date(1609926588292L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + FilterOperator.NOT_IN)); + assertNotNull(option.getConnectorExpirationDateFilters()); + assertEquals(Arrays.asList(new Date(1609926586363L), new Date(1609926589779L), new Date(1609926593534L), + new Date(1609926586938L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + FilterOperator.LESS_THAN)); + assertNotNull(option.getConnectorExpirationDateFilters()); + assertEquals(new Date(1609926591181L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + FilterOperator.GREATER_THAN)); + assertNotNull(option.getConnectorExpirationDateFilters()); + assertEquals(new Date(1609926591926L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, FilterOperator.IN)); + assertNotNull(option.getBootstrappedTimestampFilters()); + assertEquals(Arrays.asList(new Date(1609926591044L), new Date(1609926589681L), new Date(1609926595132L), + new Date(1609926593678L), new Date(1609926590031L), new Date(1609926585989L)), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, FilterOperator.NOT_IN)); + assertNotNull(option.getBootstrappedTimestampFilters()); + assertEquals(Arrays.asList(new Date(1609926586353L), new Date(1609926588135L), new Date(1609926587655L), + new Date(1609926595253L), new Date(1609926590457L), new Date(1609926592841L), + new Date(1609926595146L), new Date(1609926589571L)), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + FilterOperator.LESS_THAN)); + assertNotNull(option.getBootstrappedTimestampFilters()); + assertEquals(new Date(1609926594214L), + ListOptionsEncoder.encodeSingleLessThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + FilterOperator.GREATER_THAN)); + assertNotNull(option.getBootstrappedTimestampFilters()); + assertEquals(new Date(1609926585931L), + ListOptionsEncoder.encodeSingleGreaterThanFilter(DeviceListOptions.TAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP, + Date.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.EQUAL)); + assertNotNull(option.getAccountIdFilters()); + assertEquals("870653ee-d479-463d-a694-56f4cb275c6e", + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getAccountIdFilters()); + assertEquals("ac7aa1fc-50eb-4dbb-8a77-e18aeee11213", + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, + String.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.IN)); + assertNotNull(option.getAccountIdFilters()); + assertEquals(Arrays.asList("6fbd615d-f518-4413-9629-86dc98ef9f7f", "76e7c808-01d0-487d-b03a-205053020d46", + "2c8158d3-3ed6-48e3-be54-71080ca356d8", "cb25d655-1fb9-4380-9296-3c5ef5d87de5", + "d33a8ff4-dda0-4ed5-afeb-fba2aea37f76"), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, FilterOperator.NOT_IN)); + assertNotNull(option.getAccountIdFilters()); + assertEquals(Arrays.asList("77ee3484-49ae-4c9d-8971-9bcfc1e33204"), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_ACCOUNT_ID, + List.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.EQUAL)); + assertNotNull(option.getStateFilters()); + assertEquals(DeviceState.getDefault(), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_STATE, + DeviceState.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.NOT_EQUAL)); + assertNotNull(option.getStateFilters()); + assertEquals(DeviceState.getDefault(), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_STATE, + DeviceState.class, option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.IN)); + assertNotNull(option.getStateFilters()); + assertEquals(Arrays.asList(DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault(), + DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault(), + DeviceState.getDefault(), DeviceState.getDefault()), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_STATE, List.class, + option)); + assertTrue(option.hasFilters(DeviceListOptions.TAG_FILTER_BY_STATE)); + assertTrue(option.hasFilter(DeviceListOptions.TAG_FILTER_BY_STATE, FilterOperator.NOT_IN)); + assertNotNull(option.getStateFilters()); + assertEquals(Arrays.asList(DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault(), + DeviceState.getDefault(), DeviceState.getDefault(), DeviceState.getDefault()), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_STATE, List.class, + option)); } catch (Exception exception) { fail(exception.getMessage()); } @@ -1407,13 +1431,13 @@ public void testFilters() { @Test public void testHashCode() { try { - DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(84), Long.valueOf(21), + DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(-61), Long.valueOf(-9), Order.getDefault(), - "1186c83b-3cee-404c-bef3-091e3c0e6084", null, + "0912e1e0-d5a1-4273-88dd-5b55e32962fa", null, null); - DeviceListOptions devicelistoptions2 = new DeviceListOptions(Integer.valueOf(84), Long.valueOf(21), + DeviceListOptions devicelistoptions2 = new DeviceListOptions(Integer.valueOf(-61), Long.valueOf(-9), Order.getDefault(), - "1186c83b-3cee-404c-bef3-091e3c0e6084", null, + "0912e1e0-d5a1-4273-88dd-5b55e32962fa", null, null); assertNotNull(devicelistoptions1); assertNotNull(devicelistoptions2); @@ -1436,17 +1460,17 @@ public void testHashCode() { @Test public void testEquals() { try { - DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(-27), Long.valueOf(20), + DeviceListOptions devicelistoptions1 = new DeviceListOptions(Integer.valueOf(-106), Long.valueOf(10), Order.getDefault(), - "706ec840-79d9-4fe4-9b4d-4b133b4212c4", null, + "70e66573-8072-45aa-b68f-84af0c2b3124", null, null); - DeviceListOptions devicelistoptions2 = new DeviceListOptions(Integer.valueOf(-27), Long.valueOf(20), + DeviceListOptions devicelistoptions2 = new DeviceListOptions(Integer.valueOf(-106), Long.valueOf(10), Order.getDefault(), - "706ec840-79d9-4fe4-9b4d-4b133b4212c4", null, + "70e66573-8072-45aa-b68f-84af0c2b3124", null, null); - DeviceListOptions devicelistoptions3 = new DeviceListOptions(Integer.valueOf(-50), Long.valueOf(125), + DeviceListOptions devicelistoptions3 = new DeviceListOptions(Integer.valueOf(48), Long.valueOf(-9), Order.getDefault(), - "384baa67-2eb6-426e-b503-d7986756f1b7", null, + "27e4c545-4524-4cba-b21f-c752c5122bd1", null, null); assertNotNull(devicelistoptions1); assertNotNull(devicelistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadataListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadataListOptions.java index 1b66dbe3b..f7c6446f2 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadataListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadataListOptions.java @@ -19,10 +19,10 @@ public class TestCampaignDeviceMetadataListOptions { @Test public void testClone() { try { - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(6), - Long.valueOf(-75), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(117), + Long.valueOf(-50), Order.getDefault(), - "368dc750-be6f-4fb3-8071-0514c104212f", + "537773ef-73f0-465a-ab64-f244f81a2e0c", null, null); CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions2 = campaigndevicemetadatalistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-123), - Long.valueOf(80), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(102), + Long.valueOf(24), Order.getDefault(), - "25b31173-1954-4f3a-a534-23d22d210563", + "287358f5-2f12-4825-a587-21c499cf2fef", null, null); - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions2 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-123), - Long.valueOf(80), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions2 = new CampaignDeviceMetadataListOptions(Integer.valueOf(102), + Long.valueOf(24), Order.getDefault(), - "25b31173-1954-4f3a-a534-23d22d210563", + "287358f5-2f12-4825-a587-21c499cf2fef", null, null); assertNotNull(campaigndevicemetadatalistoptions1); @@ -75,22 +75,22 @@ public void testHashCode() { @Test public void testEquals() { try { - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-17), - Long.valueOf(-43), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions1 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-100), + Long.valueOf(63), Order.getDefault(), - "a13c3a90-59f7-48e1-bfde-2ec9badf975a", + "33846a30-b924-4a7a-a146-2bf84a95641d", null, null); - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions2 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-17), - Long.valueOf(-43), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions2 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-100), + Long.valueOf(63), Order.getDefault(), - "a13c3a90-59f7-48e1-bfde-2ec9badf975a", + "33846a30-b924-4a7a-a146-2bf84a95641d", null, null); - CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions3 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-101), - Long.valueOf(-17), + CampaignDeviceMetadataListOptions campaigndevicemetadatalistoptions3 = new CampaignDeviceMetadataListOptions(Integer.valueOf(-126), + Long.valueOf(22), Order.getDefault(), - "17476050-3903-437d-b380-781b56abef5a", + "7e834da8-9af9-483a-8956-7d5d2e251982", null, null); assertNotNull(campaigndevicemetadatalistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsEventsListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsEventsListOptions.java index 9df8481b1..93899b967 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsEventsListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsEventsListOptions.java @@ -19,10 +19,10 @@ public class TestCampaignStatisticsEventsListOptions { @Test public void testClone() { try { - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-53), - Long.valueOf(97), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(121), + Long.valueOf(-66), Order.getDefault(), - "f8fa8bcc-2d09-4124-ae73-377122cd2fd1", + "2552e941-cb5d-4a64-bd34-0c80efa442b7", null, null); CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions2 = campaignstatisticseventslistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(61), - Long.valueOf(79), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-120), + Long.valueOf(91), Order.getDefault(), - "507e63f2-15b2-43cf-ace6-e0fc282f7bb4", + "796e1b96-d2c7-425b-a027-1992f9df0bec", null, null); - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions2 = new CampaignStatisticsEventsListOptions(Integer.valueOf(61), - Long.valueOf(79), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions2 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-120), + Long.valueOf(91), Order.getDefault(), - "507e63f2-15b2-43cf-ace6-e0fc282f7bb4", + "796e1b96-d2c7-425b-a027-1992f9df0bec", null, null); assertNotNull(campaignstatisticseventslistoptions1); @@ -76,22 +76,22 @@ public void testHashCode() { @Test public void testEquals() { try { - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-16), - Long.valueOf(48), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions1 = new CampaignStatisticsEventsListOptions(Integer.valueOf(16), + Long.valueOf(52), Order.getDefault(), - "06333ed0-196d-4767-a246-2744298821b6", + "a90fd4ce-f7a9-4efb-bdf4-6419a4256272", null, null); - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions2 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-16), - Long.valueOf(48), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions2 = new CampaignStatisticsEventsListOptions(Integer.valueOf(16), + Long.valueOf(52), Order.getDefault(), - "06333ed0-196d-4767-a246-2744298821b6", + "a90fd4ce-f7a9-4efb-bdf4-6419a4256272", null, null); - CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions3 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-109), - Long.valueOf(16), + CampaignStatisticsEventsListOptions campaignstatisticseventslistoptions3 = new CampaignStatisticsEventsListOptions(Integer.valueOf(-113), + Long.valueOf(-5), Order.getDefault(), - "143cc48e-1b3d-4580-a53e-62d0203dc8b4", + "93ddf0f6-a266-43c2-b50f-02d0428e607e", null, null); assertNotNull(campaignstatisticseventslistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsListOptions.java index 8d6ace54a..2422ccb7e 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignStatisticsListOptions.java @@ -19,10 +19,10 @@ public class TestCampaignStatisticsListOptions { @Test public void testClone() { try { - CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(122), - Long.valueOf(-105), + CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(-93), + Long.valueOf(18), Order.getDefault(), - "730ed9c6-df36-4ddb-8fdd-375d63faaf3c", + "1a0a788f-6f7a-4518-a582-96e03d9cbd04", null, null); CampaignStatisticsListOptions campaignstatisticslistoptions2 = campaignstatisticslistoptions1.clone(); @@ -42,16 +42,16 @@ public void testClone() { @Test public void testHashCode() { try { - CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(-96), - Long.valueOf(-7), + CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(-82), + Long.valueOf(-96), Order.getDefault(), - "0a022aa8-ba0e-410c-8627-e24fdfb11785", + "56cd9b72-f8a3-4f6a-a022-69984cf4948f", null, null); - CampaignStatisticsListOptions campaignstatisticslistoptions2 = new CampaignStatisticsListOptions(Integer.valueOf(-96), - Long.valueOf(-7), + CampaignStatisticsListOptions campaignstatisticslistoptions2 = new CampaignStatisticsListOptions(Integer.valueOf(-82), + Long.valueOf(-96), Order.getDefault(), - "0a022aa8-ba0e-410c-8627-e24fdfb11785", + "56cd9b72-f8a3-4f6a-a022-69984cf4948f", null, null); assertNotNull(campaignstatisticslistoptions1); @@ -75,22 +75,22 @@ public void testHashCode() { @Test public void testEquals() { try { - CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(4), - Long.valueOf(-58), + CampaignStatisticsListOptions campaignstatisticslistoptions1 = new CampaignStatisticsListOptions(Integer.valueOf(23), + Long.valueOf(-99), Order.getDefault(), - "239ee3c7-1bd3-43a7-bfaa-0ce129625710", + "e3e4b114-37b5-448d-8b9b-f5c106004575", null, null); - CampaignStatisticsListOptions campaignstatisticslistoptions2 = new CampaignStatisticsListOptions(Integer.valueOf(4), - Long.valueOf(-58), + CampaignStatisticsListOptions campaignstatisticslistoptions2 = new CampaignStatisticsListOptions(Integer.valueOf(23), + Long.valueOf(-99), Order.getDefault(), - "239ee3c7-1bd3-43a7-bfaa-0ce129625710", + "e3e4b114-37b5-448d-8b9b-f5c106004575", null, null); - CampaignStatisticsListOptions campaignstatisticslistoptions3 = new CampaignStatisticsListOptions(Integer.valueOf(112), - Long.valueOf(-93), + CampaignStatisticsListOptions campaignstatisticslistoptions3 = new CampaignStatisticsListOptions(Integer.valueOf(86), + Long.valueOf(-37), Order.getDefault(), - "8a9c0ef9-3a5a-4828-8a8b-d0f78fa28115", + "beaecc12-610e-4a62-bfe2-2378c016ad5e", null, null); assertNotNull(campaignstatisticslistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareImageListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareImageListOptions.java index 913299f6d..0736f56cf 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareImageListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareImageListOptions.java @@ -24,10 +24,10 @@ public class TestFirmwareImageListOptions { @Test public void testClone() { try { - FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(62), - Long.valueOf(-108), + FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(-119), + Long.valueOf(122), Order.getDefault(), - "fe5ae079-64ba-4cd4-a2a3-25dae54320b4", + "2bb22383-c427-4eff-b0e7-d694b58417c5", null, null); FirmwareImageListOptions firmwareimagelistoptions2 = firmwareimagelistoptions1.clone(); assertNotNull(firmwareimagelistoptions1); @@ -46,319 +46,344 @@ public void testClone() { @Test public void testFilters() { try { - FirmwareImageListOptions option = new FirmwareImageListOptions().inUpdatedAts(Arrays.asList(new Date(1574704672830L), - new Date(1574704682097L), - new Date(1574704676846L), - new Date(1574704673545L), - new Date(1574704680179L))) - .notInUpdatedAts(Arrays.asList(new Date(1574704672845L), - new Date(1574704675661L), - new Date(1574704675837L), - new Date(1574704677686L), - new Date(1574704679930L))) - .lessThanUpdatedAt(new Date(1574704676776L)) - .greaterThanUpdatedAt(new Date(1574704678621L)) - .equalToName("c9e94129-0218-4392-ad0e-b2e8d1b575d8") - .notEqualToName("a588905d-2e8a-427a-8049-7374720b76bb") - .inNames(Arrays.asList("ae3d4e45-a7ea-47a1-8e57-51e7923f863c", - "fd50278e-b967-4532-90ca-6f441eedb9fc", - "8e42ff9a-3b75-4881-a948-12681e797f1c", - "6af8420d-f93d-4105-bb2b-53b218e133ac", - "7179c6f4-1440-4862-86b5-7fad1731e03d", - "9b464239-73b9-465d-9443-504df2ca2b1b", - "528a22ff-160a-4826-ad29-5a4f9b66ba26", - "cf546bcf-69fd-4928-abd3-5ccebd7d5003")) - .notInNames(Arrays.asList("cf2fc2df-8d1d-42ce-806f-27bf4147a9af")) - .equalToDescription("24888adf-fea3-47ab-8ffd-1cbbf7fe4b07") - .notEqualToDescription("7853058e-1710-4c59-a4d1-b8d586997579") - .inDescriptions(Arrays.asList("ddcdc890-8e7f-4bd7-89e9-3109964601fc", - "a89ae587-590a-4807-bfd1-3826cadca16a", - "ebc95254-b04d-494d-afa1-eb3946816a8a", - "f5388090-0c61-477b-91be-8fdda8542010", - "7a5d2181-a2f9-45b8-b42d-fd2bc818f960", - "76be2615-b5be-49cd-8779-d704ebbc7b63", - "8de900a7-4859-4761-abb5-3aa6c1e4a81c", - "76eb4abc-f444-49b1-a2ca-07242b43aa61")) - .notInDescriptions(Arrays.asList("8a5a7ad1-60ea-4806-ba96-eaff8bc6f8eb", - "c0060c1f-f8cc-4b57-bb08-9addab06dcb9", - "893975a8-7b08-4db7-9c6c-6818234cd41c", - "5deb8162-91b5-43c5-a4bc-03af4acb3f8a", - "1357ab83-d42f-4cbe-9847-6d086679fc9c", - "98832099-2677-4ac4-b1c8-611082813199", - "b027e436-a9dc-49fa-80da-b392aed6d631", - "6b1fdc2e-bcd3-4b66-9692-8ed72b97adc4")) - .inCreatedAts(Arrays.asList(new Date(1574704673665L), - new Date(1574704679915L), - new Date(1574704674467L))) - .notInCreatedAts(Arrays.asList(new Date(1574704674282L), - new Date(1574704676204L), - new Date(1574704678261L), - new Date(1574704675932L), - new Date(1574704682384L))) - .lessThanCreatedAt(new Date(1574704679711L)) - .greaterThanCreatedAt(new Date(1574704673872L)) - .equalToDatafileUrl("e76e7e13-02b4-4933-9595-ed7ed7434333") - .notEqualToDatafileUrl("45b26a49-a738-4e66-8c62-eb4696a7a743") - .inDatafileUrls(Arrays.asList("535ef435-03cd-4196-9ef4-32919a7d8049", - "f9b77d22-1650-461a-819a-fd265dcd9978", - "020be213-d665-43d9-ad32-332f71e57366", - "71d37f65-5402-4c6f-86f9-bb5b2a6269bf", - "c46161f7-5f36-476d-8138-cc38e4e1ef8b", - "9de38f1c-052f-453d-b0d7-7052ef333838", - "f9cfb153-d633-4767-bc60-f7f9f2f8b34d", - "77f26f42-c719-438a-b12e-a7d7e58744e7", - "abc29f2c-4690-4783-8ded-5f866d5d3edd")) - .notInDatafileUrls(Arrays.asList("9e8f996f-811d-4f3a-8314-76d7dc51a59d", - "38ebc29c-bc71-4876-b552-f14c21a074cc")) - .equalToDatafileSize(Long.valueOf(-121)) - .notEqualToDatafileSize(Long.valueOf(-46)) - .inDatafileSizes(Arrays.asList(Long.valueOf(32), - Long.valueOf(-2), - Long.valueOf(65), - Long.valueOf(93), - Long.valueOf(59), - Long.valueOf(54))) - .notInDatafileSizes(Arrays.asList(Long.valueOf(-122), + FirmwareImageListOptions option = new FirmwareImageListOptions().inUpdatedAts(Arrays.asList(new Date(1609926594656L), + new Date(1609926589699L), + new Date(1609926589180L), + new Date(1609926592686L), + new Date(1609926586366L), + new Date(1609926590685L))) + .notInUpdatedAts(Arrays.asList(new Date(1609926586778L), + new Date(1609926591637L), + new Date(1609926591346L), + new Date(1609926590600L), + new Date(1609926590782L), + new Date(1609926592632L), + new Date(1609926590282L), + new Date(1609926594852L), + new Date(1609926593353L))) + .lessThanUpdatedAt(new Date(1609926592466L)) + .greaterThanUpdatedAt(new Date(1609926590036L)) + .equalToName("d0782c52-bbba-45f6-8278-a85c27152a79") + .notEqualToName("f8be587d-92a8-4935-8556-d1af728b8c41") + .inNames(Arrays.asList("794bb93f-0c5d-4e8a-b440-fba3ddc1a02b", + "2350e0b8-276a-4354-a813-8a3b879eb0e9", + "6d6e600f-aa4d-4828-afdd-18d4b1150def", + "b1097153-c92a-4a93-86bb-36a5050294de", + "10a714b1-54bf-4731-9ee6-98c64d8fc38d", + "7044bdef-520e-4150-9d09-5d92fa527704", + "ae7d873b-8c0b-4c3b-ada4-7ccde54f0234")) + .notInNames(Arrays.asList("78e2c330-c93b-4373-ab8f-a8170512d78d", + "98740e19-25b2-470b-be1e-234c03dee9a8", + "12953117-ce30-492c-88d8-43b95e8e180f", + "7595c461-25d6-479c-aa2a-7b23285f1b2e")) + .equalToDescription("1e760321-7222-44fa-8f61-d6d9e88d2b28") + .notEqualToDescription("8546a583-6d0f-4759-ab1a-15599c1d067a") + .inDescriptions(Arrays.asList("8f1dbb3d-0eea-423e-990b-c3f55e6873bf", + "82487ee3-d2a2-484a-8e24-553b49de8afc", + "ae1dc8e0-faee-419c-a969-9b2dc62ae01f", + "d890a150-6eda-4671-94a2-b0f0834824c3", + "fed62ca6-8d0b-4086-a289-f5999ad3b4b8", + "99844fcf-b30b-4c7e-a843-a8ea7e71fd62", + "10797c3c-ad0d-46d1-b48c-67f6ffdfab13", + "7ac918f7-afc1-469e-aeed-44d664752360")) + .notInDescriptions(Arrays.asList("11fb8ebf-38db-49ce-900a-702976559335", + "38d9e12f-c09f-479e-a111-c41ebd7001a6", + "7ee9b06e-b17c-402d-98e3-0f871c38fdbd")) + .inCreatedAts(Arrays.asList(new Date(1609926591951L), + new Date(1609926593438L), + new Date(1609926595182L), + new Date(1609926586622L), + new Date(1609926593277L), + new Date(1609926589083L), + new Date(1609926589558L))) + .notInCreatedAts(Arrays.asList(new Date(1609926586984L), + new Date(1609926594357L), + new Date(1609926590832L))) + .lessThanCreatedAt(new Date(1609926586294L)) + .greaterThanCreatedAt(new Date(1609926587799L)) + .equalToDatafileUrl("7dd05dfe-0cac-447a-93a9-bbb085363d3f") + .notEqualToDatafileUrl("603fbac1-a7ca-4cda-aa9b-b5d3755db00d") + .inDatafileUrls(Arrays.asList("6961db4b-89e6-46fa-b31b-a4ef019b7445", + "6974d3d8-89a9-4e04-b62e-c5ca75cec258", + "600e10f8-ce03-4104-8214-cf8cfb65e6fc", + "830f0448-8909-4287-a08f-1d105087c57f", + "ff44fccb-9992-4ad0-b846-34f25897bec9", + "c904ddf9-5eea-4279-bd1d-526af5a4a85b", + "223ab1eb-d761-4e31-8e78-ab683743683a", + "d8c6c69c-96c7-4212-af46-47573df00611")) + .notInDatafileUrls(Arrays.asList("8a86babb-00c4-4f2a-9d45-b0d0266bdbd7", + "bf70c1a1-5f57-446d-a140-b302cb41a32d", + "626fb3ec-9c25-4aa2-97f5-b9507dff14fa")) + .equalToDatafileSize(Long.valueOf(-106)) + .notEqualToDatafileSize(Long.valueOf(-117)) + .inDatafileSizes(Arrays.asList(Long.valueOf(42), + Long.valueOf(-83), + Long.valueOf(-48), + Long.valueOf(-99), + Long.valueOf(-41), + Long.valueOf(-114), + Long.valueOf(110))) + .notInDatafileSizes(Arrays.asList(Long.valueOf(58), + Long.valueOf(-47), + Long.valueOf(6), + Long.valueOf(7), + Long.valueOf(-114), + Long.valueOf(87), + Long.valueOf(-46), + Long.valueOf(-108), Long.valueOf(55))) - .equalToDatafileChecksum("613ec8d4-8864-41b8-a842-b748464d532a") - .notEqualToDatafileChecksum("f4089dd9-200a-4d8d-82b6-b0423a7a776f") - .inDatafileChecksums(Arrays.asList("3db8c95d-82ca-4494-85df-8a166a5e34b6")) - .notInDatafileChecksums(Arrays.asList("b3efec0e-93f1-4aa1-a1a1-915d54984e4e", - "15f48e70-e029-4cdd-931f-1554814689ee")) - .equalToId("58b8afda-9c98-402b-8413-4f5b6b2628b6") - .notEqualToId("248fd956-c083-40f8-ac18-5d36784ba125") - .inIds(Arrays.asList("64ef153c-6934-4f8e-9054-bc7f6c9d2c28", - "fe004728-83fc-46bc-a032-9bd513c2ec69", - "da97c3a9-d4e0-451c-9026-48d5e861a84b", - "5edd669e-d494-478c-9110-400401f94e3d", - "115f596e-59d0-41ff-bf9d-3582ebe4f623")) - .notInIds(Arrays.asList("6ea64b71-1b3f-4979-8896-414f1b207139", - "516a10cb-009b-446b-8fe8-46acefbb2524", - "4cd208b1-6a7f-4dd0-9938-db07d01d7876", - "dd9c18b5-1c69-4224-967a-5ac93486ad45", - "4fe3850f-8fc2-4705-9f57-2209beafce08", - "2cdc43f7-7314-4a40-b341-db168feac06f", - "d5b20f18-0247-42ac-b6fd-9c91a0a91fe5", - "4ea7db6a-ee03-4e88-9913-fbd5b296a37e")); + .equalToDatafileChecksum("c8488ed7-fba8-4ccc-bffb-368c5185142b") + .notEqualToDatafileChecksum("9307b9b2-4f14-4972-aca0-8dacbbfdc99d") + .inDatafileChecksums(Arrays.asList("f38d3088-1d7c-401d-b1e5-a22a370289c6", + "8474ce1c-934e-4899-bb87-b4385b79ed4a", + "9d4be0bc-a763-41f7-aa0e-2fb13291d9f9", + "e5e3705b-dde4-42c9-bf4f-2ee4456b5dc4", + "0485f2eb-1c4d-4a34-b0f2-d1ae83beac3c")) + .notInDatafileChecksums(Arrays.asList("6be1c998-b45f-412a-af57-057a4a581497", + "6eed0fdb-59c7-44f7-97a3-87f11227dd25", + "5cdae8f2-92e9-41b9-b528-ddfd33bbcd8d", + "cc8a551c-e0ce-4088-a894-b4d563566c61", + "7e8fe6ad-cce8-423d-a9bd-85a4e3642906", + "d8a3e4b9-fc49-4a65-99be-94d550a86c4a")) + .equalToId("c7e670f5-7ee8-45b7-9ade-c5690a0a9635") + .notEqualToId("3e8e3259-2dcb-41f3-907e-5f8a4a5245cf") + .inIds(Arrays.asList("a77356e5-925a-4836-b9b2-744f29419352", + "4930203b-9ffd-41d1-a027-ed6acd295073", + "530755ae-b183-4612-96d9-a3a89b4efa8d", + "60c1ba6e-02d0-4f65-a538-2c7e656ad361", + "5cdb2dd1-8655-4f67-bf05-ddbf2014e9ad", + "a9ec5f6d-9b92-47ce-9971-8d1122ff3d69", + "08df09fc-f246-48e9-ab13-f312a093cb8d", + "2f669e3a-27ad-4757-aa7a-55889e2da79e")) + .notInIds(Arrays.asList("36fd489c-76b2-4207-b1f8-9871c392e8c2", + "da54ca80-4402-4132-93af-c78219170b06", + "3fb726b9-0a59-483b-8dc7-48d9bb10e622", + "7e1b59af-04d8-42a1-a700-a15136f588c0")); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704672830L), new Date(1574704682097L), new Date(1574704676846L), - new Date(1574704673545L), new Date(1574704680179L)), + assertEquals(Arrays.asList(new Date(1609926594656L), new Date(1609926589699L), new Date(1609926589180L), + new Date(1609926592686L), new Date(1609926586366L), new Date(1609926590685L)), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704672845L), new Date(1574704675661L), new Date(1574704675837L), - new Date(1574704677686L), new Date(1574704679930L)), + assertEquals(Arrays.asList(new Date(1609926586778L), new Date(1609926591637L), new Date(1609926591346L), + new Date(1609926590600L), new Date(1609926590782L), new Date(1609926592632L), + new Date(1609926590282L), new Date(1609926594852L), new Date(1609926593353L)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704676776L), + assertEquals(new Date(1609926592466L), ListOptionsEncoder.encodeSingleLessThanFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704678621L), + assertEquals(new Date(1609926590036L), ListOptionsEncoder.encodeSingleGreaterThanFilter(FirmwareImageListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("c9e94129-0218-4392-ad0e-b2e8d1b575d8", + assertEquals("d0782c52-bbba-45f6-8278-a85c27152a79", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("a588905d-2e8a-427a-8049-7374720b76bb", + assertEquals("f8be587d-92a8-4935-8556-d1af728b8c41", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("ae3d4e45-a7ea-47a1-8e57-51e7923f863c", "fd50278e-b967-4532-90ca-6f441eedb9fc", - "8e42ff9a-3b75-4881-a948-12681e797f1c", "6af8420d-f93d-4105-bb2b-53b218e133ac", - "7179c6f4-1440-4862-86b5-7fad1731e03d", "9b464239-73b9-465d-9443-504df2ca2b1b", - "528a22ff-160a-4826-ad29-5a4f9b66ba26", "cf546bcf-69fd-4928-abd3-5ccebd7d5003"), + assertEquals(Arrays.asList("794bb93f-0c5d-4e8a-b440-fba3ddc1a02b", "2350e0b8-276a-4354-a813-8a3b879eb0e9", + "6d6e600f-aa4d-4828-afdd-18d4b1150def", "b1097153-c92a-4a93-86bb-36a5050294de", + "10a714b1-54bf-4731-9ee6-98c64d8fc38d", "7044bdef-520e-4150-9d09-5d92fa527704", + "ae7d873b-8c0b-4c3b-ada4-7ccde54f0234"), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("cf2fc2df-8d1d-42ce-806f-27bf4147a9af"), + assertEquals(Arrays.asList("78e2c330-c93b-4373-ab8f-a8170512d78d", "98740e19-25b2-470b-be1e-234c03dee9a8", + "12953117-ce30-492c-88d8-43b95e8e180f", "7595c461-25d6-479c-aa2a-7b23285f1b2e"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("24888adf-fea3-47ab-8ffd-1cbbf7fe4b07", + assertEquals("1e760321-7222-44fa-8f61-d6d9e88d2b28", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("7853058e-1710-4c59-a4d1-b8d586997579", + assertEquals("8546a583-6d0f-4759-ab1a-15599c1d067a", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("ddcdc890-8e7f-4bd7-89e9-3109964601fc", "a89ae587-590a-4807-bfd1-3826cadca16a", - "ebc95254-b04d-494d-afa1-eb3946816a8a", "f5388090-0c61-477b-91be-8fdda8542010", - "7a5d2181-a2f9-45b8-b42d-fd2bc818f960", "76be2615-b5be-49cd-8779-d704ebbc7b63", - "8de900a7-4859-4761-abb5-3aa6c1e4a81c", "76eb4abc-f444-49b1-a2ca-07242b43aa61"), + assertEquals(Arrays.asList("8f1dbb3d-0eea-423e-990b-c3f55e6873bf", "82487ee3-d2a2-484a-8e24-553b49de8afc", + "ae1dc8e0-faee-419c-a969-9b2dc62ae01f", "d890a150-6eda-4671-94a2-b0f0834824c3", + "fed62ca6-8d0b-4086-a289-f5999ad3b4b8", "99844fcf-b30b-4c7e-a843-a8ea7e71fd62", + "10797c3c-ad0d-46d1-b48c-67f6ffdfab13", "7ac918f7-afc1-469e-aeed-44d664752360"), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("8a5a7ad1-60ea-4806-ba96-eaff8bc6f8eb", "c0060c1f-f8cc-4b57-bb08-9addab06dcb9", - "893975a8-7b08-4db7-9c6c-6818234cd41c", "5deb8162-91b5-43c5-a4bc-03af4acb3f8a", - "1357ab83-d42f-4cbe-9847-6d086679fc9c", "98832099-2677-4ac4-b1c8-611082813199", - "b027e436-a9dc-49fa-80da-b392aed6d631", "6b1fdc2e-bcd3-4b66-9692-8ed72b97adc4"), + assertEquals(Arrays.asList("11fb8ebf-38db-49ce-900a-702976559335", "38d9e12f-c09f-479e-a111-c41ebd7001a6", + "7ee9b06e-b17c-402d-98e3-0f871c38fdbd"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704673665L), new Date(1574704679915L), new Date(1574704674467L)), + assertEquals(Arrays.asList(new Date(1609926591951L), new Date(1609926593438L), new Date(1609926595182L), + new Date(1609926586622L), new Date(1609926593277L), new Date(1609926589083L), + new Date(1609926589558L)), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674282L), new Date(1574704676204L), new Date(1574704678261L), - new Date(1574704675932L), new Date(1574704682384L)), + assertEquals(Arrays.asList(new Date(1609926586984L), new Date(1609926594357L), new Date(1609926590832L)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704679711L), + assertEquals(new Date(1609926586294L), ListOptionsEncoder.encodeSingleLessThanFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704673872L), + assertEquals(new Date(1609926587799L), ListOptionsEncoder.encodeSingleGreaterThanFilter(FirmwareImageListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.EQUAL)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals("e76e7e13-02b4-4933-9595-ed7ed7434333", + assertEquals("7dd05dfe-0cac-447a-93a9-bbb085363d3f", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals("45b26a49-a738-4e66-8c62-eb4696a7a743", + assertEquals("603fbac1-a7ca-4cda-aa9b-b5d3755db00d", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.IN)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals(Arrays.asList("535ef435-03cd-4196-9ef4-32919a7d8049", "f9b77d22-1650-461a-819a-fd265dcd9978", - "020be213-d665-43d9-ad32-332f71e57366", "71d37f65-5402-4c6f-86f9-bb5b2a6269bf", - "c46161f7-5f36-476d-8138-cc38e4e1ef8b", "9de38f1c-052f-453d-b0d7-7052ef333838", - "f9cfb153-d633-4767-bc60-f7f9f2f8b34d", "77f26f42-c719-438a-b12e-a7d7e58744e7", - "abc29f2c-4690-4783-8ded-5f866d5d3edd"), + assertEquals(Arrays.asList("6961db4b-89e6-46fa-b31b-a4ef019b7445", "6974d3d8-89a9-4e04-b62e-c5ca75cec258", + "600e10f8-ce03-4104-8214-cf8cfb65e6fc", "830f0448-8909-4287-a08f-1d105087c57f", + "ff44fccb-9992-4ad0-b846-34f25897bec9", "c904ddf9-5eea-4279-bd1d-526af5a4a85b", + "223ab1eb-d761-4e31-8e78-ab683743683a", "d8c6c69c-96c7-4212-af46-47573df00611"), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.NOT_IN)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals(Arrays.asList("9e8f996f-811d-4f3a-8314-76d7dc51a59d", "38ebc29c-bc71-4876-b552-f14c21a074cc"), + assertEquals(Arrays.asList("8a86babb-00c4-4f2a-9d45-b0d0266bdbd7", "bf70c1a1-5f57-446d-a140-b302cb41a32d", + "626fb3ec-9c25-4aa2-97f5-b9507dff14fa"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_URL, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.EQUAL)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Long.valueOf(-121), + assertEquals(Long.valueOf(-106), ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, Long.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Long.valueOf(-46), + assertEquals(Long.valueOf(-117), ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, Long.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.IN)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Arrays.asList(Long.valueOf(32), Long.valueOf(-2), Long.valueOf(65), Long.valueOf(93), - Long.valueOf(59), Long.valueOf(54)), + assertEquals(Arrays.asList(Long.valueOf(42), Long.valueOf(-83), Long.valueOf(-48), Long.valueOf(-99), + Long.valueOf(-41), Long.valueOf(-114), Long.valueOf(110)), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.NOT_IN)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Arrays.asList(Long.valueOf(-122), Long.valueOf(55)), + assertEquals(Arrays.asList(Long.valueOf(58), Long.valueOf(-47), Long.valueOf(6), Long.valueOf(7), + Long.valueOf(-114), Long.valueOf(87), Long.valueOf(-46), Long.valueOf(-108), + Long.valueOf(55)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_SIZE, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, FilterOperator.EQUAL)); assertNotNull(option.getDatafileChecksumFilters()); - assertEquals("613ec8d4-8864-41b8-a842-b748464d532a", + assertEquals("c8488ed7-fba8-4ccc-bffb-368c5185142b", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDatafileChecksumFilters()); - assertEquals("f4089dd9-200a-4d8d-82b6-b0423a7a776f", + assertEquals("9307b9b2-4f14-4972-aca0-8dacbbfdc99d", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, FilterOperator.IN)); assertNotNull(option.getDatafileChecksumFilters()); - assertEquals(Arrays.asList("3db8c95d-82ca-4494-85df-8a166a5e34b6"), + assertEquals(Arrays.asList("f38d3088-1d7c-401d-b1e5-a22a370289c6", "8474ce1c-934e-4899-bb87-b4385b79ed4a", + "9d4be0bc-a763-41f7-aa0e-2fb13291d9f9", "e5e3705b-dde4-42c9-bf4f-2ee4456b5dc4", + "0485f2eb-1c4d-4a34-b0f2-d1ae83beac3c"), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, FilterOperator.NOT_IN)); assertNotNull(option.getDatafileChecksumFilters()); - assertEquals(Arrays.asList("b3efec0e-93f1-4aa1-a1a1-915d54984e4e", "15f48e70-e029-4cdd-931f-1554814689ee"), + assertEquals(Arrays.asList("6be1c998-b45f-412a-af57-057a4a581497", "6eed0fdb-59c7-44f7-97a3-87f11227dd25", + "5cdae8f2-92e9-41b9-b528-ddfd33bbcd8d", "cc8a551c-e0ce-4088-a894-b4d563566c61", + "7e8fe6ad-cce8-423d-a9bd-85a4e3642906", "d8a3e4b9-fc49-4a65-99be-94d550a86c4a"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_DATAFILE_CHECKSUM, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("58b8afda-9c98-402b-8413-4f5b6b2628b6", + assertEquals("c7e670f5-7ee8-45b7-9ade-c5690a0a9635", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("248fd956-c083-40f8-ac18-5d36784ba125", + assertEquals("3e8e3259-2dcb-41f3-907e-5f8a4a5245cf", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("64ef153c-6934-4f8e-9054-bc7f6c9d2c28", "fe004728-83fc-46bc-a032-9bd513c2ec69", - "da97c3a9-d4e0-451c-9026-48d5e861a84b", "5edd669e-d494-478c-9110-400401f94e3d", - "115f596e-59d0-41ff-bf9d-3582ebe4f623"), + assertEquals(Arrays.asList("a77356e5-925a-4836-b9b2-744f29419352", "4930203b-9ffd-41d1-a027-ed6acd295073", + "530755ae-b183-4612-96d9-a3a89b4efa8d", "60c1ba6e-02d0-4f65-a538-2c7e656ad361", + "5cdb2dd1-8655-4f67-bf05-ddbf2014e9ad", "a9ec5f6d-9b92-47ce-9971-8d1122ff3d69", + "08df09fc-f246-48e9-ab13-f312a093cb8d", "2f669e3a-27ad-4757-aa7a-55889e2da79e"), ListOptionsEncoder.encodeSingleInFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(FirmwareImageListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("6ea64b71-1b3f-4979-8896-414f1b207139", "516a10cb-009b-446b-8fe8-46acefbb2524", - "4cd208b1-6a7f-4dd0-9938-db07d01d7876", "dd9c18b5-1c69-4224-967a-5ac93486ad45", - "4fe3850f-8fc2-4705-9f57-2209beafce08", "2cdc43f7-7314-4a40-b341-db168feac06f", - "d5b20f18-0247-42ac-b6fd-9c91a0a91fe5", "4ea7db6a-ee03-4e88-9913-fbd5b296a37e"), + assertEquals(Arrays.asList("36fd489c-76b2-4207-b1f8-9871c392e8c2", "da54ca80-4402-4132-93af-c78219170b06", + "3fb726b9-0a59-483b-8dc7-48d9bb10e622", "7e1b59af-04d8-42a1-a700-a15136f588c0"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareImageListOptions.TAG_FILTER_BY_ID, List.class, option)); } catch (Exception exception) { @@ -373,15 +398,15 @@ public void testFilters() { @Test public void testHashCode() { try { - FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(-22), - Long.valueOf(84), + FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(106), + Long.valueOf(87), Order.getDefault(), - "b9b2b3df-e5c9-4c2b-a08b-95376a571406", + "90d32fd5-8864-4062-a1e0-6685daae7303", null, null); - FirmwareImageListOptions firmwareimagelistoptions2 = new FirmwareImageListOptions(Integer.valueOf(-22), - Long.valueOf(84), + FirmwareImageListOptions firmwareimagelistoptions2 = new FirmwareImageListOptions(Integer.valueOf(106), + Long.valueOf(87), Order.getDefault(), - "b9b2b3df-e5c9-4c2b-a08b-95376a571406", + "90d32fd5-8864-4062-a1e0-6685daae7303", null, null); assertNotNull(firmwareimagelistoptions1); assertNotNull(firmwareimagelistoptions2); @@ -404,20 +429,20 @@ public void testHashCode() { @Test public void testEquals() { try { - FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(100), - Long.valueOf(6), + FirmwareImageListOptions firmwareimagelistoptions1 = new FirmwareImageListOptions(Integer.valueOf(48), + Long.valueOf(-114), Order.getDefault(), - "c75ea4e8-eaf2-4c5f-b106-aa7a74717d0d", + "f7225809-0c92-44ca-8197-7fbb28096a48", null, null); - FirmwareImageListOptions firmwareimagelistoptions2 = new FirmwareImageListOptions(Integer.valueOf(100), - Long.valueOf(6), + FirmwareImageListOptions firmwareimagelistoptions2 = new FirmwareImageListOptions(Integer.valueOf(48), + Long.valueOf(-114), Order.getDefault(), - "c75ea4e8-eaf2-4c5f-b106-aa7a74717d0d", + "f7225809-0c92-44ca-8197-7fbb28096a48", null, null); - FirmwareImageListOptions firmwareimagelistoptions3 = new FirmwareImageListOptions(Integer.valueOf(-35), - Long.valueOf(61), + FirmwareImageListOptions firmwareimagelistoptions3 = new FirmwareImageListOptions(Integer.valueOf(25), + Long.valueOf(119), Order.getDefault(), - "217f5c38-84a9-4459-a676-e048e34c7c8b", + "350fdf35-c5e0-485c-9894-554e47a6c52a", null, null); assertNotNull(firmwareimagelistoptions1); assertNotNull(firmwareimagelistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareManifestListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareManifestListOptions.java index 16fa4c12b..80819f720 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareManifestListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestFirmwareManifestListOptions.java @@ -24,10 +24,10 @@ public class TestFirmwareManifestListOptions { @Test public void testClone() { try { - FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(-74), - Long.valueOf(-24), + FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(-66), + Long.valueOf(-89), Order.getDefault(), - "b8625a0a-a54f-44d3-a48d-942e761f8050", + "7e725763-ea6b-4128-b230-d7255c5defc1", null, null); FirmwareManifestListOptions firmwaremanifestlistoptions2 = firmwaremanifestlistoptions1.clone(); assertNotNull(firmwaremanifestlistoptions1); @@ -46,373 +46,343 @@ public void testClone() { @Test public void testFilters() { try { - FirmwareManifestListOptions option = new FirmwareManifestListOptions().inCreatedAts(Arrays.asList(new Date(1574704674885L), - new Date(1574704680252L), - new Date(1574704680201L), - new Date(1574704679575L), - new Date(1574704681165L), - new Date(1574704674783L))) - .notInCreatedAts(Arrays.asList(new Date(1574704674203L), - new Date(1574704678721L), - new Date(1574704679537L))) - .lessThanCreatedAt(new Date(1574704674606L)) - .greaterThanCreatedAt(new Date(1574704679448L)) - .equalToName("a0891b5c-145f-4480-a737-3868e5e68926") - .notEqualToName("a7793b42-571e-4a1b-8ae8-e171f2c90edf") - .inNames(Arrays.asList("3830ae3b-2bc3-4197-bd1a-3410d96982ae", - "1f553fe6-c0b1-4808-99ff-e7e44eabcdab", - "42105999-d51f-444f-a12a-7b10075f8b74", - "ec73096c-8b16-4bfc-9c12-5de179df939a", - "d4b32856-e5a9-4343-86f1-6ff0f0130630", - "9541a13e-7713-488c-9db2-02f8e4134113", - "3eb8431e-8292-489b-a19e-bb6602c2973b", - "52d3c837-3f0b-43d1-b07e-01dee3a33a9c", - "96265a48-0f59-4177-b730-588d8d970047")) - .notInNames(Arrays.asList("b63f09d1-bf10-423d-b5a0-4626f60e1f41", - "8c72d6bc-b188-4f4f-b385-e79e1429bb4b", - "dfaa7c42-93d5-4157-ae26-aca1b097a04a", - "1ebbdc28-04d5-4a22-ab1b-37bc63a014a9", - "d7145cba-7a7a-40c3-96cc-cf7f8aee4295", - "b1e66641-7bca-46d4-9873-e31e6ef590ab", - "846387c7-d53d-4f6a-ac13-22e39d89a054", - "4e148347-90a7-4405-8e39-bdfb77a5d500", - "093716b0-7c7b-4acc-b3a6-b3a62fd52098")) - .equalToId("12ddaa01-a1c0-4b15-9d40-1b16f008569b") - .notEqualToId("aa09bdf1-65b0-48d1-85f1-da033f1c865d") - .inIds(Arrays.asList("09ac49b5-6e32-44ad-b7d4-389a8ce533bf")) - .notInIds(Arrays.asList("0db69ff2-ee94-4ad8-b0b4-299e97dd95a4", - "9687c487-b147-40b1-9bd3-1b035f0859d2", - "4face62e-7529-4c89-bd0f-cf8c47dd20ee", - "1a7c2c6d-bf14-4f7d-a47c-92d60a4d4592", - "676d72ca-27bb-4ef4-8da4-9f267e1205dc")) - .equalToDatafileUrl("37c1440e-3313-4488-895e-3e3d756feb44") - .notEqualToDatafileUrl("75e50223-6c68-4b2c-97a3-92b07c1cc6be") - .inDatafileUrls(Arrays.asList("e0e4e6b1-64e6-4382-8498-58eb4b8f314a", - "ed2e015f-b2d9-47f3-ae2b-82011d3bf964", - "cf9c8fd8-2482-45d2-8633-ed4c928c5f8d", - "00ebe008-b729-4078-b04f-755ebbd0082e", - "f0ceb4a2-03ad-4be8-8097-80bd841e0b43", - "7b387320-2e87-4b6e-9c94-d093dd23bca0", - "801fd426-5e30-4e8a-81b1-cc7e30c9acd8")) - .notInDatafileUrls(Arrays.asList("567c2df6-1678-4224-81b2-6fdec16ebdcb", - "968e64dc-2980-4180-b90b-d739d069beb2", - "9a8e9d7d-b28a-4821-bd9c-f2ddd5dde550", - "17374ba0-28d0-44ae-88b3-7bbf15b89fb4")) - .equalToDatafileSize(Long.valueOf(45)) - .notEqualToDatafileSize(Long.valueOf(2)) - .inDatafileSizes(Arrays.asList(Long.valueOf(30), - Long.valueOf(18), - Long.valueOf(-58), - Long.valueOf(25), - Long.valueOf(107))) - .notInDatafileSizes(Arrays.asList(Long.valueOf(-28), - Long.valueOf(30), - Long.valueOf(94), - Long.valueOf(-44), - Long.valueOf(-5), - Long.valueOf(-124))) - .equalToDeviceClass("716e6607-bfb9-4c12-a664-6deed717dcdc") - .notEqualToDeviceClass("537eb720-2120-4313-a0c8-60f99c06bfec") - .inDeviceClass(Arrays.asList("ada00d0d-6b0c-4e14-a29e-b23c6e0a871f", - "bc90070a-6a2d-45af-8dcf-28cbb78ceed0", - "aa847ff3-8804-47e1-a929-1ccf21f1ef3e", - "a37f6a3b-0f01-4f11-abf3-0261df5fea85", - "4b0c6bb8-6f4b-477d-b788-a335663b682d", - "450c1cf0-39d0-42aa-b834-2f77e62bd28a", - "844b20fe-ac85-4348-b9ea-9e2ae242ab07")) - .notInDeviceClass(Arrays.asList("121ede7a-e0bd-497d-822d-be9932017f58", - "95eb82ed-7013-432d-901d-e40a49a94a05", - "e68b0561-4955-4760-8f29-acdf5fefdb75")) - .inTimestamps(Arrays.asList(new Date(1574704674224L), - new Date(1574704681816L), - new Date(1574704673950L), - new Date(1574704679193L), - new Date(1574704675874L), - new Date(1574704678472L), - new Date(1574704677908L))) - .notInTimestamps(Arrays.asList(new Date(1574704675953L), - new Date(1574704678749L), - new Date(1574704677716L), - new Date(1574704675268L), - new Date(1574704678379L), - new Date(1574704676501L), - new Date(1574704681122L), - new Date(1574704674276L), - new Date(1574704680191L))) - .lessThanTimestamp(new Date(1574704674940L)) - .greaterThanTimestamp(new Date(1574704677338L)) - .inUpdatedAts(Arrays.asList(new Date(1574704673895L))) - .notInUpdatedAts(Arrays.asList(new Date(1574704675473L), - new Date(1574704681743L))) - .lessThanUpdatedAt(new Date(1574704676962L)) - .greaterThanUpdatedAt(new Date(1574704675054L)) - .equalToDescription("2870069d-3022-4820-af8d-04b0d79d9b88") - .notEqualToDescription("66dd2b38-a9b8-4010-bec6-5b2541341a33") - .inDescriptions(Arrays.asList("55767a07-6a50-44ee-b73b-7ae7a75d6c04", - "0dca1719-427a-4fad-ae9e-176b5312b23b", - "21e979c8-6e44-48d7-8bbf-189a796874a9")) - .notInDescriptions(Arrays.asList("9d7b064b-8c66-42d7-91d0-3310ba31f8ba", - "471fff46-4b87-441d-a2bb-8dfad056a63b", - "9a4d2bdc-11de-4549-a5ba-54c7f46ee400", - "24b2fdf9-3676-474c-9d3d-bff11bf36a7e", - "2a3518f0-9d71-4e70-b8d6-b7fb07dd90fd", - "ecfa1ab4-ff3f-4285-8b44-0dae686dda90", - "b0c00901-6fd3-40e3-85fa-640b50497514", - "1be49819-f8b8-425c-8dc4-abe5139d2931")); + FirmwareManifestListOptions option = new FirmwareManifestListOptions().inCreatedAts(Arrays.asList(new Date(1609926588201L), + new Date(1609926589030L), + new Date(1609926589710L))) + .notInCreatedAts(Arrays.asList(new Date(1609926593546L), + new Date(1609926587034L), + new Date(1609926594575L))) + .lessThanCreatedAt(new Date(1609926587978L)) + .greaterThanCreatedAt(new Date(1609926593056L)) + .equalToName("2ccafaba-9087-4951-86fe-2c1142dd63f3") + .notEqualToName("60e4a62f-eafe-444c-b10e-32840129a6d1") + .inNames(Arrays.asList("2a538f32-9289-42a2-8cd1-2996c80ccee0", + "6690136a-41b8-4d77-9f76-4d1cf4d2b11f", + "980b1ef1-e8c4-4e91-a39b-c960bb40c8a5", + "18b5fcab-55a2-4a17-b321-abf184942e2d", + "bd443633-b1a0-4331-97eb-7506a15da77b", + "48b9297e-7d8c-4371-b69a-8e58dea10c6a", + "14b4f90c-7dfb-406f-996a-50b21af7491f", + "7fee0945-85ba-411a-9d13-5d1c9efc1cbc", + "58f9533c-3fe5-4ce3-a6c9-e7f7937aa388")) + .notInNames(Arrays.asList("d98a4032-49af-47cf-9f67-75ba576aa2cb")) + .equalToId("e38ce14a-760b-4507-9c68-a268ad70a3ec") + .notEqualToId("9bab7b3f-a998-49f3-8d4d-77462f7a9ebe") + .inIds(Arrays.asList("070a421c-85c9-4c21-bdfc-53f8c586d9cc", + "947e9141-800a-4404-9c19-086174c87d3d")) + .notInIds(Arrays.asList("1100b02f-3164-4985-82ba-dbb001ecaf9a", + "7498b871-7984-4260-9aab-415d06a2eb34", + "42b1a063-cef9-4c7d-8c67-cc4be264cacd", + "5d3c83f7-bc37-41e1-9499-cb5a8538f810", + "de84714f-1a49-4e04-b8d1-9e68d1ffd2df")) + .equalToDatafileUrl("348f0670-7b7d-48f6-9da0-11bba33391a3") + .notEqualToDatafileUrl("5b1edad1-6b3f-4ab0-b1d2-62e5fceda5ed") + .inDatafileUrls(Arrays.asList("65d7bfb5-61ab-4a5d-a053-6edadef7fb3d", + "87f20a8b-e0fb-4b59-9966-3ee26b7c4d38")) + .notInDatafileUrls(Arrays.asList("3b5b28b3-572b-4585-a6bf-96d4b8af1887", + "b257aaf1-9ee5-480d-ae9f-1bfed62b8c8a", + "ff463420-3bf0-4efd-b2b9-672cef951d10", + "039e10cc-f136-4022-8d6b-8eb86c88e575", + "2c00368c-32c0-4495-837a-5939d19aea2b", + "4bba85f3-5ede-4715-818d-7db4add843dc", + "a9c4e424-890e-46c4-a421-589f9524cfd7", + "9b20d9a2-a511-4915-a6fc-fbd110c7ce53")) + .equalToDatafileSize(Long.valueOf(-23)) + .notEqualToDatafileSize(Long.valueOf(72)) + .inDatafileSizes(Arrays.asList(Long.valueOf(122), + Long.valueOf(51), + Long.valueOf(-82), + Long.valueOf(-40), + Long.valueOf(-52))) + .notInDatafileSizes(Arrays.asList(Long.valueOf(-105), + Long.valueOf(-120))) + .equalToDeviceClass("01fcb124-2b11-4ba5-a9a6-fe4adb440061") + .notEqualToDeviceClass("8a0110ac-2247-497e-880c-2b4649fdc21c") + .inDeviceClass(Arrays.asList("10abf8f1-2b8e-4ac6-962f-b58eec71104f", + "3ee4518e-ad45-4b21-bd26-8a55ed7d23c1", + "e02ce6ca-c3a0-453c-848e-167bd88d87c9")) + .notInDeviceClass(Arrays.asList("2428e974-0f9d-4f08-90d4-a5b1aea9620a", + "dd16aff4-7b7a-46e3-9d1d-36dbaf1af885", + "eee87b86-2560-4a14-9c81-a162c4b2b578", + "3e5625ec-b68d-4343-a54d-740df8b63c94", + "3a940857-cece-473b-81fe-b87f300292d6", + "e0061acd-6363-42d8-9935-ba10092b9d34")) + .inTimestamps(Arrays.asList(new Date(1609926587403L))) + .notInTimestamps(Arrays.asList(new Date(1609926589933L))) + .lessThanTimestamp(new Date(1609926594439L)) + .greaterThanTimestamp(new Date(1609926590614L)) + .inUpdatedAts(Arrays.asList(new Date(1609926589500L), + new Date(1609926588487L), + new Date(1609926592150L), + new Date(1609926594003L))) + .notInUpdatedAts(Arrays.asList(new Date(1609926589427L), + new Date(1609926593438L), + new Date(1609926588851L))) + .lessThanUpdatedAt(new Date(1609926587113L)) + .greaterThanUpdatedAt(new Date(1609926586491L)) + .equalToDescription("94d45cb3-1c62-458d-97cd-04dcb6453ae0") + .notEqualToDescription("5d36c161-6b76-419d-bed5-1ab461c43335") + .inDescriptions(Arrays.asList("4b16e533-9028-40c1-aed5-3dbf1d8af1ca", + "2c163760-6cc5-401f-875e-71473492c552", + "14826518-7ca9-49b4-9266-c2ecfa263a25", + "da4b28d0-1b48-4808-9c64-1c13024d8441", + "a99a744d-c5c5-47cf-97da-28bc4b9cd1bf", + "9d989c08-3b0f-40b3-bdb4-c1371e9ec655", + "a382ffe0-7067-4bb7-ac23-cc7b9e4fe0f2", + "8961de93-0c4b-4fb8-8d72-4be7fbb24196")) + .notInDescriptions(Arrays.asList("91835f2b-7b5c-4cbe-9ff8-68c0d1c56c79", + "97411f7b-25cf-41ac-9a84-317c905f125d", + "d071c695-98c0-43e3-826a-510c4c52d4fc", + "24e746be-db24-470a-8ac3-27040cb9a7e0", + "36678d57-f97a-4c9f-bdaa-0b953ce3f506", + "5cec0104-7247-4598-bce0-989a0c28ec2d", + "2179545f-940a-467b-a266-5ab55ea4fc09", + "6f943f91-9e2c-4cc3-8a0f-dbf4c029c592")); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674885L), new Date(1574704680252L), new Date(1574704680201L), - new Date(1574704679575L), new Date(1574704681165L), new Date(1574704674783L)), + assertEquals(Arrays.asList(new Date(1609926588201L), new Date(1609926589030L), new Date(1609926589710L)), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704674203L), new Date(1574704678721L), new Date(1574704679537L)), + assertEquals(Arrays.asList(new Date(1609926593546L), new Date(1609926587034L), new Date(1609926594575L)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704674606L), + assertEquals(new Date(1609926587978L), ListOptionsEncoder.encodeSingleLessThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704679448L), + assertEquals(new Date(1609926593056L), ListOptionsEncoder.encodeSingleGreaterThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("a0891b5c-145f-4480-a737-3868e5e68926", + assertEquals("2ccafaba-9087-4951-86fe-2c1142dd63f3", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("a7793b42-571e-4a1b-8ae8-e171f2c90edf", + assertEquals("60e4a62f-eafe-444c-b10e-32840129a6d1", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("3830ae3b-2bc3-4197-bd1a-3410d96982ae", "1f553fe6-c0b1-4808-99ff-e7e44eabcdab", - "42105999-d51f-444f-a12a-7b10075f8b74", "ec73096c-8b16-4bfc-9c12-5de179df939a", - "d4b32856-e5a9-4343-86f1-6ff0f0130630", "9541a13e-7713-488c-9db2-02f8e4134113", - "3eb8431e-8292-489b-a19e-bb6602c2973b", "52d3c837-3f0b-43d1-b07e-01dee3a33a9c", - "96265a48-0f59-4177-b730-588d8d970047"), + assertEquals(Arrays.asList("2a538f32-9289-42a2-8cd1-2996c80ccee0", "6690136a-41b8-4d77-9f76-4d1cf4d2b11f", + "980b1ef1-e8c4-4e91-a39b-c960bb40c8a5", "18b5fcab-55a2-4a17-b321-abf184942e2d", + "bd443633-b1a0-4331-97eb-7506a15da77b", "48b9297e-7d8c-4371-b69a-8e58dea10c6a", + "14b4f90c-7dfb-406f-996a-50b21af7491f", "7fee0945-85ba-411a-9d13-5d1c9efc1cbc", + "58f9533c-3fe5-4ce3-a6c9-e7f7937aa388"), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("b63f09d1-bf10-423d-b5a0-4626f60e1f41", "8c72d6bc-b188-4f4f-b385-e79e1429bb4b", - "dfaa7c42-93d5-4157-ae26-aca1b097a04a", "1ebbdc28-04d5-4a22-ab1b-37bc63a014a9", - "d7145cba-7a7a-40c3-96cc-cf7f8aee4295", "b1e66641-7bca-46d4-9873-e31e6ef590ab", - "846387c7-d53d-4f6a-ac13-22e39d89a054", "4e148347-90a7-4405-8e39-bdfb77a5d500", - "093716b0-7c7b-4acc-b3a6-b3a62fd52098"), + assertEquals(Arrays.asList("d98a4032-49af-47cf-9f67-75ba576aa2cb"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("12ddaa01-a1c0-4b15-9d40-1b16f008569b", + assertEquals("e38ce14a-760b-4507-9c68-a268ad70a3ec", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("aa09bdf1-65b0-48d1-85f1-da033f1c865d", + assertEquals("9bab7b3f-a998-49f3-8d4d-77462f7a9ebe", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("09ac49b5-6e32-44ad-b7d4-389a8ce533bf"), + assertEquals(Arrays.asList("070a421c-85c9-4c21-bdfc-53f8c586d9cc", "947e9141-800a-4404-9c19-086174c87d3d"), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("0db69ff2-ee94-4ad8-b0b4-299e97dd95a4", "9687c487-b147-40b1-9bd3-1b035f0859d2", - "4face62e-7529-4c89-bd0f-cf8c47dd20ee", "1a7c2c6d-bf14-4f7d-a47c-92d60a4d4592", - "676d72ca-27bb-4ef4-8da4-9f267e1205dc"), + assertEquals(Arrays.asList("1100b02f-3164-4985-82ba-dbb001ecaf9a", "7498b871-7984-4260-9aab-415d06a2eb34", + "42b1a063-cef9-4c7d-8c67-cc4be264cacd", "5d3c83f7-bc37-41e1-9499-cb5a8538f810", + "de84714f-1a49-4e04-b8d1-9e68d1ffd2df"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.EQUAL)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals("37c1440e-3313-4488-895e-3e3d756feb44", + assertEquals("348f0670-7b7d-48f6-9da0-11bba33391a3", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals("75e50223-6c68-4b2c-97a3-92b07c1cc6be", + assertEquals("5b1edad1-6b3f-4ab0-b1d2-62e5fceda5ed", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.IN)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals(Arrays.asList("e0e4e6b1-64e6-4382-8498-58eb4b8f314a", "ed2e015f-b2d9-47f3-ae2b-82011d3bf964", - "cf9c8fd8-2482-45d2-8633-ed4c928c5f8d", "00ebe008-b729-4078-b04f-755ebbd0082e", - "f0ceb4a2-03ad-4be8-8097-80bd841e0b43", "7b387320-2e87-4b6e-9c94-d093dd23bca0", - "801fd426-5e30-4e8a-81b1-cc7e30c9acd8"), + assertEquals(Arrays.asList("65d7bfb5-61ab-4a5d-a053-6edadef7fb3d", "87f20a8b-e0fb-4b59-9966-3ee26b7c4d38"), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, FilterOperator.NOT_IN)); assertNotNull(option.getDatafileUrlFilters()); - assertEquals(Arrays.asList("567c2df6-1678-4224-81b2-6fdec16ebdcb", "968e64dc-2980-4180-b90b-d739d069beb2", - "9a8e9d7d-b28a-4821-bd9c-f2ddd5dde550", "17374ba0-28d0-44ae-88b3-7bbf15b89fb4"), + assertEquals(Arrays.asList("3b5b28b3-572b-4585-a6bf-96d4b8af1887", "b257aaf1-9ee5-480d-ae9f-1bfed62b8c8a", + "ff463420-3bf0-4efd-b2b9-672cef951d10", "039e10cc-f136-4022-8d6b-8eb86c88e575", + "2c00368c-32c0-4495-837a-5939d19aea2b", "4bba85f3-5ede-4715-818d-7db4add843dc", + "a9c4e424-890e-46c4-a421-589f9524cfd7", "9b20d9a2-a511-4915-a6fc-fbd110c7ce53"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_URL, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.EQUAL)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Long.valueOf(45), + assertEquals(Long.valueOf(-23), ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, Long.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Long.valueOf(2), + assertEquals(Long.valueOf(72), ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, Long.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.IN)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Arrays.asList(Long.valueOf(30), Long.valueOf(18), Long.valueOf(-58), Long.valueOf(25), - Long.valueOf(107)), + assertEquals(Arrays.asList(Long.valueOf(122), Long.valueOf(51), Long.valueOf(-82), Long.valueOf(-40), + Long.valueOf(-52)), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, FilterOperator.NOT_IN)); assertNotNull(option.getDatafileSizeFilters()); - assertEquals(Arrays.asList(Long.valueOf(-28), Long.valueOf(30), Long.valueOf(94), Long.valueOf(-44), - Long.valueOf(-5), Long.valueOf(-124)), + assertEquals(Arrays.asList(Long.valueOf(-105), Long.valueOf(-120)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DATAFILE_SIZE, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.EQUAL)); assertNotNull(option.getDeviceClassFilters()); - assertEquals("716e6607-bfb9-4c12-a664-6deed717dcdc", + assertEquals("01fcb124-2b11-4ba5-a9a6-fe4adb440061", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceClassFilters()); - assertEquals("537eb720-2120-4313-a0c8-60f99c06bfec", + assertEquals("8a0110ac-2247-497e-880c-2b4649fdc21c", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.IN)); assertNotNull(option.getDeviceClassFilters()); - assertEquals(Arrays.asList("ada00d0d-6b0c-4e14-a29e-b23c6e0a871f", "bc90070a-6a2d-45af-8dcf-28cbb78ceed0", - "aa847ff3-8804-47e1-a929-1ccf21f1ef3e", "a37f6a3b-0f01-4f11-abf3-0261df5fea85", - "4b0c6bb8-6f4b-477d-b788-a335663b682d", "450c1cf0-39d0-42aa-b834-2f77e62bd28a", - "844b20fe-ac85-4348-b9ea-9e2ae242ab07"), + assertEquals(Arrays.asList("10abf8f1-2b8e-4ac6-962f-b58eec71104f", "3ee4518e-ad45-4b21-bd26-8a55ed7d23c1", + "e02ce6ca-c3a0-453c-848e-167bd88d87c9"), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, FilterOperator.NOT_IN)); assertNotNull(option.getDeviceClassFilters()); - assertEquals(Arrays.asList("121ede7a-e0bd-497d-822d-be9932017f58", "95eb82ed-7013-432d-901d-e40a49a94a05", - "e68b0561-4955-4760-8f29-acdf5fefdb75"), + assertEquals(Arrays.asList("2428e974-0f9d-4f08-90d4-a5b1aea9620a", "dd16aff4-7b7a-46e3-9d1d-36dbaf1af885", + "eee87b86-2560-4a14-9c81-a162c4b2b578", "3e5625ec-b68d-4343-a54d-740df8b63c94", + "3a940857-cece-473b-81fe-b87f300292d6", "e0061acd-6363-42d8-9935-ba10092b9d34"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DEVICE_CLASS, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, FilterOperator.IN)); assertNotNull(option.getTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704674224L), new Date(1574704681816L), new Date(1574704673950L), - new Date(1574704679193L), new Date(1574704675874L), new Date(1574704678472L), - new Date(1574704677908L)), + assertEquals(Arrays.asList(new Date(1609926587403L)), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, FilterOperator.NOT_IN)); assertNotNull(option.getTimestampFilters()); - assertEquals(Arrays.asList(new Date(1574704675953L), new Date(1574704678749L), new Date(1574704677716L), - new Date(1574704675268L), new Date(1574704678379L), new Date(1574704676501L), - new Date(1574704681122L), new Date(1574704674276L), new Date(1574704680191L)), + assertEquals(Arrays.asList(new Date(1609926589933L)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, FilterOperator.LESS_THAN)); assertNotNull(option.getTimestampFilters()); - assertEquals(new Date(1574704674940L), + assertEquals(new Date(1609926594439L), ListOptionsEncoder.encodeSingleLessThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, FilterOperator.GREATER_THAN)); assertNotNull(option.getTimestampFilters()); - assertEquals(new Date(1574704677338L), + assertEquals(new Date(1609926590614L), ListOptionsEncoder.encodeSingleGreaterThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_TIMESTAMP, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704673895L)), + assertEquals(Arrays.asList(new Date(1609926589500L), new Date(1609926588487L), new Date(1609926592150L), + new Date(1609926594003L)), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704675473L), new Date(1574704681743L)), + assertEquals(Arrays.asList(new Date(1609926589427L), new Date(1609926593438L), new Date(1609926588851L)), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704676962L), + assertEquals(new Date(1609926587113L), ListOptionsEncoder.encodeSingleLessThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704675054L), + assertEquals(new Date(1609926586491L), ListOptionsEncoder.encodeSingleGreaterThanFilter(FirmwareManifestListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("2870069d-3022-4820-af8d-04b0d79d9b88", + assertEquals("94d45cb3-1c62-458d-97cd-04dcb6453ae0", ListOptionsEncoder.encodeSingleEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("66dd2b38-a9b8-4010-bec6-5b2541341a33", + assertEquals("5d36c161-6b76-419d-bed5-1ab461c43335", ListOptionsEncoder.encodeSingleNotEqualFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("55767a07-6a50-44ee-b73b-7ae7a75d6c04", "0dca1719-427a-4fad-ae9e-176b5312b23b", - "21e979c8-6e44-48d7-8bbf-189a796874a9"), + assertEquals(Arrays.asList("4b16e533-9028-40c1-aed5-3dbf1d8af1ca", "2c163760-6cc5-401f-875e-71473492c552", + "14826518-7ca9-49b4-9266-c2ecfa263a25", "da4b28d0-1b48-4808-9c64-1c13024d8441", + "a99a744d-c5c5-47cf-97da-28bc4b9cd1bf", "9d989c08-3b0f-40b3-bdb4-c1371e9ec655", + "a382ffe0-7067-4bb7-ac23-cc7b9e4fe0f2", "8961de93-0c4b-4fb8-8d72-4be7fbb24196"), ListOptionsEncoder.encodeSingleInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("9d7b064b-8c66-42d7-91d0-3310ba31f8ba", "471fff46-4b87-441d-a2bb-8dfad056a63b", - "9a4d2bdc-11de-4549-a5ba-54c7f46ee400", "24b2fdf9-3676-474c-9d3d-bff11bf36a7e", - "2a3518f0-9d71-4e70-b8d6-b7fb07dd90fd", "ecfa1ab4-ff3f-4285-8b44-0dae686dda90", - "b0c00901-6fd3-40e3-85fa-640b50497514", "1be49819-f8b8-425c-8dc4-abe5139d2931"), + assertEquals(Arrays.asList("91835f2b-7b5c-4cbe-9ff8-68c0d1c56c79", "97411f7b-25cf-41ac-9a84-317c905f125d", + "d071c695-98c0-43e3-826a-510c4c52d4fc", "24e746be-db24-470a-8ac3-27040cb9a7e0", + "36678d57-f97a-4c9f-bdaa-0b953ce3f506", "5cec0104-7247-4598-bce0-989a0c28ec2d", + "2179545f-940a-467b-a266-5ab55ea4fc09", "6f943f91-9e2c-4cc3-8a0f-dbf4c029c592"), ListOptionsEncoder.encodeSingleNotInFilter(FirmwareManifestListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); } catch (Exception exception) { @@ -427,15 +397,15 @@ public void testFilters() { @Test public void testHashCode() { try { - FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(106), - Long.valueOf(-90), + FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(-40), + Long.valueOf(-85), Order.getDefault(), - "38790e53-f34b-4b2b-a442-5d23345760d1", + "1ac6ce39-8056-4d76-8a51-6dcfc5851d20", null, null); - FirmwareManifestListOptions firmwaremanifestlistoptions2 = new FirmwareManifestListOptions(Integer.valueOf(106), - Long.valueOf(-90), + FirmwareManifestListOptions firmwaremanifestlistoptions2 = new FirmwareManifestListOptions(Integer.valueOf(-40), + Long.valueOf(-85), Order.getDefault(), - "38790e53-f34b-4b2b-a442-5d23345760d1", + "1ac6ce39-8056-4d76-8a51-6dcfc5851d20", null, null); assertNotNull(firmwaremanifestlistoptions1); assertNotNull(firmwaremanifestlistoptions2); @@ -458,20 +428,20 @@ public void testHashCode() { @Test public void testEquals() { try { - FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(-3), - Long.valueOf(-39), + FirmwareManifestListOptions firmwaremanifestlistoptions1 = new FirmwareManifestListOptions(Integer.valueOf(119), + Long.valueOf(-95), Order.getDefault(), - "ede6f275-5690-47ed-bc3e-0a4b9f11e89d", + "a1ab03c2-36c8-44d4-bf48-5a799eab1caa", null, null); - FirmwareManifestListOptions firmwaremanifestlistoptions2 = new FirmwareManifestListOptions(Integer.valueOf(-3), - Long.valueOf(-39), + FirmwareManifestListOptions firmwaremanifestlistoptions2 = new FirmwareManifestListOptions(Integer.valueOf(119), + Long.valueOf(-95), Order.getDefault(), - "ede6f275-5690-47ed-bc3e-0a4b9f11e89d", + "a1ab03c2-36c8-44d4-bf48-5a799eab1caa", null, null); - FirmwareManifestListOptions firmwaremanifestlistoptions3 = new FirmwareManifestListOptions(Integer.valueOf(-81), - Long.valueOf(-96), + FirmwareManifestListOptions firmwaremanifestlistoptions3 = new FirmwareManifestListOptions(Integer.valueOf(71), + Long.valueOf(72), Order.getDefault(), - "d4dae9c2-ce11-46a0-a1cc-afeb7599e5c1", + "80e13487-42d1-4ba5-8d76-7612bdf4960f", null, null); assertNotNull(firmwaremanifestlistoptions1); assertNotNull(firmwaremanifestlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestUpdateCampaignListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestUpdateCampaignListOptions.java index 405bde700..4484e4bbc 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestUpdateCampaignListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestUpdateCampaignListOptions.java @@ -24,10 +24,10 @@ public class TestUpdateCampaignListOptions { @Test public void testClone() { try { - UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(21), - Long.valueOf(125), + UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(-87), + Long.valueOf(108), Order.getDefault(), - "eb2bed7f-9586-41a6-90f4-7733c29fe0e5", + "95f35840-b913-43b0-9fac-cc3cd2baea66", null, null); UpdateCampaignListOptions updatecampaignlistoptions2 = updatecampaignlistoptions1.clone(); assertNotNull(updatecampaignlistoptions1); @@ -46,395 +46,403 @@ public void testClone() { @Test public void testFilters() { try { - UpdateCampaignListOptions option = new UpdateCampaignListOptions().inCreatedAts(Arrays.asList(new Date(1574704675046L), - new Date(1574704676358L))) - .notInCreatedAts(Arrays.asList(new Date(1574704675152L), - new Date(1574704676260L))) - .lessThanCreatedAt(new Date(1574704673055L)) - .greaterThanCreatedAt(new Date(1574704679168L)) - .equalToName("f29eb380-b174-43fb-81fb-d62a52c3b907") - .notEqualToName("16b63d8a-9a0e-41d8-ba70-bb5d639594ea") - .inNames(Arrays.asList("a3c7b615-5e97-43af-a804-17ec5ccd143f")) - .notInNames(Arrays.asList("c21a2c8c-44b4-43a7-864b-6d9d9296ce38", - "1f507d95-b5dc-4a44-be1e-d2962e56607a", - "5e68152e-d9e6-42bd-8373-fff10dbb8454", - "30b0d44f-fcab-4b98-a980-3d67cc211c99", - "332dfaac-3e80-4ca1-b8dd-9f0c821074a1")) - .equalToId("9a736518-dbc6-4d8a-8f99-e261be56df1a") - .notEqualToId("6811fe09-9ab2-465b-b704-8e1960f94e8e") - .inIds(Arrays.asList("205ea732-2c90-4a03-8f21-d6b0b72e7c0b")) - .notInIds(Arrays.asList("e6f5da61-9791-4f6e-ad95-74e0b9df7227", - "944a3c47-ffa5-48cb-9ae1-afdaa15090b4", - "75e7d8a3-c961-454f-979b-3eea78f44dda")) - .equalToDeviceFilter("98575394-20f0-491d-830d-c799e9a7344f") - .notEqualToDeviceFilter("e1936874-6494-4b32-a1cd-715e02ae7831") - .inDeviceFilters(Arrays.asList("baeedbc6-1b97-4c2f-b094-7b3633cfb5f1", - "68bb22e1-5c2a-4535-b139-c0e4fd7c6c50", - "b808ced2-cbe7-4542-8203-ee38ed2cd274", - "ef24aea5-f41d-4594-9f68-8084ad2fb906", - "e45d6d39-ada2-4289-b420-53467cf75459", - "9b633432-215f-4345-bab4-d3b46c9d99e8", - "aeaa38fb-f130-447f-a75a-25a88e11bf02", - "07a681f5-1d3d-447b-b7f2-c8c3ab63712f")) - .notInDeviceFilters(Arrays.asList("b1d0ada0-072f-4689-bb97-2d708189b2d0", - "a1bb2c2b-d1f1-4ea1-9057-28db0573d1eb", - "9b8892af-4043-4ae0-b040-df0f63c95b9f", - "f4066424-7655-4c73-81b9-46f426696e7c", - "cf1e2886-011e-4199-b749-1ff4005dbb47", - "ce949c5a-4675-464f-913b-47c05a0a11e3", - "8fbae38b-f8d2-4cc8-8f3a-763bc3884039", - "386da303-8a60-4452-944b-64423345862b")) - .inFinisheds(Arrays.asList(new Date(1574704675222L), - new Date(1574704679167L), - new Date(1574704680908L), - new Date(1574704679319L))) - .notInFinisheds(Arrays.asList(new Date(1574704681108L), - new Date(1574704678909L), - new Date(1574704679904L))) - .lessThanFinished(new Date(1574704672789L)) - .greaterThanFinished(new Date(1574704681862L)) - .inStartedAts(Arrays.asList(new Date(1574704679352L), - new Date(1574704682383L), - new Date(1574704680925L), - new Date(1574704676922L), - new Date(1574704673584L), - new Date(1574704674798L), - new Date(1574704677960L), - new Date(1574704678541L), - new Date(1574704682572L))) - .notInStartedAts(Arrays.asList(new Date(1574704682104L), - new Date(1574704680373L), - new Date(1574704680846L), - new Date(1574704674426L), - new Date(1574704676908L), - new Date(1574704672939L), - new Date(1574704674988L), - new Date(1574704674849L))) - .lessThanStartedAt(new Date(1574704676583L)) - .greaterThanStartedAt(new Date(1574704675582L)) - .inWhens(Arrays.asList(new Date(1574704676877L), - new Date(1574704673121L), - new Date(1574704678057L), - new Date(1574704679834L), - new Date(1574704679913L), - new Date(1574704677972L), - new Date(1574704673938L), - new Date(1574704678093L))) - .notInWhens(Arrays.asList(new Date(1574704676456L), - new Date(1574704680852L), - new Date(1574704672959L), - new Date(1574704675280L), - new Date(1574704677819L), - new Date(1574704679011L))) - .lessThanWhen(new Date(1574704675747L)) - .greaterThanWhen(new Date(1574704679338L)) - .inUpdatedAts(Arrays.asList(new Date(1574704678687L), - new Date(1574704681137L), - new Date(1574704677515L), - new Date(1574704675367L), - new Date(1574704679360L), - new Date(1574704679122L))) - .notInUpdatedAts(Arrays.asList(new Date(1574704678030L), - new Date(1574704678096L), - new Date(1574704673990L), - new Date(1574704680350L), - new Date(1574704682102L))) - .lessThanUpdatedAt(new Date(1574704682395L)) - .greaterThanUpdatedAt(new Date(1574704674247L)) - .equalToRootManifestId("430227d0-3cc4-468b-90ea-e91c3204f7a2") - .notEqualToRootManifestId("2ade60c6-8632-424c-ba6b-9c5896bce7fe") - .inRootManifestIds(Arrays.asList("bdc33936-ea60-40e7-b2ba-825e4ff53682", - "5e6a372b-1784-46ef-83c6-f89ffaed0e5e", - "a7c71cc4-b3c4-4bdd-b864-a3e574a39fb4")) - .notInRootManifestIds(Arrays.asList("5d0f069a-41e0-49c5-8cff-fea757ba530c", - "9624d72e-25ab-4d19-b7ae-4df3e94e27ce", - "7ae1f8f2-558b-4c41-802a-0494b400c8f5", - "37e3732c-1ad9-4663-b507-9c7e15db3a27", - "fd46c601-478b-43bb-9254-97fa15064870")) - .equalToDescription("7a16e097-9dbd-4902-830e-46e6a9b0f784") - .notEqualToDescription("69a58d3d-d799-4ab6-bced-5dc2623362a0") - .inDescriptions(Arrays.asList("38bb63fd-cc3a-423d-b666-d51ba49443ba")) - .notInDescriptions(Arrays.asList("23106f52-4e26-4cf7-a65b-e3881f8e918b", - "51bcf480-acab-4277-8829-2a650f65f646", - "9b8af3e4-9ba1-4231-914e-1ca3b8bb04b9", - "aa5be059-ab07-48a0-8374-ef120ff76b41", - "9867353a-8ec7-4529-a119-fa3d186977be", - "edaf4f96-8164-4f72-b4da-bee028106d87", - "4f9358f3-8e01-4edd-a44e-ff8f35bd0c0d", - "edb235b0-d56c-477a-bdb9-c9914780b2c3", - "89626bae-b150-4631-bf6b-8a33ee104b6b")); + UpdateCampaignListOptions option = new UpdateCampaignListOptions().inCreatedAts(Arrays.asList(new Date(1609926593968L), + new Date(1609926588604L), + new Date(1609926589565L), + new Date(1609926586592L), + new Date(1609926589561L), + new Date(1609926593618L), + new Date(1609926586436L), + new Date(1609926586689L))) + .notInCreatedAts(Arrays.asList(new Date(1609926588363L), + new Date(1609926595376L), + new Date(1609926593098L), + new Date(1609926588275L), + new Date(1609926587294L))) + .lessThanCreatedAt(new Date(1609926585951L)) + .greaterThanCreatedAt(new Date(1609926587048L)) + .equalToName("db62f195-c6b4-403f-9c58-cd2dc1341bbb") + .notEqualToName("af7a5f43-064f-459b-9260-73d4ff095e66") + .inNames(Arrays.asList("ea882913-33a9-43f4-a1d6-de003c15d51b", + "a40fd4c0-d384-49d3-8c91-0390a186d8c9", + "0b82b14a-01b6-47e1-90d9-9d63184e768e", + "c073cbc2-63d3-4606-a146-fda1b82857f4", + "c53f8fec-657d-4b4c-80a6-b62cab5faf8f", + "002dc496-9b7b-4abd-af54-f7a89154ca36")) + .notInNames(Arrays.asList("d4fb97cd-afee-40c8-9e05-7086ac242a3d", + "ca865ba8-d8b1-4456-a282-dddee098c26a", + "d1393cf9-0ac4-443e-815d-38ef8599b53f", + "55d9db87-be8a-4399-8cb5-cf2822411805", + "0c45bca2-7236-4b62-b7e4-d7228da1ca7d")) + .equalToId("75f09698-e54c-4a82-9d09-5e6e1fa182a9") + .notEqualToId("abe26330-8531-4a2b-8dad-6c5b8b96d28e") + .inIds(Arrays.asList("5d573661-f77e-431c-a4a4-6bc323e425b0")) + .notInIds(Arrays.asList("a32c07d4-609f-4367-9614-f6d4f7edf641", + "80655807-3db9-4f33-b6ce-6adca1fbef0c", + "73fe09d4-b37c-488b-84c4-ea6ec6589db2", + "f981d0e5-71f6-4053-9e7b-c42b5e4f2052", + "00f489ac-f79b-452a-8b5d-105fce3487bd", + "ce243e74-4c61-4fcc-8181-8f9110592182", + "d591e621-1c6f-476b-854a-e9a67c2d8e45", + "33cff42b-400c-4c0a-9ee9-028106cf9b5f")) + .equalToDeviceFilter("11cb88eb-f9ba-4021-a700-2d4f9d5c95e0") + .notEqualToDeviceFilter("7f949fbc-d8a0-46c1-b996-1ccc63327bea") + .inDeviceFilters(Arrays.asList("c449ef3a-607e-47ea-8249-a1d3361883bb", + "7109ea66-86ba-49b9-81b6-341ee07e81ff", + "f8ae24ec-3e8b-4f47-b6d2-3136713c96f5", + "322a9208-00f4-4bda-bf33-710c254901ef", + "1a8a9a4b-1312-4c32-924c-41ebe4802fa2", + "28b1f37e-7c16-4b19-a5b2-32c8bfc76a96", + "a952b3a5-b1ce-4045-a65b-a21d4427dfbc", + "f21e577e-cb25-4aee-b8f1-3b4a10cf3919")) + .notInDeviceFilters(Arrays.asList("75701461-c376-40c8-a111-e9c802de219d", + "84cd228d-a064-4915-9738-00289d16ce92")) + .inFinisheds(Arrays.asList(new Date(1609926593385L), + new Date(1609926595532L), + new Date(1609926590370L), + new Date(1609926590295L), + new Date(1609926589283L), + new Date(1609926594017L), + new Date(1609926590265L), + new Date(1609926590272L))) + .notInFinisheds(Arrays.asList(new Date(1609926593730L), + new Date(1609926590944L), + new Date(1609926589775L), + new Date(1609926593973L), + new Date(1609926589683L))) + .lessThanFinished(new Date(1609926594039L)) + .greaterThanFinished(new Date(1609926586458L)) + .inStartedAts(Arrays.asList(new Date(1609926595389L), + new Date(1609926592998L), + new Date(1609926588895L), + new Date(1609926591465L), + new Date(1609926586179L), + new Date(1609926592721L))) + .notInStartedAts(Arrays.asList(new Date(1609926590768L), + new Date(1609926592143L), + new Date(1609926589665L), + new Date(1609926589616L), + new Date(1609926588312L))) + .lessThanStartedAt(new Date(1609926591145L)) + .greaterThanStartedAt(new Date(1609926594976L)) + .inWhens(Arrays.asList(new Date(1609926586252L), + new Date(1609926587106L))) + .notInWhens(Arrays.asList(new Date(1609926592019L), + new Date(1609926592055L), + new Date(1609926591249L), + new Date(1609926593543L), + new Date(1609926588966L), + new Date(1609926591935L))) + .lessThanWhen(new Date(1609926594298L)) + .greaterThanWhen(new Date(1609926588788L)) + .inUpdatedAts(Arrays.asList(new Date(1609926588271L), + new Date(1609926585795L), + new Date(1609926587547L), + new Date(1609926587040L), + new Date(1609926586084L), + new Date(1609926592619L), + new Date(1609926588215L), + new Date(1609926586445L), + new Date(1609926592085L))) + .notInUpdatedAts(Arrays.asList(new Date(1609926594189L), + new Date(1609926586217L), + new Date(1609926593423L), + new Date(1609926590339L), + new Date(1609926589286L), + new Date(1609926594759L), + new Date(1609926592304L))) + .lessThanUpdatedAt(new Date(1609926593024L)) + .greaterThanUpdatedAt(new Date(1609926588620L)) + .equalToRootManifestId("9a7ce0fd-1c83-4ac6-ad5d-228e99a84f98") + .notEqualToRootManifestId("c46c5246-fffa-41b2-a5a7-4053ef9bce2d") + .inRootManifestIds(Arrays.asList("173a4438-1a32-4f85-b985-d124e5e8cdac")) + .notInRootManifestIds(Arrays.asList("2639de72-f2da-4a8e-a1f1-e4961ab3845f", + "8d214a32-a3b3-43ef-b6e4-86a975c22e78")) + .equalToDescription("16ae6a81-cd49-4d15-a2d2-150da40bf3b7") + .notEqualToDescription("3851f522-b6e0-473c-9fad-4783399e2a37") + .inDescriptions(Arrays.asList("69ab5689-ffea-4e86-8282-bde501d63c47", + "d2b070ec-fbda-4d26-b696-c7ee56120623", + "aad9401a-6258-47b2-aeb0-4335e3a14cd3")) + .notInDescriptions(Arrays.asList("981e3841-833a-4c01-9584-4dd6cf6fdd0d", + "f1ba3beb-3b18-4c65-9358-6daa8795c07d", + "a9db8eba-9077-45c3-83c1-add67a908d4e", + "7c30ca8e-03a7-43f8-9595-1cb9e8fb5c14", + "1a68d859-1b38-4edc-8393-fca79f373a6f", + "4e7fc8fe-ea81-4458-ba0d-ae800b6cf33a", + "fada7c96-6887-43c2-a9d4-6fcd3b2d0b75")); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704675046L), new Date(1574704676358L)), + assertEquals(Arrays.asList(new Date(1609926593968L), new Date(1609926588604L), new Date(1609926589565L), + new Date(1609926586592L), new Date(1609926589561L), new Date(1609926593618L), + new Date(1609926586436L), new Date(1609926586689L)), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704675152L), new Date(1574704676260L)), + assertEquals(Arrays.asList(new Date(1609926588363L), new Date(1609926595376L), new Date(1609926593098L), + new Date(1609926588275L), new Date(1609926587294L)), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704673055L), + assertEquals(new Date(1609926585951L), ListOptionsEncoder.encodeSingleLessThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704679168L), + assertEquals(new Date(1609926587048L), ListOptionsEncoder.encodeSingleGreaterThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("f29eb380-b174-43fb-81fb-d62a52c3b907", + assertEquals("db62f195-c6b4-403f-9c58-cd2dc1341bbb", ListOptionsEncoder.encodeSingleEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("16b63d8a-9a0e-41d8-ba70-bb5d639594ea", + assertEquals("af7a5f43-064f-459b-9260-73d4ff095e66", ListOptionsEncoder.encodeSingleNotEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, FilterOperator.IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("a3c7b615-5e97-43af-a804-17ec5ccd143f"), + assertEquals(Arrays.asList("ea882913-33a9-43f4-a1d6-de003c15d51b", "a40fd4c0-d384-49d3-8c91-0390a186d8c9", + "0b82b14a-01b6-47e1-90d9-9d63184e768e", "c073cbc2-63d3-4606-a146-fda1b82857f4", + "c53f8fec-657d-4b4c-80a6-b62cab5faf8f", "002dc496-9b7b-4abd-af54-f7a89154ca36"), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, FilterOperator.NOT_IN)); assertNotNull(option.getNameFilters()); - assertEquals(Arrays.asList("c21a2c8c-44b4-43a7-864b-6d9d9296ce38", "1f507d95-b5dc-4a44-be1e-d2962e56607a", - "5e68152e-d9e6-42bd-8373-fff10dbb8454", "30b0d44f-fcab-4b98-a980-3d67cc211c99", - "332dfaac-3e80-4ca1-b8dd-9f0c821074a1"), + assertEquals(Arrays.asList("d4fb97cd-afee-40c8-9e05-7086ac242a3d", "ca865ba8-d8b1-4456-a282-dddee098c26a", + "d1393cf9-0ac4-443e-815d-38ef8599b53f", "55d9db87-be8a-4399-8cb5-cf2822411805", + "0c45bca2-7236-4b62-b7e4-d7228da1ca7d"), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_NAME, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, FilterOperator.EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("9a736518-dbc6-4d8a-8f99-e261be56df1a", + assertEquals("75f09698-e54c-4a82-9d09-5e6e1fa182a9", ListOptionsEncoder.encodeSingleEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getIdFilters()); - assertEquals("6811fe09-9ab2-465b-b704-8e1960f94e8e", + assertEquals("abe26330-8531-4a2b-8dad-6c5b8b96d28e", ListOptionsEncoder.encodeSingleNotEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, FilterOperator.IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("205ea732-2c90-4a03-8f21-d6b0b72e7c0b"), + assertEquals(Arrays.asList("5d573661-f77e-431c-a4a4-6bc323e425b0"), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, FilterOperator.NOT_IN)); assertNotNull(option.getIdFilters()); - assertEquals(Arrays.asList("e6f5da61-9791-4f6e-ad95-74e0b9df7227", "944a3c47-ffa5-48cb-9ae1-afdaa15090b4", - "75e7d8a3-c961-454f-979b-3eea78f44dda"), + assertEquals(Arrays.asList("a32c07d4-609f-4367-9614-f6d4f7edf641", "80655807-3db9-4f33-b6ce-6adca1fbef0c", + "73fe09d4-b37c-488b-84c4-ea6ec6589db2", "f981d0e5-71f6-4053-9e7b-c42b5e4f2052", + "00f489ac-f79b-452a-8b5d-105fce3487bd", "ce243e74-4c61-4fcc-8181-8f9110592182", + "d591e621-1c6f-476b-854a-e9a67c2d8e45", "33cff42b-400c-4c0a-9ee9-028106cf9b5f"), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ID, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, FilterOperator.EQUAL)); assertNotNull(option.getDeviceFilterFilters()); - assertEquals("98575394-20f0-491d-830d-c799e9a7344f", + assertEquals("11cb88eb-f9ba-4021-a700-2d4f9d5c95e0", ListOptionsEncoder.encodeSingleEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceFilterFilters()); - assertEquals("e1936874-6494-4b32-a1cd-715e02ae7831", + assertEquals("7f949fbc-d8a0-46c1-b996-1ccc63327bea", ListOptionsEncoder.encodeSingleNotEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, FilterOperator.IN)); assertNotNull(option.getDeviceFilterFilters()); - assertEquals(Arrays.asList("baeedbc6-1b97-4c2f-b094-7b3633cfb5f1", "68bb22e1-5c2a-4535-b139-c0e4fd7c6c50", - "b808ced2-cbe7-4542-8203-ee38ed2cd274", "ef24aea5-f41d-4594-9f68-8084ad2fb906", - "e45d6d39-ada2-4289-b420-53467cf75459", "9b633432-215f-4345-bab4-d3b46c9d99e8", - "aeaa38fb-f130-447f-a75a-25a88e11bf02", "07a681f5-1d3d-447b-b7f2-c8c3ab63712f"), + assertEquals(Arrays.asList("c449ef3a-607e-47ea-8249-a1d3361883bb", "7109ea66-86ba-49b9-81b6-341ee07e81ff", + "f8ae24ec-3e8b-4f47-b6d2-3136713c96f5", "322a9208-00f4-4bda-bf33-710c254901ef", + "1a8a9a4b-1312-4c32-924c-41ebe4802fa2", "28b1f37e-7c16-4b19-a5b2-32c8bfc76a96", + "a952b3a5-b1ce-4045-a65b-a21d4427dfbc", "f21e577e-cb25-4aee-b8f1-3b4a10cf3919"), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, FilterOperator.NOT_IN)); assertNotNull(option.getDeviceFilterFilters()); - assertEquals(Arrays.asList("b1d0ada0-072f-4689-bb97-2d708189b2d0", "a1bb2c2b-d1f1-4ea1-9057-28db0573d1eb", - "9b8892af-4043-4ae0-b040-df0f63c95b9f", "f4066424-7655-4c73-81b9-46f426696e7c", - "cf1e2886-011e-4199-b749-1ff4005dbb47", "ce949c5a-4675-464f-913b-47c05a0a11e3", - "8fbae38b-f8d2-4cc8-8f3a-763bc3884039", "386da303-8a60-4452-944b-64423345862b"), + assertEquals(Arrays.asList("75701461-c376-40c8-a111-e9c802de219d", "84cd228d-a064-4915-9738-00289d16ce92"), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DEVICE_FILTER, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, FilterOperator.IN)); assertNotNull(option.getFinishedFilters()); - assertEquals(Arrays.asList(new Date(1574704675222L), new Date(1574704679167L), new Date(1574704680908L), - new Date(1574704679319L)), + assertEquals(Arrays.asList(new Date(1609926593385L), new Date(1609926595532L), new Date(1609926590370L), + new Date(1609926590295L), new Date(1609926589283L), new Date(1609926594017L), + new Date(1609926590265L), new Date(1609926590272L)), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, FilterOperator.NOT_IN)); assertNotNull(option.getFinishedFilters()); - assertEquals(Arrays.asList(new Date(1574704681108L), new Date(1574704678909L), new Date(1574704679904L)), + assertEquals(Arrays.asList(new Date(1609926593730L), new Date(1609926590944L), new Date(1609926589775L), + new Date(1609926593973L), new Date(1609926589683L)), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, FilterOperator.LESS_THAN)); assertNotNull(option.getFinishedFilters()); - assertEquals(new Date(1574704672789L), + assertEquals(new Date(1609926594039L), ListOptionsEncoder.encodeSingleLessThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, FilterOperator.GREATER_THAN)); assertNotNull(option.getFinishedFilters()); - assertEquals(new Date(1574704681862L), + assertEquals(new Date(1609926586458L), ListOptionsEncoder.encodeSingleGreaterThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_FINISHED, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, FilterOperator.IN)); assertNotNull(option.getStartedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704679352L), new Date(1574704682383L), new Date(1574704680925L), - new Date(1574704676922L), new Date(1574704673584L), new Date(1574704674798L), - new Date(1574704677960L), new Date(1574704678541L), new Date(1574704682572L)), + assertEquals(Arrays.asList(new Date(1609926595389L), new Date(1609926592998L), new Date(1609926588895L), + new Date(1609926591465L), new Date(1609926586179L), new Date(1609926592721L)), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getStartedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704682104L), new Date(1574704680373L), new Date(1574704680846L), - new Date(1574704674426L), new Date(1574704676908L), new Date(1574704672939L), - new Date(1574704674988L), new Date(1574704674849L)), + assertEquals(Arrays.asList(new Date(1609926590768L), new Date(1609926592143L), new Date(1609926589665L), + new Date(1609926589616L), new Date(1609926588312L)), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getStartedAtFilters()); - assertEquals(new Date(1574704676583L), + assertEquals(new Date(1609926591145L), ListOptionsEncoder.encodeSingleLessThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getStartedAtFilters()); - assertEquals(new Date(1574704675582L), + assertEquals(new Date(1609926594976L), ListOptionsEncoder.encodeSingleGreaterThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_STARTED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, FilterOperator.IN)); assertNotNull(option.getWhenFilters()); - assertEquals(Arrays.asList(new Date(1574704676877L), new Date(1574704673121L), new Date(1574704678057L), - new Date(1574704679834L), new Date(1574704679913L), new Date(1574704677972L), - new Date(1574704673938L), new Date(1574704678093L)), + assertEquals(Arrays.asList(new Date(1609926586252L), new Date(1609926587106L)), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, FilterOperator.NOT_IN)); assertNotNull(option.getWhenFilters()); - assertEquals(Arrays.asList(new Date(1574704676456L), new Date(1574704680852L), new Date(1574704672959L), - new Date(1574704675280L), new Date(1574704677819L), new Date(1574704679011L)), + assertEquals(Arrays.asList(new Date(1609926592019L), new Date(1609926592055L), new Date(1609926591249L), + new Date(1609926593543L), new Date(1609926588966L), new Date(1609926591935L)), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, FilterOperator.LESS_THAN)); assertNotNull(option.getWhenFilters()); - assertEquals(new Date(1574704675747L), + assertEquals(new Date(1609926594298L), ListOptionsEncoder.encodeSingleLessThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, FilterOperator.GREATER_THAN)); assertNotNull(option.getWhenFilters()); - assertEquals(new Date(1574704679338L), + assertEquals(new Date(1609926588788L), ListOptionsEncoder.encodeSingleGreaterThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_WHEN, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704678687L), new Date(1574704681137L), new Date(1574704677515L), - new Date(1574704675367L), new Date(1574704679360L), new Date(1574704679122L)), + assertEquals(Arrays.asList(new Date(1609926588271L), new Date(1609926585795L), new Date(1609926587547L), + new Date(1609926587040L), new Date(1609926586084L), new Date(1609926592619L), + new Date(1609926588215L), new Date(1609926586445L), new Date(1609926592085L)), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.NOT_IN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(Arrays.asList(new Date(1574704678030L), new Date(1574704678096L), new Date(1574704673990L), - new Date(1574704680350L), new Date(1574704682102L)), + assertEquals(Arrays.asList(new Date(1609926594189L), new Date(1609926586217L), new Date(1609926593423L), + new Date(1609926590339L), new Date(1609926589286L), new Date(1609926594759L), + new Date(1609926592304L)), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704682395L), + assertEquals(new Date(1609926593024L), ListOptionsEncoder.encodeSingleLessThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704674247L), + assertEquals(new Date(1609926588620L), ListOptionsEncoder.encodeSingleGreaterThanFilter(UpdateCampaignListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, FilterOperator.EQUAL)); assertNotNull(option.getRootManifestIdFilters()); - assertEquals("430227d0-3cc4-468b-90ea-e91c3204f7a2", + assertEquals("9a7ce0fd-1c83-4ac6-ad5d-228e99a84f98", ListOptionsEncoder.encodeSingleEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, FilterOperator.NOT_EQUAL)); assertNotNull(option.getRootManifestIdFilters()); - assertEquals("2ade60c6-8632-424c-ba6b-9c5896bce7fe", + assertEquals("c46c5246-fffa-41b2-a5a7-4053ef9bce2d", ListOptionsEncoder.encodeSingleNotEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, FilterOperator.IN)); assertNotNull(option.getRootManifestIdFilters()); - assertEquals(Arrays.asList("bdc33936-ea60-40e7-b2ba-825e4ff53682", "5e6a372b-1784-46ef-83c6-f89ffaed0e5e", - "a7c71cc4-b3c4-4bdd-b864-a3e574a39fb4"), + assertEquals(Arrays.asList("173a4438-1a32-4f85-b985-d124e5e8cdac"), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, FilterOperator.NOT_IN)); assertNotNull(option.getRootManifestIdFilters()); - assertEquals(Arrays.asList("5d0f069a-41e0-49c5-8cff-fea757ba530c", "9624d72e-25ab-4d19-b7ae-4df3e94e27ce", - "7ae1f8f2-558b-4c41-802a-0494b400c8f5", "37e3732c-1ad9-4663-b507-9c7e15db3a27", - "fd46c601-478b-43bb-9254-97fa15064870"), + assertEquals(Arrays.asList("2639de72-f2da-4a8e-a1f1-e4961ab3845f", "8d214a32-a3b3-43ef-b6e4-86a975c22e78"), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_ROOT_MANIFEST_ID, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("7a16e097-9dbd-4902-830e-46e6a9b0f784", + assertEquals("16ae6a81-cd49-4d15-a2d2-150da40bf3b7", ListOptionsEncoder.encodeSingleEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDescriptionFilters()); - assertEquals("69a58d3d-d799-4ab6-bced-5dc2623362a0", + assertEquals("3851f522-b6e0-473c-9fad-4783399e2a37", ListOptionsEncoder.encodeSingleNotEqualFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, String.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("38bb63fd-cc3a-423d-b666-d51ba49443ba"), + assertEquals(Arrays.asList("69ab5689-ffea-4e86-8282-bde501d63c47", "d2b070ec-fbda-4d26-b696-c7ee56120623", + "aad9401a-6258-47b2-aeb0-4335e3a14cd3"), ListOptionsEncoder.encodeSingleInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); assertTrue(option.hasFilters(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION)); assertTrue(option.hasFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, FilterOperator.NOT_IN)); assertNotNull(option.getDescriptionFilters()); - assertEquals(Arrays.asList("23106f52-4e26-4cf7-a65b-e3881f8e918b", "51bcf480-acab-4277-8829-2a650f65f646", - "9b8af3e4-9ba1-4231-914e-1ca3b8bb04b9", "aa5be059-ab07-48a0-8374-ef120ff76b41", - "9867353a-8ec7-4529-a119-fa3d186977be", "edaf4f96-8164-4f72-b4da-bee028106d87", - "4f9358f3-8e01-4edd-a44e-ff8f35bd0c0d", "edb235b0-d56c-477a-bdb9-c9914780b2c3", - "89626bae-b150-4631-bf6b-8a33ee104b6b"), + assertEquals(Arrays.asList("981e3841-833a-4c01-9584-4dd6cf6fdd0d", "f1ba3beb-3b18-4c65-9358-6daa8795c07d", + "a9db8eba-9077-45c3-83c1-add67a908d4e", "7c30ca8e-03a7-43f8-9595-1cb9e8fb5c14", + "1a68d859-1b38-4edc-8393-fca79f373a6f", "4e7fc8fe-ea81-4458-ba0d-ae800b6cf33a", + "fada7c96-6887-43c2-a9d4-6fcd3b2d0b75"), ListOptionsEncoder.encodeSingleNotInFilter(UpdateCampaignListOptions.TAG_FILTER_BY_DESCRIPTION, List.class, option)); } catch (Exception exception) { @@ -449,15 +457,15 @@ public void testFilters() { @Test public void testHashCode() { try { - UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(47), - Long.valueOf(-96), + UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(15), + Long.valueOf(-50), Order.getDefault(), - "5298899b-2ce2-4b86-8f59-c99d20b5f99e", + "db161c06-fb74-4707-9156-818cd6cc8a4f", null, null); - UpdateCampaignListOptions updatecampaignlistoptions2 = new UpdateCampaignListOptions(Integer.valueOf(47), - Long.valueOf(-96), + UpdateCampaignListOptions updatecampaignlistoptions2 = new UpdateCampaignListOptions(Integer.valueOf(15), + Long.valueOf(-50), Order.getDefault(), - "5298899b-2ce2-4b86-8f59-c99d20b5f99e", + "db161c06-fb74-4707-9156-818cd6cc8a4f", null, null); assertNotNull(updatecampaignlistoptions1); assertNotNull(updatecampaignlistoptions2); @@ -480,20 +488,20 @@ public void testHashCode() { @Test public void testEquals() { try { - UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(-86), - Long.valueOf(-45), + UpdateCampaignListOptions updatecampaignlistoptions1 = new UpdateCampaignListOptions(Integer.valueOf(-101), + Long.valueOf(-84), Order.getDefault(), - "e0acb5d5-47c4-481c-a578-9d23bb3603df", + "a7f58772-5fb1-4146-8f88-3a51c90c8457", null, null); - UpdateCampaignListOptions updatecampaignlistoptions2 = new UpdateCampaignListOptions(Integer.valueOf(-86), - Long.valueOf(-45), + UpdateCampaignListOptions updatecampaignlistoptions2 = new UpdateCampaignListOptions(Integer.valueOf(-101), + Long.valueOf(-84), Order.getDefault(), - "e0acb5d5-47c4-481c-a578-9d23bb3603df", + "a7f58772-5fb1-4146-8f88-3a51c90c8457", null, null); - UpdateCampaignListOptions updatecampaignlistoptions3 = new UpdateCampaignListOptions(Integer.valueOf(-4), - Long.valueOf(74), + UpdateCampaignListOptions updatecampaignlistoptions3 = new UpdateCampaignListOptions(Integer.valueOf(90), + Long.valueOf(33), Order.getDefault(), - "7c1b063e-03af-47e9-ada1-57d7b759d43e", + "7f32484c-d307-47d7-8728-76a66a901acb", null, null); assertNotNull(updatecampaignlistoptions1); assertNotNull(updatecampaignlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateEnrollmentListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateEnrollmentListOptions.java index 77015b4ec..a4821eeca 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateEnrollmentListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateEnrollmentListOptions.java @@ -22,10 +22,10 @@ public class TestCertificateEnrollmentListOptions { @Test public void testClone() { try { - CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(48), - Long.valueOf(36), + CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(-14), + Long.valueOf(-104), Order.getDefault(), - "b0f5fbe1-99ac-48ae-9b47-721559e6ccff", + "5f0d3e06-6ace-4cc6-840d-8e3213cca704", null, null); CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = certificateenrollmentlistoptions1.clone(); @@ -45,14 +45,14 @@ public void testClone() { @Test public void testFilters() { try { - CertificateEnrollmentListOptions option = new CertificateEnrollmentListOptions().lessThanUpdatedAt(new Date(1574704672876L)) - .greaterThanUpdatedAt(new Date(1574704677026L)) - .equalToCertificateName("cfd6eee7-e42f-4caa-b164-8e4ea692470c") - .equalToDeviceId("0ba0b02f-20b0-4aec-b18c-a2e23c3053f6") + CertificateEnrollmentListOptions option = new CertificateEnrollmentListOptions().lessThanUpdatedAt(new Date(1609926593757L)) + .greaterThanUpdatedAt(new Date(1609926590307L)) + .equalToCertificateName("85b15b11-81b8-4000-8224-a27c46291c8d") + .equalToDeviceId("1196fd1a-4595-4049-8d41-acfd90540b57") .notEqualToEnrollResult(CertificateEnrollmentEnrollResult.getDefault()) .equalToEnrollResult(CertificateEnrollmentEnrollResult.getDefault()) - .lessThanCreatedAt(new Date(1574704679359L)) - .greaterThanCreatedAt(new Date(1574704673792L)) + .lessThanCreatedAt(new Date(1609926586768L)) + .greaterThanCreatedAt(new Date(1609926588491L)) .notEqualToEnrollStatus(CertificateEnrollmentEnrollStatus.getDefault()) .equalToEnrollStatus(CertificateEnrollmentEnrollStatus.getDefault()); assertTrue(option.hasFilters()); @@ -60,28 +60,28 @@ public void testFilters() { assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704672876L), + assertEquals(new Date(1609926593757L), ListOptionsEncoder.encodeSingleLessThanFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_UPDATED_AT)); assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_UPDATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getUpdatedAtFilters()); - assertEquals(new Date(1574704677026L), + assertEquals(new Date(1609926590307L), ListOptionsEncoder.encodeSingleGreaterThanFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_UPDATED_AT, Date.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_CERTIFICATE_NAME)); assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CERTIFICATE_NAME, FilterOperator.EQUAL)); assertNotNull(option.getCertificateNameFilters()); - assertEquals("cfd6eee7-e42f-4caa-b164-8e4ea692470c", + assertEquals("85b15b11-81b8-4000-8224-a27c46291c8d", ListOptionsEncoder.encodeSingleEqualFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CERTIFICATE_NAME, String.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_DEVICE_ID)); assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_DEVICE_ID, FilterOperator.EQUAL)); assertNotNull(option.getDeviceIdFilters()); - assertEquals("0ba0b02f-20b0-4aec-b18c-a2e23c3053f6", + assertEquals("1196fd1a-4595-4049-8d41-acfd90540b57", ListOptionsEncoder.encodeSingleEqualFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_DEVICE_ID, String.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_ENROLL_RESULT)); @@ -103,14 +103,14 @@ public void testFilters() { assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.LESS_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704679359L), + assertEquals(new Date(1609926586768L), ListOptionsEncoder.encodeSingleLessThanFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_CREATED_AT)); assertTrue(option.hasFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CREATED_AT, FilterOperator.GREATER_THAN)); assertNotNull(option.getCreatedAtFilters()); - assertEquals(new Date(1574704673792L), + assertEquals(new Date(1609926588491L), ListOptionsEncoder.encodeSingleGreaterThanFilter(CertificateEnrollmentListOptions.TAG_FILTER_BY_CREATED_AT, Date.class, option)); assertTrue(option.hasFilters(CertificateEnrollmentListOptions.TAG_FILTER_BY_ENROLL_STATUS)); @@ -140,16 +140,16 @@ public void testFilters() { @Test public void testHashCode() { try { - CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(58), - Long.valueOf(40), + CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(35), + Long.valueOf(126), Order.getDefault(), - "a079c181-0afe-4474-a989-af61026abaab", + "a64cec5f-6c9f-4ed2-b507-c46403594ce6", null, null); - CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(58), - Long.valueOf(40), + CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(35), + Long.valueOf(126), Order.getDefault(), - "a079c181-0afe-4474-a989-af61026abaab", + "a64cec5f-6c9f-4ed2-b507-c46403594ce6", null, null); assertNotNull(certificateenrollmentlistoptions1); @@ -173,22 +173,22 @@ public void testHashCode() { @Test public void testEquals() { try { - CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(1), - Long.valueOf(-38), + CertificateEnrollmentListOptions certificateenrollmentlistoptions1 = new CertificateEnrollmentListOptions(Integer.valueOf(29), + Long.valueOf(-121), Order.getDefault(), - "4c2f0459-26a3-4bf3-930d-2cc2a4358b6e", + "6b0d8167-0edc-4682-b955-3a68e7d87ac8", null, null); - CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(1), - Long.valueOf(-38), + CertificateEnrollmentListOptions certificateenrollmentlistoptions2 = new CertificateEnrollmentListOptions(Integer.valueOf(29), + Long.valueOf(-121), Order.getDefault(), - "4c2f0459-26a3-4bf3-930d-2cc2a4358b6e", + "6b0d8167-0edc-4682-b955-3a68e7d87ac8", null, null); - CertificateEnrollmentListOptions certificateenrollmentlistoptions3 = new CertificateEnrollmentListOptions(Integer.valueOf(-127), - Long.valueOf(59), + CertificateEnrollmentListOptions certificateenrollmentlistoptions3 = new CertificateEnrollmentListOptions(Integer.valueOf(51), + Long.valueOf(-73), Order.getDefault(), - "befffe12-e706-430f-85f8-49a031b8334a", + "e06f806d-c3f7-4e12-96b5-dc3ad4651731", null, null); assertNotNull(certificateenrollmentlistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerConfigListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerConfigListOptions.java index 106308438..c1a385293 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerConfigListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerConfigListOptions.java @@ -21,10 +21,10 @@ public class TestCertificateIssuerConfigListOptions { @Test public void testClone() { try { - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(-102), - Long.valueOf(-126), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(41), + Long.valueOf(26), Order.getDefault(), - "249b4a86-d4ec-4491-92d6-54d08b0dbc2b", + "6c171f5a-e195-4415-8f69-da08a077128e", null, null); CertificateIssuerConfigListOptions certificateissuerconfiglistoptions2 = certificateissuerconfiglistoptions1.clone(); @@ -44,13 +44,13 @@ public void testClone() { @Test public void testFilters() { try { - CertificateIssuerConfigListOptions option = new CertificateIssuerConfigListOptions().equalToReference("b6e049b8-f62f-447a-9e18-d3c6f8db72b4"); + CertificateIssuerConfigListOptions option = new CertificateIssuerConfigListOptions().equalToReference("68029984-b44f-4bdc-a101-68942b3044fc"); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(CertificateIssuerConfigListOptions.TAG_FILTER_BY_REFERENCE)); assertTrue(option.hasFilter(CertificateIssuerConfigListOptions.TAG_FILTER_BY_REFERENCE, FilterOperator.EQUAL)); assertNotNull(option.getReferenceFilters()); - assertEquals("b6e049b8-f62f-447a-9e18-d3c6f8db72b4", + assertEquals("68029984-b44f-4bdc-a101-68942b3044fc", ListOptionsEncoder.encodeSingleEqualFilter(CertificateIssuerConfigListOptions.TAG_FILTER_BY_REFERENCE, String.class, option)); } catch (Exception exception) { @@ -65,16 +65,16 @@ public void testFilters() { @Test public void testHashCode() { try { - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(116), - Long.valueOf(88), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(19), + Long.valueOf(-59), Order.getDefault(), - "e5ae1598-386b-4caa-8ba7-ccbeaa145607", + "e8830698-a3ed-4f41-b83e-d66d9269938f", null, null); - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions2 = new CertificateIssuerConfigListOptions(Integer.valueOf(116), - Long.valueOf(88), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions2 = new CertificateIssuerConfigListOptions(Integer.valueOf(19), + Long.valueOf(-59), Order.getDefault(), - "e5ae1598-386b-4caa-8ba7-ccbeaa145607", + "e8830698-a3ed-4f41-b83e-d66d9269938f", null, null); assertNotNull(certificateissuerconfiglistoptions1); @@ -99,22 +99,22 @@ public void testHashCode() { @Test public void testEquals() { try { - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(10), - Long.valueOf(88), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions1 = new CertificateIssuerConfigListOptions(Integer.valueOf(-26), + Long.valueOf(-33), Order.getDefault(), - "84903dcb-15b1-48a3-b8b8-0a109f88db91", + "3ee34691-c989-4ac6-a388-94010b8e2d48", null, null); - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions2 = new CertificateIssuerConfigListOptions(Integer.valueOf(10), - Long.valueOf(88), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions2 = new CertificateIssuerConfigListOptions(Integer.valueOf(-26), + Long.valueOf(-33), Order.getDefault(), - "84903dcb-15b1-48a3-b8b8-0a109f88db91", + "3ee34691-c989-4ac6-a388-94010b8e2d48", null, null); - CertificateIssuerConfigListOptions certificateissuerconfiglistoptions3 = new CertificateIssuerConfigListOptions(Integer.valueOf(70), - Long.valueOf(-111), + CertificateIssuerConfigListOptions certificateissuerconfiglistoptions3 = new CertificateIssuerConfigListOptions(Integer.valueOf(-85), + Long.valueOf(-54), Order.getDefault(), - "27f78902-7986-440d-9214-4c70899dd906", + "a174821b-707c-46d7-8e6e-f4182dbe5a35", null, null); assertNotNull(certificateissuerconfiglistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerListOptions.java index 3a9d8090b..68f204d47 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestCertificateIssuerListOptions.java @@ -19,10 +19,10 @@ public class TestCertificateIssuerListOptions { @Test public void testClone() { try { - CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(101), - Long.valueOf(-38), + CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(95), + Long.valueOf(-16), Order.getDefault(), - "5f8a687e-7686-4a24-9d4e-d331d6d9868e", + "e3a5f1b1-ff0e-421b-91fe-ee3f6e852fc4", null, null); CertificateIssuerListOptions certificateissuerlistoptions2 = certificateissuerlistoptions1.clone(); assertNotNull(certificateissuerlistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(119), - Long.valueOf(3), + CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(19), + Long.valueOf(90), Order.getDefault(), - "3610d875-b957-48d9-97fd-88486b014489", + "6974ec4d-7ef1-436c-a18a-823d6358e96e", null, null); - CertificateIssuerListOptions certificateissuerlistoptions2 = new CertificateIssuerListOptions(Integer.valueOf(119), - Long.valueOf(3), + CertificateIssuerListOptions certificateissuerlistoptions2 = new CertificateIssuerListOptions(Integer.valueOf(19), + Long.valueOf(90), Order.getDefault(), - "3610d875-b957-48d9-97fd-88486b014489", + "6974ec4d-7ef1-436c-a18a-823d6358e96e", null, null); assertNotNull(certificateissuerlistoptions1); assertNotNull(certificateissuerlistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(102), - Long.valueOf(8), + CertificateIssuerListOptions certificateissuerlistoptions1 = new CertificateIssuerListOptions(Integer.valueOf(47), + Long.valueOf(-49), Order.getDefault(), - "d6078419-f2bb-4098-ac84-a06d5b3ad221", + "6d0401bb-2ed0-44d8-b0dc-e4642ad0a02d", null, null); - CertificateIssuerListOptions certificateissuerlistoptions2 = new CertificateIssuerListOptions(Integer.valueOf(102), - Long.valueOf(8), + CertificateIssuerListOptions certificateissuerlistoptions2 = new CertificateIssuerListOptions(Integer.valueOf(47), + Long.valueOf(-49), Order.getDefault(), - "d6078419-f2bb-4098-ac84-a06d5b3ad221", + "6d0401bb-2ed0-44d8-b0dc-e4642ad0a02d", null, null); - CertificateIssuerListOptions certificateissuerlistoptions3 = new CertificateIssuerListOptions(Integer.valueOf(-54), - Long.valueOf(-19), + CertificateIssuerListOptions certificateissuerlistoptions3 = new CertificateIssuerListOptions(Integer.valueOf(84), + Long.valueOf(-105), Order.getDefault(), - "432135c8-0bd8-4e01-a6dc-66ab8a7f919f", + "a18f94be-5156-42c4-b652-121d9effbba1", null, null); assertNotNull(certificateissuerlistoptions1); assertNotNull(certificateissuerlistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestPreSharedKeyListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestPreSharedKeyListOptions.java index 3facfdee1..2de796c73 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestPreSharedKeyListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestPreSharedKeyListOptions.java @@ -19,10 +19,10 @@ public class TestPreSharedKeyListOptions { @Test public void testClone() { try { - PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(46), - Long.valueOf(-31), + PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(2), + Long.valueOf(-59), Order.getDefault(), - "7d7d94bb-63a2-422b-aa73-d6dac53f13cb", + "505d8c14-432c-48aa-bc90-0660caf59ddb", null, null); PreSharedKeyListOptions presharedkeylistoptions2 = presharedkeylistoptions1.clone(); assertNotNull(presharedkeylistoptions1); @@ -41,15 +41,15 @@ public void testClone() { @Test public void testHashCode() { try { - PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(-77), - Long.valueOf(-91), + PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(-4), + Long.valueOf(-114), Order.getDefault(), - "25769883-3a5a-45e7-8db4-28e644b43a60", + "58d69424-52e8-4d58-b4dd-7d5746cad59d", null, null); - PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(-77), - Long.valueOf(-91), + PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(-4), + Long.valueOf(-114), Order.getDefault(), - "25769883-3a5a-45e7-8db4-28e644b43a60", + "58d69424-52e8-4d58-b4dd-7d5746cad59d", null, null); assertNotNull(presharedkeylistoptions1); assertNotNull(presharedkeylistoptions2); @@ -72,20 +72,20 @@ public void testHashCode() { @Test public void testEquals() { try { - PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(62), - Long.valueOf(-65), + PreSharedKeyListOptions presharedkeylistoptions1 = new PreSharedKeyListOptions(Integer.valueOf(-68), + Long.valueOf(4), Order.getDefault(), - "15c77751-457d-45e4-a4a8-d9b1c0a45121", + "c2ffd410-fa6f-47ea-a682-f1dc78f7a18d", null, null); - PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(62), - Long.valueOf(-65), + PreSharedKeyListOptions presharedkeylistoptions2 = new PreSharedKeyListOptions(Integer.valueOf(-68), + Long.valueOf(4), Order.getDefault(), - "15c77751-457d-45e4-a4a8-d9b1c0a45121", + "c2ffd410-fa6f-47ea-a682-f1dc78f7a18d", null, null); - PreSharedKeyListOptions presharedkeylistoptions3 = new PreSharedKeyListOptions(Integer.valueOf(-114), - Long.valueOf(30), + PreSharedKeyListOptions presharedkeylistoptions3 = new PreSharedKeyListOptions(Integer.valueOf(-39), + Long.valueOf(-38), Order.getDefault(), - "30e458ef-456e-4391-8967-d3c1b28ee0e3", + "37f9b220-c960-4e46-93ff-553bfcbf558b", null, null); assertNotNull(presharedkeylistoptions1); assertNotNull(presharedkeylistoptions2); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateListOptions.java index 6843929ce..f060728ab 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateListOptions.java @@ -21,10 +21,10 @@ public class TestSubtenantTrustedCertificateListOptions { @Test public void testClone() { try { - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(50), - Long.valueOf(-30), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-128), + Long.valueOf(-7), Order.getDefault(), - "23d23473-f6f1-4a08-a77d-a56d2983c571", + "6559a47f-3bed-44f8-ab52-5c6093603312", null, null); SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = subtenanttrustedcertificatelistoptions1.clone(); @@ -45,14 +45,15 @@ public void testClone() { public void testFilters() { try { SubtenantTrustedCertificateListOptions option = new SubtenantTrustedCertificateListOptions().equalToValid(Boolean.TRUE) - .equalToName("684cae18-2157-48fe-b0f7-da7f84a076be") + .equalToName("57c60c2d-7654-4383-987b-8d9e1cd26995") + .equalToCertificateFingerprint("5b821b5d-33ad-48a6-b852-0f54924eb89d") .equalToStatus(SubtenantTrustedCertificateStatus.getDefault()) - .equalToDeviceExecutionMode(Integer.valueOf(-59)) - .notEqualToDeviceExecutionMode(Integer.valueOf(125)) - .likeIssuer("fe18cf14-53b5-41a8-a7f8-b75fdfb07f33") + .equalToDeviceExecutionMode(Integer.valueOf(-4)) + .notEqualToDeviceExecutionMode(Integer.valueOf(-95)) + .likeIssuer("f4e480d0-01ec-4997-8067-431e0b3561d0") .equalToService(SubtenantTrustedCertificateService.getDefault()) - .likeSubject("21046fa4-cb86-4546-8075-6c4302ab99b5") - .equalToEnrollmentMode(Boolean.TRUE); + .likeSubject("86f2eddd-4d4f-410e-9ed2-680a8fc7ee7f") + .equalToEnrollmentMode(Boolean.FALSE); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_VALID)); assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_VALID, @@ -65,9 +66,16 @@ public void testFilters() { assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("684cae18-2157-48fe-b0f7-da7f84a076be", + assertEquals("57c60c2d-7654-4383-987b-8d9e1cd26995", ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_NAME, String.class, option)); + assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT)); + assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + FilterOperator.EQUAL)); + assertNotNull(option.getCertificateFingerprintFilters()); + assertEquals("5b821b5d-33ad-48a6-b852-0f54924eb89d", + ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + String.class, option)); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_STATUS)); assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_STATUS, FilterOperator.EQUAL)); @@ -79,21 +87,21 @@ public void testFilters() { assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.EQUAL)); assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(-59), + assertEquals(Integer.valueOf(-4), ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.class, option)); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(125), + assertEquals(Integer.valueOf(-95), ListOptionsEncoder.encodeSingleNotEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.class, option)); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ISSUER)); assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ISSUER, FilterOperator.LIKE)); assertNotNull(option.getIssuerFilters()); - assertEquals("fe18cf14-53b5-41a8-a7f8-b75fdfb07f33", + assertEquals("f4e480d0-01ec-4997-8067-431e0b3561d0", ListOptionsEncoder.encodeSingleLikeFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ISSUER, String.class, option)); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_SERVICE)); @@ -107,14 +115,14 @@ public void testFilters() { assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, FilterOperator.LIKE)); assertNotNull(option.getSubjectFilters()); - assertEquals("21046fa4-cb86-4546-8075-6c4302ab99b5", + assertEquals("86f2eddd-4d4f-410e-9ed2-680a8fc7ee7f", ListOptionsEncoder.encodeSingleLikeFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, String.class, option)); assertTrue(option.hasFilters(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE)); assertTrue(option.hasFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE, FilterOperator.EQUAL)); assertNotNull(option.getEnrollmentModeFilters()); - assertEquals(Boolean.TRUE, + assertEquals(Boolean.FALSE, ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE, Boolean.class, option)); } catch (Exception exception) { @@ -129,16 +137,16 @@ public void testFilters() { @Test public void testHashCode() { try { - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(38), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(51), Long.valueOf(79), Order.getDefault(), - "f2d79052-cdeb-468c-81c9-c72f1883423c", + "e2df2b67-b77a-477b-80a5-257f4d8fa716", null, null); - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(38), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(51), Long.valueOf(79), Order.getDefault(), - "f2d79052-cdeb-468c-81c9-c72f1883423c", + "e2df2b67-b77a-477b-80a5-257f4d8fa716", null, null); assertNotNull(subtenanttrustedcertificatelistoptions1); @@ -163,22 +171,22 @@ public void testHashCode() { @Test public void testEquals() { try { - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(65), - Long.valueOf(61), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions1 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-110), + Long.valueOf(-81), Order.getDefault(), - "6646edc5-d533-4033-b553-763fb25382fd", + "a595379a-aa43-4d27-baff-c2027445d92a", null, null); - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(65), - Long.valueOf(61), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions2 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-110), + Long.valueOf(-81), Order.getDefault(), - "6646edc5-d533-4033-b553-763fb25382fd", + "a595379a-aa43-4d27-baff-c2027445d92a", null, null); - SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions3 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-9), - Long.valueOf(79), + SubtenantTrustedCertificateListOptions subtenanttrustedcertificatelistoptions3 = new SubtenantTrustedCertificateListOptions(Integer.valueOf(-108), + Long.valueOf(-71), Order.getDefault(), - "0a4a71de-968f-49dd-8f4c-bc2efa782cd7", + "40d5fe93-ec96-4fe6-8f74-f01643cf6be1", null, null); assertNotNull(subtenanttrustedcertificatelistoptions1); diff --git a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateListOptions.java b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateListOptions.java index 5cadec40f..26911c260 100644 --- a/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateListOptions.java +++ b/foundation-access/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateListOptions.java @@ -21,10 +21,10 @@ public class TestTrustedCertificateListOptions { @Test public void testClone() { try { - TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(-26), - Long.valueOf(10), + TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(15), + Long.valueOf(115), Order.getDefault(), - "15e58cd7-7aa3-4234-9db6-cde260cba28d", + "f068e062-b7b0-499b-b113-e3bfa356aa53", null, null); TrustedCertificateListOptions trustedcertificatelistoptions2 = trustedcertificatelistoptions1.clone(); @@ -45,14 +45,15 @@ public void testClone() { public void testFilters() { try { TrustedCertificateListOptions option = new TrustedCertificateListOptions().equalToValid(Boolean.FALSE) - .equalToName("ff943075-aee3-497a-8ed2-0cd09e72d7db") + .equalToName("9ac686b8-9d6d-44aa-a4bb-2d3902c878d7") + .equalToCertificateFingerprint("5babe6ae-2cb7-47fb-bcf1-10b2b801c30e") .equalToStatus(TrustedCertificateStatus.getDefault()) - .equalToDeviceExecutionMode(Integer.valueOf(-100)) - .notEqualToDeviceExecutionMode(Integer.valueOf(69)) - .likeIssuer("0cc520be-37b0-4911-b014-75fae6993111") + .equalToDeviceExecutionMode(Integer.valueOf(-125)) + .notEqualToDeviceExecutionMode(Integer.valueOf(-117)) + .likeIssuer("5eb0c20e-d5c8-438a-be4b-2d89a45f07be") .equalToService(TrustedCertificateService.getDefault()) - .likeSubject("2eb17387-18e9-4040-9223-259c3976aea0") - .equalToEnrollmentMode(Boolean.FALSE); + .likeSubject("8e38076a-3f6a-4d39-8cec-2ea3daac9962") + .equalToEnrollmentMode(Boolean.TRUE); assertTrue(option.hasFilters()); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_VALID)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_VALID, FilterOperator.EQUAL)); @@ -63,9 +64,16 @@ public void testFilters() { assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_NAME)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_NAME, FilterOperator.EQUAL)); assertNotNull(option.getNameFilters()); - assertEquals("ff943075-aee3-497a-8ed2-0cd09e72d7db", + assertEquals("9ac686b8-9d6d-44aa-a4bb-2d3902c878d7", ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_NAME, String.class, option)); + assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT)); + assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + FilterOperator.EQUAL)); + assertNotNull(option.getCertificateFingerprintFilters()); + assertEquals("5babe6ae-2cb7-47fb-bcf1-10b2b801c30e", + ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + String.class, option)); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_STATUS)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_STATUS, FilterOperator.EQUAL)); assertNotNull(option.getStatusFilters()); @@ -76,20 +84,20 @@ public void testFilters() { assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.EQUAL)); assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(-100), + assertEquals(Integer.valueOf(-125), ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.class, option)); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, FilterOperator.NOT_EQUAL)); assertNotNull(option.getDeviceExecutionModeFilters()); - assertEquals(Integer.valueOf(69), + assertEquals(Integer.valueOf(-117), ListOptionsEncoder.encodeSingleNotEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_DEVICE_EXECUTION_MODE, Integer.class, option)); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_ISSUER)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_ISSUER, FilterOperator.LIKE)); assertNotNull(option.getIssuerFilters()); - assertEquals("0cc520be-37b0-4911-b014-75fae6993111", + assertEquals("5eb0c20e-d5c8-438a-be4b-2d89a45f07be", ListOptionsEncoder.encodeSingleLikeFilter(TrustedCertificateListOptions.TAG_FILTER_BY_ISSUER, String.class, option)); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_SERVICE)); @@ -101,14 +109,14 @@ public void testFilters() { assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, FilterOperator.LIKE)); assertNotNull(option.getSubjectFilters()); - assertEquals("2eb17387-18e9-4040-9223-259c3976aea0", + assertEquals("8e38076a-3f6a-4d39-8cec-2ea3daac9962", ListOptionsEncoder.encodeSingleLikeFilter(TrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, String.class, option)); assertTrue(option.hasFilters(TrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE)); assertTrue(option.hasFilter(TrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE, FilterOperator.EQUAL)); assertNotNull(option.getEnrollmentModeFilters()); - assertEquals(Boolean.FALSE, + assertEquals(Boolean.TRUE, ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_ENROLLMENT_MODE, Boolean.class, option)); } catch (Exception exception) { @@ -123,16 +131,16 @@ public void testFilters() { @Test public void testHashCode() { try { - TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(102), - Long.valueOf(60), + TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(101), + Long.valueOf(98), Order.getDefault(), - "4de497a9-e74b-4f21-b29a-98bc61163333", + "97d1e526-f0e4-411c-b3c4-a218c3905bb3", null, null); - TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(102), - Long.valueOf(60), + TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(101), + Long.valueOf(98), Order.getDefault(), - "4de497a9-e74b-4f21-b29a-98bc61163333", + "97d1e526-f0e4-411c-b3c4-a218c3905bb3", null, null); assertNotNull(trustedcertificatelistoptions1); @@ -156,22 +164,22 @@ public void testHashCode() { @Test public void testEquals() { try { - TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(-12), - Long.valueOf(67), + TrustedCertificateListOptions trustedcertificatelistoptions1 = new TrustedCertificateListOptions(Integer.valueOf(81), + Long.valueOf(-105), Order.getDefault(), - "8c6cafbd-7aa0-4c85-b7f2-8fa1e15e9311", + "682f3044-2703-4d90-971f-3744e203c63c", null, null); - TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(-12), - Long.valueOf(67), + TrustedCertificateListOptions trustedcertificatelistoptions2 = new TrustedCertificateListOptions(Integer.valueOf(81), + Long.valueOf(-105), Order.getDefault(), - "8c6cafbd-7aa0-4c85-b7f2-8fa1e15e9311", + "682f3044-2703-4d90-971f-3744e203c63c", null, null); - TrustedCertificateListOptions trustedcertificatelistoptions3 = new TrustedCertificateListOptions(Integer.valueOf(-34), - Long.valueOf(-25), + TrustedCertificateListOptions trustedcertificatelistoptions3 = new TrustedCertificateListOptions(Integer.valueOf(115), + Long.valueOf(64), Order.getDefault(), - "ae5139b4-224a-43ba-a267-9045fa815029", + "7a19fc49-fde9-4f28-be28-08b49a6fc248", null, null); assertNotNull(trustedcertificatelistoptions1); diff --git a/foundation-core/pom.xml b/foundation-core/pom.xml new file mode 100644 index 000000000..5edafe81f --- /dev/null +++ b/foundation-core/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + com.arm.mbed.cloud.sdk + foundation-core + 2.4.0 + + + 1.8 + 1.8 + + + + + com.arm.mbed.cloud.sdk + support-annotations + 2.4.0 + compile + + + commons-codec + commons-codec + 1.12 + compile + + + junit + junit + 4.12 + test + + + nl.jqno.equalsverifier + equalsverifier + 2.5.2 + test + + + diff --git a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ArtifactsGenerator.java b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ArtifactsGenerator.java index ecfd3d5e0..685ab9428 100644 --- a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ArtifactsGenerator.java +++ b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ArtifactsGenerator.java @@ -57,30 +57,30 @@ public void generate() throws TranslationException { for (final ModelAdapter adapter : artifacts.getAdapterModels()) { new ModelGenerator(sourceDestinationDirectory, adapter).generate(); } - logger.logInfo("Generating endpoints classes"); - for (final ModelEndpoints endpoints : artifacts.getProcessedEndpoints()) { - new ModelGenerator(sourceDestinationDirectory, endpoints).generate(); - } - logger.logInfo("Generating module classes"); - for (final ModelModule endpoints : artifacts.getProcessedModules()) { - new ModelGenerator(sourceDestinationDirectory, endpoints).generate(); - } - logger.logInfo("Generating Pelion other classes"); - for (final Model model : artifacts.getProcessedNonPojoModels()) { - new ModelGenerator(sourceDestinationDirectory, model).generate(); - } - for (final Model model : artifacts.getModuleFactory()) { - new ModelGenerator(primarySourceDestinationDirectory, model).generate(); - } - logger.logInfo("Generating unit tests"); - for (final ModelTest unittest : artifacts.getNonPojoUnitTests()) { - unittest.generateTests(); - new ModelTestGenerator(testDestinationDirectory, unittest, forceRegenerateUnitTests).generate(); - } - for (final ModelTest unittest : artifacts.getModuleFactoryUnitTests()) { - unittest.generateTests(); - new ModelTestGenerator(primaryTestDestinationDirectory, unittest, forceRegenerateUnitTests).generate(); - } + // logger.logInfo("Generating endpoints classes"); + // for (final ModelEndpoints endpoints : artifacts.getProcessedEndpoints()) { + // new ModelGenerator(sourceDestinationDirectory, endpoints).generate(); + // } + // logger.logInfo("Generating module classes"); + // for (final ModelModule endpoints : artifacts.getProcessedModules()) { + // new ModelGenerator(sourceDestinationDirectory, endpoints).generate(); + // } + // logger.logInfo("Generating Pelion other classes"); + // for (final Model model : artifacts.getProcessedNonPojoModels()) { + // new ModelGenerator(sourceDestinationDirectory, model).generate(); + // } + // for (final Model model : artifacts.getModuleFactory()) { + // new ModelGenerator(primarySourceDestinationDirectory, model).generate(); + // } + // logger.logInfo("Generating unit tests"); + // for (final ModelTest unittest : artifacts.getNonPojoUnitTests()) { + // unittest.generateTests(); + // new ModelTestGenerator(testDestinationDirectory, unittest, forceRegenerateUnitTests).generate(); + // } + // for (final ModelTest unittest : artifacts.getModuleFactoryUnitTests()) { + // unittest.generateTests(); + // new ModelTestGenerator(primaryTestDestinationDirectory, unittest, forceRegenerateUnitTests).generate(); + // } } diff --git a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapter.java b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapter.java index 91623e0d0..c979cc425 100644 --- a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapter.java +++ b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapter.java @@ -4,6 +4,7 @@ import java.util.LinkedHashMap; import java.util.Map; +import com.arm.pelion.sdk.foundation.generator.util.Logger; import com.arm.pelion.sdk.foundation.generator.util.TranslationException; import com.arm.pelion.sdk.foundation.generator.util.Utils; @@ -179,6 +180,10 @@ private void addConversion(Conversion conversion, boolean enflate) { } } + public Map getConversions() { + return conversions; + } + public static class Conversion { private final Model from; private final Model to; @@ -283,45 +288,51 @@ public void addMethod(ModelAdapter adapter, Renames renames) { // Nothing to do. exception.printStackTrace(); } - if (isEnum) { - boolean isFromModel = fromType.isModelEnum(); - - MethodMapperEnum enumMapping = new MethodMapperEnum((ModelEnum) (isFromModel ? fromToConsider - : toToConsider), - (isFromModel ? toType : fromType).getClazz(), - isFromModel); - adapter.addMethod(enumMapping); - } else if (isList) { - final MethodListMapper listMapping = new MethodListMapper(FUNCTION_NAME_MAP_LIST, - FUNCTION_NAME_GET_MAPPER, true, - toContentToConsider, fromToConsider, - fromContentToConsider, adapter); - adapter.addMethod(listMapping); - final MethodGetMapper getMapper = new MethodGetMapper(FUNCTION_NAME_GET_LIST_MAPPER, true, adapter, - determineListType(toToConsider.toType(), - toContentToConsider), - determineListType(fromType, - fromContentToConsider), - false, listMapping.getName()); - adapter.addMethod(getMapper); - } else if (fromType.isList() && toType.isList()) { - final TypeParameter fromSubType = ((TypeCompose) fromType).getContentType(); - final TypeParameter toSubType = ((TypeCompose) toType).getContentType(); - addSimpleListMethods(adapter, fromToConsider, toToConsider, fromContentToConsider, toContentToConsider, - fromType, toType, fromSubType.isModel()); - if (adapter.fetcher != null) { - addBasicMappingMethods(adapter, - TypeUtils.checkIfCollectionOfModel(fromSubType) ? adapter.fetcher.fetchModel(fromSubType) - : new Model(fromSubType.getClazz(), - fromSubType), - TypeUtils.checkIfCollectionOfModel(toSubType) ? adapter.fetcher.fetchModel(toSubType) - : new Model(toSubType.getClazz(), - toSubType), - renames, fromSubType, - action == MethodAction.CREATE || action == MethodAction.UPDATE); + + try { + if (isEnum) { + boolean isFromModel = fromType.isModelEnum(); + + MethodMapperEnum enumMapping = new MethodMapperEnum((ModelEnum) (isFromModel ? fromToConsider + : toToConsider), + (isFromModel ? toType : fromType).getClazz(), + isFromModel); + adapter.addMethod(enumMapping); + } else if (isList) { + final MethodListMapper listMapping = new MethodListMapper(FUNCTION_NAME_MAP_LIST, + FUNCTION_NAME_GET_MAPPER, true, + toContentToConsider, fromToConsider, + fromContentToConsider, adapter); + adapter.addMethod(listMapping); + final MethodGetMapper getMapper = new MethodGetMapper(FUNCTION_NAME_GET_LIST_MAPPER, true, adapter, + determineListType(toToConsider.toType(), + toContentToConsider), + determineListType(fromType, + fromContentToConsider), + false, listMapping.getName()); + adapter.addMethod(getMapper); + } else if (fromType.isList() && toType.isList()) { + final TypeParameter fromSubType = ((TypeCompose) fromType).getContentType(); + final TypeParameter toSubType = ((TypeCompose) toType).getContentType(); + addSimpleListMethods(adapter, fromToConsider, toToConsider, fromContentToConsider, + toContentToConsider, fromType, toType, fromSubType.isModel()); + if (adapter.fetcher != null) { + addBasicMappingMethods(adapter, + TypeUtils.checkIfCollectionOfModel(fromSubType) ? adapter.fetcher.fetchModel(fromSubType) + : new Model(fromSubType.getClazz(), + fromSubType), + TypeUtils.checkIfCollectionOfModel(toSubType) ? adapter.fetcher.fetchModel(toSubType) + : new Model(toSubType.getClazz(), + toSubType), + renames, fromSubType, + action == MethodAction.CREATE || action == MethodAction.UPDATE); + } + } else {// TODO mapping for Hashtable + addBasicMappingMethods(adapter, fromToConsider, toToConsider, renames, fromType, false); } - } else {// TODO mapping for Hashtable - addBasicMappingMethods(adapter, fromToConsider, toToConsider, renames, fromType, false); + } catch (Exception e) { + Logger.getLogger().logWarn("adapter=" + adapter.toString() + ", renames=" + renames.toString(), e); + e.printStackTrace(); } } diff --git a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapterFetcher.java b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapterFetcher.java index 19ac5ae95..685ca23c2 100644 --- a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapterFetcher.java +++ b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/ModelAdapterFetcher.java @@ -85,4 +85,34 @@ public ModelAdapter fetchAdapter(String correspondingModelIdentifier) { return store.get(ModelAdapter.generateName(correspondingModelIdentifier)); } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((modelFetcher == null) ? 0 : modelFetcher.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModelAdapterFetcher other = (ModelAdapterFetcher) obj; + if (modelFetcher == null) { + if (other.modelFetcher != null) + return false; + } else if (!modelFetcher.equals(other.modelFetcher)) + return false; + return true; + } + + @Override + public String toString() { + return "{\"ModelAdapterFetcher\": {\"modelFetcher\":\"" + modelFetcher + "\", \"store\":\"" + store + "\"}}"; + } + } diff --git a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/PackageInfo.java b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/PackageInfo.java index df1c9e947..c9d6afde4 100644 --- a/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/PackageInfo.java +++ b/foundation-generator/src/main/java/com/arm/pelion/sdk/foundation/generator/model/PackageInfo.java @@ -88,4 +88,53 @@ public void translate() throws TranslationException { } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((group == null) ? 0 : group.hashCode()); + result = prime * result + ((longDescription == null) ? 0 : longDescription.hashCode()); + result = prime * result + ((packageName == null) ? 0 : packageName.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PackageInfo other = (PackageInfo) obj; + if (description == null) { + if (other.description != null) + return false; + } else if (!description.equals(other.description)) + return false; + if (group == null) { + if (other.group != null) + return false; + } else if (!group.equals(other.group)) + return false; + if (longDescription == null) { + if (other.longDescription != null) + return false; + } else if (!longDescription.equals(other.longDescription)) + return false; + if (packageName == null) { + if (other.packageName != null) + return false; + } else if (!packageName.equals(other.packageName)) + return false; + return true; + } + + @Override + public String toString() { + return "{\"PackageInfo\": {\"packageName\":\"" + packageName + "\", \"description\":\"" + description + + "\", \"longDescription\":\"" + longDescription + "\", \"group\":\"" + group + "\"}}"; + } + } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/Account.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/Account.java index e91c7c7ec..17a6a9061 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/Account.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/Account.java @@ -50,7 +50,13 @@ public class Account implements SdkModel { /** * The admin API key created for this account. Present only in the response for account creation. + * + *

+ * + * @deprecated This field has been deprecated since Tue Sep 01 08:00:00 CST 2020 and will be removed by Wed Sep 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. */ + @Deprecated private final String adminKey; /** @@ -64,7 +70,7 @@ public class Account implements SdkModel { private String adminPassword; /** - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. */ private List aliases; @@ -77,7 +83,7 @@ public class Account implements SdkModel { /** * Business model history for this account. */ - private final List businessModelHistory; + private final List businessModelHistory; /** * The city part of the postal address. @@ -85,7 +91,7 @@ public class Account implements SdkModel { private String city; /** - * The name of the company. + * The name of the company used in billing. */ private String company; @@ -120,7 +126,7 @@ public class Account implements SdkModel { private String customerNumber; /** - * The display name for the account. + * The display name for the tenant account. */ private String displayName; @@ -160,15 +166,15 @@ public class Account implements SdkModel { /** * List of account limitation objects. */ - private final List limitations; + private final List limitations; /** - * List of limits as key-value pairs if requested. + * DEPRECATED: Replaced by the limitations parameter. * *

* - * @deprecated This field has been deprecated since Tue Aug 27 13:03:58 BST 2019 and will be removed by Thu Aug 27 - * 13:03:58 BST 2020. Superseded by the limitations parameter. + * @deprecated This field has been deprecated since Tue Aug 27 20:03:58 CST 2019 and will be removed by Thu Aug 27 + * 20:03:58 CST 2020. Replaced by the limitations parameter. */ @Deprecated private final Map limits; @@ -255,6 +261,11 @@ public class Account implements SdkModel { */ private final String tier; + /** + * Tier history for this account. + */ + private final List tierHistory; + /** * Last update UTC time RFC3339. */ @@ -295,7 +306,7 @@ public class Account implements SdkModel { * The password of the admin user created for this account. Present only in the response for account * creation. * @param aliases - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. * @param businessModel * Business model for this account. Manageable by the root admin only. * @param businessModelHistory @@ -303,7 +314,7 @@ public class Account implements SdkModel { * @param city * The city part of the postal address. * @param company - * The name of the company. + * The name of the company used in billing. * @param contact * The name of the contact person for this account. * @param contractNumber @@ -317,7 +328,7 @@ public class Account implements SdkModel { * @param customerNumber * Customer number of the customer. * @param displayName - * The display name for the account. + * The display name for the tenant account. * @param email * The company email address for this account. * @param endMarket @@ -333,7 +344,7 @@ public class Account implements SdkModel { * @param limitations * List of account limitation objects. * @param limits - * List of limits as key-value pairs if requested. + * DEPRECATED: Replaced by the limitations parameter. * @param mfaStatus * The enforcement status of multi-factor authentication, either `enforced` or `optional`. * @param notificationEmails @@ -367,6 +378,8 @@ public class Account implements SdkModel { * @param tier * The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other * values are reserved for the future. + * @param tierHistory + * Tier history for this account. * @param updatedAt * Last update UTC time RFC3339. * @param upgradedAt @@ -377,16 +390,16 @@ public class Account implements SdkModel { public Account(String addressLine1, String addressLine2, String adminEmail, String adminFullName, String adminId, String adminKey, String adminName, String adminPassword, List aliases, @DefaultValue("active_device_business_model") AccountBusinessModel businessModel, - List businessModelHistory, String city, String company, String contact, + List businessModelHistory, String city, String company, String contact, String contractNumber, String country, Date createdAt, Map customFields, String customerNumber, String displayName, String email, String endMarket, Date expiration, @DefaultValue("1") int expirationWarningThreshold, String id, @DefaultValue("1") int idleTimeout, - List limitations, Map limits, AccountMfaStatus mfaStatus, + List limitations, Map limits, AccountMfaStatus mfaStatus, List notificationEmails, ParentAccount parentAccount, String parentId, PasswordPolicy passwordPolicy, @DefaultValue("1") int passwordRecoveryExpiration, String phoneNumber, List policies, String postalCode, String reason, String referenceNote, String salesContact, - String state, AccountStatus status, String templateId, String tier, Date updatedAt, - Date upgradedAt) { + String state, AccountStatus status, String templateId, String tier, List tierHistory, + Date updatedAt, Date upgradedAt) { super(); this.adminId = adminId; this.adminKey = adminKey; @@ -403,6 +416,7 @@ public Account(String addressLine1, String addressLine2, String adminEmail, Stri this.status = status; this.templateId = templateId; this.tier = tier; + this.tierHistory = tierHistory; this.updatedAt = updatedAt; this.upgradedAt = upgradedAt; setAddressLine1(addressLine1); @@ -457,7 +471,7 @@ public Account(Account account) { account == null ? (String) null : account.adminPassword, account == null ? (List) null : account.aliases, account == null ? AccountBusinessModel.getValue("active_device_business_model") : account.businessModel, - account == null ? (List) null : account.businessModelHistory, + account == null ? (List) null : account.businessModelHistory, account == null ? (String) null : account.city, account == null ? (String) null : account.company, account == null ? (String) null : account.contact, account == null ? (String) null : account.contractNumber, @@ -467,7 +481,8 @@ public Account(Account account) { account == null ? (String) null : account.displayName, account == null ? (String) null : account.email, account == null ? (String) null : account.endMarket, account == null ? new Date() : account.expiration, account == null ? 1 : account.expirationWarningThreshold, account == null ? (String) null : account.id, - account == null ? 1 : account.idleTimeout, account == null ? (List) null : account.limitations, + account == null ? 1 : account.idleTimeout, + account == null ? (List) null : account.limitations, account == null ? (Map) null : account.limits, account == null ? AccountMfaStatus.getDefault() : account.mfaStatus, account == null ? (List) null : account.notificationEmails, @@ -482,6 +497,7 @@ public Account(Account account) { account == null ? (String) null : account.salesContact, account == null ? (String) null : account.state, account == null ? AccountStatus.getDefault() : account.status, account == null ? (String) null : account.templateId, account == null ? (String) null : account.tier, + account == null ? (List) null : account.tierHistory, account == null ? new Date() : account.updatedAt, account == null ? new Date() : account.upgradedAt); } @@ -491,12 +507,13 @@ public Account(Account account) { public Account() { this((String) null, (String) null, (String) null, (String) null, (String) null, (String) null, (String) null, (String) null, (List) null, AccountBusinessModel.getValue("active_device_business_model"), - (List) null, (String) null, (String) null, (String) null, (String) null, (String) null, new Date(), - (Map) null, (String) null, (String) null, (String) null, (String) null, new Date(), 1, - (String) null, 1, (List) null, (Map) null, AccountMfaStatus.getDefault(), - (List) null, (ParentAccount) null, (String) null, (PasswordPolicy) null, 1, (String) null, - (List) null, (String) null, (String) null, (String) null, (String) null, (String) null, - AccountStatus.getDefault(), (String) null, (String) null, new Date(), new Date()); + (List) null, (String) null, (String) null, (String) null, (String) null, + (String) null, new Date(), (Map) null, (String) null, (String) null, (String) null, + (String) null, new Date(), 1, (String) null, 1, (List) null, (Map) null, + AccountMfaStatus.getDefault(), (List) null, (ParentAccount) null, (String) null, + (PasswordPolicy) null, 1, (String) null, (List) null, (String) null, (String) null, (String) null, + (String) null, (String) null, AccountStatus.getDefault(), (String) null, (String) null, + (List) null, new Date(), new Date()); } /** @@ -536,7 +553,7 @@ public Account(String id) { * @param limitations * List of account limitation objects. * @param limits - * List of limits as key-value pairs if requested. + * DEPRECATED: Replaced by the limitations parameter. * @param parentAccount * Represents parent account contact details in responses. * @param parentId @@ -554,6 +571,8 @@ public Account(String id) { * @param tier * The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other * values are reserved for the future. + * @param tierHistory + * Tier history for this account. * @param updatedAt * Last update UTC time RFC3339. * @param upgradedAt @@ -561,17 +580,18 @@ public Account(String id) { */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") - public Account(String adminId, String adminKey, List businessModelHistory, Date createdAt, Date expiration, - List limitations, Map limits, ParentAccount parentAccount, String parentId, - List policies, String reason, String referenceNote, AccountStatus status, String templateId, - String tier, Date updatedAt, Date upgradedAt) { + public Account(String adminId, String adminKey, List businessModelHistory, Date createdAt, + Date expiration, List limitations, Map limits, + ParentAccount parentAccount, String parentId, List policies, String reason, + String referenceNote, AccountStatus status, String templateId, String tier, + List tierHistory, Date updatedAt, Date upgradedAt) { this((String) null, (String) null, (String) null, (String) null, adminId, adminKey, (String) null, (String) null, (List) null, AccountBusinessModel.getValue("active_device_business_model"), businessModelHistory, (String) null, (String) null, (String) null, (String) null, (String) null, createdAt, (Map) null, (String) null, (String) null, (String) null, (String) null, expiration, 1, (String) null, 1, limitations, limits, AccountMfaStatus.getDefault(), (List) null, parentAccount, parentId, (PasswordPolicy) null, 1, (String) null, policies, (String) null, reason, referenceNote, - (String) null, (String) null, status, templateId, tier, updatedAt, upgradedAt); + (String) null, (String) null, status, templateId, tier, tierHistory, updatedAt, upgradedAt); } /** @@ -718,8 +738,14 @@ public String getAdminId() { /** * Gets the admin api key created for this account. present only in the response for account creation. * + *

+ * + * @deprecated This field has been deprecated since Tue Sep 01 08:00:00 CST 2020 and will be removed by Wed Sep 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. + * * @return adminKey */ + @Deprecated public String getAdminKey() { return adminKey; } @@ -778,7 +804,7 @@ public void setAdminPassword(String adminPassword) { } /** - * Gets an array of aliases. + * Gets an array of aliases for the tenant account id. the aliases must be globally unique. * * @return aliases */ @@ -787,13 +813,13 @@ public List getAliases() { } /** - * Sets an array of aliases. + * Sets an array of aliases for the tenant account id. the aliases must be globally unique. * *

* Note: the number of elements has to be less than or equal to {@code 10} to be valid * * @param aliases - * An array of aliases. + * An array of aliases for the tenant account ID. The aliases must be globally unique. */ public void setAliases(List aliases) { this.aliases = aliases; @@ -847,7 +873,7 @@ public void setBusinessModel(@DefaultValue("active_device_business_model") Strin * * @return businessModelHistory */ - public List getBusinessModelHistory() { + public List getBusinessModelHistory() { return businessModelHistory; } @@ -884,7 +910,7 @@ public boolean isCityValid() { } /** - * Gets the name of the company. + * Gets the name of the company used in billing. * * @return company */ @@ -893,13 +919,13 @@ public String getCompany() { } /** - * Sets the name of the company. + * Sets the name of the company used in billing. * *

* Note: the length of the string has to be less than or equal to {@code 100} to be valid * * @param company - * The name of the company. + * The name of the company used in billing. */ public void setCompany(String company) { this.company = company; @@ -1046,7 +1072,7 @@ public void setCustomerNumber(String customerNumber) { } /** - * Gets the display name for the account. + * Gets the display name for the tenant account. * * @return displayName */ @@ -1055,13 +1081,13 @@ public String getDisplayName() { } /** - * Sets the display name for the account. + * Sets the display name for the tenant account. * *

* Note: the length of the string has to be less than or equal to {@code 100} to be valid * * @param displayName - * The display name for the account. + * The display name for the tenant account. */ public void setDisplayName(String displayName) { this.displayName = displayName; @@ -1271,17 +1297,17 @@ public boolean isIdleTimeoutValid() { * * @return limitations */ - public List getLimitations() { + public List getLimitations() { return limitations; } /** - * Gets list of limits as key-value pairs if requested. + * Gets deprecated: replaced by the limitations parameter. * *

* - * @deprecated This field has been deprecated since Tue Aug 27 13:03:58 BST 2019 and will be removed by Thu Aug 27 - * 13:03:58 BST 2020. Superseded by the limitations parameter. + * @deprecated This field has been deprecated since Tue Aug 27 20:03:58 CST 2019 and will be removed by Thu Aug 27 + * 20:03:58 CST 2020. Replaced by the limitations parameter. * * @return limits */ @@ -1596,6 +1622,15 @@ public String getTier() { return tier; } + /** + * Gets tier history for this account. + * + * @return tierHistory + */ + public List getTierHistory() { + return tierHistory; + } + /** * Gets last update utc time rfc3339. * @@ -1638,7 +1673,8 @@ public String toString() { + passwordRecoveryExpiration + ", phoneNumber=" + phoneNumber + ", policies=" + policies + ", postalCode=" + postalCode + ", reason=" + reason + ", referenceNote=" + referenceNote + ", salesContact=" + salesContact + ", state=" + state + ", status=" + status + ", templateId=" - + templateId + ", tier=" + tier + ", updatedAt=" + updatedAt + ", upgradedAt=" + upgradedAt + "]"; + + templateId + ", tier=" + tier + ", tierHistory=" + tierHistory + ", updatedAt=" + updatedAt + + ", upgradedAt=" + upgradedAt + "]"; } /** @@ -1697,6 +1733,7 @@ public int hashCode() { result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((templateId == null) ? 0 : templateId.hashCode()); result = prime * result + ((tier == null) ? 0 : tier.hashCode()); + result = prime * result + ((tierHistory == null) ? 0 : tierHistory.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); result = prime * result + ((upgradedAt == null) ? 0 : upgradedAt.hashCode()); return result; @@ -2026,6 +2063,13 @@ public boolean equals(Object obj) { } else if (!tier.equals(other.tier)) { return false; } + if (tierHistory == null) { + if (other.tierHistory != null) { + return false; + } + } else if (!tierHistory.equals(other.tierHistory)) { + return false; + } if (updatedAt == null) { if (other.updatedAt != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitation.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitation.java new file mode 100644 index 000000000..04b6d709a --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitation.java @@ -0,0 +1,540 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import com.arm.mbed.cloud.sdk.annotations.DefaultValue; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; +import java.util.Date; +import java.util.Objects; + +/** + * Model for an account limitation. + */ +@Preamble(description = "Model for an account limitation.") +@SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.AvoidDuplicateLiterals" }) +public class AccountLimitation implements SdkModel { + /** + * Serialisation Id. + */ + private static final long serialVersionUID = 1215620287133152L; + + /** + * Billing period of the account limitation. + */ + @DefaultValue("1") + private final int billingPeriod; + + /** + * Creation UTC time RFC3339. + */ + private final Date createdAt; + + /** + * Description of the account limitation. + */ + private final String description; + + /** + * Entity ID. + */ + private String id; + + /** + * Flag indicating whether this limitation is inherited. + */ + private final boolean inherited; + + /** + * Indicates where this limit is inherited from. + */ + private final String inheritedFrom; + + /** + * Indicates the type of the entity where the limitation is inherited from. + */ + private final AccountLimitationInheritedType inheritedType; + + /** + * Used as default value if parent entity has this limitation defined. If parent entity does not have such a + * limitation, the value is null. + */ + private final Object inheritedValue; + + /** + * The value of the limit. + */ + private final long limit; + + /** + * Name of the account limitation. + */ + private final String name; + + /** + * Quota of the account limitation. + */ + private final long quota; + + /** + * Last update UTC time RFC3339. + */ + private final Date updatedAt; + + /** + * Internal constructor. + * + *

+ * Constructor based on all fields. + *

+ * Note: Should not be used. Use {@link #AccountLimitation()} instead. + * + * @param billingPeriod + * Billing period of the account limitation. + * @param createdAt + * Creation UTC time RFC3339. + * @param description + * Description of the account limitation. + * @param id + * Entity ID. + * @param inherited + * Flag indicating whether this limitation is inherited. + * @param inheritedFrom + * Indicates where this limit is inherited from. + * @param inheritedType + * Indicates the type of the entity where the limitation is inherited from. + * @param inheritedValue + * Used as default value if parent entity has this limitation defined. If parent entity does not have + * such a limitation, the value is null. + * @param limit + * The value of the limit. + * @param name + * Name of the account limitation. + * @param quota + * Quota of the account limitation. + * @param updatedAt + * Last update UTC time RFC3339. + */ + @Internal + @SuppressWarnings("PMD.CyclomaticComplexity") + public AccountLimitation(@DefaultValue("1") int billingPeriod, Date createdAt, String description, String id, + boolean inherited, String inheritedFrom, AccountLimitationInheritedType inheritedType, + Object inheritedValue, long limit, String name, long quota, Date updatedAt) { + super(); + this.billingPeriod = billingPeriod; + this.createdAt = createdAt; + this.description = description; + this.inherited = inherited; + this.inheritedFrom = inheritedFrom; + this.inheritedType = inheritedType; + this.inheritedValue = inheritedValue; + this.limit = limit; + this.name = name; + this.quota = quota; + this.updatedAt = updatedAt; + setId(id); + } + + /** + * Internal constructor. + * + *

+ * Constructor based on a similar object. + *

+ * Note: Should not be used. Use {@link #AccountLimitation()} instead. + * + * @param accountLimitation + * an account limitation. + */ + @Internal + public AccountLimitation(AccountLimitation accountLimitation) { + this(accountLimitation == null ? 1 : accountLimitation.billingPeriod, + accountLimitation == null ? new Date() : accountLimitation.createdAt, + accountLimitation == null ? (String) null : accountLimitation.description, + accountLimitation == null ? (String) null : accountLimitation.id, + accountLimitation != null && accountLimitation.inherited, + accountLimitation == null ? (String) null : accountLimitation.inheritedFrom, + accountLimitation == null ? AccountLimitationInheritedType.getDefault() : accountLimitation.inheritedType, + accountLimitation == null ? (Object) null : accountLimitation.inheritedValue, + accountLimitation == null ? 0 : accountLimitation.limit, + accountLimitation == null ? (String) null : accountLimitation.name, + accountLimitation == null ? 0 : accountLimitation.quota, + accountLimitation == null ? new Date() : accountLimitation.updatedAt); + } + + /** + * Constructor. + */ + public AccountLimitation() { + this(1, new Date(), (String) null, (String) null, false, (String) null, + AccountLimitationInheritedType.getDefault(), (Object) null, 0, (String) null, 0, new Date()); + } + + /** + * Constructor. + * + *

+ * Constructor based on object identifier. + *

+ * + * @param id + * Entity ID. + */ + public AccountLimitation(String id) { + this(); + setId(id); + } + + /** + * Internal constructor. + * + *

+ * Constructor based on read-only fields. + *

+ * Note: Should not be used. Use {@link #AccountLimitation()} instead. + * + * @param billingPeriod + * Billing period of the account limitation. + * @param createdAt + * Creation UTC time RFC3339. + * @param description + * Description of the account limitation. + * @param inherited + * Flag indicating whether this limitation is inherited. + * @param inheritedFrom + * Indicates where this limit is inherited from. + * @param inheritedType + * Indicates the type of the entity where the limitation is inherited from. + * @param inheritedValue + * Used as default value if parent entity has this limitation defined. If parent entity does not have + * such a limitation, the value is null. + * @param limit + * The value of the limit. + * @param name + * Name of the account limitation. + * @param quota + * Quota of the account limitation. + * @param updatedAt + * Last update UTC time RFC3339. + */ + @Internal + @SuppressWarnings("PMD.CyclomaticComplexity") + public AccountLimitation(@DefaultValue("1") int billingPeriod, Date createdAt, String description, + boolean inherited, String inheritedFrom, AccountLimitationInheritedType inheritedType, + Object inheritedValue, long limit, String name, long quota, Date updatedAt) { + this(billingPeriod, createdAt, description, (String) null, inherited, inheritedFrom, inheritedType, + inheritedValue, limit, name, quota, updatedAt); + } + + /** + * Gets billing period of the account limitation. + * + * @return billingPeriod + */ + public int getBillingPeriod() { + return billingPeriod; + } + + /** + * Gets creation utc time rfc3339. + * + * @return createdAt + */ + public Date getCreatedAt() { + return createdAt; + } + + /** + * Gets description of the account limitation. + * + * @return description + */ + public String getDescription() { + return description; + } + + /** + * Gets entity id. + * + * @return id + */ + @Override + public String getId() { + return id; + } + + /** + * Sets entity id. + * + * @param id + * Entity ID. + */ + @Override + public void setId(String id) { + this.id = id; + } + + /** + * Sets entity id. + * + *

+ * Similar to {@link #setId(String)} + * + * @param accountLimitationId + * Entity ID. + */ + @Internal + public void setAccountLimitationId(String accountLimitationId) { + setId(accountLimitationId); + } + + /** + * Gets flag indicating whether this limitation is inherited. + * + * @return inherited + */ + public boolean isInherited() { + return inherited; + } + + /** + * Gets indicates where this limit is inherited from. + * + * @return inheritedFrom + */ + public String getInheritedFrom() { + return inheritedFrom; + } + + /** + * Gets indicates the type of the entity where the limitation is inherited from. + * + * @return inheritedType + */ + public AccountLimitationInheritedType getInheritedType() { + return inheritedType; + } + + /** + * Gets used as default value if parent entity has this limitation defined. if parent entity does not have such a + * limitation, the value is null. + * + * @return inheritedValue + */ + public Object getInheritedValue() { + return inheritedValue; + } + + /** + * Gets the value of the limit. + * + * @return limit + */ + public long getLimit() { + return limit; + } + + /** + * Gets name of the account limitation. + * + * @return name + */ + public String getName() { + return name; + } + + /** + * Gets quota of the account limitation. + * + * @return quota + */ + public long getQuota() { + return quota; + } + + /** + * Gets last update utc time rfc3339. + * + * @return updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Returns a string representation of the object. + * + *

+ * + * @see java.lang.Object#toString() + * @return the string representation + */ + @Override + public String toString() { + return "AccountLimitation [billingPeriod=" + billingPeriod + ", createdAt=" + createdAt + ", description=" + + description + ", id=" + id + ", inherited=" + inherited + ", inheritedFrom=" + inheritedFrom + + ", inheritedType=" + inheritedType + ", inheritedValue=" + inheritedValue + ", limit=" + limit + + ", name=" + name + ", quota=" + quota + ", updatedAt=" + updatedAt + "]"; + } + + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + Objects.hashCode(Integer.valueOf(billingPeriod)); + result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + Objects.hashCode(Boolean.valueOf(inherited)); + result = prime * result + ((inheritedFrom == null) ? 0 : inheritedFrom.hashCode()); + result = prime * result + ((inheritedType == null) ? 0 : inheritedType.hashCode()); + result = prime * result + ((inheritedValue == null) ? 0 : inheritedValue.hashCode()); + result = prime * result + Objects.hashCode(Long.valueOf(limit)); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + Objects.hashCode(Long.valueOf(quota)); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + + /** + * Method to ensure {@link #equals(Object)} is correct. + * + *

+ * Note: see this article: canEqual() + * + * @param other + * another object. + * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. + */ + protected boolean canEqual(Object other) { + return other instanceof AccountLimitation; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + *

+ * + * @see java.lang.Object#equals(java.lang.Object) + * @param obj + * an object to compare with this instance. + * @return true if this object is the same as the obj argument; false otherwise. + */ + @Override + @SuppressWarnings({ "PMD.ExcessiveMethodLength", "PMD.NcssMethodCount" }) + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof AccountLimitation)) { + return false; + } + final AccountLimitation other = (AccountLimitation) obj; + if (!other.canEqual(this)) { + return false; + } + if (billingPeriod != other.billingPeriod) { + return false; + } + if (createdAt == null) { + if (other.createdAt != null) { + return false; + } + } else if (!createdAt.equals(other.createdAt)) { + return false; + } + if (description == null) { + if (other.description != null) { + return false; + } + } else if (!description.equals(other.description)) { + return false; + } + if (id == null) { + if (other.id != null) { + return false; + } + } else if (!id.equals(other.id)) { + return false; + } + if (inherited != other.inherited) { + return false; + } + if (inheritedFrom == null) { + if (other.inheritedFrom != null) { + return false; + } + } else if (!inheritedFrom.equals(other.inheritedFrom)) { + return false; + } + if (inheritedType != other.inheritedType) { + return false; + } + if (inheritedValue == null) { + if (other.inheritedValue != null) { + return false; + } + } else if (!inheritedValue.equals(other.inheritedValue)) { + return false; + } + if (limit != other.limit) { + return false; + } + if (name == null) { + if (other.name != null) { + return false; + } + } else if (!name.equals(other.name)) { + return false; + } + if (quota != other.quota) { + return false; + } + if (updatedAt == null) { + if (other.updatedAt != null) { + return false; + } + } else if (!updatedAt.equals(other.updatedAt)) { + return false; + } + return true; + } + + /** + * Checks whether the model is valid or not. + * + *

+ * + * @see SdkModel#isValid() + * @return true if the model is valid; false otherwise. + */ + @Override + public boolean isValid() { + return true; + } + + /** + * Clones this instance. + * + *

+ * + * @see java.lang.Object#clone() + * @return a cloned instance + */ + @Override + public AccountLimitation clone() { + return new AccountLimitation(this); + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitationInheritedType.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitationInheritedType.java new file mode 100644 index 000000000..e61ae307e --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountLimitationInheritedType.java @@ -0,0 +1,167 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import com.arm.mbed.cloud.sdk.annotations.DefaultValue; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.annotations.Required; +import com.arm.mbed.cloud.sdk.common.SdkEnum; + +/** + * Account limitation inherited type. + */ +@Preamble(description = "Account limitation inherited type.") +public enum AccountLimitationInheritedType implements SdkEnum { + ACCOUNT("account"), + + TEMPLATE("template"), + + TIER_TEMPLATE("tier_template"), + + UNKNOWN_ENUM(SDK_UNKNOWN_ENUM_VALUE); + + /** + * Serialisation Id. + */ + private static final long serialVersionUID = -764580571133152L; + + /** + * string representation. + */ + @Internal + @Required + @DefaultValue("ACCOUNT") + private final String string; + + /** + * Internal constructor. + * + * @param string + * string representation. + */ + @Internal + AccountLimitationInheritedType(@DefaultValue("ACCOUNT") String string) { + this.string = string; + } + + /** + * Gets string representation. + * + * @return string + */ + @Override + @Internal + public String getString() { + return string; + } + + /** + * toString. + * + *

+ * + * @see java.lang.Enum#toString() + * @return the string representation of this value + */ + @Override + public String toString() { + return getString(); + } + + /** + * States whether it is the default value. + * + *

+ * + * @see SdkEnum#isDefault() + * @return true if this is the default value; false otherwise + */ + @Override + public boolean isDefault() { + return this == getDefault(); + } + + /** + * States whether the value is unknown and an error happened during parsing. + * + *

+ * + * @see SdkEnum#isUnknownValue() + * @return true if this is an unknown value; false otherwise + */ + @Override + public boolean isUnknownValue() { + return this == getUnknownEnum(); + } + + /** + * Gets default account limitation inherited type. + * + * @return default account limitation inherited type + */ + public static AccountLimitationInheritedType getDefault() { + return ACCOUNT; + } + + /** + * Gets unknown account limitation inherited type value. + * + * @return unknown account limitation inherited type + */ + public static AccountLimitationInheritedType getUnknownEnum() { + return UNKNOWN_ENUM; + } + + /** + * Gets account limitation inherited type from its string representation. + * + * @param value + * string. + * @return corresponding account limitation inherited type or default account limitation inherited type if not + * recognised. + */ + public static AccountLimitationInheritedType getValue(String value) { + if (value == null) { + return getDefault(); + } + final String trimmedValue = value.trim(); + for (final AccountLimitationInheritedType option : values()) { + if (option.getString().equalsIgnoreCase(trimmedValue)) { + return option; + } + } + return getDefault(); + } + + /** + * Merges two states. + * + *

+ * + * @see SdkEnum#merge(SdkEnum, SdkEnum) + * @param + * type of an sdk enum + * @param obj1 + * a account limitation inherited type. + * @param obj2 + * a account limitation inherited type. + * @return the merged enumerator + */ + @Override + public T merge(T obj1, T obj2) { + if (obj1 == null) { + return obj2; + } + if (obj2 == null) { + return obj1; + } + if (obj1.isDefault()) { + return obj2; + } + if (obj2.isDefault()) { + return obj1; + } + return obj2; + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/BusinessModelHistory.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/BusinessModelHistory.java new file mode 100644 index 000000000..bbfbe78d5 --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/BusinessModelHistory.java @@ -0,0 +1,231 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.PerformsNoOperation; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; +import java.util.Date; + +/** + * Model for a business model history. + */ +@Preamble(description = "Model for a business model history.") +public class BusinessModelHistory implements SdkModel { + /** + * Serialisation Id. + */ + private static final long serialVersionUID = 1521041379221199L; + + /** + * value. + */ + private final String businessModel; + + /** + * Last update UTC time RFC3339. + */ + private final Date updatedAt; + + /** + * Internal constructor. + * + *

+ * Constructor based on all fields. + *

+ * Note: Should not be used. Use {@link #BusinessModelHistory()} instead. + * + * @param businessModel + * value. + * @param updatedAt + * Last update UTC time RFC3339. + */ + @Internal + public BusinessModelHistory(String businessModel, Date updatedAt) { + super(); + this.businessModel = businessModel; + this.updatedAt = updatedAt; + } + + /** + * Internal constructor. + * + *

+ * Constructor based on a similar object. + *

+ * Note: Should not be used. Use {@link #BusinessModelHistory()} instead. + * + * @param businessModelHistory + * a business model history. + */ + @Internal + public BusinessModelHistory(BusinessModelHistory businessModelHistory) { + this(businessModelHistory == null ? (String) null : businessModelHistory.businessModel, + businessModelHistory == null ? new Date() : businessModelHistory.updatedAt); + } + + /** + * Constructor. + */ + public BusinessModelHistory() { + this((String) null, new Date()); + } + + /** + * Sets id. + * + * @param id + * id. + */ + @Override + @Internal + @PerformsNoOperation + public void setId(String id) { + // Nothing to do + } + + /** + * Gets id. + * + *

+ * Warning: BusinessModelHistory model does not have any ID field. This always returns {@code null}. + * + * @return id + */ + @Override + @Internal + public String getId() { + return null; + } + + /** + * Gets value. + * + * @return businessModel + */ + public String getBusinessModel() { + return businessModel; + } + + /** + * Gets last update utc time rfc3339. + * + * @return updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Returns a string representation of the object. + * + *

+ * + * @see java.lang.Object#toString() + * @return the string representation + */ + @Override + public String toString() { + return "BusinessModelHistory [businessModel=" + businessModel + ", updatedAt=" + updatedAt + "]"; + } + + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((businessModel == null) ? 0 : businessModel.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + + /** + * Method to ensure {@link #equals(Object)} is correct. + * + *

+ * Note: see this article: canEqual() + * + * @param other + * another object. + * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. + */ + protected boolean canEqual(Object other) { + return other instanceof BusinessModelHistory; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + *

+ * + * @see java.lang.Object#equals(java.lang.Object) + * @param obj + * an object to compare with this instance. + * @return true if this object is the same as the obj argument; false otherwise. + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof BusinessModelHistory)) { + return false; + } + final BusinessModelHistory other = (BusinessModelHistory) obj; + if (!other.canEqual(this)) { + return false; + } + if (businessModel == null) { + if (other.businessModel != null) { + return false; + } + } else if (!businessModel.equals(other.businessModel)) { + return false; + } + if (updatedAt == null) { + if (other.updatedAt != null) { + return false; + } + } else if (!updatedAt.equals(other.updatedAt)) { + return false; + } + return true; + } + + /** + * Checks whether the model is valid or not. + * + *

+ * + * @see SdkModel#isValid() + * @return true if the model is valid; false otherwise. + */ + @Override + public boolean isValid() { + return true; + } + + /** + * Clones this instance. + * + *

+ * + * @see java.lang.Object#clone() + * @return a cloned instance + */ + @Override + public BusinessModelHistory clone() { + return new BusinessModelHistory(this); + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProvider.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProvider.java index 4f07ddf40..1a8ec2877 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProvider.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProvider.java @@ -68,6 +68,11 @@ public class IdentityProvider implements SdkModel { @Required private String name; + /** + * Represents OIDC specific attributes. + */ + private OidcRequest oidcAttributes; + /** * Represents SAML2 specific attributes in responses. */ @@ -105,6 +110,8 @@ public class IdentityProvider implements SdkModel { * Flag indicating whether this is the global default identity provider. * @param name * Name of the identity provider. + * @param oidcAttributes + * Represents OIDC specific attributes. * @param saml2Attributes * Represents SAML2 specific attributes in responses. * @param status @@ -116,7 +123,8 @@ public class IdentityProvider implements SdkModel { @SuppressWarnings("PMD.CyclomaticComplexity") public IdentityProvider(String accountId, Date createdAt, String description, String id, IdentityProviderType identityProviderType, boolean isDefault, String name, - Object saml2Attributes, IdentityProviderStatus status, Date updatedAt) { + OidcRequest oidcAttributes, Object saml2Attributes, IdentityProviderStatus status, + Date updatedAt) { super(); this.accountId = accountId; this.createdAt = createdAt; @@ -126,6 +134,7 @@ public IdentityProvider(String accountId, Date createdAt, String description, St setId(id); setIdentityProviderType(identityProviderType); setName(name); + setOidcAttributes(oidcAttributes); setSaml2Attributes(saml2Attributes); setStatus(status); } @@ -150,6 +159,7 @@ public IdentityProvider(IdentityProvider identityProvider) { identityProvider == null ? IdentityProviderType.getDefault() : identityProvider.identityProviderType, identityProvider != null && identityProvider.isDefault, identityProvider == null ? (String) null : identityProvider.name, + identityProvider == null ? (OidcRequest) null : identityProvider.oidcAttributes, identityProvider == null ? (Object) null : identityProvider.saml2Attributes, identityProvider == null ? IdentityProviderStatus.getDefault() : identityProvider.status, identityProvider == null ? new Date() : identityProvider.updatedAt); @@ -160,7 +170,7 @@ public IdentityProvider(IdentityProvider identityProvider) { */ public IdentityProvider() { this((String) null, new Date(), (String) null, (String) null, IdentityProviderType.getDefault(), false, - (String) null, (Object) null, IdentityProviderStatus.getDefault(), new Date()); + (String) null, (OidcRequest) null, (Object) null, IdentityProviderStatus.getDefault(), new Date()); } /** @@ -198,7 +208,7 @@ public IdentityProvider(String id) { @Internal public IdentityProvider(String accountId, Date createdAt, boolean isDefault, Date updatedAt) { this(accountId, createdAt, (String) null, (String) null, IdentityProviderType.getDefault(), isDefault, - (String) null, (Object) null, IdentityProviderStatus.getDefault(), updatedAt); + (String) null, (OidcRequest) null, (Object) null, IdentityProviderStatus.getDefault(), updatedAt); } /** @@ -214,8 +224,8 @@ public IdentityProvider(String accountId, Date createdAt, boolean isDefault, Dat * Name of the identity provider. */ public IdentityProvider(IdentityProviderType identityProviderType, String name) { - this((String) null, new Date(), (String) null, (String) null, identityProviderType, false, name, (Object) null, - IdentityProviderStatus.getDefault(), new Date()); + this((String) null, new Date(), (String) null, (String) null, identityProviderType, false, name, + (OidcRequest) null, (Object) null, IdentityProviderStatus.getDefault(), new Date()); } /** @@ -405,6 +415,25 @@ public boolean isNameValid() { return name != null && (name.length() <= 100); } + /** + * Gets represents oidc specific attributes. + * + * @return oidcAttributes + */ + public OidcRequest getOidcAttributes() { + return oidcAttributes; + } + + /** + * Sets represents oidc specific attributes. + * + * @param oidcAttributes + * Represents OIDC specific attributes. + */ + public void setOidcAttributes(OidcRequest oidcAttributes) { + this.oidcAttributes = oidcAttributes; + } + /** * Gets represents saml2 specific attributes in responses. * @@ -493,8 +522,8 @@ protected static final Map generateFilterMapping() { public String toString() { return "IdentityProvider [accountId=" + accountId + ", createdAt=" + createdAt + ", description=" + description + ", id=" + id + ", identityProviderType=" + identityProviderType + ", isDefault=" + isDefault - + ", name=" + name + ", saml2Attributes=" + saml2Attributes + ", status=" + status + ", updatedAt=" - + updatedAt + "]"; + + ", name=" + name + ", oidcAttributes=" + oidcAttributes + ", saml2Attributes=" + saml2Attributes + + ", status=" + status + ", updatedAt=" + updatedAt + "]"; } /** @@ -516,6 +545,7 @@ public int hashCode() { result = prime * result + ((identityProviderType == null) ? 0 : identityProviderType.hashCode()); result = prime * result + Objects.hashCode(Boolean.valueOf(isDefault)); result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((oidcAttributes == null) ? 0 : oidcAttributes.hashCode()); result = prime * result + ((saml2Attributes == null) ? 0 : saml2Attributes.hashCode()); result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); @@ -603,6 +633,13 @@ public boolean equals(Object obj) { } else if (!name.equals(other.name)) { return false; } + if (oidcAttributes == null) { + if (other.oidcAttributes != null) { + return false; + } + } else if (!oidcAttributes.equals(other.oidcAttributes)) { + return false; + } if (saml2Attributes == null) { if (other.saml2Attributes != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/LoginProfile.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/LoginProfile.java index 23a45365b..6641ced6e 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/LoginProfile.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/LoginProfile.java @@ -27,6 +27,11 @@ public class LoginProfile implements SdkModel { */ private static final long serialVersionUID = -244427560121579L; + /** + * The ID of the user in the identity provider's service. + */ + private final String foreignId; + /** * ID of the identity provider. */ @@ -50,6 +55,8 @@ public class LoginProfile implements SdkModel { *

* Note: Should not be used. Use {@link #LoginProfile()} instead. * + * @param foreignId + * The ID of the user in the identity provider's service. * @param id * ID of the identity provider. * @param loginProfileType @@ -58,8 +65,9 @@ public class LoginProfile implements SdkModel { * Name of the identity provider. */ @Internal - public LoginProfile(String id, LoginProfileType loginProfileType, String name) { + public LoginProfile(String foreignId, String id, LoginProfileType loginProfileType, String name) { super(); + this.foreignId = foreignId; this.loginProfileType = loginProfileType; setId(id); setName(name); @@ -78,7 +86,8 @@ public LoginProfile(String id, LoginProfileType loginProfileType, String name) { */ @Internal public LoginProfile(LoginProfile loginProfile) { - this(loginProfile == null ? (String) null : loginProfile.id, + this(loginProfile == null ? (String) null : loginProfile.foreignId, + loginProfile == null ? (String) null : loginProfile.id, loginProfile == null ? LoginProfileType.getDefault() : loginProfile.loginProfileType, loginProfile == null ? (String) null : loginProfile.name); } @@ -87,7 +96,7 @@ public LoginProfile(LoginProfile loginProfile) { * Constructor. */ public LoginProfile() { - this((String) null, LoginProfileType.getDefault(), (String) null); + this((String) null, (String) null, LoginProfileType.getDefault(), (String) null); } /** @@ -113,12 +122,23 @@ public LoginProfile(String id) { *

* Note: Should not be used. Use {@link #LoginProfile()} instead. * + * @param foreignId + * The ID of the user in the identity provider's service. * @param loginProfileType * Identity provider type. */ @Internal - public LoginProfile(LoginProfileType loginProfileType) { - this((String) null, loginProfileType, (String) null); + public LoginProfile(String foreignId, LoginProfileType loginProfileType) { + this(foreignId, (String) null, loginProfileType, (String) null); + } + + /** + * Gets the id of the user in the identity provider's service. + * + * @return foreignId + */ + public String getForeignId() { + return foreignId; } /** @@ -209,7 +229,8 @@ protected static final Map generateFilterMapping() { */ @Override public String toString() { - return "LoginProfile [id=" + id + ", loginProfileType=" + loginProfileType + ", name=" + name + "]"; + return "LoginProfile [foreignId=" + foreignId + ", id=" + id + ", loginProfileType=" + loginProfileType + + ", name=" + name + "]"; } /** @@ -224,6 +245,7 @@ public String toString() { public int hashCode() { final int prime = 31; int result = 1; + result = prime * result + ((foreignId == null) ? 0 : foreignId.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((loginProfileType == null) ? 0 : loginProfileType.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); @@ -269,6 +291,13 @@ public boolean equals(Object obj) { if (!other.canEqual(this)) { return false; } + if (foreignId == null) { + if (other.foreignId != null) { + return false; + } + } else if (!foreignId.equals(other.foreignId)) { + return false; + } if (id == null) { if (other.id != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroup.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroup.java index 8a4fc1067..0955b63a3 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroup.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroup.java @@ -13,7 +13,7 @@ * Model for a policy group. */ @Preamble(description = "Model for a policy group.") -@SuppressWarnings("PMD.AvoidDuplicateLiterals") +@SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.AvoidDuplicateLiterals" }) public class PolicyGroup implements SdkModel { /** * Serialisation Id. @@ -27,9 +27,20 @@ public class PolicyGroup implements SdkModel { /** * The number of API keys in this group. + * + *

+ * + * @deprecated This field has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This property is deprecated. See 'application_count' property. */ + @Deprecated private final int apikeyCount; + /** + * The number of applications in this group. + */ + private final int applicationCount; + /** * Creation UTC time RFC3339. */ @@ -68,6 +79,8 @@ public class PolicyGroup implements SdkModel { * The ID of the account this group belongs to. * @param apikeyCount * The number of API keys in this group. + * @param applicationCount + * The number of applications in this group. * @param createdAt * Creation UTC time RFC3339. * @param id @@ -80,11 +93,13 @@ public class PolicyGroup implements SdkModel { * The number of users in this group. */ @Internal - public PolicyGroup(String accountId, int apikeyCount, Date createdAt, String id, String name, Date updatedAt, - int userCount) { + @SuppressWarnings("PMD.CyclomaticComplexity") + public PolicyGroup(String accountId, int apikeyCount, int applicationCount, Date createdAt, String id, String name, + Date updatedAt, int userCount) { super(); this.accountId = accountId; this.apikeyCount = apikeyCount; + this.applicationCount = applicationCount; this.createdAt = createdAt; this.updatedAt = updatedAt; this.userCount = userCount; @@ -106,7 +121,7 @@ public PolicyGroup(String accountId, int apikeyCount, Date createdAt, String id, @Internal public PolicyGroup(PolicyGroup policyGroup) { this(policyGroup == null ? (String) null : policyGroup.accountId, - policyGroup == null ? 0 : policyGroup.apikeyCount, + policyGroup == null ? 0 : policyGroup.apikeyCount, policyGroup == null ? 0 : policyGroup.applicationCount, policyGroup == null ? new Date() : policyGroup.createdAt, policyGroup == null ? (String) null : policyGroup.id, policyGroup == null ? (String) null : policyGroup.name, @@ -117,7 +132,7 @@ public PolicyGroup(PolicyGroup policyGroup) { * Constructor. */ public PolicyGroup() { - this((String) null, 0, new Date(), (String) null, (String) null, new Date(), 0); + this((String) null, 0, 0, new Date(), (String) null, (String) null, new Date(), 0); } /** @@ -147,6 +162,8 @@ public PolicyGroup(String id) { * The ID of the account this group belongs to. * @param apikeyCount * The number of API keys in this group. + * @param applicationCount + * The number of applications in this group. * @param createdAt * Creation UTC time RFC3339. * @param updatedAt @@ -155,8 +172,9 @@ public PolicyGroup(String id) { * The number of users in this group. */ @Internal - public PolicyGroup(String accountId, int apikeyCount, Date createdAt, Date updatedAt, int userCount) { - this(accountId, apikeyCount, createdAt, (String) null, (String) null, updatedAt, userCount); + public PolicyGroup(String accountId, int apikeyCount, int applicationCount, Date createdAt, Date updatedAt, + int userCount) { + this(accountId, apikeyCount, applicationCount, createdAt, (String) null, (String) null, updatedAt, userCount); } /** @@ -171,12 +189,27 @@ public String getAccountId() { /** * Gets the number of api keys in this group. * + *

+ * + * @deprecated This field has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This property is deprecated. See 'application_count' property. + * * @return apikeyCount */ + @Deprecated public int getApikeyCount() { return apikeyCount; } + /** + * Gets the number of applications in this group. + * + * @return applicationCount + */ + public int getApplicationCount() { + return applicationCount; + } + /** * Gets creation utc time rfc3339. * @@ -297,8 +330,9 @@ public int getUserCount() { */ @Override public String toString() { - return "PolicyGroup [accountId=" + accountId + ", apikeyCount=" + apikeyCount + ", createdAt=" + createdAt - + ", id=" + id + ", name=" + name + ", updatedAt=" + updatedAt + ", userCount=" + userCount + "]"; + return "PolicyGroup [accountId=" + accountId + ", apikeyCount=" + apikeyCount + ", applicationCount=" + + applicationCount + ", createdAt=" + createdAt + ", id=" + id + ", name=" + name + ", updatedAt=" + + updatedAt + ", userCount=" + userCount + "]"; } /** @@ -315,6 +349,7 @@ public int hashCode() { int result = 1; result = prime * result + ((accountId == null) ? 0 : accountId.hashCode()); result = prime * result + Objects.hashCode(Integer.valueOf(apikeyCount)); + result = prime * result + Objects.hashCode(Integer.valueOf(applicationCount)); result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); @@ -348,6 +383,7 @@ protected boolean canEqual(Object other) { * @return true if this object is the same as the obj argument; false otherwise. */ @Override + @SuppressWarnings({ "PMD.ExcessiveMethodLength", "PMD.NcssMethodCount" }) public boolean equals(Object obj) { if (this == obj) { return true; @@ -372,6 +408,9 @@ public boolean equals(Object obj) { if (apikeyCount != other.apikeyCount) { return false; } + if (applicationCount != other.applicationCount) { + return false; + } if (createdAt == null) { if (other.createdAt != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProvider.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProvider.java index 642d4c69b..edb3eb626 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProvider.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProvider.java @@ -52,6 +52,11 @@ public class SubtenantIdentityProvider implements SdkModel { @Required private String name; + /** + * Represents OIDC specific attributes. + */ + private OidcRequest oidcAttributes; + /** * Represents SAML2 specific attributes in responses. */ @@ -87,6 +92,8 @@ public class SubtenantIdentityProvider implements SdkModel { * Flag indicating whether this is the global default identity provider. * @param name * Name of the identity provider. + * @param oidcAttributes + * Represents OIDC specific attributes. * @param saml2Attributes * Represents SAML2 specific attributes in responses. * @param status @@ -97,8 +104,8 @@ public class SubtenantIdentityProvider implements SdkModel { @Internal @SuppressWarnings("PMD.CyclomaticComplexity") public SubtenantIdentityProvider(String accountId, Date createdAt, String description, String id, boolean isDefault, - String name, Object saml2Attributes, SubtenantIdentityProviderStatus status, - Date updatedAt) { + String name, OidcRequest oidcAttributes, Object saml2Attributes, + SubtenantIdentityProviderStatus status, Date updatedAt) { super(); this.createdAt = createdAt; this.isDefault = isDefault; @@ -107,6 +114,7 @@ public SubtenantIdentityProvider(String accountId, Date createdAt, String descri setDescription(description); setId(id); setName(name); + setOidcAttributes(oidcAttributes); setSaml2Attributes(saml2Attributes); setStatus(status); } @@ -130,6 +138,7 @@ public SubtenantIdentityProvider(SubtenantIdentityProvider subtenantIdentityProv subtenantIdentityProvider == null ? (String) null : subtenantIdentityProvider.id, subtenantIdentityProvider != null && subtenantIdentityProvider.isDefault, subtenantIdentityProvider == null ? (String) null : subtenantIdentityProvider.name, + subtenantIdentityProvider == null ? (OidcRequest) null : subtenantIdentityProvider.oidcAttributes, subtenantIdentityProvider == null ? (Object) null : subtenantIdentityProvider.saml2Attributes, subtenantIdentityProvider == null ? SubtenantIdentityProviderStatus.getDefault() : subtenantIdentityProvider.status, @@ -140,8 +149,8 @@ public SubtenantIdentityProvider(SubtenantIdentityProvider subtenantIdentityProv * Constructor. */ public SubtenantIdentityProvider() { - this((String) null, new Date(), (String) null, (String) null, false, (String) null, (Object) null, - SubtenantIdentityProviderStatus.getDefault(), new Date()); + this((String) null, new Date(), (String) null, (String) null, false, (String) null, (OidcRequest) null, + (Object) null, SubtenantIdentityProviderStatus.getDefault(), new Date()); } /** @@ -176,8 +185,8 @@ public SubtenantIdentityProvider(String id) { */ @Internal public SubtenantIdentityProvider(Date createdAt, boolean isDefault, Date updatedAt) { - this((String) null, createdAt, (String) null, (String) null, isDefault, (String) null, (Object) null, - SubtenantIdentityProviderStatus.getDefault(), updatedAt); + this((String) null, createdAt, (String) null, (String) null, isDefault, (String) null, (OidcRequest) null, + (Object) null, SubtenantIdentityProviderStatus.getDefault(), updatedAt); } /** @@ -193,7 +202,7 @@ public SubtenantIdentityProvider(Date createdAt, boolean isDefault, Date updated * Name of the identity provider. */ public SubtenantIdentityProvider(String accountId, String name) { - this(accountId, new Date(), (String) null, (String) null, false, name, (Object) null, + this(accountId, new Date(), (String) null, (String) null, false, name, (OidcRequest) null, (Object) null, SubtenantIdentityProviderStatus.getDefault(), new Date()); } @@ -363,6 +372,25 @@ public boolean isNameValid() { return name != null && (name.length() <= 100); } + /** + * Gets represents oidc specific attributes. + * + * @return oidcAttributes + */ + public OidcRequest getOidcAttributes() { + return oidcAttributes; + } + + /** + * Sets represents oidc specific attributes. + * + * @param oidcAttributes + * Represents OIDC specific attributes. + */ + public void setOidcAttributes(OidcRequest oidcAttributes) { + this.oidcAttributes = oidcAttributes; + } + /** * Gets represents saml2 specific attributes in responses. * @@ -435,8 +463,9 @@ public Date getUpdatedAt() { @Override public String toString() { return "SubtenantIdentityProvider [accountId=" + accountId + ", createdAt=" + createdAt + ", description=" - + description + ", id=" + id + ", isDefault=" + isDefault + ", name=" + name + ", saml2Attributes=" - + saml2Attributes + ", status=" + status + ", updatedAt=" + updatedAt + "]"; + + description + ", id=" + id + ", isDefault=" + isDefault + ", name=" + name + ", oidcAttributes=" + + oidcAttributes + ", saml2Attributes=" + saml2Attributes + ", status=" + status + ", updatedAt=" + + updatedAt + "]"; } /** @@ -457,6 +486,7 @@ public int hashCode() { result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + Objects.hashCode(Boolean.valueOf(isDefault)); result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((oidcAttributes == null) ? 0 : oidcAttributes.hashCode()); result = prime * result + ((saml2Attributes == null) ? 0 : saml2Attributes.hashCode()); result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); @@ -541,6 +571,13 @@ public boolean equals(Object obj) { } else if (!name.equals(other.name)) { return false; } + if (oidcAttributes == null) { + if (other.oidcAttributes != null) { + return false; + } + } else if (!oidcAttributes.equals(other.oidcAttributes)) { + return false; + } if (saml2Attributes == null) { if (other.saml2Attributes != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroup.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroup.java index a47c69a75..3ea7e5055 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroup.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroup.java @@ -13,7 +13,7 @@ * Model for a subtenant policy group. */ @Preamble(description = "Model for a subtenant policy group.") -@SuppressWarnings("PMD.AvoidDuplicateLiterals") +@SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.AvoidDuplicateLiterals" }) public class SubtenantPolicyGroup implements SdkModel { /** * Serialisation Id. @@ -28,9 +28,20 @@ public class SubtenantPolicyGroup implements SdkModel { /** * The number of API keys in this group. + * + *

+ * + * @deprecated This field has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This property is deprecated. See 'application_count' property. */ + @Deprecated private final int apikeyCount; + /** + * The number of applications in this group. + */ + private final int applicationCount; + /** * Creation UTC time RFC3339. */ @@ -69,6 +80,8 @@ public class SubtenantPolicyGroup implements SdkModel { * The ID of the account this group belongs to. * @param apikeyCount * The number of API keys in this group. + * @param applicationCount + * The number of applications in this group. * @param createdAt * Creation UTC time RFC3339. * @param id @@ -81,10 +94,12 @@ public class SubtenantPolicyGroup implements SdkModel { * The number of users in this group. */ @Internal - public SubtenantPolicyGroup(String accountId, int apikeyCount, Date createdAt, String id, String name, - Date updatedAt, int userCount) { + @SuppressWarnings("PMD.CyclomaticComplexity") + public SubtenantPolicyGroup(String accountId, int apikeyCount, int applicationCount, Date createdAt, String id, + String name, Date updatedAt, int userCount) { super(); this.apikeyCount = apikeyCount; + this.applicationCount = applicationCount; this.createdAt = createdAt; this.updatedAt = updatedAt; this.userCount = userCount; @@ -108,6 +123,7 @@ public SubtenantPolicyGroup(String accountId, int apikeyCount, Date createdAt, S public SubtenantPolicyGroup(SubtenantPolicyGroup subtenantPolicyGroup) { this(subtenantPolicyGroup == null ? (String) null : subtenantPolicyGroup.accountId, subtenantPolicyGroup == null ? 0 : subtenantPolicyGroup.apikeyCount, + subtenantPolicyGroup == null ? 0 : subtenantPolicyGroup.applicationCount, subtenantPolicyGroup == null ? new Date() : subtenantPolicyGroup.createdAt, subtenantPolicyGroup == null ? (String) null : subtenantPolicyGroup.id, subtenantPolicyGroup == null ? (String) null : subtenantPolicyGroup.name, @@ -119,7 +135,7 @@ public SubtenantPolicyGroup(SubtenantPolicyGroup subtenantPolicyGroup) { * Constructor. */ public SubtenantPolicyGroup() { - this((String) null, 0, new Date(), (String) null, (String) null, new Date(), 0); + this((String) null, 0, 0, new Date(), (String) null, (String) null, new Date(), 0); } /** @@ -147,6 +163,8 @@ public SubtenantPolicyGroup(String id) { * * @param apikeyCount * The number of API keys in this group. + * @param applicationCount + * The number of applications in this group. * @param createdAt * Creation UTC time RFC3339. * @param updatedAt @@ -155,8 +173,9 @@ public SubtenantPolicyGroup(String id) { * The number of users in this group. */ @Internal - public SubtenantPolicyGroup(int apikeyCount, Date createdAt, Date updatedAt, int userCount) { - this((String) null, apikeyCount, createdAt, (String) null, (String) null, updatedAt, userCount); + public SubtenantPolicyGroup(int apikeyCount, int applicationCount, Date createdAt, Date updatedAt, int userCount) { + this((String) null, apikeyCount, applicationCount, createdAt, (String) null, (String) null, updatedAt, + userCount); } /** @@ -172,7 +191,7 @@ public SubtenantPolicyGroup(int apikeyCount, Date createdAt, Date updatedAt, int * The name of the group. */ public SubtenantPolicyGroup(String accountId, String name) { - this(accountId, 0, new Date(), (String) null, name, new Date(), 0); + this(accountId, 0, 0, new Date(), (String) null, name, new Date(), 0); } /** @@ -211,12 +230,27 @@ public boolean isAccountIdValid() { /** * Gets the number of api keys in this group. * + *

+ * + * @deprecated This field has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This property is deprecated. See 'application_count' property. + * * @return apikeyCount */ + @Deprecated public int getApikeyCount() { return apikeyCount; } + /** + * Gets the number of applications in this group. + * + * @return applicationCount + */ + public int getApplicationCount() { + return applicationCount; + } + /** * Gets creation utc time rfc3339. * @@ -337,9 +371,9 @@ public int getUserCount() { */ @Override public String toString() { - return "SubtenantPolicyGroup [accountId=" + accountId + ", apikeyCount=" + apikeyCount + ", createdAt=" - + createdAt + ", id=" + id + ", name=" + name + ", updatedAt=" + updatedAt + ", userCount=" + userCount - + "]"; + return "SubtenantPolicyGroup [accountId=" + accountId + ", apikeyCount=" + apikeyCount + ", applicationCount=" + + applicationCount + ", createdAt=" + createdAt + ", id=" + id + ", name=" + name + ", updatedAt=" + + updatedAt + ", userCount=" + userCount + "]"; } /** @@ -356,6 +390,7 @@ public int hashCode() { int result = 1; result = prime * result + ((accountId == null) ? 0 : accountId.hashCode()); result = prime * result + Objects.hashCode(Integer.valueOf(apikeyCount)); + result = prime * result + Objects.hashCode(Integer.valueOf(applicationCount)); result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); @@ -389,6 +424,7 @@ protected boolean canEqual(Object other) { * @return true if this object is the same as the obj argument; false otherwise. */ @Override + @SuppressWarnings({ "PMD.ExcessiveMethodLength", "PMD.NcssMethodCount" }) public boolean equals(Object obj) { if (this == obj) { return true; @@ -413,6 +449,9 @@ public boolean equals(Object obj) { if (apikeyCount != other.apikeyCount) { return false; } + if (applicationCount != other.applicationCount) { + return false; + } if (createdAt == null) { if (other.createdAt != null) { return false; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/TierHistory.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/TierHistory.java new file mode 100644 index 000000000..9516d784a --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/TierHistory.java @@ -0,0 +1,231 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.PerformsNoOperation; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; +import java.util.Date; + +/** + * Model for a tier history. + */ +@Preamble(description = "Model for a tier history.") +public class TierHistory implements SdkModel { + /** + * Serialisation Id. + */ + private static final long serialVersionUID = 1967757034209518L; + + /** + * value. + */ + private final String tier; + + /** + * Last update UTC time RFC3339. + */ + private final Date updatedAt; + + /** + * Internal constructor. + * + *

+ * Constructor based on all fields. + *

+ * Note: Should not be used. Use {@link #TierHistory()} instead. + * + * @param tier + * value. + * @param updatedAt + * Last update UTC time RFC3339. + */ + @Internal + public TierHistory(String tier, Date updatedAt) { + super(); + this.tier = tier; + this.updatedAt = updatedAt; + } + + /** + * Internal constructor. + * + *

+ * Constructor based on a similar object. + *

+ * Note: Should not be used. Use {@link #TierHistory()} instead. + * + * @param tierHistory + * a tier history. + */ + @Internal + public TierHistory(TierHistory tierHistory) { + this(tierHistory == null ? (String) null : tierHistory.tier, + tierHistory == null ? new Date() : tierHistory.updatedAt); + } + + /** + * Constructor. + */ + public TierHistory() { + this((String) null, new Date()); + } + + /** + * Sets id. + * + * @param id + * id. + */ + @Override + @Internal + @PerformsNoOperation + public void setId(String id) { + // Nothing to do + } + + /** + * Gets id. + * + *

+ * Warning: TierHistory model does not have any ID field. This always returns {@code null}. + * + * @return id + */ + @Override + @Internal + public String getId() { + return null; + } + + /** + * Gets value. + * + * @return tier + */ + public String getTier() { + return tier; + } + + /** + * Gets last update utc time rfc3339. + * + * @return updatedAt + */ + public Date getUpdatedAt() { + return updatedAt; + } + + /** + * Returns a string representation of the object. + * + *

+ * + * @see java.lang.Object#toString() + * @return the string representation + */ + @Override + public String toString() { + return "TierHistory [tier=" + tier + ", updatedAt=" + updatedAt + "]"; + } + + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((tier == null) ? 0 : tier.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + + /** + * Method to ensure {@link #equals(Object)} is correct. + * + *

+ * Note: see this article: canEqual() + * + * @param other + * another object. + * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. + */ + protected boolean canEqual(Object other) { + return other instanceof TierHistory; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + *

+ * + * @see java.lang.Object#equals(java.lang.Object) + * @param obj + * an object to compare with this instance. + * @return true if this object is the same as the obj argument; false otherwise. + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof TierHistory)) { + return false; + } + final TierHistory other = (TierHistory) obj; + if (!other.canEqual(this)) { + return false; + } + if (tier == null) { + if (other.tier != null) { + return false; + } + } else if (!tier.equals(other.tier)) { + return false; + } + if (updatedAt == null) { + if (other.updatedAt != null) { + return false; + } + } else if (!updatedAt.equals(other.updatedAt)) { + return false; + } + return true; + } + + /** + * Checks whether the model is valid or not. + * + *

+ * + * @see SdkModel#isValid() + * @return true if the model is valid; false otherwise. + */ + @Override + public boolean isValid() { + return true; + } + + /** + * Clones this instance. + * + *

+ * + * @see java.lang.Object#clone() + * @return a cloned instance + */ + @Override + public TierHistory clone() { + return new TierHistory(this); + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColor.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColor.java index 4450e5adf..bb79f0ae5 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColor.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColor.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a dark theme color. @@ -20,7 +20,7 @@ public class DarkThemeColor extends AbstractDarkThemeColor { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public DarkThemeColor(String color, DarkThemeColorReference reference, Date upda /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -65,7 +65,7 @@ public DarkThemeColor() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -80,42 +80,33 @@ public DarkThemeColor(Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setDarkThemeColorId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -128,7 +119,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -141,59 +132,22 @@ protected boolean canEqual(Object other) { return other instanceof DarkThemeColor; } - /** - * Indicates whether some other object is "equal to" this one. - * - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof DarkThemeColor)) { - return false; - } - final DarkThemeColor other = (DarkThemeColor) obj; - if (!other.canEqual(this)) { - return false; - } - return true; - } - - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - /** * Checks whether the model is valid or not. - * + * *

* - * @see SdkModel#isValid() + * @see com.arm.mbed.cloud.sdk.common.SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @Override public boolean isValid() { - return super.isValid() && reference != null; + return true; } /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorReference.java index 882e7e3b4..45f72af17 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorReference.java @@ -25,6 +25,22 @@ public enum DarkThemeColorReference implements SdkEnum { INFO_FONT_COLOR("info_font_color"), + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"), + PRIMARY("primary"), PRIMARY_FONT_COLOR("primary_font_color"), diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImage.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImage.java index c1636c785..b4a27df6f 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImage.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImage.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a dark theme image. @@ -20,7 +20,7 @@ public class DarkThemeImage extends AbstractDarkThemeImage { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public DarkThemeImage(DarkThemeImageReference reference, String staticUri, Date /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -65,7 +65,7 @@ public DarkThemeImage() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -82,42 +82,33 @@ public DarkThemeImage(String staticUri, Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setDarkThemeImageId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -130,7 +121,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -143,9 +134,27 @@ protected boolean canEqual(Object other) { return other instanceof DarkThemeImage; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((staticUri == null) ? 0 : staticUri.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -174,28 +183,22 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - /** * Checks whether the model is valid or not. - * + * *

* - * @see SdkModel#isValid() + * @see com.arm.mbed.cloud.sdk.common.SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @Override public boolean isValid() { - return super.isValid() && reference != null; + return true; } /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageReference.java index f4bd4234e..e966d4bc6 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageReference.java @@ -13,6 +13,12 @@ */ @Preamble(description = "Dark theme image reference.") public enum DarkThemeImageReference implements SdkEnum { + APP_LOGO_LANDSCAPE("app_logo_landscape"), + + APP_LOGO_PORTRAIT("app_logo_portrait"), + + APP_LOGO_SQUARE("app_logo_square"), + BRAND_LOGO_EMAIL("brand_logo_email"), BRAND_LOGO_LANDSCAPE("brand_logo_landscape"), @@ -99,7 +105,7 @@ public enum DarkThemeImageReference implements SdkEnum { */ @Internal @Required - @DefaultValue("BRAND_LOGO_EMAIL") + @DefaultValue("APP_LOGO_LANDSCAPE") private final String string; /** @@ -109,7 +115,7 @@ public enum DarkThemeImageReference implements SdkEnum { * string representation. */ @Internal - DarkThemeImageReference(@DefaultValue("BRAND_LOGO_EMAIL") String string) { + DarkThemeImageReference(@DefaultValue("APP_LOGO_LANDSCAPE") String string) { this.string = string; } @@ -169,7 +175,7 @@ public boolean isUnknownValue() { * @return default dark theme image reference */ public static DarkThemeImageReference getDefault() { - return BRAND_LOGO_EMAIL; + return APP_LOGO_LANDSCAPE; } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColor.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColor.java index c5ff06ff4..1d6b16bb9 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColor.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColor.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a light theme color. @@ -20,7 +20,7 @@ public class LightThemeColor extends AbstractLightThemeColor { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public LightThemeColor(String color, LightThemeColorReference reference, Date up /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -65,7 +65,7 @@ public LightThemeColor() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -80,42 +80,33 @@ public LightThemeColor(Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setLightThemeColorId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -128,7 +119,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -141,59 +132,9 @@ protected boolean canEqual(Object other) { return other instanceof LightThemeColor; } - /** - * Indicates whether some other object is "equal to" this one. - * - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (!super.equals(obj)) { - return false; - } - if (!(obj instanceof LightThemeColor)) { - return false; - } - final LightThemeColor other = (LightThemeColor) obj; - if (!other.canEqual(this)) { - return false; - } - return true; - } - - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return super.isValid() && reference != null; - } - /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorReference.java index 0ab93d54a..2e1efc9de 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorReference.java @@ -25,6 +25,22 @@ public enum LightThemeColorReference implements SdkEnum { INFO_FONT_COLOR("info_font_color"), + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"), + PRIMARY("primary"), PRIMARY_FONT_COLOR("primary_font_color"), diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImage.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImage.java index 410d0da1e..34caf400d 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImage.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImage.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a light theme image. @@ -20,7 +20,7 @@ public class LightThemeImage extends AbstractLightThemeImage { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public LightThemeImage(LightThemeImageReference reference, String staticUri, Dat /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -65,7 +65,7 @@ public LightThemeImage() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -82,42 +82,33 @@ public LightThemeImage(String staticUri, Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setLightThemeImageId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -131,7 +122,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -144,9 +135,27 @@ protected boolean canEqual(Object other) { return other instanceof LightThemeImage; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((staticUri == null) ? 0 : staticUri.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -175,28 +184,22 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - /** * Checks whether the model is valid or not. - * + * *

* - * @see SdkModel#isValid() + * @see com.arm.mbed.cloud.sdk.common.SdkModel#isValid() * @return true if the model is valid; false otherwise. */ @Override public boolean isValid() { - return super.isValid() && reference != null; + return true; } /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageReference.java index e04f0149b..934ae1ee7 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageReference.java @@ -13,6 +13,12 @@ */ @Preamble(description = "Light theme image reference.") public enum LightThemeImageReference implements SdkEnum { + APP_LOGO_LANDSCAPE("app_logo_landscape"), + + APP_LOGO_PORTRAIT("app_logo_portrait"), + + APP_LOGO_SQUARE("app_logo_square"), + BRAND_LOGO_EMAIL("brand_logo_email"), BRAND_LOGO_LANDSCAPE("brand_logo_landscape"), @@ -99,7 +105,7 @@ public enum LightThemeImageReference implements SdkEnum { */ @Internal @Required - @DefaultValue("BRAND_LOGO_EMAIL") + @DefaultValue("APP_LOGO_LANDSCAPE") private final String string; /** @@ -109,7 +115,7 @@ public enum LightThemeImageReference implements SdkEnum { * string representation. */ @Internal - LightThemeImageReference(@DefaultValue("BRAND_LOGO_EMAIL") String string) { + LightThemeImageReference(@DefaultValue("APP_LOGO_LANDSCAPE") String string) { this.string = string; } @@ -169,7 +175,7 @@ public boolean isUnknownValue() { * @return default light theme image reference */ public static LightThemeImageReference getDefault() { - return BRAND_LOGO_EMAIL; + return APP_LOGO_LANDSCAPE; } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColor.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColor.java index 3a28379c4..5d70e6640 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColor.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColor.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a subtenant dark theme color. @@ -20,7 +20,7 @@ public class SubtenantDarkThemeColor extends AbstractSubtenantDarkThemeColor { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public SubtenantDarkThemeColor(String color, SubtenantDarkThemeColorReference re /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -66,7 +66,7 @@ public SubtenantDarkThemeColor() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -81,42 +81,33 @@ public SubtenantDarkThemeColor(Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setSubtenantDarkThemeColorId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -130,7 +121,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -143,9 +134,27 @@ protected boolean canEqual(Object other) { return other instanceof SubtenantDarkThemeColor; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((color == null) ? 0 : color.hashCode()); + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -174,28 +183,9 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return super.isValid() && reference != null; - } - /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorReference.java index 9e6319b8e..9d767e63b 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorReference.java @@ -25,6 +25,22 @@ public enum SubtenantDarkThemeColorReference implements SdkEnum { INFO_FONT_COLOR("info_font_color"), + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"), + PRIMARY("primary"), PRIMARY_FONT_COLOR("primary_font_color"), diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImage.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImage.java index 3c619afa9..2589d94ab 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImage.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImage.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a subtenant dark theme image. @@ -20,7 +20,7 @@ public class SubtenantDarkThemeImage extends AbstractSubtenantDarkThemeImage { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public SubtenantDarkThemeImage(SubtenantDarkThemeImageReference reference, Strin /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -66,7 +66,7 @@ public SubtenantDarkThemeImage() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -83,43 +83,33 @@ public SubtenantDarkThemeImage(String staticUri, Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setSubtenantDarkThemeImageId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -133,7 +123,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -146,9 +136,27 @@ protected boolean canEqual(Object other) { return other instanceof SubtenantDarkThemeImage; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((staticUri == null) ? 0 : staticUri.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -177,28 +185,9 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return super.isValid() && reference != null; - } - /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageReference.java index e343356eb..e20aa2e52 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageReference.java @@ -13,6 +13,12 @@ */ @Preamble(description = "Subtenant dark theme image reference.") public enum SubtenantDarkThemeImageReference implements SdkEnum { + APP_LOGO_LANDSCAPE("app_logo_landscape"), + + APP_LOGO_PORTRAIT("app_logo_portrait"), + + APP_LOGO_SQUARE("app_logo_square"), + BRAND_LOGO_EMAIL("brand_logo_email"), BRAND_LOGO_LANDSCAPE("brand_logo_landscape"), @@ -99,7 +105,7 @@ public enum SubtenantDarkThemeImageReference implements SdkEnum { */ @Internal @Required - @DefaultValue("BRAND_LOGO_EMAIL") + @DefaultValue("APP_LOGO_LANDSCAPE") private final String string; /** @@ -109,7 +115,7 @@ public enum SubtenantDarkThemeImageReference implements SdkEnum { * string representation. */ @Internal - SubtenantDarkThemeImageReference(@DefaultValue("BRAND_LOGO_EMAIL") String string) { + SubtenantDarkThemeImageReference(@DefaultValue("APP_LOGO_LANDSCAPE") String string) { this.string = string; } @@ -169,7 +175,7 @@ public boolean isUnknownValue() { * @return default subtenant dark theme image reference */ public static SubtenantDarkThemeImageReference getDefault() { - return BRAND_LOGO_EMAIL; + return APP_LOGO_LANDSCAPE; } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColor.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColor.java index d05e98ba1..dca3f845f 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColor.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColor.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a subtenant light theme color. @@ -20,7 +20,7 @@ public class SubtenantLightThemeColor extends AbstractSubtenantLightThemeColor { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public SubtenantLightThemeColor(String color, SubtenantLightThemeColorReference /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -66,7 +66,7 @@ public SubtenantLightThemeColor() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -81,42 +81,33 @@ public SubtenantLightThemeColor(Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setSubtenantLightThemeColorId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -130,7 +121,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -143,9 +134,27 @@ protected boolean canEqual(Object other) { return other instanceof SubtenantLightThemeColor; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((color == null) ? 0 : color.hashCode()); + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -174,28 +183,9 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return super.isValid() && reference != null; - } - /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorReference.java index eb01abb1f..bcd4fbae9 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorReference.java @@ -25,6 +25,22 @@ public enum SubtenantLightThemeColorReference implements SdkEnum { INFO_FONT_COLOR("info_font_color"), + MENU_BACKGROUND_COLOR("menu_background_color"), + + MENU_TEXT_COLOR("menu_text_color"), + + NAV_MENU_ACTIVE_BACKGROUND("nav_menu_active_background"), + + NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR("nav_menu_active_background_font_color"), + + NAV_MENU_BACKGROUND("nav_menu_background"), + + NAV_MENU_BACKGROUND_FONT_COLOR("nav_menu_background_font_color"), + + NAV_MENU_HIGHLIGHT("nav_menu_highlight"), + + NAV_MENU_HIGHLIGHT_FONT_COLOR("nav_menu_highlight_font_color"), + PRIMARY("primary"), PRIMARY_FONT_COLOR("primary_font_color"), diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImage.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImage.java index 6b53bc8f6..6e9913acf 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImage.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImage.java @@ -1,12 +1,12 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Jun 05 19:22:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a subtenant light theme image. @@ -20,7 +20,7 @@ public class SubtenantLightThemeImage extends AbstractSubtenantLightThemeImage { /** * Internal constructor. - * + * *

* Constructor based on all fields. *

@@ -40,7 +40,7 @@ public SubtenantLightThemeImage(SubtenantLightThemeImageReference reference, Str /** * Internal constructor. - * + * *

* Constructor based on a similar object. *

@@ -66,7 +66,7 @@ public SubtenantLightThemeImage() { /** * Internal constructor. - * + * *

* Constructor based on read-only fields. *

@@ -83,42 +83,33 @@ public SubtenantLightThemeImage(String staticUri, Date updatedAt) { } /** - * Executes setId. + * Executes getId. * - * @param id - * a string. + * @return something */ @Override - public void setId(String id) { - setReference(id); + @NotImplemented + public String getId() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes setId. - *

- * Similar to {@link #setId(String)} * * @param id * a string. */ - @Internal - public void setSubtenantLightThemeImageId(String id) { - setId(id); - } - - /** - * Executes getId. - * - * @return something - */ @Override - public String getId() { - return reference == null ? null : reference.getString(); + @NotImplemented + public void setId(String id) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Returns a string representation of the object. - * + * *

* * @see java.lang.Object#toString() @@ -132,7 +123,7 @@ public String toString() { /** * Method to ensure {@link #equals(Object)} is correct. - * + * *

* Note: see this article: canEqual() * @@ -145,9 +136,27 @@ protected boolean canEqual(Object other) { return other instanceof SubtenantLightThemeImage; } + /** + * Calculates the hash code of this instance based on field values. + * + *

+ * + * @see java.lang.Object#hashCode() + * @return hash code + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((reference == null) ? 0 : reference.hashCode()); + result = prime * result + ((staticUri == null) ? 0 : staticUri.hashCode()); + result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); + return result; + } + /** * Indicates whether some other object is "equal to" this one. - * + * *

* * @see java.lang.Object#equals(java.lang.Object) @@ -176,28 +185,9 @@ public boolean equals(Object obj) { return true; } - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public int hashCode() { - return super.hashCode(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return super.isValid() && reference != null; - } - /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageReference.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageReference.java index 755dede8d..3dd1d61e3 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageReference.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageReference.java @@ -13,6 +13,12 @@ */ @Preamble(description = "Subtenant light theme image reference.") public enum SubtenantLightThemeImageReference implements SdkEnum { + APP_LOGO_LANDSCAPE("app_logo_landscape"), + + APP_LOGO_PORTRAIT("app_logo_portrait"), + + APP_LOGO_SQUARE("app_logo_square"), + BRAND_LOGO_EMAIL("brand_logo_email"), BRAND_LOGO_LANDSCAPE("brand_logo_landscape"), @@ -99,7 +105,7 @@ public enum SubtenantLightThemeImageReference implements SdkEnum { */ @Internal @Required - @DefaultValue("BRAND_LOGO_EMAIL") + @DefaultValue("APP_LOGO_LANDSCAPE") private final String string; /** @@ -109,7 +115,7 @@ public enum SubtenantLightThemeImageReference implements SdkEnum { * string representation. */ @Internal - SubtenantLightThemeImageReference(@DefaultValue("BRAND_LOGO_EMAIL") String string) { + SubtenantLightThemeImageReference(@DefaultValue("APP_LOGO_LANDSCAPE") String string) { this.string = string; } @@ -169,7 +175,7 @@ public boolean isUnknownValue() { * @return default subtenant light theme image reference */ public static SubtenantLightThemeImageReference getDefault() { - return BRAND_LOGO_EMAIL; + return APP_LOGO_LANDSCAPE; } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoDevice.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoDevice.java new file mode 100644 index 000000000..22a44f7cc --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoDevice.java @@ -0,0 +1,192 @@ +package com.arm.mbed.cloud.sdk.connect.model; + +import java.util.Date; +import java.util.List; +import java.util.Objects; + +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; + +/** + * The Device Echo object representing the device. + */ +@Preamble(description = "EchoDevice") +public class EchoDevice implements SdkModel { + + private static final long serialVersionUID = 1L; + + private Date createdAt; + + private String deviceId; + + private String endpointName; + + private Date lastDesiredAt; + + private Date lastReportedAt; + + private String object; + + private List resources; + + private Date updatedAt; + + /** + * @param createdAt + * Response creation UTC time. + * @param deviceId + * The device ID. + * @param endpointName + * The endpoint name. + * @param lastDesiredAt + * The last time a write command was initiated on a resource. + * @param lastReportedAt + * The last time any resource's reported value was updated. + * @param object + * API Resource name + * @param resources + * The list of device resources stored in Device Echo. + * @param updatedAt + * The time of last registration event of a Device Echo object. + */ + public EchoDevice(Date createdAt, String deviceId, String endpointName, Date lastDesiredAt, Date lastReportedAt, + String object, List resources, Date updatedAt) { + super(); + this.createdAt = createdAt; + this.deviceId = deviceId; + this.endpointName = endpointName; + this.lastDesiredAt = lastDesiredAt; + this.lastReportedAt = lastReportedAt; + this.object = object; + this.resources = resources; + this.updatedAt = updatedAt; + } + + public EchoDevice() { + this(null, null, null, null, null, null, null, null); + } + + @Override + public EchoDevice clone() { + return new EchoDevice(createdAt, deviceId, endpointName, lastDesiredAt, lastReportedAt, object, resources, + updatedAt); + } + + @Override + public boolean isValid() { + return true; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getEndpointName() { + return endpointName; + } + + public void setEndpointName(String endpointName) { + this.endpointName = endpointName; + } + + public Date getLastDesiredAt() { + return lastDesiredAt; + } + + public void setLastDesiredAt(Date lastDesiredAt) { + this.lastDesiredAt = lastDesiredAt; + } + + public Date getLastReportedAt() { + return lastReportedAt; + } + + public void setLastReportedAt(Date lastReportedAt) { + this.lastReportedAt = lastReportedAt; + } + + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + public List getResources() { + return resources; + } + + public void setResources(List resources) { + this.resources = resources; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + @Override + public String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setId(String id) { + // TODO Auto-generated method stub + + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, deviceId, endpointName, lastDesiredAt, lastReportedAt, object, resources, + updatedAt); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EchoDevice other = (EchoDevice) obj; + return Objects.equals(createdAt, other.createdAt) && Objects.equals(deviceId, other.deviceId) + && Objects.equals(endpointName, other.endpointName) && Objects.equals(lastDesiredAt, other.lastDesiredAt) + && Objects.equals(lastReportedAt, other.lastReportedAt) && Objects.equals(object, other.object) + && Objects.equals(resources, other.resources) && Objects.equals(updatedAt, other.updatedAt); + } + + @Override + public String toString() { + return "{\"EchoDevice\": {\"createdAt\":\"" + createdAt + "\", \"deviceId\":\"" + deviceId + + "\", \"endpointName\":\"" + endpointName + "\", \"lastDesiredAt\":\"" + lastDesiredAt + + "\", \"lastReportedAt\":\"" + lastReportedAt + "\", \"object\":\"" + object + "\", \"resources\":" + + resources + ", \"updatedAt\":\"" + updatedAt + "\"}}"; + } + +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResource.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResource.java new file mode 100644 index 000000000..26a1c6bc6 --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResource.java @@ -0,0 +1,139 @@ +package com.arm.mbed.cloud.sdk.connect.model; + +import java.util.Objects; + +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; + +@Preamble(description = "EchoResource") +public class EchoResource implements SdkModel { + private static final long serialVersionUID = 1L; + + private EchoResourceDesired desired; + + private EchoResourceReported reported; + + private String resourcePath; + + private Boolean subscribed; + + private String deviceId; + + /** + * @param desired + * desired + * @param reported + * reported + * @param resourcePath + * The path of the resource. + * @param subscribed + * System-level subscription status of the resource. If any of the applications has placed a + * subscription, the status is true. Overlapping subscriptions from multiple applications do not increase + * the load on the device as the server handles the multiplexing. + */ + public EchoResource(EchoResourceDesired desired, EchoResourceReported reported, String resourcePath, + Boolean subscribed) { + super(); + this.desired = desired; + this.reported = reported; + this.resourcePath = resourcePath; + this.subscribed = subscribed; + } + + public EchoResource() { + this(null, null, null, null); + } + + @Override + public EchoResource clone() { + return new EchoResource(desired, reported, resourcePath, subscribed); + } + + @Override + public boolean isValid() { + return true; + } + + public EchoResourceDesired getDesired() { + return desired; + } + + public void setDesired(EchoResourceDesired desired) { + this.desired = desired; + } + + public EchoResourceReported getReported() { + return reported; + } + + public void setReported(EchoResourceReported reported) { + this.reported = reported; + } + + public String getResourcePath() { + return resourcePath; + } + + public void setResourcePath(String resourcePath) { + this.resourcePath = resourcePath; + } + + public Boolean getSubscribed() { + return subscribed; + } + + public void setSubscribed(Boolean subscribed) { + this.subscribed = subscribed; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + @Override + public int hashCode() { + return Objects.hash(desired, reported, resourcePath, subscribed, deviceId); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EchoResource other = (EchoResource) obj; + return Objects.equals(desired, other.desired) && Objects.equals(reported, other.reported) + && Objects.equals(resourcePath, other.resourcePath) && Objects.equals(subscribed, other.subscribed) && Objects.equals(deviceId, other.deviceId); + } + + @Override + public String toString() { + return "{\"desired\":\"" + desired + "\", \"reported\":\"" + reported + "\", \"resourcePath\":\"" + resourcePath + + "\", \"subscribed\":\"" + subscribed+ "\", \"deviceId\":\"" + deviceId + "\"}"; + } + + @Override + public String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setId(String id) { + // TODO Auto-generated method stub + + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceDesired.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceDesired.java new file mode 100644 index 000000000..4e16b1a96 --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceDesired.java @@ -0,0 +1,134 @@ +package com.arm.mbed.cloud.sdk.connect.model; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.Objects; + +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.SdkModel; + +/** + * Resource value written, or queued to be written to the device. + */ +@Preamble(description = "EchoResource") +public class EchoResourceDesired implements SdkModel { + private static final long serialVersionUID = 1L; + + private Date desiredAt; + + private BigDecimal status; + + private Date statusUpdatedAt; + + private String value; + + /** + * @param desiredAt + * The time of the latest value write was initiated. + * @param status + * The status of the desired value. 0 = 'pending write', 1 = 'success', 2 + * = 'failed'. + * @param statusUpdatedAt + * The time of the last status update. + * @param value + * The desired value in base64 encoded format. + * + */ + public EchoResourceDesired(Date desiredAt, BigDecimal status, Date statusUpdatedAt, String value) { + super(); + this.desiredAt = desiredAt; + this.status = status; + this.statusUpdatedAt = statusUpdatedAt; + this.value = value; + } + + public EchoResourceDesired() { + this(null, null, null, null); + } + + @Override + public EchoResourceDesired clone() { + return new EchoResourceDesired(desiredAt, status, statusUpdatedAt, value); + } + + @Override + public boolean isValid() { + return true; + } + + public Date getDesiredAt() { + return desiredAt; + } + + public void setDesiredAt(Date desiredAt) { + this.desiredAt = desiredAt; + } + + public BigDecimal getStatus() { + return status; + } + + public void setStatus(BigDecimal status) { + this.status = status; + } + + public Date getStatusUpdatedAt() { + return statusUpdatedAt; + } + + public void setStatusUpdatedAt(Date statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + @Override + public int hashCode() { + return Objects.hash(desiredAt, status, statusUpdatedAt, value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EchoResourceDesired other = (EchoResourceDesired) obj; + return Objects.equals(desiredAt, other.desiredAt) && Objects.equals(status, other.status) + && Objects.equals(statusUpdatedAt, other.statusUpdatedAt) && Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "{\"EchoResourceDesired\": {\"desiredAt\":\"" + desiredAt + "\", \"status\":\"" + status + + "\", \"statusUpdatedAt\":\"" + statusUpdatedAt + "\", \"value\":\"" + value + "\"}}"; + } + + @Override + public String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setId(String id) { + // TODO Auto-generated method stub + + } + +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceReported.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceReported.java new file mode 100644 index 000000000..561b1f74d --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EchoResourceReported.java @@ -0,0 +1,129 @@ +package com.arm.mbed.cloud.sdk.connect.model; + +import java.util.Date; +import java.util.Objects; + +import com.arm.mbed.cloud.sdk.common.SdkModel; + +public class EchoResourceReported implements SdkModel { + private static final long serialVersionUID = 1L; + + private String contentType; + + private Date expiresAt; + + private Date reportedAt; + + private String value; + + /** + * + * @param contentType + * Content type of the reported resource value. + * @param expiresAt + * The time after which the reported value is not valid, calculated based on the max-age of the resource + * value the device reported. + * @param reportedAt + * The time the last value was reported. + * @param value + * The reported value in base64 encoded format. + * + */ + public EchoResourceReported(String contentType, Date expiresAt, Date reportedAt, String value) { + super(); + this.contentType = contentType; + this.expiresAt = expiresAt; + this.reportedAt = reportedAt; + this.value = value; + } + + public EchoResourceReported() { + this(null, null, null, null); + } + + @Override + public EchoResourceReported clone() { + return new EchoResourceReported(contentType, expiresAt, reportedAt, value); + } + + @Override + public boolean isValid() { + return true; + } + + public String getContentType() { + return contentType; + } + + public void setContentType(String contentType) { + this.contentType = contentType; + } + + public Date getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(Date expiresAt) { + this.expiresAt = expiresAt; + } + + public Date getReportedAt() { + return reportedAt; + } + + public void setReportedAt(Date reportedAt) { + this.reportedAt = reportedAt; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + @Override + public int hashCode() { + return Objects.hash(contentType, expiresAt, reportedAt, value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EchoResourceReported other = (EchoResourceReported) obj; + return Objects.equals(contentType, other.contentType) && Objects.equals(expiresAt, other.expiresAt) + && Objects.equals(reportedAt, other.reportedAt) && Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "{\"EchoResourceReported\": {\"contentType\":\"" + contentType + "\", \"expiresAt\":\"" + expiresAt + + "\", \"reportedAt\":\"" + reportedAt + "\", \"value\":\"" + value + "\"}}"; + } + + @Override + public String getId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setId(String id) { + // TODO Auto-generated method stub + + } + +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/Device.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/Device.java index e227019f3..8bfce1904 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/Device.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/Device.java @@ -47,6 +47,12 @@ public class Device implements SdkModel { */ private String caId; + /** + * Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are + * limited to 128 characters. Updating this field replaces existing contents. + */ + private final Map componentAttributes; + /** * The expiration date of the certificate used to connect to LwM2M server. */ @@ -99,7 +105,8 @@ public class Device implements SdkModel { private String deviceKey; /** - * The endpoint name given to the device. + * The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory + * tool. */ private final String endpointName; @@ -124,7 +131,7 @@ public class Device implements SdkModel { private final List groups; /** - * The ID of the host gateway, if appropriate. + * The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set. */ private String hostGateway; @@ -169,7 +176,9 @@ public class Device implements SdkModel { private final Date lastSystemSuspendedUpdatedAt; /** - * The lifecycle status of the device. + * The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device Management. * + * Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, + * 'suspended'. */ private final DeviceLifecycleStatus lifecycleStatus; @@ -184,32 +193,47 @@ public class Device implements SdkModel { private final Date manifestTimestamp; /** - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. */ private DeviceMechanism mechanism; /** - * The address of the connector to use. + * NOT USED: The address of the connector to use. */ private String mechanismUrl; /** - * The name of the device. + * The name given by the web application for the device. Device itself provides only the endpoint_name. */ private String name; /** - * Is the device suspended by the operator?. + * Private network identifier. Used to group nodes connected to a specific border router. + */ + private final String netId; + + /** + * Device has been suspended by operator. */ private final boolean operatorSuspended; /** - * The serial number of the device. + * The [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. The serial number is injected by the factory tool during manufacturing. */ private String serialNumber; /** - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet bootstrapped or + * connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the first time. This state is + * set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to + * bootstrap again after few seconds. * Bootstrapped: The device has bootstrapped, and has credentials to connect to + * Device Management. * Registered: The device has registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. */ private DeviceState state; @@ -219,7 +243,7 @@ public class Device implements SdkModel { private final boolean systemSuspended; /** - * The time the object was updated. + * The time this data object was updated. */ private final Date updatedAt; @@ -246,6 +270,9 @@ public class Device implements SdkModel { * The timestamp of the device's most recent bootstrap process. * @param caId * The certificate issuer's ID. + * @param componentAttributes + * Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values + * are limited to 128 characters. Updating this field replaces existing contents. * @param connectorExpirationDate * The expiration date of the certificate used to connect to LwM2M server. * @param createdAt @@ -271,7 +298,8 @@ public class Device implements SdkModel { * @param deviceKey * The fingerprint of the device certificate. * @param endpointName - * The endpoint name given to the device. + * The endpoint name given to the device. The endpoint_name is from the device certificate and is set by + * factory tool. * @param endpointType * The endpoint type of the device. For example, the device is a gateway. * @param enrolmentListTimestamp @@ -281,7 +309,7 @@ public class Device implements SdkModel { * @param groups * An array containing an ID of each group this device belongs to. * @param hostGateway - * The ID of the host gateway, if appropriate. + * The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set. * @param id * The ID of the device. The device ID is used across all Device Management APIs. * @param issuerFingerprint @@ -299,47 +327,63 @@ public class Device implements SdkModel { * @param lastSystemSuspendedUpdatedAt * The timestamp of the most recent system block activity. * @param lifecycleStatus - * The lifecycle status of the device. + * The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device + * Management. * Blocked: The device is prevented from connecting to Pelion Device Management. Device can + * be, for example, 'suspended'. * @param manifest * DEPRECATED: The URL for the current device manifest. * @param manifestTimestamp * The timestamp of the current manifest version. * @param mechanism - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. * @param mechanismUrl - * The address of the connector to use. + * NOT USED: The address of the connector to use. * @param name - * The name of the device. + * The name given by the web application for the device. Device itself provides only the endpoint_name. + * @param netId + * Private network identifier. Used to group nodes connected to a specific border router. * @param operatorSuspended - * Is the device suspended by the operator?. + * Device has been suspended by operator. * @param serialNumber - * The serial number of the device. + * The [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. The serial number is injected by the factory tool during manufacturing. * @param state - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet + * bootstrapped or connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the + * first time. This state is set only while bootstrapping is in progress. For example, an external CA + * gives an error, and the device tries to bootstrap again after few seconds. * Bootstrapped: The device + * has bootstrapped, and has credentials to connect to Device Management. * Registered: The device has + * registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device + * sends events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. * @param systemSuspended * Is the device suspended by the system?. * @param updatedAt - * The time the object was updated. + * The time this data object was updated. * @param vendorId * The device vendor ID. */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") public Device(String accountId, boolean autoUpdate, Date bootstrapExpirationDate, Date bootstrappedTimestamp, - String caId, Date connectorExpirationDate, Date createdAt, Map customAttributes, - DeviceDeployedState deployedState, String deployment, String description, String deviceClass, - @DefaultValue("0") int deviceExecutionMode, String deviceKey, String endpointName, - String endpointType, Date enrolmentListTimestamp, String firmwareChecksum, List groups, - String hostGateway, String id, String issuerFingerprint, String lastOperatorSuspendedCategory, - String lastOperatorSuspendedDescription, Date lastOperatorSuspendedUpdatedAt, - String lastSystemSuspendedCategory, String lastSystemSuspendedDescription, - Date lastSystemSuspendedUpdatedAt, DeviceLifecycleStatus lifecycleStatus, String manifest, - Date manifestTimestamp, DeviceMechanism mechanism, String mechanismUrl, String name, - boolean operatorSuspended, String serialNumber, DeviceState state, boolean systemSuspended, - Date updatedAt, String vendorId) { + String caId, Map componentAttributes, Date connectorExpirationDate, Date createdAt, + Map customAttributes, DeviceDeployedState deployedState, String deployment, + String description, String deviceClass, @DefaultValue("0") int deviceExecutionMode, String deviceKey, + String endpointName, String endpointType, Date enrolmentListTimestamp, String firmwareChecksum, + List groups, String hostGateway, String id, String issuerFingerprint, + String lastOperatorSuspendedCategory, String lastOperatorSuspendedDescription, + Date lastOperatorSuspendedUpdatedAt, String lastSystemSuspendedCategory, + String lastSystemSuspendedDescription, Date lastSystemSuspendedUpdatedAt, + DeviceLifecycleStatus lifecycleStatus, String manifest, Date manifestTimestamp, + DeviceMechanism mechanism, String mechanismUrl, String name, String netId, boolean operatorSuspended, + String serialNumber, DeviceState state, boolean systemSuspended, Date updatedAt, String vendorId) { super(); this.accountId = accountId; this.bootstrappedTimestamp = bootstrappedTimestamp; + this.componentAttributes = componentAttributes; this.createdAt = createdAt; this.deployedState = deployedState; this.endpointName = endpointName; @@ -354,6 +398,7 @@ public Device(String accountId, boolean autoUpdate, Date bootstrapExpirationDate this.lastSystemSuspendedUpdatedAt = lastSystemSuspendedUpdatedAt; this.lifecycleStatus = lifecycleStatus; this.manifestTimestamp = manifestTimestamp; + this.netId = netId; this.operatorSuspended = operatorSuspended; this.systemSuspended = systemSuspended; this.updatedAt = updatedAt; @@ -396,6 +441,7 @@ public Device(Device device) { this(device == null ? (String) null : device.accountId, device != null && device.autoUpdate, device == null ? new Date() : device.bootstrapExpirationDate, device == null ? new Date() : device.bootstrappedTimestamp, device == null ? (String) null : device.caId, + device == null ? (Map) null : device.componentAttributes, device == null ? new Date() : device.connectorExpirationDate, device == null ? new Date() : device.createdAt, device == null ? (Map) null : device.customAttributes, @@ -418,7 +464,8 @@ public Device(Device device) { device == null ? (String) null : device.manifest, device == null ? new Date() : device.manifestTimestamp, device == null ? DeviceMechanism.getDefault() : device.mechanism, device == null ? (String) null : device.mechanismUrl, device == null ? (String) null : device.name, - device != null && device.operatorSuspended, device == null ? (String) null : device.serialNumber, + device == null ? (String) null : device.netId, device != null && device.operatorSuspended, + device == null ? (String) null : device.serialNumber, device == null ? DeviceState.getDefault() : device.state, device != null && device.systemSuspended, device == null ? new Date() : device.updatedAt, device == null ? (String) null : device.vendorId); } @@ -427,13 +474,13 @@ public Device(Device device) { * Constructor. */ public Device() { - this((String) null, false, new Date(), new Date(), (String) null, new Date(), new Date(), - (Map) null, DeviceDeployedState.getDefault(), (String) null, (String) null, (String) null, - 0, (String) null, (String) null, (String) null, new Date(), (String) null, (List) null, - (String) null, (String) null, (String) null, (String) null, (String) null, new Date(), (String) null, - (String) null, new Date(), DeviceLifecycleStatus.getDefault(), (String) null, new Date(), - DeviceMechanism.getDefault(), (String) null, (String) null, false, (String) null, DeviceState.getDefault(), - false, new Date(), (String) null); + this((String) null, false, new Date(), new Date(), (String) null, (Map) null, new Date(), + new Date(), (Map) null, DeviceDeployedState.getDefault(), (String) null, (String) null, + (String) null, 0, (String) null, (String) null, (String) null, new Date(), (String) null, + (List) null, (String) null, (String) null, (String) null, (String) null, (String) null, new Date(), + (String) null, (String) null, new Date(), DeviceLifecycleStatus.getDefault(), (String) null, new Date(), + DeviceMechanism.getDefault(), (String) null, (String) null, (String) null, false, (String) null, + DeviceState.getDefault(), false, new Date(), (String) null); } /** @@ -463,12 +510,16 @@ public Device(String id) { * The ID of the associated account. * @param bootstrappedTimestamp * The timestamp of the device's most recent bootstrap process. + * @param componentAttributes + * Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values + * are limited to 128 characters. Updating this field replaces existing contents. * @param createdAt * The timestamp of when the device was created in the device directory. * @param deployedState * DEPRECATED: The state of the device's deployment. * @param endpointName - * The endpoint name given to the device. + * The endpoint name given to the device. The endpoint_name is from the device certificate and is set by + * factory tool. * @param enrolmentListTimestamp * The claim date/time. * @param firmwareChecksum @@ -488,33 +539,37 @@ public Device(String id) { * @param lastSystemSuspendedUpdatedAt * The timestamp of the most recent system block activity. * @param lifecycleStatus - * The lifecycle status of the device. + * The lifecycle status of the device. * Enabled: The device is allowed to connect to Pelion Device + * Management. * Blocked: The device is prevented from connecting to Pelion Device Management. Device can + * be, for example, 'suspended'. * @param manifestTimestamp * The timestamp of the current manifest version. + * @param netId + * Private network identifier. Used to group nodes connected to a specific border router. * @param operatorSuspended - * Is the device suspended by the operator?. + * Device has been suspended by operator. * @param systemSuspended * Is the device suspended by the system?. * @param updatedAt - * The time the object was updated. + * The time this data object was updated. */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") - public Device(String accountId, Date bootstrappedTimestamp, Date createdAt, DeviceDeployedState deployedState, - String endpointName, Date enrolmentListTimestamp, String firmwareChecksum, List groups, - String lastOperatorSuspendedCategory, String lastOperatorSuspendedDescription, - Date lastOperatorSuspendedUpdatedAt, String lastSystemSuspendedCategory, - String lastSystemSuspendedDescription, Date lastSystemSuspendedUpdatedAt, - DeviceLifecycleStatus lifecycleStatus, Date manifestTimestamp, boolean operatorSuspended, - boolean systemSuspended, Date updatedAt) { - this(accountId, false, new Date(), bootstrappedTimestamp, (String) null, new Date(), createdAt, - (Map) null, deployedState, (String) null, (String) null, (String) null, 0, (String) null, - endpointName, (String) null, enrolmentListTimestamp, firmwareChecksum, groups, (String) null, - (String) null, (String) null, lastOperatorSuspendedCategory, lastOperatorSuspendedDescription, - lastOperatorSuspendedUpdatedAt, lastSystemSuspendedCategory, lastSystemSuspendedDescription, - lastSystemSuspendedUpdatedAt, lifecycleStatus, (String) null, manifestTimestamp, - DeviceMechanism.getDefault(), (String) null, (String) null, operatorSuspended, (String) null, - DeviceState.getDefault(), systemSuspended, updatedAt, (String) null); + public Device(String accountId, Date bootstrappedTimestamp, Map componentAttributes, Date createdAt, + DeviceDeployedState deployedState, String endpointName, Date enrolmentListTimestamp, + String firmwareChecksum, List groups, String lastOperatorSuspendedCategory, + String lastOperatorSuspendedDescription, Date lastOperatorSuspendedUpdatedAt, + String lastSystemSuspendedCategory, String lastSystemSuspendedDescription, + Date lastSystemSuspendedUpdatedAt, DeviceLifecycleStatus lifecycleStatus, Date manifestTimestamp, + String netId, boolean operatorSuspended, boolean systemSuspended, Date updatedAt) { + this(accountId, false, new Date(), bootstrappedTimestamp, (String) null, componentAttributes, new Date(), + createdAt, (Map) null, deployedState, (String) null, (String) null, (String) null, 0, + (String) null, endpointName, (String) null, enrolmentListTimestamp, firmwareChecksum, groups, + (String) null, (String) null, (String) null, lastOperatorSuspendedCategory, + lastOperatorSuspendedDescription, lastOperatorSuspendedUpdatedAt, lastSystemSuspendedCategory, + lastSystemSuspendedDescription, lastSystemSuspendedUpdatedAt, lifecycleStatus, (String) null, + manifestTimestamp, DeviceMechanism.getDefault(), (String) null, (String) null, netId, operatorSuspended, + (String) null, DeviceState.getDefault(), systemSuspended, updatedAt, (String) null); } /** @@ -605,6 +660,16 @@ public boolean isCaIdValid() { return (caId == null || caId.length() <= 500); } + /** + * Gets up to ten custom key-value attributes. note that keys cannot begin with a number. both keys and values are + * limited to 128 characters. updating this field replaces existing contents. + * + * @return componentAttributes + */ + public Map getComponentAttributes() { + return componentAttributes; + } + /** * Gets the expiration date of the certificate used to connect to lwm2m server. * @@ -825,7 +890,8 @@ public boolean isDeviceKeyValid() { } /** - * Gets the endpoint name given to the device. + * Gets the endpoint name given to the device. the endpoint_name is from the device certificate and is set by + * factory tool. * * @return endpointName */ @@ -893,7 +959,7 @@ public List getGroups() { } /** - * Gets the id of the host gateway, if appropriate. + * Gets the id of the host gateway, if appropriate. a device behind edge has this host_gateway set. * * @return hostGateway */ @@ -902,10 +968,10 @@ public String getHostGateway() { } /** - * Sets the id of the host gateway, if appropriate. + * Sets the id of the host gateway, if appropriate. a device behind edge has this host_gateway set. * * @param hostGateway - * The ID of the host gateway, if appropriate. + * The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set. */ public void setHostGateway(String hostGateway) { this.hostGateway = hostGateway; @@ -1033,7 +1099,9 @@ public Date getLastSystemSuspendedUpdatedAt() { } /** - * Gets the lifecycle status of the device. + * Gets the lifecycle status of the device. * enabled: the device is allowed to connect to pelion device management. + * * blocked: the device is prevented from connecting to pelion device management. device can be, for example, + * 'suspended'. * * @return lifecycleStatus */ @@ -1070,7 +1138,7 @@ public Date getManifestTimestamp() { } /** - * Gets the id of the channel used to communicate with the device. + * Gets not used: the id of the channel used to communicate with the device. * * @return mechanism */ @@ -1079,23 +1147,23 @@ public DeviceMechanism getMechanism() { } /** - * Sets the id of the channel used to communicate with the device. + * Sets not used: the id of the channel used to communicate with the device. * * @param mechanism - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. */ public void setMechanism(DeviceMechanism mechanism) { this.mechanism = mechanism; } /** - * Sets the id of the channel used to communicate with the device. + * Sets not used: the id of the channel used to communicate with the device. * *

* Similar to {@link #setMechanism(com.arm.mbed.cloud.sdk.devices.model.DeviceMechanism)} * * @param mechanism - * The ID of the channel used to communicate with the device. + * NOT USED: The ID of the channel used to communicate with the device. */ @Internal public void setMechanism(String mechanism) { @@ -1103,7 +1171,7 @@ public void setMechanism(String mechanism) { } /** - * Gets the address of the connector to use. + * Gets not used: the address of the connector to use. * * @return mechanismUrl */ @@ -1112,17 +1180,17 @@ public String getMechanismUrl() { } /** - * Sets the address of the connector to use. + * Sets not used: the address of the connector to use. * * @param mechanismUrl - * The address of the connector to use. + * NOT USED: The address of the connector to use. */ public void setMechanismUrl(String mechanismUrl) { this.mechanismUrl = mechanismUrl; } /** - * Gets the name of the device. + * Gets the name given by the web application for the device. device itself provides only the endpoint_name. * * @return name */ @@ -1131,13 +1199,13 @@ public String getName() { } /** - * Sets the name of the device. + * Sets the name given by the web application for the device. device itself provides only the endpoint_name. * *

* Note: the length of the string has to be less than or equal to {@code 128} to be valid * * @param name - * The name of the device. + * The name given by the web application for the device. Device itself provides only the endpoint_name. */ public void setName(String name) { this.name = name; @@ -1154,7 +1222,16 @@ public boolean isNameValid() { } /** - * Gets is the device suspended by the operator?. + * Gets private network identifier. used to group nodes connected to a specific border router. + * + * @return netId + */ + public String getNetId() { + return netId; + } + + /** + * Gets device has been suspended by operator. * * @return operatorSuspended */ @@ -1163,7 +1240,9 @@ public boolean isOperatorSuspended() { } /** - * Gets the serial number of the device. + * Gets the [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. the serial number is injected by the factory tool during manufacturing. * * @return serialNumber */ @@ -1172,17 +1251,29 @@ public String getSerialNumber() { } /** - * Sets the serial number of the device. + * Sets the [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. the serial number is injected by the factory tool during manufacturing. * * @param serialNumber - * The serial number of the device. + * The [serial + * number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + * of the device. The serial number is injected by the factory tool during manufacturing. */ public void setSerialNumber(String serialNumber) { this.serialNumber = serialNumber; } /** - * Gets the current state of the device. + * Gets the current state of the device. * unenrolled: the device has been created, but has not yet bootstrapped or + * connected to device management. * cloud_enrolling: the device is bootstrapping for the first time. this state is + * set only while bootstrapping is in progress. for example, an external ca gives an error, and the device tries to + * bootstrap again after few seconds. * bootstrapped: the device has bootstrapped, and has credentials to connect to + * device management. * registered: the device has registered with pelion device management. [device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. the device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * deregistered: the device has requested deregistration, or its registration has expired. * * @return state */ @@ -1191,23 +1282,57 @@ public DeviceState getState() { } /** - * Sets the current state of the device. + * Sets the current state of the device. * unenrolled: the device has been created, but has not yet bootstrapped or + * connected to device management. * cloud_enrolling: the device is bootstrapping for the first time. this state is + * set only while bootstrapping is in progress. for example, an external ca gives an error, and the device tries to + * bootstrap again after few seconds. * bootstrapped: the device has bootstrapped, and has credentials to connect to + * device management. * registered: the device has registered with pelion device management. [device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. the device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * deregistered: the device has requested deregistration, or its registration has expired. * * @param state - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet + * bootstrapped or connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the + * first time. This state is set only while bootstrapping is in progress. For example, an external CA + * gives an error, and the device tries to bootstrap again after few seconds. * Bootstrapped: The device + * has bootstrapped, and has credentials to connect to Device Management. * Registered: The device has + * registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device + * sends events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. */ public void setState(DeviceState state) { this.state = state; } /** - * Sets the current state of the device. + * Sets the current state of the device. * unenrolled: the device has been created, but has not yet bootstrapped or + * connected to device management. * cloud_enrolling: the device is bootstrapping for the first time. this state is + * set only while bootstrapping is in progress. for example, an external ca gives an error, and the device tries to + * bootstrap again after few seconds. * bootstrapped: the device has bootstrapped, and has credentials to connect to + * device management. * registered: the device has registered with pelion device management. [device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. the device sends + * events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * deregistered: the device has requested deregistration, or its registration has expired. * *

* Similar to {@link #setState(com.arm.mbed.cloud.sdk.devices.model.DeviceState)} * * @param state - * The current state of the device. + * The current state of the device. * Unenrolled: The device has been created, but has not yet + * bootstrapped or connected to Device Management. * Cloud_enrolling: The device is bootstrapping for the + * first time. This state is set only while bootstrapping is in progress. For example, an external CA + * gives an error, and the device tries to bootstrap again after few seconds. * Bootstrapped: The device + * has bootstrapped, and has credentials to connect to Device Management. * Registered: The device has + * registered with Pelion Device Management. [Device + * commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device + * sends events for + * [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + * resources. * Deregistered: The device has requested deregistration, or its registration has expired. */ @Internal public void setState(String state) { @@ -1224,7 +1349,7 @@ public boolean isSystemSuspended() { } /** - * Gets the time the object was updated. + * Gets the time this data object was updated. * * @return updatedAt */ @@ -1263,19 +1388,20 @@ public void setVendorId(String vendorId) { public String toString() { return "Device [accountId=" + accountId + ", autoUpdate=" + autoUpdate + ", bootstrapExpirationDate=" + bootstrapExpirationDate + ", bootstrappedTimestamp=" + bootstrappedTimestamp + ", caId=" + caId - + ", connectorExpirationDate=" + connectorExpirationDate + ", createdAt=" + createdAt - + ", customAttributes=" + customAttributes + ", deployedState=" + deployedState + ", deployment=" - + deployment + ", description=" + description + ", deviceClass=" + deviceClass + ", deviceExecutionMode=" - + deviceExecutionMode + ", deviceKey=" + deviceKey + ", endpointName=" + endpointName + ", endpointType=" - + endpointType + ", enrolmentListTimestamp=" + enrolmentListTimestamp + ", firmwareChecksum=" - + firmwareChecksum + ", groups=" + groups + ", hostGateway=" + hostGateway + ", id=" + id - + ", issuerFingerprint=" + issuerFingerprint + ", lastOperatorSuspendedCategory=" - + lastOperatorSuspendedCategory + ", lastOperatorSuspendedDescription=" - + lastOperatorSuspendedDescription + ", lastOperatorSuspendedUpdatedAt=" + lastOperatorSuspendedUpdatedAt - + ", lastSystemSuspendedCategory=" + lastSystemSuspendedCategory + ", lastSystemSuspendedDescription=" - + lastSystemSuspendedDescription + ", lastSystemSuspendedUpdatedAt=" + lastSystemSuspendedUpdatedAt - + ", lifecycleStatus=" + lifecycleStatus + ", manifest=" + manifest + ", manifestTimestamp=" - + manifestTimestamp + ", mechanism=" + mechanism + ", mechanismUrl=" + mechanismUrl + ", name=" + name + + ", componentAttributes=" + componentAttributes + ", connectorExpirationDate=" + connectorExpirationDate + + ", createdAt=" + createdAt + ", customAttributes=" + customAttributes + ", deployedState=" + + deployedState + ", deployment=" + deployment + ", description=" + description + ", deviceClass=" + + deviceClass + ", deviceExecutionMode=" + deviceExecutionMode + ", deviceKey=" + deviceKey + + ", endpointName=" + endpointName + ", endpointType=" + endpointType + ", enrolmentListTimestamp=" + + enrolmentListTimestamp + ", firmwareChecksum=" + firmwareChecksum + ", groups=" + groups + + ", hostGateway=" + hostGateway + ", id=" + id + ", issuerFingerprint=" + issuerFingerprint + + ", lastOperatorSuspendedCategory=" + lastOperatorSuspendedCategory + + ", lastOperatorSuspendedDescription=" + lastOperatorSuspendedDescription + + ", lastOperatorSuspendedUpdatedAt=" + lastOperatorSuspendedUpdatedAt + ", lastSystemSuspendedCategory=" + + lastSystemSuspendedCategory + ", lastSystemSuspendedDescription=" + lastSystemSuspendedDescription + + ", lastSystemSuspendedUpdatedAt=" + lastSystemSuspendedUpdatedAt + ", lifecycleStatus=" + + lifecycleStatus + ", manifest=" + manifest + ", manifestTimestamp=" + manifestTimestamp + + ", mechanism=" + mechanism + ", mechanismUrl=" + mechanismUrl + ", name=" + name + ", netId=" + netId + ", operatorSuspended=" + operatorSuspended + ", serialNumber=" + serialNumber + ", state=" + state + ", systemSuspended=" + systemSuspended + ", updatedAt=" + updatedAt + ", vendorId=" + vendorId + "]"; } @@ -1297,6 +1423,7 @@ public int hashCode() { result = prime * result + ((bootstrapExpirationDate == null) ? 0 : bootstrapExpirationDate.hashCode()); result = prime * result + ((bootstrappedTimestamp == null) ? 0 : bootstrappedTimestamp.hashCode()); result = prime * result + ((caId == null) ? 0 : caId.hashCode()); + result = prime * result + ((componentAttributes == null) ? 0 : componentAttributes.hashCode()); result = prime * result + ((connectorExpirationDate == null) ? 0 : connectorExpirationDate.hashCode()); result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + ((customAttributes == null) ? 0 : customAttributes.hashCode()); @@ -1331,6 +1458,7 @@ public int hashCode() { result = prime * result + ((mechanism == null) ? 0 : mechanism.hashCode()); result = prime * result + ((mechanismUrl == null) ? 0 : mechanismUrl.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((netId == null) ? 0 : netId.hashCode()); result = prime * result + Objects.hashCode(Boolean.valueOf(operatorSuspended)); result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode()); result = prime * result + ((state == null) ? 0 : state.hashCode()); @@ -1411,6 +1539,13 @@ public boolean equals(Object obj) { } else if (!caId.equals(other.caId)) { return false; } + if (componentAttributes == null) { + if (other.componentAttributes != null) { + return false; + } + } else if (!componentAttributes.equals(other.componentAttributes)) { + return false; + } if (connectorExpirationDate == null) { if (other.connectorExpirationDate != null) { return false; @@ -1598,6 +1733,13 @@ public boolean equals(Object obj) { } else if (!name.equals(other.name)) { return false; } + if (netId == null) { + if (other.netId != null) { + return false; + } + } else if (!netId.equals(other.netId)) { + return false; + } if (operatorSuspended != other.operatorSuspended) { return false; } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEvents.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEvents.java index f3cd13637..bd372e395 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEvents.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEvents.java @@ -25,8 +25,8 @@ public class DeviceEvents implements SdkModel { * *

* - * @deprecated This field has been deprecated since Tue Jan 15 14:55:20 GMT 2019 and will be removed by Wed Jan 15 - * 14:55:20 GMT 2020. This field is not used. + * @deprecated This field has been deprecated since Tue Jan 15 22:55:20 CST 2019 and will be removed by Wed Jan 15 + * 22:55:20 CST 2020. This field is not used. */ @Deprecated private final Map changes; @@ -62,7 +62,7 @@ public class DeviceEvents implements SdkModel { private final String eventType; /** - * Category code which groups the event type by a summary category. + * Category code that groups the event type by a summary category. */ private final String eventTypeCategory; @@ -104,7 +104,7 @@ public class DeviceEvents implements SdkModel { * @param eventType * Event code. * @param eventTypeCategory - * Category code which groups the event type by a summary category. + * Category code that groups the event type by a summary category. * @param eventTypeDescription * Generic description of the event. * @param id @@ -202,7 +202,7 @@ public DeviceEvents(String id) { * @param eventType * Event code. * @param eventTypeCategory - * Category code which groups the event type by a summary category. + * Category code that groups the event type by a summary category. * @param eventTypeDescription * Generic description of the event. * @param stateChange @@ -222,8 +222,8 @@ public DeviceEvents(Map changes, Date createdAt, Map * - * @deprecated This field has been deprecated since Tue Jan 15 14:55:20 GMT 2019 and will be removed by Wed Jan 15 - * 14:55:20 GMT 2020. This field is not used. + * @deprecated This field has been deprecated since Tue Jan 15 22:55:20 CST 2019 and will be removed by Wed Jan 15 + * 22:55:20 CST 2020. This field is not used. * * @return changes */ @@ -287,7 +287,7 @@ public String getEventType() { } /** - * Gets category code which groups the event type by a summary category. + * Gets category code that groups the event type by a summary category. * * @return eventTypeCategory */ diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceGroup.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceGroup.java index 3edb5ff91..77341077a 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceGroup.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceGroup.java @@ -21,7 +21,7 @@ public class DeviceGroup implements SdkModel { private static final long serialVersionUID = 1596529818452293L; /** - * The time the campaign was created. + * The time the group was created. */ private final Date createdAt; @@ -52,7 +52,7 @@ public class DeviceGroup implements SdkModel { private String name; /** - * The time the object was updated. + * The time this object was updated. */ private final Date updatedAt; @@ -65,7 +65,7 @@ public class DeviceGroup implements SdkModel { * Note: Should not be used. Use {@link #DeviceGroup()} instead. * * @param createdAt - * The time the campaign was created. + * The time the group was created. * @param customAttributes * Up to ten custom key-value attributes. Keys cannot begin with a number. Both key and value are limited * to 128 characters. Updating this field replaces existing contents. @@ -78,7 +78,7 @@ public class DeviceGroup implements SdkModel { * @param name * Name of the group. * @param updatedAt - * The time the object was updated. + * The time this object was updated. */ @Internal public DeviceGroup(Date createdAt, Map customAttributes, String description, int devicesCount, @@ -145,11 +145,11 @@ public DeviceGroup(String id) { * Note: Should not be used. Use {@link #DeviceGroup()} instead. * * @param createdAt - * The time the campaign was created. + * The time the group was created. * @param devicesCount * The number of devices in this group. * @param updatedAt - * The time the object was updated. + * The time this object was updated. */ @Internal public DeviceGroup(Date createdAt, int devicesCount, Date updatedAt) { @@ -158,7 +158,7 @@ public DeviceGroup(Date createdAt, int devicesCount, Date updatedAt) { } /** - * Gets the time the campaign was created. + * Gets the time the group was created. * * @return createdAt */ @@ -214,7 +214,7 @@ public String getDescription() { * Sets the description of the group. * *

- * Note: the length of the string has to be less than or equal to {@code 2000} to be valid + * Note: the length of the string has to be less than or equal to {@code 1024} to be valid * * @param description * The description of the group. @@ -230,7 +230,7 @@ public void setDescription(String description) { */ @SuppressWarnings("PMD.UselessParentheses") public boolean isDescriptionValid() { - return (description == null || description.length() <= 2000); + return (description == null || description.length() <= 1024); } /** @@ -310,7 +310,7 @@ public boolean isNameValid() { } /** - * Gets the time the object was updated. + * Gets the time this object was updated. * * @return updatedAt */ diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/AbstractUpdateCampaign.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/AbstractUpdateCampaign.java index 0f4171913..a55bd1198 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/AbstractUpdateCampaign.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/AbstractUpdateCampaign.java @@ -72,7 +72,7 @@ public abstract class AbstractUpdateCampaign implements SdkModel { protected String description; /** - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. */ @Required protected String deviceFilter; @@ -136,7 +136,7 @@ public abstract class AbstractUpdateCampaign implements SdkModel { * The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has * elapsed. */ - protected final Date when; + protected Date when; /** * Internal constructor. @@ -167,7 +167,7 @@ public abstract class AbstractUpdateCampaign implements SdkModel { * @param description * An optional description of the campaign. * @param deviceFilter - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. * @param finished * The time the campaign finished. * @param id @@ -216,7 +216,6 @@ public AbstractUpdateCampaign(Date activeAt, boolean approvalRequired, Date arch this.stoppedAt = stoppedAt; this.stoppingAt = stoppingAt; this.updatedAt = updatedAt; - this.when = when; setApprovalRequired(approvalRequired); setAutostop(autostop); setAutostopSuccessPercent(autostopSuccessPercent); @@ -226,6 +225,7 @@ public AbstractUpdateCampaign(Date activeAt, boolean approvalRequired, Date arch setId(id); setName(name); setRootManifestId(rootManifestId); + setWhen(when); } /** @@ -323,18 +323,15 @@ public AbstractUpdateCampaign(String id) { * The time the campaign will be stopped. * @param updatedAt * The time the entity was updated. - * @param when - * The scheduled start time for the campaign. The campaign will start within 1 minute when then start - * time has elapsed. */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") public AbstractUpdateCampaign(Date activeAt, Date archivedAt, String autostopReason, Date createdAt, Date finished, UpdateCampaignPhase phase, String rootManifestUrl, Date startedAt, Date startingAt, - Date stoppedAt, Date stoppingAt, Date updatedAt, Date when) { + Date stoppedAt, Date stoppingAt, Date updatedAt) { this(activeAt, false, archivedAt, false, autostopReason, 0.0, UpdateCampaignStrategy.getValue("one-shot"), createdAt, (String) null, (String) null, finished, (String) null, (String) null, phase, (String) null, - rootManifestUrl, startedAt, startingAt, stoppedAt, stoppingAt, updatedAt, when); + rootManifestUrl, startedAt, startingAt, stoppedAt, stoppingAt, updatedAt, new Date()); } /** @@ -506,7 +503,7 @@ public boolean isDescriptionValid() { } /** - * Gets the filter for the devices the campaign is targeting at. + * Gets the filter for the devices the campaign targets. refer to this using the filter id. * * @return deviceFilter */ @@ -515,10 +512,10 @@ public String getDeviceFilter() { } /** - * Sets the filter for the devices the campaign is targeting at. + * Sets the filter for the devices the campaign targets. refer to this using the filter id. * * @param deviceFilter - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. */ @Required public void setDeviceFilter(String deviceFilter) { @@ -557,6 +554,9 @@ public String getId() { /** * Sets the campaign id. * + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid + * * @param id * The campaign ID. */ @@ -570,6 +570,8 @@ public void setId(String id) { * *

* Similar to {@link #setId(String)} + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid * * @param updateCampaignId * The campaign ID. @@ -579,6 +581,16 @@ public void setUpdateCampaignId(String updateCampaignId) { setId(updateCampaignId); } + /** + * Checks whether id value is valid. + * + * @return true if the value is valid; false otherwise. + */ + @SuppressWarnings("PMD.UselessParentheses") + public boolean isIdValid() { + return (id == null || id.matches("[A-Fa-f0-9]{32}")); + } + /** * Gets the campaign name. * @@ -703,6 +715,18 @@ public Date getWhen() { return when; } + /** + * Sets the scheduled start time for the campaign. the campaign will start within 1 minute when then start time has + * elapsed. + * + * @param when + * The scheduled start time for the campaign. The campaign will start within 1 minute when then start + * time has elapsed. + */ + public void setWhen(Date when) { + this.when = when; + } + /** * Method to ensure {@link #equals(Object)} is correct. * @@ -958,6 +982,6 @@ public boolean equals(Object obj) { */ @Override public boolean isValid() { - return isDescriptionValid() && isDeviceFilterValid() && isNameValid(); + return isDescriptionValid() && isDeviceFilterValid() && isIdValid() && isNameValid(); } } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadata.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadata.java index 6c0c56b8d..e63b3097d 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadata.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/CampaignDeviceMetadata.java @@ -293,6 +293,9 @@ public String getId() { /** * Sets the metadata record id. * + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid + * * @param id * The metadata record ID. */ @@ -306,6 +309,8 @@ public void setId(String id) { * *

* Similar to {@link #setId(String)} + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid * * @param campaignDeviceMetadataId * The metadata record ID. @@ -315,6 +320,16 @@ public void setCampaignDeviceMetadataId(String campaignDeviceMetadataId) { setId(campaignDeviceMetadataId); } + /** + * Checks whether id value is valid. + * + * @return true if the value is valid; false otherwise. + */ + @SuppressWarnings("PMD.UselessParentheses") + public boolean isIdValid() { + return (id == null || id.matches("[A-Fa-f0-9]{32}")); + } + /** * Gets how the firmware is delivered (connector or direct). * @@ -526,7 +541,7 @@ public boolean equals(Object obj) { */ @Override public boolean isValid() { - return isCampaignIdValid(); + return isCampaignIdValid() && isIdValid(); } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImage.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImage.java index 79684da5b..29355324f 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImage.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareImage.java @@ -262,6 +262,9 @@ public String getId() { /** * Sets the firmware image id. * + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid + * * @param id * The firmware image ID. */ @@ -275,6 +278,8 @@ public void setId(String id) { * *

* Similar to {@link #setId(String)} + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid * * @param firmwareImageId * The firmware image ID. @@ -284,6 +289,16 @@ public void setFirmwareImageId(String firmwareImageId) { setId(firmwareImageId); } + /** + * Checks whether id value is valid. + * + * @return true if the value is valid; false otherwise. + */ + @SuppressWarnings("PMD.UselessParentheses") + public boolean isIdValid() { + return (id == null || id.matches("[A-Fa-f0-9]{32}")); + } + /** * Gets the firmware image name. * @@ -483,7 +498,7 @@ public boolean equals(Object obj) { */ @Override public boolean isValid() { - return isDescriptionValid() && isNameValid(); + return isDescriptionValid() && isIdValid() && isNameValid(); } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifest.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifest.java index fa49d8603..2113db0b6 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifest.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifest.java @@ -4,6 +4,7 @@ import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.annotations.Required; import com.arm.mbed.cloud.sdk.common.SdkModel; import java.util.Date; import java.util.Hashtable; @@ -36,25 +37,50 @@ public class FirmwareManifest implements SdkModel { private final Date createdAt; /** - * The size of the datafile in bytes. + * The size of the firmware manifest in bytes. */ private final long datafileSize; /** - * The URL of the firmware manifest binary. + * The URL of the ASN.1 DER-encoded firmware manifest binary. */ private final String datafileUrl; + /** + * Digest (SHA256, hex-encoded) of the payload to deliver to the device. + */ + private final String deliveredPayloadDigest; + + /** + * The size in bytes of the payload to deliver to the device. + */ + private final long deliveredPayloadSize; + + /** + * Type of the payload to deliver to the device (full or delta image). + */ + private final FirmwareManifestDeliveredPayloadType deliveredPayloadType; + + /** + * The URL of the payload to deliver to the device. + */ + private final String deliveredPayloadUrl; + /** * The description of the firmware manifest. */ private String description; /** - * The class of the device. + * The device class ID. */ private final String deviceClass; + /** + * The device vendor ID. + */ + private final String deviceVendor; + /** * The firmware manifest ID. */ @@ -66,15 +92,39 @@ public class FirmwareManifest implements SdkModel { private final String keyTableUrl; /** - * The name of the object. + * Version of the manifest schema (1 or 3). */ + private final FirmwareManifestSchemaVersion manifestSchemaVersion; + + /** + * The name of the manifest. + */ + @Required private String name; + /** + * Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards compatibility is not + * guaranteed. Recommended for debugging only. + * + */ + private final Object parsedRawManifest; + + /** + * Digest (SHA256, hex-encoded) of the currently installed payload. + */ + private final String precursorPayloadDigest; + /** * The firmware manifest version as a timestamp. */ private final Date timestamp; + /** + * Update priority, passed to the application callback when an update is performed. Allows the application to make + * application-specific decisions. + */ + private final long updatePriority; + /** * The time the entity was updated. */ @@ -91,36 +141,69 @@ public class FirmwareManifest implements SdkModel { * @param createdAt * The time the entity was created. * @param datafileSize - * The size of the datafile in bytes. + * The size of the firmware manifest in bytes. * @param datafileUrl - * The URL of the firmware manifest binary. + * The URL of the ASN.1 DER-encoded firmware manifest binary. + * @param deliveredPayloadDigest + * Digest (SHA256, hex-encoded) of the payload to deliver to the device. + * @param deliveredPayloadSize + * The size in bytes of the payload to deliver to the device. + * @param deliveredPayloadType + * Type of the payload to deliver to the device (full or delta image). + * @param deliveredPayloadUrl + * The URL of the payload to deliver to the device. * @param description * The description of the firmware manifest. * @param deviceClass - * The class of the device. + * The device class ID. + * @param deviceVendor + * The device vendor ID. * @param id * The firmware manifest ID. * @param keyTableUrl * The key table of pre-shared keys for devices. + * @param manifestSchemaVersion + * Version of the manifest schema (1 or 3). * @param name - * The name of the object. + * The name of the manifest. + * @param parsedRawManifest + * Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards + * compatibility is not guaranteed. Recommended for debugging only. + * + * @param precursorPayloadDigest + * Digest (SHA256, hex-encoded) of the currently installed payload. * @param timestamp * The firmware manifest version as a timestamp. + * @param updatePriority + * Update priority, passed to the application callback when an update is performed. Allows the + * application to make application-specific decisions. * @param updatedAt * The time the entity was updated. */ @Internal @SuppressWarnings("PMD.CyclomaticComplexity") - public FirmwareManifest(Date createdAt, long datafileSize, String datafileUrl, String description, - String deviceClass, String id, String keyTableUrl, String name, Date timestamp, - Date updatedAt) { + public FirmwareManifest(Date createdAt, long datafileSize, String datafileUrl, String deliveredPayloadDigest, + long deliveredPayloadSize, FirmwareManifestDeliveredPayloadType deliveredPayloadType, + String deliveredPayloadUrl, String description, String deviceClass, String deviceVendor, + String id, String keyTableUrl, FirmwareManifestSchemaVersion manifestSchemaVersion, + String name, Object parsedRawManifest, String precursorPayloadDigest, Date timestamp, + long updatePriority, Date updatedAt) { super(); this.createdAt = createdAt; this.datafileSize = datafileSize; this.datafileUrl = datafileUrl; + this.deliveredPayloadDigest = deliveredPayloadDigest; + this.deliveredPayloadSize = deliveredPayloadSize; + this.deliveredPayloadType = deliveredPayloadType; + this.deliveredPayloadUrl = deliveredPayloadUrl; this.deviceClass = deviceClass; + this.deviceVendor = deviceVendor; this.keyTableUrl = keyTableUrl; + this.manifestSchemaVersion = manifestSchemaVersion; + this.parsedRawManifest = parsedRawManifest; + this.precursorPayloadDigest = precursorPayloadDigest; this.timestamp = timestamp; + this.updatePriority = updatePriority; this.updatedAt = updatedAt; setDescription(description); setId(id); @@ -143,12 +226,23 @@ public FirmwareManifest(FirmwareManifest firmwareManifest) { this(firmwareManifest == null ? new Date() : firmwareManifest.createdAt, firmwareManifest == null ? 0 : firmwareManifest.datafileSize, firmwareManifest == null ? (String) null : firmwareManifest.datafileUrl, + firmwareManifest == null ? (String) null : firmwareManifest.deliveredPayloadDigest, + firmwareManifest == null ? 0 : firmwareManifest.deliveredPayloadSize, + firmwareManifest == null ? FirmwareManifestDeliveredPayloadType.getDefault() + : firmwareManifest.deliveredPayloadType, + firmwareManifest == null ? (String) null : firmwareManifest.deliveredPayloadUrl, firmwareManifest == null ? (String) null : firmwareManifest.description, firmwareManifest == null ? (String) null : firmwareManifest.deviceClass, + firmwareManifest == null ? (String) null : firmwareManifest.deviceVendor, firmwareManifest == null ? (String) null : firmwareManifest.id, firmwareManifest == null ? (String) null : firmwareManifest.keyTableUrl, + firmwareManifest == null ? FirmwareManifestSchemaVersion.getDefault() + : firmwareManifest.manifestSchemaVersion, firmwareManifest == null ? (String) null : firmwareManifest.name, + firmwareManifest == null ? (Object) null : firmwareManifest.parsedRawManifest, + firmwareManifest == null ? (String) null : firmwareManifest.precursorPayloadDigest, firmwareManifest == null ? new Date() : firmwareManifest.timestamp, + firmwareManifest == null ? 0 : firmwareManifest.updatePriority, firmwareManifest == null ? new Date() : firmwareManifest.updatedAt); } @@ -156,8 +250,10 @@ public FirmwareManifest(FirmwareManifest firmwareManifest) { * Constructor. */ public FirmwareManifest() { - this(new Date(), 0, (String) null, (String) null, (String) null, (String) null, (String) null, (String) null, - new Date(), new Date()); + this(new Date(), 0, (String) null, (String) null, 0, FirmwareManifestDeliveredPayloadType.getDefault(), + (String) null, (String) null, (String) null, (String) null, (String) null, (String) null, + FirmwareManifestSchemaVersion.getDefault(), (String) null, (Object) null, (String) null, new Date(), 0, + new Date()); } /** @@ -186,23 +282,50 @@ public FirmwareManifest(String id) { * @param createdAt * The time the entity was created. * @param datafileSize - * The size of the datafile in bytes. + * The size of the firmware manifest in bytes. * @param datafileUrl - * The URL of the firmware manifest binary. + * The URL of the ASN.1 DER-encoded firmware manifest binary. + * @param deliveredPayloadDigest + * Digest (SHA256, hex-encoded) of the payload to deliver to the device. + * @param deliveredPayloadSize + * The size in bytes of the payload to deliver to the device. + * @param deliveredPayloadType + * Type of the payload to deliver to the device (full or delta image). + * @param deliveredPayloadUrl + * The URL of the payload to deliver to the device. * @param deviceClass - * The class of the device. + * The device class ID. + * @param deviceVendor + * The device vendor ID. * @param keyTableUrl * The key table of pre-shared keys for devices. + * @param manifestSchemaVersion + * Version of the manifest schema (1 or 3). + * @param parsedRawManifest + * Raw manifest in JSON format, parsed from ASN.1 DER encoding. Fields may change. Backwards + * compatibility is not guaranteed. Recommended for debugging only. + * + * @param precursorPayloadDigest + * Digest (SHA256, hex-encoded) of the currently installed payload. * @param timestamp * The firmware manifest version as a timestamp. + * @param updatePriority + * Update priority, passed to the application callback when an update is performed. Allows the + * application to make application-specific decisions. * @param updatedAt * The time the entity was updated. */ @Internal - public FirmwareManifest(Date createdAt, long datafileSize, String datafileUrl, String deviceClass, - String keyTableUrl, Date timestamp, Date updatedAt) { - this(createdAt, datafileSize, datafileUrl, (String) null, deviceClass, (String) null, keyTableUrl, - (String) null, timestamp, updatedAt); + @SuppressWarnings("PMD.CyclomaticComplexity") + public FirmwareManifest(Date createdAt, long datafileSize, String datafileUrl, String deliveredPayloadDigest, + long deliveredPayloadSize, FirmwareManifestDeliveredPayloadType deliveredPayloadType, + String deliveredPayloadUrl, String deviceClass, String deviceVendor, String keyTableUrl, + FirmwareManifestSchemaVersion manifestSchemaVersion, Object parsedRawManifest, + String precursorPayloadDigest, Date timestamp, long updatePriority, Date updatedAt) { + this(createdAt, datafileSize, datafileUrl, deliveredPayloadDigest, deliveredPayloadSize, deliveredPayloadType, + deliveredPayloadUrl, (String) null, deviceClass, deviceVendor, (String) null, keyTableUrl, + manifestSchemaVersion, (String) null, parsedRawManifest, precursorPayloadDigest, timestamp, updatePriority, + updatedAt); } /** @@ -215,7 +338,7 @@ public Date getCreatedAt() { } /** - * Gets the size of the datafile in bytes. + * Gets the size of the firmware manifest in bytes. * * @return datafileSize */ @@ -224,7 +347,7 @@ public long getDatafileSize() { } /** - * Gets the url of the firmware manifest binary. + * Gets the url of the asn.1 der-encoded firmware manifest binary. * * @return datafileUrl */ @@ -232,6 +355,42 @@ public String getDatafileUrl() { return datafileUrl; } + /** + * Gets digest (sha256, hex-encoded) of the payload to deliver to the device. + * + * @return deliveredPayloadDigest + */ + public String getDeliveredPayloadDigest() { + return deliveredPayloadDigest; + } + + /** + * Gets the size in bytes of the payload to deliver to the device. + * + * @return deliveredPayloadSize + */ + public long getDeliveredPayloadSize() { + return deliveredPayloadSize; + } + + /** + * Gets type of the payload to deliver to the device (full or delta image). + * + * @return deliveredPayloadType + */ + public FirmwareManifestDeliveredPayloadType getDeliveredPayloadType() { + return deliveredPayloadType; + } + + /** + * Gets the url of the payload to deliver to the device. + * + * @return deliveredPayloadUrl + */ + public String getDeliveredPayloadUrl() { + return deliveredPayloadUrl; + } + /** * Gets the description of the firmware manifest. * @@ -265,7 +424,7 @@ public boolean isDescriptionValid() { } /** - * Gets the class of the device. + * Gets the device class id. * * @return deviceClass */ @@ -273,6 +432,15 @@ public String getDeviceClass() { return deviceClass; } + /** + * Gets the device vendor id. + * + * @return deviceVendor + */ + public String getDeviceVendor() { + return deviceVendor; + } + /** * Gets the firmware manifest id. * @@ -286,6 +454,9 @@ public String getId() { /** * Sets the firmware manifest id. * + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid + * * @param id * The firmware manifest ID. */ @@ -299,6 +470,8 @@ public void setId(String id) { * *

* Similar to {@link #setId(String)} + *

+ * Note: the length of the string has to match {@code /[A-Fa-f0-9]{32}/} to be valid * * @param firmwareManifestId * The firmware manifest ID. @@ -308,6 +481,16 @@ public void setFirmwareManifestId(String firmwareManifestId) { setId(firmwareManifestId); } + /** + * Checks whether id value is valid. + * + * @return true if the value is valid; false otherwise. + */ + @SuppressWarnings("PMD.UselessParentheses") + public boolean isIdValid() { + return (id == null || id.matches("[A-Fa-f0-9]{32}")); + } + /** * Gets the key table of pre-shared keys for devices. * @@ -318,7 +501,16 @@ public String getKeyTableUrl() { } /** - * Gets the name of the object. + * Gets version of the manifest schema (1 or 3). + * + * @return manifestSchemaVersion + */ + public FirmwareManifestSchemaVersion getManifestSchemaVersion() { + return manifestSchemaVersion; + } + + /** + * Gets the name of the manifest. * * @return name */ @@ -327,14 +519,15 @@ public String getName() { } /** - * Sets the name of the object. + * Sets the name of the manifest. * *

* Note: the length of the string has to be less than or equal to {@code 128} to be valid * * @param name - * The name of the object. + * The name of the manifest. */ + @Required public void setName(String name) { this.name = name; } @@ -346,7 +539,26 @@ public void setName(String name) { */ @SuppressWarnings("PMD.UselessParentheses") public boolean isNameValid() { - return (name == null || name.length() <= 128); + return name != null && (name.length() <= 128); + } + + /** + * Gets raw manifest in json format, parsed from asn.1 der encoding. fields may change. backwards compatibility is + * not guaranteed. recommended for debugging only. + * + * @return parsedRawManifest + */ + public Object getParsedRawManifest() { + return parsedRawManifest; + } + + /** + * Gets digest (sha256, hex-encoded) of the currently installed payload. + * + * @return precursorPayloadDigest + */ + public String getPrecursorPayloadDigest() { + return precursorPayloadDigest; } /** @@ -358,6 +570,16 @@ public Date getTimestamp() { return timestamp; } + /** + * Gets update priority, passed to the application callback when an update is performed. allows the application to + * make application-specific decisions. + * + * @return updatePriority + */ + public long getUpdatePriority() { + return updatePriority; + } + /** * Gets the time the entity was updated. * @@ -394,9 +616,13 @@ protected static final Map generateFilterMapping() { @Override public String toString() { return "FirmwareManifest [createdAt=" + createdAt + ", datafileSize=" + datafileSize + ", datafileUrl=" - + datafileUrl + ", description=" + description + ", deviceClass=" + deviceClass + ", id=" + id - + ", keyTableUrl=" + keyTableUrl + ", name=" + name + ", timestamp=" + timestamp + ", updatedAt=" - + updatedAt + "]"; + + datafileUrl + ", deliveredPayloadDigest=" + deliveredPayloadDigest + ", deliveredPayloadSize=" + + deliveredPayloadSize + ", deliveredPayloadType=" + deliveredPayloadType + ", deliveredPayloadUrl=" + + deliveredPayloadUrl + ", description=" + description + ", deviceClass=" + deviceClass + + ", deviceVendor=" + deviceVendor + ", id=" + id + ", keyTableUrl=" + keyTableUrl + + ", manifestSchemaVersion=" + manifestSchemaVersion + ", name=" + name + ", parsedRawManifest=" + + parsedRawManifest + ", precursorPayloadDigest=" + precursorPayloadDigest + ", timestamp=" + timestamp + + ", updatePriority=" + updatePriority + ", updatedAt=" + updatedAt + "]"; } /** @@ -414,12 +640,21 @@ public int hashCode() { result = prime * result + ((createdAt == null) ? 0 : createdAt.hashCode()); result = prime * result + Objects.hashCode(Long.valueOf(datafileSize)); result = prime * result + ((datafileUrl == null) ? 0 : datafileUrl.hashCode()); + result = prime * result + ((deliveredPayloadDigest == null) ? 0 : deliveredPayloadDigest.hashCode()); + result = prime * result + Objects.hashCode(Long.valueOf(deliveredPayloadSize)); + result = prime * result + ((deliveredPayloadType == null) ? 0 : deliveredPayloadType.hashCode()); + result = prime * result + ((deliveredPayloadUrl == null) ? 0 : deliveredPayloadUrl.hashCode()); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((deviceClass == null) ? 0 : deviceClass.hashCode()); + result = prime * result + ((deviceVendor == null) ? 0 : deviceVendor.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((keyTableUrl == null) ? 0 : keyTableUrl.hashCode()); + result = prime * result + ((manifestSchemaVersion == null) ? 0 : manifestSchemaVersion.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((parsedRawManifest == null) ? 0 : parsedRawManifest.hashCode()); + result = prime * result + ((precursorPayloadDigest == null) ? 0 : precursorPayloadDigest.hashCode()); result = prime * result + ((timestamp == null) ? 0 : timestamp.hashCode()); + result = prime * result + Objects.hashCode(Long.valueOf(updatePriority)); result = prime * result + ((updatedAt == null) ? 0 : updatedAt.hashCode()); return result; } @@ -481,6 +716,26 @@ public boolean equals(Object obj) { } else if (!datafileUrl.equals(other.datafileUrl)) { return false; } + if (deliveredPayloadDigest == null) { + if (other.deliveredPayloadDigest != null) { + return false; + } + } else if (!deliveredPayloadDigest.equals(other.deliveredPayloadDigest)) { + return false; + } + if (deliveredPayloadSize != other.deliveredPayloadSize) { + return false; + } + if (deliveredPayloadType != other.deliveredPayloadType) { + return false; + } + if (deliveredPayloadUrl == null) { + if (other.deliveredPayloadUrl != null) { + return false; + } + } else if (!deliveredPayloadUrl.equals(other.deliveredPayloadUrl)) { + return false; + } if (description == null) { if (other.description != null) { return false; @@ -495,6 +750,13 @@ public boolean equals(Object obj) { } else if (!deviceClass.equals(other.deviceClass)) { return false; } + if (deviceVendor == null) { + if (other.deviceVendor != null) { + return false; + } + } else if (!deviceVendor.equals(other.deviceVendor)) { + return false; + } if (id == null) { if (other.id != null) { return false; @@ -509,6 +771,9 @@ public boolean equals(Object obj) { } else if (!keyTableUrl.equals(other.keyTableUrl)) { return false; } + if (manifestSchemaVersion != other.manifestSchemaVersion) { + return false; + } if (name == null) { if (other.name != null) { return false; @@ -516,6 +781,20 @@ public boolean equals(Object obj) { } else if (!name.equals(other.name)) { return false; } + if (parsedRawManifest == null) { + if (other.parsedRawManifest != null) { + return false; + } + } else if (!parsedRawManifest.equals(other.parsedRawManifest)) { + return false; + } + if (precursorPayloadDigest == null) { + if (other.precursorPayloadDigest != null) { + return false; + } + } else if (!precursorPayloadDigest.equals(other.precursorPayloadDigest)) { + return false; + } if (timestamp == null) { if (other.timestamp != null) { return false; @@ -523,6 +802,9 @@ public boolean equals(Object obj) { } else if (!timestamp.equals(other.timestamp)) { return false; } + if (updatePriority != other.updatePriority) { + return false; + } if (updatedAt == null) { if (other.updatedAt != null) { return false; @@ -543,7 +825,7 @@ public boolean equals(Object obj) { */ @Override public boolean isValid() { - return isDescriptionValid() && isNameValid(); + return isDescriptionValid() && isIdValid() && isNameValid(); } /** diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDeliveredPayloadType.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDeliveredPayloadType.java new file mode 100644 index 000000000..de8bb99a5 --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestDeliveredPayloadType.java @@ -0,0 +1,165 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.deviceupdate.model; + +import com.arm.mbed.cloud.sdk.annotations.DefaultValue; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.annotations.Required; +import com.arm.mbed.cloud.sdk.common.SdkEnum; + +/** + * Firmware manifest delivered payload type. + */ +@Preamble(description = "Firmware manifest delivered payload type.") +public enum FirmwareManifestDeliveredPayloadType implements SdkEnum { + DELTA("delta"), + + FULL("full"), + + UNKNOWN_ENUM(SDK_UNKNOWN_ENUM_VALUE); + + /** + * Serialisation Id. + */ + private static final long serialVersionUID = -100782465969181L; + + /** + * string representation. + */ + @Internal + @Required + @DefaultValue("DELTA") + private final String string; + + /** + * Internal constructor. + * + * @param string + * string representation. + */ + @Internal + FirmwareManifestDeliveredPayloadType(@DefaultValue("DELTA") String string) { + this.string = string; + } + + /** + * Gets string representation. + * + * @return string + */ + @Override + @Internal + public String getString() { + return string; + } + + /** + * toString. + * + *

+ * + * @see java.lang.Enum#toString() + * @return the string representation of this value + */ + @Override + public String toString() { + return getString(); + } + + /** + * States whether it is the default value. + * + *

+ * + * @see SdkEnum#isDefault() + * @return true if this is the default value; false otherwise + */ + @Override + public boolean isDefault() { + return this == getDefault(); + } + + /** + * States whether the value is unknown and an error happened during parsing. + * + *

+ * + * @see SdkEnum#isUnknownValue() + * @return true if this is an unknown value; false otherwise + */ + @Override + public boolean isUnknownValue() { + return this == getUnknownEnum(); + } + + /** + * Gets default firmware manifest delivered payload type. + * + * @return default firmware manifest delivered payload type + */ + public static FirmwareManifestDeliveredPayloadType getDefault() { + return DELTA; + } + + /** + * Gets unknown firmware manifest delivered payload type value. + * + * @return unknown firmware manifest delivered payload type + */ + public static FirmwareManifestDeliveredPayloadType getUnknownEnum() { + return UNKNOWN_ENUM; + } + + /** + * Gets firmware manifest delivered payload type from its string representation. + * + * @param value + * string. + * @return corresponding firmware manifest delivered payload type or default firmware manifest delivered payload + * type if not recognised. + */ + public static FirmwareManifestDeliveredPayloadType getValue(String value) { + if (value == null) { + return getDefault(); + } + final String trimmedValue = value.trim(); + for (final FirmwareManifestDeliveredPayloadType option : values()) { + if (option.getString().equalsIgnoreCase(trimmedValue)) { + return option; + } + } + return getDefault(); + } + + /** + * Merges two states. + * + *

+ * + * @see SdkEnum#merge(SdkEnum, SdkEnum) + * @param + * type of an sdk enum + * @param obj1 + * a firmware manifest delivered payload type. + * @param obj2 + * a firmware manifest delivered payload type. + * @return the merged enumerator + */ + @Override + public T merge(T obj1, T obj2) { + if (obj1 == null) { + return obj2; + } + if (obj2 == null) { + return obj1; + } + if (obj1.isDefault()) { + return obj2; + } + if (obj2.isDefault()) { + return obj1; + } + return obj2; + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestSchemaVersion.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestSchemaVersion.java new file mode 100644 index 000000000..23e6fbc19 --- /dev/null +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/FirmwareManifestSchemaVersion.java @@ -0,0 +1,165 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.deviceupdate.model; + +import com.arm.mbed.cloud.sdk.annotations.DefaultValue; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.annotations.Required; +import com.arm.mbed.cloud.sdk.common.SdkEnum; + +/** + * Firmware manifest schema version. + */ +@Preamble(description = "Firmware manifest schema version.") +public enum FirmwareManifestSchemaVersion implements SdkEnum { + _1("1"), + + _3("3"), + + UNKNOWN_ENUM(SDK_UNKNOWN_ENUM_VALUE); + + /** + * Serialisation Id. + */ + private static final long serialVersionUID = -108907397269181L; + + /** + * string representation. + */ + @Internal + @Required + @DefaultValue("1") + private final String string; + + /** + * Internal constructor. + * + * @param string + * string representation. + */ + @Internal + FirmwareManifestSchemaVersion(@DefaultValue("1") String string) { + this.string = string; + } + + /** + * Gets string representation. + * + * @return string + */ + @Override + @Internal + public String getString() { + return string; + } + + /** + * toString. + * + *

+ * + * @see java.lang.Enum#toString() + * @return the string representation of this value + */ + @Override + public String toString() { + return getString(); + } + + /** + * States whether it is the default value. + * + *

+ * + * @see SdkEnum#isDefault() + * @return true if this is the default value; false otherwise + */ + @Override + public boolean isDefault() { + return this == getDefault(); + } + + /** + * States whether the value is unknown and an error happened during parsing. + * + *

+ * + * @see SdkEnum#isUnknownValue() + * @return true if this is an unknown value; false otherwise + */ + @Override + public boolean isUnknownValue() { + return this == getUnknownEnum(); + } + + /** + * Gets default firmware manifest schema version. + * + * @return default firmware manifest schema version + */ + public static FirmwareManifestSchemaVersion getDefault() { + return _1; + } + + /** + * Gets unknown firmware manifest schema version value. + * + * @return unknown firmware manifest schema version + */ + public static FirmwareManifestSchemaVersion getUnknownEnum() { + return UNKNOWN_ENUM; + } + + /** + * Gets firmware manifest schema version from its string representation. + * + * @param value + * string. + * @return corresponding firmware manifest schema version or default firmware manifest schema version if not + * recognised. + */ + public static FirmwareManifestSchemaVersion getValue(String value) { + if (value == null) { + return getDefault(); + } + final String trimmedValue = value.trim(); + for (final FirmwareManifestSchemaVersion option : values()) { + if (option.getString().equalsIgnoreCase(trimmedValue)) { + return option; + } + } + return getDefault(); + } + + /** + * Merges two states. + * + *

+ * + * @see SdkEnum#merge(SdkEnum, SdkEnum) + * @param + * type of an sdk enum + * @param obj1 + * a firmware manifest schema version. + * @param obj2 + * a firmware manifest schema version. + * @return the merged enumerator + */ + @Override + public T merge(T obj1, T obj2) { + if (obj1 == null) { + return obj2; + } + if (obj2 == null) { + return obj1; + } + if (obj1.isDefault()) { + return obj2; + } + if (obj2.isDefault()) { + return obj1; + } + return obj2; + } +} diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/UpdateCampaign.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/UpdateCampaign.java index f42d7ce46..c09904d1d 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/UpdateCampaign.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/deviceupdate/model/UpdateCampaign.java @@ -1,18 +1,14 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Apr 05 11:47:42 BST 2019. Feel free to change its contents as you wish. - +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.deviceupdate.model; -import java.util.Date; -import java.util.Map; - import com.arm.mbed.cloud.sdk.annotations.DefaultValue; import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; -import com.arm.mbed.cloud.sdk.common.listing.ListOptions; -import com.arm.mbed.cloud.sdk.common.listing.filtering.FilterMarshaller; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; import com.arm.mbed.cloud.sdk.common.listing.filtering.Filters; +import java.util.Date; /** * Model for an update campaign. @@ -25,11 +21,8 @@ public class UpdateCampaign extends AbstractUpdateCampaign { */ private static final long serialVersionUID = -116737460021164L; - /** - * Filter encoder/decoder. - */ - // TODO add some field mapping if necessary i.e Device#FILTER_MAPPING. - private static final FilterMarshaller FILTERS_MARSHALLER = new FilterMarshaller(null); + protected double activationDelay; + private Filters deviceFilterHelper; /** * Internal constructor. @@ -43,6 +36,9 @@ public class UpdateCampaign extends AbstractUpdateCampaign { * Helper for creating the device filter string. This helper can be used instead of setting device filter * directly. This allows the campaign filter to be created in a way which is similar to the device * listing filter. + * @param activationDelay + * The amount of time (in seconds) the device waits to install the firmware update after the download is + * complete. For mesh campaigns only. * @param activeAt * The time the campaign entered the active state. * @param approvalRequired @@ -54,17 +50,22 @@ public class UpdateCampaign extends AbstractUpdateCampaign { * @param autostopReason * Text description of why a campaign failed to start or why a campaign stopped. * @param autostopSuccessPercent - * Percent of successful device updates to auto stop the campaign. + * Percent of successful device updates to auto stop a one-shot campaign. For mesh campaigns, this is the + * percentage of devices connected to one border router that acknowledge their readiness to perform an + * update. * @param campaignStrategy * How the campaign adds devices. A `one-shot` campaign does not add new devices after it has started. A - * `continuous` campaign means that devices may be added to the campaign after it has started. The - * default is `one-shot`. + * `continuous` campaign means that devices may be added to the campaign after it has started. A `mesh` + * campaign adds only devices in the mesh network. The devices receive the update in groups, with each + * group consisting of a border router and nodes (the devices to update). + * + * The default is `one-shot`. * @param createdAt * The time the entity was created. * @param description * An optional description of the campaign. * @param deviceFilter - * The filter for the devices the campaign is targeting at. + * The filter for the devices the campaign targets. Refer to this using the filter ID. * @param finished * The time the campaign finished. * @param id @@ -92,8 +93,9 @@ public class UpdateCampaign extends AbstractUpdateCampaign { * time has elapsed. */ @Internal - public UpdateCampaign(Filters deviceFilterHelper, Date activeAt, boolean approvalRequired, Date archivedAt, - boolean autostop, String autostopReason, double autostopSuccessPercent, + @SuppressWarnings("PMD.CyclomaticComplexity") + public UpdateCampaign(Filters deviceFilterHelper, double activationDelay, Date activeAt, boolean approvalRequired, + Date archivedAt, boolean autostop, String autostopReason, double autostopSuccessPercent, @DefaultValue("one-shot") UpdateCampaignStrategy campaignStrategy, Date createdAt, String description, String deviceFilter, Date finished, String id, String name, UpdateCampaignPhase phase, String rootManifestId, String rootManifestUrl, Date startedAt, @@ -101,52 +103,8 @@ public UpdateCampaign(Filters deviceFilterHelper, Date activeAt, boolean approva super(activeAt, approvalRequired, archivedAt, autostop, autostopReason, autostopSuccessPercent, campaignStrategy, createdAt, description, deviceFilter, finished, id, name, phase, rootManifestId, rootManifestUrl, startedAt, startingAt, stoppedAt, stoppingAt, updatedAt, when); - setDeviceFiltersHelper(deviceFilterHelper); - } - - /** - * Internal constructor. - * - *

- * Constructor based on read-only fields. - *

- * Note: Should not be used. Use {@link #UpdateCampaign()} instead. - * - * @param activeAt - * The time the campaign entered the active state. - * @param archivedAt - * The time the campaign was archived. - * @param autostopReason - * Text description of why a campaign failed to start or why a campaign stopped. - * @param createdAt - * The time the entity was created. - * @param finished - * The time the campaign finished. - * @param phase - * The phase of the campaign. - * @param rootManifestUrl - * The URL for the manifest that will be sent to the device as part of the campaign. - * @param startedAt - * The time the campaign was started. - * @param startingAt - * The time the campaign will be started. - * @param stoppedAt - * The time the campaign was stopped. - * @param stoppingAt - * The time the campaign will be stopped. - * @param updatedAt - * The time the entity was updated. - * @param when - * The scheduled start time for the campaign. The campaign will start within 1 minute when then start - * time has elapsed. - */ - @Internal - public UpdateCampaign(Date activeAt, Date archivedAt, String autostopReason, Date createdAt, Date finished, - UpdateCampaignPhase phase, String rootManifestUrl, Date startedAt, Date startingAt, - Date stoppedAt, Date stoppingAt, Date updatedAt, Date when) { - this(null, activeAt, false, archivedAt, false, autostopReason, 0.0, UpdateCampaignStrategy.getValue("one-shot"), - createdAt, (String) null, (String) null, finished, (String) null, (String) null, phase, (String) null, - rootManifestUrl, startedAt, startingAt, stoppedAt, stoppingAt, updatedAt, when); + this.activationDelay = activationDelay; + setDeviceFilterHelper(deviceFilterHelper); } /** @@ -158,11 +116,12 @@ public UpdateCampaign(Date activeAt, Date archivedAt, String autostopReason, Dat * Note: Should not be used. Use {@link #UpdateCampaign()} instead. * * @param updateCampaign - * an abstract update campaign. + * an update campaign. */ @Internal public UpdateCampaign(UpdateCampaign updateCampaign) { - this(updateCampaign == null ? (Filters) null : updateCampaign.getDeviceFiltersHelper(), + this(updateCampaign == null ? (Filters) null : updateCampaign.getDeviceFilterHelper(), + updateCampaign == null ? 0.0 : updateCampaign.activationDelay, updateCampaign == null ? new Date() : updateCampaign.activeAt, updateCampaign != null && updateCampaign.approvalRequired, updateCampaign == null ? new Date() : updateCampaign.archivedAt, @@ -191,7 +150,7 @@ public UpdateCampaign(UpdateCampaign updateCampaign) { * Constructor. */ public UpdateCampaign() { - this((Filters) null, new Date(), false, new Date(), false, (String) null, 0.0, + this((Filters) null, 0.0, new Date(), false, new Date(), false, (String) null, 0.0, UpdateCampaignStrategy.getValue("one-shot"), new Date(), (String) null, (String) null, new Date(), (String) null, (String) null, UpdateCampaignPhase.getDefault(), (String) null, (String) null, new Date(), new Date(), new Date(), new Date(), new Date(), new Date()); @@ -200,6 +159,10 @@ public UpdateCampaign() { /** * Constructor. * + *

+ * Constructor based on object identifier. + *

+ * * @param id * The campaign ID. */ @@ -209,81 +172,78 @@ public UpdateCampaign(String id) { } /** - * Gets the device filter ({@link UpdateCampaign#getDeviceFilter()}) defined as a generic {@link Filters}. + * Internal constructor. * *

- * This helper can be used instead of getting device filter directly ({@link UpdateCampaign#getDeviceFilter()}) as a - * string. This allows the campaign filter to be seen and defined in a way which is similar to the device listing - * filter. + * Constructor based on read-only fields. + *

+ * Note: Should not be used. Use {@link #UpdateCampaign()} instead. * - * @return deviceFilterHelper + * @param activeAt + * The time the campaign entered the active state. + * @param archivedAt + * The time the campaign was archived. + * @param autostopReason + * Text description of why a campaign failed to start or why a campaign stopped. + * @param createdAt + * The time the entity was created. + * @param finished + * The time the campaign finished. + * @param phase + * The phase of the campaign. + * @param rootManifestUrl + * The URL for the manifest that will be sent to the device as part of the campaign. + * @param startedAt + * The time the campaign was started. + * @param startingAt + * The time the campaign will be started. + * @param stoppedAt + * The time the campaign was stopped. + * @param stoppingAt + * The time the campaign will be stopped. + * @param updatedAt + * The time the entity was updated. */ - public Filters getDeviceFiltersHelper() { - return FILTERS_MARSHALLER.decode(getDeviceFilter()); + @Internal + @SuppressWarnings("PMD.CyclomaticComplexity") + public UpdateCampaign(Date activeAt, Date archivedAt, String autostopReason, Date createdAt, Date finished, + UpdateCampaignPhase phase, String rootManifestUrl, Date startedAt, Date startingAt, + Date stoppedAt, Date stoppingAt, Date updatedAt) { + this((Filters) null, 0.0, activeAt, false, archivedAt, false, autostopReason, 0.0, + UpdateCampaignStrategy.getValue("one-shot"), createdAt, (String) null, (String) null, finished, + (String) null, (String) null, phase, (String) null, rootManifestUrl, startedAt, startingAt, stoppedAt, + stoppingAt, updatedAt, new Date()); } /** - * Sets the device filter ({@link UpdateCampaign#setDeviceFilter(String)}) using a generic {@link Filters} object - * defined within {@link ListOptions}. + * Gets helper for creating the device filter string. + * *

* This helper can be used instead of setting device filter directly. This allows the campaign filter to be created - * in a way which is similar to the device listing filter. It is hence possible to define the filter using the - * DeviceListOptions helpers and then pass it to a campaign using {@link ListOptions#getFilter()}. + * in a way which is similar to the device listing filter. * - * @param deviceFilter - * Helper for creating the device filter string. This helper can be used instead of setting device filter - * directly. This allows the campaign filter to be created in a way which is similar to the device - * listing filter. + * @return deviceFilterHelper */ - public void setDeviceFiltersHelper(Filters deviceFilter) { - setDeviceFilter(deviceFilter == null ? getDeviceFilter() == null ? (String) null : getDeviceFilter() - : FILTERS_MARSHALLER.encode(deviceFilter)); + @NotImplemented + public Filters getDeviceFilterHelper() throws NotImplementedException { + return deviceFilterHelper; } /** - * Sets the device filter ({@link UpdateCampaign#setDeviceFilter(String)}). + * Sets helper for creating the device filter string. + * *

- * Prefer using {@link #setDeviceFiltersHelper(Filters)} or {@link #setDeviceFilterFromJson(String)} to set filters. - * - * @param filter - * filters expressed as a Json hashtable (key,value) - */ - @Internal - public void setDeviceFilterHelper(Map filter) { - setDeviceFiltersHelper(FilterMarshaller.fromJsonObject(filter)); - } - - /** - * Gets the filter as a "Json object". - * - * @return the filters as a Json object - */ - @Internal - public Map getDeviceFilterHelper() { - return FilterMarshaller.toJsonObject(getDeviceFiltersHelper()); - } - - /** - * Sets the device filter from a Json string. - * - * @see FilterMarshaller#fromJson(String) - * - * @param jsonString - * Json string defining the device filter to set - */ - public void setDeviceFilterFromJson(String jsonString) { - setDeviceFiltersHelper(FilterMarshaller.fromJson(jsonString)); - } - - /** - * Gets the device filter as Json String. - * - * @see FilterMarshaller#toJson(Filters) - * - * @return the filters as a Json string + * This helper can be used instead of setting device filter directly. This allows the campaign filter to be created + * in a way which is similar to the device listing filter. + * + * @param deviceFilterHelper + * Helper for creating the device filter string. This helper can be used instead of setting device filter + * directly. This allows the campaign filter to be created in a way which is similar to the device + * listing filter. */ - public String getDeviceFilterAsJson() { - return FilterMarshaller.toJson(getDeviceFiltersHelper()); + @NotImplemented + public void setDeviceFilterHelper(Filters deviceFilterHelper) throws NotImplementedException { + this.deviceFilterHelper = deviceFilterHelper; } /** @@ -296,71 +256,45 @@ public String getDeviceFilterAsJson() { */ @Override public String toString() { - return "UpdateCampaign [autostopReason=" + autostopReason + ", createdAt=" + createdAt + ", description=" - + description + ", deviceFilter=" + getDeviceFilterAsJson() + ", finished=" + finished + ", id=" + id - + ", name=" + name + ", phase=" + phase + ", rootManifestId=" + rootManifestId + ", rootManifestUrl=" - + rootManifestUrl + ", startedAt=" + startedAt + ", updatedAt=" + updatedAt + ", when=" + when + "]"; + return "UpdateCampaign [deviceFilterHelper=" + getDeviceFilterHelper() + ", activationDelay=" + activationDelay + + ", activeAt=" + activeAt + ", approvalRequired=" + approvalRequired + ", archivedAt=" + archivedAt + + ", autostop=" + autostop + ", autostopReason=" + autostopReason + ", autostopSuccessPercent=" + + autostopSuccessPercent + ", campaignStrategy=" + campaignStrategy + ", createdAt=" + createdAt + + ", description=" + description + ", deviceFilter=" + deviceFilter + ", finished=" + finished + ", id=" + + id + ", name=" + name + ", phase=" + phase + ", rootManifestId=" + rootManifestId + + ", rootManifestUrl=" + rootManifestUrl + ", startedAt=" + startedAt + ", startingAt=" + startingAt + + ", stoppedAt=" + stoppedAt + ", stoppingAt=" + stoppingAt + ", updatedAt=" + updatedAt + ", when=" + + when + "]"; } - /** - * Calculates the hash code of this instance based on field values. - * - *

- * - * @see java.lang.Object#hashCode() - * @return hash code - */ - @SuppressWarnings("PMD.UselessOverridingMethod") @Override public int hashCode() { - return super.hashCode(); + final int prime = 31; + int result = super.hashCode(); + long temp; + temp = Double.doubleToLongBits(activationDelay); + result = prime * result + (int) (temp ^ (temp >>> 32)); + return result; } - /** - * Indicates whether some other object is "equal to" this one. - * - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } - if (obj == null) { - return false; - } if (!super.equals(obj)) { return false; } - if (!(obj instanceof UpdateCampaign)) { + if (getClass() != obj.getClass()) { return false; } final UpdateCampaign other = (UpdateCampaign) obj; - if (!other.canEqual(this)) { + if (Double.doubleToLongBits(activationDelay) != Double.doubleToLongBits(other.activationDelay)) { return false; } return true; } - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public boolean isValid() { - return super.isValid(); - } - /** * Clones this instance. * @@ -388,4 +322,12 @@ public UpdateCampaign clone() { protected boolean canEqual(Object other) { return other instanceof UpdateCampaign; } + + public double getActivationDelay() { + return activationDelay; + } + + public void setActivationDelay(double activationDelay) { + this.activationDelay = activationDelay; + } } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractSubtenantTrustedCertificate.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractSubtenantTrustedCertificate.java index ed84cdbcb..540f600a9 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractSubtenantTrustedCertificate.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractSubtenantTrustedCertificate.java @@ -54,8 +54,14 @@ public abstract class AbstractSubtenantTrustedCertificate implements SdkModel { protected final int deviceExecutionMode; /** - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. */ + @Deprecated protected boolean enrollmentMode; /** @@ -131,7 +137,7 @@ public abstract class AbstractSubtenantTrustedCertificate implements SdkModel { * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * @param id * Entity ID. * @param issuer @@ -426,20 +432,32 @@ public int getDeviceExecutionMode() { } /** - * Gets if true, signature is not required. default value false. + * Gets deprecated: certificate is used in enrollment mode. default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. * * @return enrollmentMode */ + @Deprecated public boolean isEnrollmentMode() { return enrollmentMode; } /** - * Sets if true, signature is not required. default value false. + * Sets deprecated: certificate is used in enrollment mode. default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. * * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. */ + @Deprecated public void setEnrollmentMode(boolean enrollmentMode) { this.enrollmentMode = enrollmentMode; } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractTrustedCertificate.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractTrustedCertificate.java index 336416e47..0c832759b 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractTrustedCertificate.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/AbstractTrustedCertificate.java @@ -53,8 +53,14 @@ public abstract class AbstractTrustedCertificate implements SdkModel { protected final int deviceExecutionMode; /** - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. */ + @Deprecated protected boolean enrollmentMode; /** @@ -130,7 +136,7 @@ public abstract class AbstractTrustedCertificate implements SdkModel { * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * @param id * Entity ID. * @param issuer @@ -395,20 +401,32 @@ public int getDeviceExecutionMode() { } /** - * Gets if true, signature is not required. default value false. + * Gets deprecated: certificate is used in enrollment mode. default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. * * @return enrollmentMode */ + @Deprecated public boolean isEnrollmentMode() { return enrollmentMode; } /** - * Sets if true, signature is not required. default value false. + * Sets deprecated: certificate is used in enrollment mode. default value is false. + * + *

+ * + * @deprecated This field has been deprecated since Sun Nov 01 08:00:00 CST 2020 and will be removed by Mon Nov 01 + * 08:00:00 CST 2021. This field is deprecated, do not use it anymore. * * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. */ + @Deprecated public void setEnrollmentMode(boolean enrollmentMode) { this.enrollmentMode = enrollmentMode; } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuer.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuer.java index f52cd5c04..6bcd78d5b 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuer.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuer.java @@ -31,22 +31,20 @@ public class CertificateIssuer implements SdkModel { private String description; /** - * The ID of the certificate issuer. + * Certificate issuer ID. */ private String id; /** - * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value shall be + * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the value is * empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - * */ private Map issuerAttributes; /** - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The users must - * provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated - * signing service. The users must provide their own CFSSL host_url and credentials. - * + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must provide your own + * GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL authenticated signing service. You + * must provide your own CFSSL host_url and credentials. */ @Required private CertificateIssuerType issuerType; @@ -70,16 +68,14 @@ public class CertificateIssuer implements SdkModel { * @param description * General description for the certificate issuer. * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. * @param issuerAttributes * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the - * value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - * + * value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. * @param issuerType - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The - * users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by - * CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. - * + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must + * provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL + * authenticated signing service. You must provide your own CFSSL host_url and credentials. * @param name * Certificate issuer name, unique per account. */ @@ -132,7 +128,7 @@ public CertificateIssuer() { *

* * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. */ public CertificateIssuer(String id) { this(); @@ -164,10 +160,9 @@ public CertificateIssuer(Date createdAt) { *

* * @param issuerType - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The - * users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by - * CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. - * + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must + * provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL + * authenticated signing service. You must provide your own CFSSL host_url and credentials. * @param name * Certificate issuer name, unique per account. */ @@ -217,7 +212,7 @@ public boolean isDescriptionValid() { } /** - * Gets the id of the certificate issuer. + * Gets certificate issuer id. * * @return id */ @@ -227,10 +222,10 @@ public String getId() { } /** - * Sets the id of the certificate issuer. + * Sets certificate issuer id. * * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. */ @Override public void setId(String id) { @@ -238,13 +233,13 @@ public void setId(String id) { } /** - * Sets the id of the certificate issuer. + * Sets certificate issuer id. * *

* Similar to {@link #setId(String)} * * @param certificateIssuerId - * The ID of the certificate issuer. + * Certificate issuer ID. */ @Internal public void setCertificateIssuerId(String certificateIssuerId) { @@ -252,8 +247,8 @@ public void setCertificateIssuerId(String certificateIssuerId) { } /** - * Gets general attributes for connecting the certificate issuer. when the issuer_type is global_sign, the value - * shall be empty. when the issuer_type is cfssl_auth, see definition of cfsslattributes. + * Gets general attributes for connecting the certificate issuer. when the issuer_type is global_sign, the value is + * empty. when the issuer_type is cfssl_auth, see definition of cfsslattributes. * * @return issuerAttributes */ @@ -262,22 +257,21 @@ public Map getIssuerAttributes() { } /** - * Sets general attributes for connecting the certificate issuer. when the issuer_type is global_sign, the value - * shall be empty. when the issuer_type is cfssl_auth, see definition of cfsslattributes. + * Sets general attributes for connecting the certificate issuer. when the issuer_type is global_sign, the value is + * empty. when the issuer_type is cfssl_auth, see definition of cfsslattributes. * * @param issuerAttributes * General attributes for connecting the certificate issuer. When the issuer_type is GLOBAL_SIGN, the - * value shall be empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - * + * value is empty. When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. */ public void setIssuerAttributes(Map issuerAttributes) { this.issuerAttributes = issuerAttributes; } /** - * Gets the type of the certificate issuer. - global_sign: certificates are issued by globalsign service. the users - * must provide their own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl - * authenticated signing service. the users must provide their own cfssl host_url and credentials. + * Gets certificate issuer type. - global_sign: certificates are issued by globalsign service. you must provide your + * own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl authenticated signing service. + * you must provide your own cfssl host_url and credentials. * * @return issuerType */ @@ -286,15 +280,14 @@ public CertificateIssuerType getIssuerType() { } /** - * Sets the type of the certificate issuer. - global_sign: certificates are issued by globalsign service. the users - * must provide their own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl - * authenticated signing service. the users must provide their own cfssl host_url and credentials. + * Sets certificate issuer type. - global_sign: certificates are issued by globalsign service. you must provide your + * own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl authenticated signing service. + * you must provide your own cfssl host_url and credentials. * * @param issuerType - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The - * users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by - * CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. - * + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must + * provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL + * authenticated signing service. You must provide your own CFSSL host_url and credentials. */ @Required public void setIssuerType(CertificateIssuerType issuerType) { @@ -302,18 +295,17 @@ public void setIssuerType(CertificateIssuerType issuerType) { } /** - * Sets the type of the certificate issuer. - global_sign: certificates are issued by globalsign service. the users - * must provide their own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl - * authenticated signing service. the users must provide their own cfssl host_url and credentials. + * Sets certificate issuer type. - global_sign: certificates are issued by globalsign service. you must provide your + * own globalsign account credentials. - cfssl_auth: certificates are issued by cfssl authenticated signing service. + * you must provide your own cfssl host_url and credentials. * *

* Similar to {@link #setIssuerType(com.arm.mbed.cloud.sdk.security.model.CertificateIssuerType)} * * @param issuerType - * The type of the certificate issuer. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. The - * users must provide their own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by - * CFSSL authenticated signing service. The users must provide their own CFSSL host_url and credentials. - * + * Certificate issuer type. - GLOBAL_SIGN: Certificates are issued by GlobalSign service. You must + * provide your own GlobalSign account credentials. - CFSSL_AUTH: Certificates are issued by CFSSL + * authenticated signing service. You must provide your own CFSSL host_url and credentials. */ @Internal @Required diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfig.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfig.java index 85fac9566..5e2f274a7 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfig.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/CertificateIssuerConfig.java @@ -20,8 +20,7 @@ public class CertificateIssuerConfig implements SdkModel { private static final long serialVersionUID = 1579411600351820L; /** - * The ID of the certificate issuer. Null if Device Management internal HSM is used. - * + * Certificate issuer ID. Null if Device Management internal HSM is used. */ @Required private String certificateIssuerId; @@ -32,8 +31,7 @@ public class CertificateIssuerConfig implements SdkModel { private final Date createdAt; /** - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. */ private String id; @@ -57,13 +55,11 @@ public class CertificateIssuerConfig implements SdkModel { * Note: Should not be used. Use {@link #CertificateIssuerConfig()} instead. * * @param certificateIssuerId - * The ID of the certificate issuer. Null if Device Management internal HSM is used. - * + * Certificate issuer ID. Null if Device Management internal HSM is used. * @param createdAt * Created UTC time RFC3339. * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @param reference * The certificate name to which the certificate issuer configuration applies. * @param updatedAt @@ -115,8 +111,7 @@ public CertificateIssuerConfig() { *

* * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. */ public CertificateIssuerConfig(String id) { this(); @@ -149,8 +144,7 @@ public CertificateIssuerConfig(Date createdAt, Date updatedAt) { *

* * @param certificateIssuerId - * The ID of the certificate issuer. Null if Device Management internal HSM is used. - * + * Certificate issuer ID. Null if Device Management internal HSM is used. * @param reference * The certificate name to which the certificate issuer configuration applies. */ @@ -159,7 +153,7 @@ public CertificateIssuerConfig(String certificateIssuerId, String reference) { } /** - * Gets the id of the certificate issuer. null if device management internal hsm is used. + * Gets certificate issuer id. null if device management internal hsm is used. * * @return certificateIssuerId */ @@ -168,11 +162,10 @@ public String getCertificateIssuerId() { } /** - * Sets the id of the certificate issuer. null if device management internal hsm is used. + * Sets certificate issuer id. null if device management internal hsm is used. * * @param certificateIssuerId - * The ID of the certificate issuer. Null if Device Management internal HSM is used. - * + * Certificate issuer ID. Null if Device Management internal HSM is used. */ @Required public void setCertificateIssuerId(String certificateIssuerId) { @@ -199,7 +192,7 @@ public Date getCreatedAt() { } /** - * Gets the id of the certificate issuer configuration. + * Gets certificate issuer id. configuration. * * @return id */ @@ -209,11 +202,10 @@ public String getId() { } /** - * Sets the id of the certificate issuer configuration. + * Sets certificate issuer id. configuration. * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. */ @Override public void setId(String id) { @@ -221,14 +213,13 @@ public void setId(String id) { } /** - * Sets the id of the certificate issuer configuration. + * Sets certificate issuer id. configuration. * *

* Similar to {@link #setId(String)} * * @param certificateIssuerConfigId - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. */ @Internal public void setCertificateIssuerConfigId(String certificateIssuerConfigId) { diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKey.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKey.java index 3f699a698..e5bec6ff0 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKey.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/PreSharedKey.java @@ -1,12 +1,15 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 18:55:00 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. +// TODO The following fields need to be defined: +// - endpointName +// - id package com.arm.mbed.cloud.sdk.security.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a pre shared key. @@ -17,10 +20,9 @@ public class PreSharedKey extends AbstractPreSharedKey { * Serialisation Id. */ private static final long serialVersionUID = 1784667797161851L; - /** - * The ID of the pre-shared key. - */ + private String id; + private String endpointName; /** * Internal constructor. @@ -102,129 +104,81 @@ public PreSharedKey(Date createdAt) { } /** - * Gets the unique endpoint identifier that this psk applies to. 16-64 - * [printable](https://en.wikipedia.org/wiki/ascii#printable_characters) (non-control) ascii characters. - * - * @return endpointName - */ - public String getEndpointName() { - return getId(); - } - - /** - * Sets the unique endpoint identifier that this psk applies to. 16-64 - * [printable](https://en.wikipedia.org/wiki/ascii#printable_characters) (non-control) ascii characters. + * Sets the id of the pre_shared_key, shadows the endpoint_name. * *

- * Note: the length of the string has to match {@code /^[ -~]{16,64}$/} to be valid - * - * @param endpointName - * The unique endpoint identifier that this PSK applies to. 16-64 - * [printable](https://en.wikipedia.org/wiki/ASCII#Printable_characters) (non-control) ASCII characters. - */ - public void setEndpointName(String endpointName) { - setId(endpointName); - } - - /** - * Checks whether endpointName value is valid. - * - * @return true if the value is valid; false otherwise. - */ - @SuppressWarnings("PMD.UselessParentheses") - public boolean isEndpointNameValid() { - return id != null && id.matches("^[ -~]{16,64}$"); - } - - /** - * Gets the id of the pre_shared_key, shadows the endpoint_name. + * Similar to {@link #setId(String)} * - * @return id + * @param preSharedKeyId + * The Id of the pre_shared_key, shadows the endpoint_name. */ - @Override - public String getId() { - return this.id; + @Internal + @NotImplemented + public void setPreSharedKeyId(String preSharedKeyId) throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } - /** - * Sets the id of the pre_shared_key, shadows the endpoint_name. - * - * @param id - * The Id of the pre_shared_key, shadows the endpoint_name. - */ @Override - public void setId(String id) { - this.id = id; + public String toString() { + return "{\"PreSharedKey\": {\"id\":\"" + id + "\", \"endpointName\":\"" + endpointName + "\", \"createdAt\":\"" + + createdAt + "\"}}"; } /** - * Sets the id of the pre_shared_key, shadows the endpoint_name. + * Clones this instance. * *

- * Similar to {@link #setId(String)} * - * @param preSharedKeyId - * The Id of the pre_shared_key, shadows the endpoint_name. + * @see java.lang.Object#clone() + * @return a cloned instance */ - @Internal - public void setPreSharedKeyId(String preSharedKeyId) { - setId(preSharedKeyId); + @Override + public PreSharedKey clone() { + return new PreSharedKey(this); } /** - * Returns a string representation of the object. + * Method to ensure {@link #equals(Object)} is correct. * *

+ * Note: see this article: canEqual() * - * @see java.lang.Object#toString() - * @return the string representation + * @param other + * another object. + * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. */ @Override - public String toString() { - return "PreSharedKey [endpointName=" + getEndpointName() + ", id=" + getId() + ", createdAt=" + createdAt + "]"; + protected boolean canEqual(Object other) { + return other instanceof PreSharedKey; } - /** - * Calculates the hash code of this instance based on field values. - *

- * - * @see java.lang.Object#hashCode() - * @return hash code - */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); + result = prime * result + ((endpointName == null) ? 0 : endpointName.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; - } - /** - * Indicates whether some other object is "equal to" this one. - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } - if (obj == null) { - return false; - } if (!super.equals(obj)) { return false; } - if (!(obj instanceof PreSharedKey)) { + if (getClass() != obj.getClass()) { return false; } final PreSharedKey other = (PreSharedKey) obj; - if (!other.canEqual(this)) { + if (endpointName == null) { + if (other.endpointName != null) { + return false; + } + } else if (!endpointName.equals(other.endpointName)) { return false; } if (id == null) { @@ -235,47 +189,21 @@ public boolean equals(Object obj) { return false; } return true; + } + public String getId() { + return id; } - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @Override - public boolean isValid() { - return isEndpointNameValid() && super.isValid(); + public void setId(String id) { + this.id = id; } - /** - * Clones this instance. - * - *

- * - * @see java.lang.Object#clone() - * @return a cloned instance - */ - @Override - public PreSharedKey clone() { - return new PreSharedKey(this); + public String getEndpointName() { + return endpointName; } - /** - * Method to ensure {@link #equals(Object)} is correct. - * - *

- * Note: see this article: canEqual() - * - * @param other - * another object. - * @return true if the other object is an instance of the class in which canEqual is (re)defined, false otherwise. - */ - @Override - protected boolean canEqual(Object other) { - return other instanceof PreSharedKey; + public void setEndpointName(String endpointName) { + this.endpointName = endpointName; } } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificate.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificate.java index f7ec7f9fd..6cbd283e0 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificate.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/SubtenantTrustedCertificate.java @@ -1,12 +1,14 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 19:21:45 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. +// TODO The following fields need to be defined: +// - isDeveloperCertificate package com.arm.mbed.cloud.sdk.security.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a subtenant trusted certificate. @@ -18,6 +20,7 @@ public class SubtenantTrustedCertificate extends AbstractSubtenantTrustedCertifi * Serialisation Id. */ private static final long serialVersionUID = 8306879121921220L; + private boolean isDeveloperCertificate; /** * Internal constructor. @@ -27,6 +30,8 @@ public class SubtenantTrustedCertificate extends AbstractSubtenantTrustedCertifi *

* Note: Should not be used. Use {@link #SubtenantTrustedCertificate()} instead. * + * @param isDeveloperCertificate + * Whether or not this certificate is a developer certificate. * @param accountId * The ID of the account. * @param certificate @@ -40,7 +45,7 @@ public class SubtenantTrustedCertificate extends AbstractSubtenantTrustedCertifi * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * @param id * Entity ID. * @param issuer @@ -66,12 +71,13 @@ public class SubtenantTrustedCertificate extends AbstractSubtenantTrustedCertifi @SuppressWarnings("PMD.CyclomaticComplexity") public SubtenantTrustedCertificate(String accountId, String certificate, String certificateFingerprint, Date createdAt, String description, int deviceExecutionMode, - boolean enrollmentMode, String id, String issuer, String name, String ownerId, - SubtenantTrustedCertificateService service, + boolean enrollmentMode, String id, boolean isDeveloperCertificate, String issuer, + String name, String ownerId, SubtenantTrustedCertificateService service, SubtenantTrustedCertificateStatus status, String subject, Date updatedAt, boolean valid, Date validity) { super(accountId, certificate, certificateFingerprint, createdAt, description, deviceExecutionMode, enrollmentMode, id, issuer, name, ownerId, service, status, subject, updatedAt, valid, validity); + this.isDeveloperCertificate = isDeveloperCertificate; } /** @@ -85,6 +91,7 @@ public SubtenantTrustedCertificate(String accountId, String certificate, String * @param subtenantTrustedCertificate * a subtenant trusted certificate. */ + @SuppressWarnings("deprecation") @Internal public SubtenantTrustedCertificate(SubtenantTrustedCertificate subtenantTrustedCertificate) { this(subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.accountId, @@ -95,6 +102,7 @@ public SubtenantTrustedCertificate(SubtenantTrustedCertificate subtenantTrustedC subtenantTrustedCertificate == null ? 0 : subtenantTrustedCertificate.deviceExecutionMode, subtenantTrustedCertificate != null && subtenantTrustedCertificate.enrollmentMode, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.id, + subtenantTrustedCertificate != null && subtenantTrustedCertificate.isDeveloperCertificate(), subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.issuer, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.name, subtenantTrustedCertificate == null ? (String) null : subtenantTrustedCertificate.ownerId, @@ -112,11 +120,22 @@ public SubtenantTrustedCertificate(SubtenantTrustedCertificate subtenantTrustedC * Constructor. */ public SubtenantTrustedCertificate() { - this((String) null, (String) null, (String) null, new Date(), (String) null, 0, false, (String) null, + this((String) null, (String) null, (String) null, new Date(), (String) null, 0, false, (String) null, false, (String) null, (String) null, (String) null, SubtenantTrustedCertificateService.getDefault(), SubtenantTrustedCertificateStatus.getDefault(), (String) null, new Date(), false, new Date()); } + @Internal + public SubtenantTrustedCertificate(String accountId, String certificate, String certificateFingerprint, + Date createdAt, String description, int deviceExecutionMode, + boolean enrollmentMode, String id, String issuer, String name, String ownerId, + SubtenantTrustedCertificateService service, + SubtenantTrustedCertificateStatus status, String subject, Date updatedAt, + boolean valid, Date validity) { + super(accountId, certificate, certificateFingerprint, createdAt, description, deviceExecutionMode, + enrollmentMode, id, issuer, name, ownerId, service, status, subject, updatedAt, valid, validity); + } + /** * Constructor. * @@ -140,14 +159,14 @@ public SubtenantTrustedCertificate(String id) { *

* Note: Should not be used. Use {@link #SubtenantTrustedCertificate()} instead. * + * @param isDeveloperCertificate + * Whether or not this certificate is a developer certificate. * @param certificateFingerprint * A SHA-256 fingerprint of the certificate. * @param createdAt * Creation UTC time RFC3339. * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. - * @param isDeveloperCertificate - * whether or not this certificate is a developer certificate. * @param issuer * Issuer of the certificate. * @param ownerId @@ -161,14 +180,15 @@ public SubtenantTrustedCertificate(String id) { * @param validity * Expiration time in UTC formatted as RFC3339. */ - @SuppressWarnings("PMD.UnusedFormalParameter") @Internal + @SuppressWarnings("PMD.CyclomaticComplexity") public SubtenantTrustedCertificate(String certificateFingerprint, Date createdAt, int deviceExecutionMode, boolean isDeveloperCertificate, String issuer, String ownerId, String subject, Date updatedAt, boolean valid, Date validity) { this((String) null, (String) null, certificateFingerprint, createdAt, (String) null, deviceExecutionMode, false, - (String) null, issuer, (String) null, ownerId, SubtenantTrustedCertificateService.getDefault(), - SubtenantTrustedCertificateStatus.getDefault(), subject, updatedAt, valid, validity); + (String) null, isDeveloperCertificate, issuer, (String) null, ownerId, + SubtenantTrustedCertificateService.getDefault(), SubtenantTrustedCertificateStatus.getDefault(), subject, + updatedAt, valid, validity); } /** @@ -189,9 +209,9 @@ public SubtenantTrustedCertificate(String certificateFingerprint, Date createdAt */ public SubtenantTrustedCertificate(String accountId, String certificate, String name, SubtenantTrustedCertificateService service) { - this(accountId, certificate, (String) null, new Date(), (String) null, 0, false, (String) null, (String) null, - name, (String) null, service, SubtenantTrustedCertificateStatus.getDefault(), (String) null, new Date(), - false, new Date()); + this(accountId, certificate, (String) null, new Date(), (String) null, 0, false, (String) null, false, + (String) null, name, (String) null, service, SubtenantTrustedCertificateStatus.getDefault(), (String) null, + new Date(), false, new Date()); } /** @@ -199,35 +219,9 @@ public SubtenantTrustedCertificate(String accountId, String certificate, String * * @return isDeveloperCertificate */ - public boolean isDeveloperCertificate() { - return getDeviceExecutionMode() == 1; - } - - /** - * Gets whether or not this certificate is a developer certificate. - *

- * Note: Similar to {@link #isDeveloperCertificate()} - * - * @return isDeveloperCertificate - */ - @SuppressWarnings("PMD.BooleanGetMethodName") - @Internal - public boolean getIsDeveloperCertificate() { - return isDeveloperCertificate(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public boolean isValid() { - return super.isValid(); + @NotImplemented + public boolean isDeveloperCertificate() throws NotImplementedException { + return isDeveloperCertificate; } /** @@ -238,6 +232,7 @@ public boolean isValid() { * @see java.lang.Object#toString() * @return the string representation */ + @SuppressWarnings("deprecation") @Override public String toString() { return "SubtenantTrustedCertificate [isDeveloperCertificate=" + isDeveloperCertificate() + ", accountId=" @@ -249,50 +244,30 @@ public String toString() { + "]"; } - /** - * Calculates the hash code of this instance based on field values. - * - *

- * - * @see java.lang.Object#hashCode() - * @return hash code - */ - @SuppressWarnings("PMD.UselessOverridingMethod") @Override public int hashCode() { - return super.hashCode(); + final int prime = 31; + int result = super.hashCode(); + result = prime * result + (isDeveloperCertificate ? 1231 : 1237); + return result; } - /** - * Indicates whether some other object is "equal to" this one. - * - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } - if (obj == null) { - return false; - } if (!super.equals(obj)) { return false; } - if (!(obj instanceof SubtenantTrustedCertificate)) { + if (getClass() != obj.getClass()) { return false; } final SubtenantTrustedCertificate other = (SubtenantTrustedCertificate) obj; - if (!other.canEqual(this)) { + if (isDeveloperCertificate != other.isDeveloperCertificate) { return false; } return true; - } /** @@ -322,4 +297,5 @@ public SubtenantTrustedCertificate clone() { protected boolean canEqual(Object other) { return other instanceof SubtenantTrustedCertificate; } + } diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificate.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificate.java index ca0824c12..1cfb1f4dd 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificate.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/TrustedCertificate.java @@ -1,12 +1,14 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Thu May 02 19:21:45 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 18:10:54 CST 2021. Feel free to change its contents as you wish. +// TODO The following fields need to be defined: +// - isDeveloperCertificate package com.arm.mbed.cloud.sdk.security.model; -import java.util.Date; - import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.SdkModel; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; +import java.util.Date; /** * Model for a trusted certificate. @@ -18,6 +20,7 @@ public class TrustedCertificate extends AbstractTrustedCertificate { * Serialisation Id. */ private static final long serialVersionUID = 1727697502201821L; + private boolean isDeveloperCertificate; /** * Internal constructor. @@ -27,6 +30,8 @@ public class TrustedCertificate extends AbstractTrustedCertificate { *

* Note: Should not be used. Use {@link #TrustedCertificate()} instead. * + * @param isDeveloperCertificate + * Whether or not this certificate is a developer certificate. * @param accountId * The ID of the account. * @param certificate @@ -40,7 +45,7 @@ public class TrustedCertificate extends AbstractTrustedCertificate { * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. * @param enrollmentMode - * If true, signature is not required. Default value false. + * DEPRECATED: Certificate is used in enrollment mode. Default value is false. * @param id * Entity ID. * @param issuer @@ -66,12 +71,12 @@ public class TrustedCertificate extends AbstractTrustedCertificate { @SuppressWarnings("PMD.CyclomaticComplexity") public TrustedCertificate(String accountId, String certificate, String certificateFingerprint, Date createdAt, String description, int deviceExecutionMode, boolean enrollmentMode, String id, - String issuer, String name, String ownerId, TrustedCertificateService service, - TrustedCertificateStatus status, String subject, Date updatedAt, boolean valid, - Date validity) { + boolean isDeveloperCertificate, String issuer, String name, String ownerId, + TrustedCertificateService service, TrustedCertificateStatus status, String subject, + Date updatedAt, boolean valid, Date validity) { super(accountId, certificate, certificateFingerprint, createdAt, description, deviceExecutionMode, enrollmentMode, id, issuer, name, ownerId, service, status, subject, updatedAt, valid, validity); - + this.isDeveloperCertificate = isDeveloperCertificate; } /** @@ -85,6 +90,7 @@ public TrustedCertificate(String accountId, String certificate, String certifica * @param trustedCertificate * a trusted certificate. */ + @SuppressWarnings("deprecation") @Internal public TrustedCertificate(TrustedCertificate trustedCertificate) { this(trustedCertificate == null ? (String) null : trustedCertificate.accountId, @@ -95,6 +101,7 @@ public TrustedCertificate(TrustedCertificate trustedCertificate) { trustedCertificate == null ? 0 : trustedCertificate.deviceExecutionMode, trustedCertificate != null && trustedCertificate.enrollmentMode, trustedCertificate == null ? (String) null : trustedCertificate.id, + trustedCertificate != null && trustedCertificate.isDeveloperCertificate(), trustedCertificate == null ? (String) null : trustedCertificate.issuer, trustedCertificate == null ? (String) null : trustedCertificate.name, trustedCertificate == null ? (String) null : trustedCertificate.ownerId, @@ -110,11 +117,21 @@ public TrustedCertificate(TrustedCertificate trustedCertificate) { * Constructor. */ public TrustedCertificate() { - this((String) null, (String) null, (String) null, new Date(), (String) null, 0, false, (String) null, + this((String) null, (String) null, (String) null, new Date(), (String) null, 0, false, (String) null, false, (String) null, (String) null, (String) null, TrustedCertificateService.getDefault(), TrustedCertificateStatus.getDefault(), (String) null, new Date(), false, new Date()); } + @Internal + public TrustedCertificate(String accountId, String certificate, String certificateFingerprint, Date createdAt, + String description, int deviceExecutionMode, boolean enrollmentMode, String id, + String issuer, String name, String ownerId, TrustedCertificateService service, + TrustedCertificateStatus status, String subject, Date updatedAt, boolean valid, + Date validity) { + super(accountId, certificate, certificateFingerprint, createdAt, description, deviceExecutionMode, + enrollmentMode, id, issuer, name, ownerId, service, status, subject, updatedAt, valid, validity); + } + /** * Constructor. * @@ -138,6 +155,8 @@ public TrustedCertificate(String id) { *

* Note: Should not be used. Use {@link #TrustedCertificate()} instead. * + * @param isDeveloperCertificate + * Whether or not this certificate is a developer certificate. * @param accountId * The ID of the account. * @param certificateFingerprint @@ -146,8 +165,6 @@ public TrustedCertificate(String id) { * Creation UTC time RFC3339. * @param deviceExecutionMode * Device execution mode where 1 means a developer certificate. - * @param isDeveloperCertificate - * whether or not this certificate is a developer certificate. * @param issuer * Issuer of the certificate. * @param ownerId @@ -162,13 +179,14 @@ public TrustedCertificate(String id) { * Expiration time in UTC formatted as RFC3339. */ @Internal - @SuppressWarnings({ "PMD.UnusedFormalParameter", "PMD.CyclomaticComplexity" }) + @SuppressWarnings("PMD.CyclomaticComplexity") public TrustedCertificate(String accountId, String certificateFingerprint, Date createdAt, int deviceExecutionMode, boolean isDeveloperCertificate, String issuer, String ownerId, String subject, Date updatedAt, boolean valid, Date validity) { this(accountId, (String) null, certificateFingerprint, createdAt, (String) null, deviceExecutionMode, false, - (String) null, issuer, (String) null, ownerId, TrustedCertificateService.getDefault(), - TrustedCertificateStatus.getDefault(), subject, updatedAt, valid, validity); + (String) null, isDeveloperCertificate, issuer, (String) null, ownerId, + TrustedCertificateService.getDefault(), TrustedCertificateStatus.getDefault(), subject, updatedAt, valid, + validity); } /** @@ -186,7 +204,7 @@ public TrustedCertificate(String accountId, String certificateFingerprint, Date * Service name where the certificate is used. */ public TrustedCertificate(String certificate, String name, TrustedCertificateService service) { - this((String) null, certificate, (String) null, new Date(), (String) null, 0, false, (String) null, + this((String) null, certificate, (String) null, new Date(), (String) null, 0, false, (String) null, false, (String) null, name, (String) null, service, TrustedCertificateStatus.getDefault(), (String) null, new Date(), false, new Date()); } @@ -196,35 +214,9 @@ public TrustedCertificate(String certificate, String name, TrustedCertificateSer * * @return isDeveloperCertificate */ - public boolean isDeveloperCertificate() { - return getDeviceExecutionMode() == 1; - } - - /** - * Gets whether or not this certificate is a developer certificate. - *

- * Note: Similar to {@link #isDeveloperCertificate()} - * - * @return isDeveloperCertificate - */ - @SuppressWarnings("PMD.BooleanGetMethodName") - @Internal - public boolean getIsDeveloperCertificate() { - return isDeveloperCertificate(); - } - - /** - * Checks whether the model is valid or not. - * - *

- * - * @see SdkModel#isValid() - * @return true if the model is valid; false otherwise. - */ - @SuppressWarnings("PMD.UselessOverridingMethod") - @Override - public boolean isValid() { - return super.isValid(); + @NotImplemented + public boolean isDeveloperCertificate() throws NotImplementedException { + return isDeveloperCertificate; } /** @@ -235,6 +227,7 @@ public boolean isValid() { * @see java.lang.Object#toString() * @return the string representation */ + @SuppressWarnings("deprecation") @Override public String toString() { return "TrustedCertificate [isDeveloperCertificate=" + isDeveloperCertificate() + ", accountId=" + accountId @@ -245,46 +238,27 @@ public String toString() { + ", updatedAt=" + updatedAt + ", valid=" + valid + ", validity=" + validity + "]"; } - /** - * Calculates the hash code of this instance based on field values. - * - *

- * - * @see java.lang.Object#hashCode() - * @return hash code - */ - @SuppressWarnings("PMD.UselessOverridingMethod") @Override public int hashCode() { - return super.hashCode(); + final int prime = 31; + int result = super.hashCode(); + result = prime * result + (isDeveloperCertificate ? 1231 : 1237); + return result; } - /** - * Indicates whether some other object is "equal to" this one. - * - *

- * - * @see java.lang.Object#equals(java.lang.Object) - * @param obj - * an object to compare with this instance. - * @return true if this object is the same as the obj argument; false otherwise. - */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } - if (obj == null) { - return false; - } if (!super.equals(obj)) { return false; } - if (!(obj instanceof TrustedCertificate)) { + if (getClass() != obj.getClass()) { return false; } final TrustedCertificate other = (TrustedCertificate) obj; - if (!other.canEqual(this)) { + if (isDeveloperCertificate != other.isDeveloperCertificate) { return false; } return true; diff --git a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/VerificationResponse.java b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/VerificationResponse.java index 68cf88765..82d7c49c1 100644 --- a/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/VerificationResponse.java +++ b/foundation-models/src/main/java/com/arm/mbed/cloud/sdk/security/model/VerificationResponse.java @@ -20,13 +20,11 @@ public class VerificationResponse implements SdkModel { /** * Provides details in case of failure. - * */ private final String message; /** * Indicates whether the certificate issuer was verified successfully. - * */ private final boolean successful; @@ -40,10 +38,8 @@ public class VerificationResponse implements SdkModel { * * @param message * Provides details in case of failure. - * * @param successful * Indicates whether the certificate issuer was verified successfully. - * */ @Internal public VerificationResponse(String message, boolean successful) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccount.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccount.java index b6b9822b6..31acd6775 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccount.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccount.java @@ -19,31 +19,31 @@ public class TestAccount { @Test public void testClone() { try { - Account account1 = new Account("764ea553-7bc2-4123-a213-42be75c94e41", - "4e1bb58f-3449-4286-b6b3-5fa9b5009e56", "c6b19.88d7c@77e74.fr", - "27626c82-d117-4ab6-92eb-41c1efa08719", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "5db79174-a11b-47ab-b998-73303ea83e90", - "b608895c-b597-4bec-9192-18d8ef6caeb3", - "ed926a33-614a-4f61-8e5a-d2416bddfeee", null, + Account account1 = new Account("e36646f2-8171-4d5a-b131-fb79c9fc96b5", + "78411e92-9a0f-4103-b3d0-935de653abcb", "a6a57.0b8b6@006f3.me", + "b107cc29-0423-42b0-9333-5986bd694d13", "3b2c98a6b0d3341e5184f0f766dde798", + "dc218b62-5a11-4a5d-8604-72297c1c9a10", + "b2950311-f93a-4f6a-b262-a64768a2a082", + "0e68a726-8b05-47ae-b2fd-214ba3a2ae13", null, AccountBusinessModel.getDefault(), null, - "d81d2696-a021-41f5-8a50-3b78f4f17a33", - "65654abc-cf51-4c5c-a11a-eff095a623c9", - "ec9ab297-6f3f-4792-a760-7bfdd87cc011", - "f30a17c9-eb32-4aaf-884a-95077f057a25", - "dc543530-f3da-49d7-8de3-51575c0e6fd1", new Date(1574704664846L), null, - "c8d2ed37-c501-44fb-bcf4-a34ad515e1ee", - "b7863859-8e16-4e69-83d4-bcb7330f272d", "cc991.75b90@b9c5c.fr", - "c81d09aa-6102-478d-a5e3-f3792ccde135", new Date(1574704668969L), 1, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 1, null, null, + "15149517-be60-41bd-a0c8-4c96e16ba3b8", + "b30ea2eb-3ffc-455a-8a3b-a8dfdf89a21f", + "b2964ba7-189b-41a4-b863-9bd68498f7f4", + "f02ffe94-75fc-4f68-b61a-47e63ad4c1ac", + "c303b883-f4b5-4113-a883-0f065de7c3ff", new Date(1610683992052L), null, + "c1c6af8b-83fb-4ff4-8698-f7810725a59b", + "67fc2ecc-a7f4-4ed1-b556-252eef354973", "53333.944d0@9d1ba.fr", + "bc78ef1a-0e6e-4ac4-9292-ca0da504fc6d", new Date(1610683989446L), 1, + "3b2c98a6b0d3341e5184f0f766dde798", 1, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 1, - "6c529ace-5259-4834-a872-72d8c8e825d8", null, - "9508cc6f-c199-4840-9e61-98a124a5e163", - "993d2fd4-f4e7-4249-8552-23afc62518c4", - "94fed715-20be-48e5-83dc-25f3098c64f6", "8c180.30961@b2ca7.fr", - "de0898c5-8fbc-4d94-9ade-499613a405d9", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "9f703265-37cd-4d80-892d-0643666e7ac9", - new Date(1574704666747L), new Date(1574704667699L)); + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 1, + "29f7d514-925d-40d0-a596-fc67bc62e1b6", null, + "d9265984-c8cd-4bb9-85df-7143624519a2", + "f7406665-fca8-40b6-b052-9248da587a23", + "2810ec41-4767-48a2-a297-fa482f2b2dfe", "fe89d.616d1@29884.me", + "e71c1ebd-d791-4cf5-9727-48bf311a0dbf", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "ed854683-dec7-4036-82a2-9f79c85edc7a", + null, new Date(1610683986576L), new Date(1610683991844L)); Account account2 = account1.clone(); assertNotNull(account1); assertNotNull(account2); @@ -61,56 +61,56 @@ public void testClone() { @Test public void testHashCode() { try { - Account account1 = new Account("c4fdfcbc-4428-48fc-b6a9-2dfaa8e558b0", - "a74492dd-8c4b-42bf-b5d9-bb1b61ecb2fb", "33f8c.3e3e5@d6322.me", - "7a0cc1b2-b086-4e5e-af5f-f752f3d1df0f", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "89352fca-ad25-43f5-9174-2396fa927be3", - "c1928665-6e97-4eed-bbb9-9c0bb9f2c580", - "87d7b8d0-42c1-48b7-839f-a5293fc9f893", null, + Account account1 = new Account("3d2e1d86-1369-45f8-b82a-4136858048fa", + "eec31ba0-0efc-4352-92fa-84e60cfd48f2", "fa2ce.9fb01@7fc3c.me", + "d707c9ef-2b3a-4e02-bc48-63ee5640c90d", "3b2c98a6b0d3341e5184f0f766dde798", + "c0429679-a1fa-41f8-9786-b1e6e777c953", + "5cb9ed58-89fc-425a-9bd0-f449505925ee", + "24439b1c-c2a6-4b5c-8286-76e6924ee0a7", null, AccountBusinessModel.getDefault(), null, - "02518059-cfd2-492c-ada6-bdb42c59f8a0", - "129f9dab-5add-4bd0-be12-910d553cd147", - "24f7e51f-87e7-4953-afd8-3474626e9a13", - "7d966689-fe12-4876-b7b8-bc4696915ce6", - "b654b871-c297-4988-a5a4-5d93194bd136", new Date(1574704663088L), null, - "7687894f-938c-49ee-9967-5381b189b945", - "bceb9199-e94a-4685-93b1-9255f7f6838c", "7df53.26c19@6030c.me", - "fc8bfc29-aa68-450c-aadc-76f097688695", new Date(1574704661383L), 1, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 64, null, null, + "ddb67afd-6baf-4667-aff1-54944fad8cf2", + "6308f4a8-fdee-4a86-a88e-c7e6e5383994", + "6643867c-cd91-47c2-975e-8625932e9a7c", + "722f9487-a9b5-476d-a44b-611bfff78abe", + "4a85fbf9-4fd3-4707-86b4-f99c2fa6530f", new Date(1610683992939L), null, + "0567249d-4d59-4dc5-b5aa-49d7dbac5a5b", + "5ebb6bc8-159c-4b32-8b11-002b24a46e3f", "577ba.b6367@4be8e.fr", + "52cd380a-eb02-4fbf-bfa4-f652d4e53771", new Date(1610683986237L), 39, + "3b2c98a6b0d3341e5184f0f766dde798", 1, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 45, - "9634e89d-ef0a-49a5-a51f-b28741eae90b", null, - "28929189-13b7-4ae3-a6a4-35a9f14a2a39", - "ed88f6ea-a7b5-4dc4-b9aa-a20b5760441f", - "d16c71e0-8aae-4262-b4c0-237bffd6882b", "1252f.5ba9b@45a76.fr", - "4459f14c-1d01-47fa-a441-cc07fbbbcb05", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "7e6a382c-4b29-4ee4-a2b9-6a7e89a562ca", - new Date(1574704661279L), new Date(1574704662786L)); - Account account2 = new Account("c4fdfcbc-4428-48fc-b6a9-2dfaa8e558b0", - "a74492dd-8c4b-42bf-b5d9-bb1b61ecb2fb", "33f8c.3e3e5@d6322.me", - "7a0cc1b2-b086-4e5e-af5f-f752f3d1df0f", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "89352fca-ad25-43f5-9174-2396fa927be3", - "c1928665-6e97-4eed-bbb9-9c0bb9f2c580", - "87d7b8d0-42c1-48b7-839f-a5293fc9f893", null, + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 4, + "b259845a-c419-4d69-9698-abee432b2722", null, + "00acb061-81a4-499b-a110-64ee67c0cff8", + "1c58f0e6-49e7-4401-a7c1-19e273c92eb4", + "f04a2551-769b-4966-9a20-6356fde02cb7", "da24d.95db7@1c383.fr", + "9e3c1199-1e65-4f02-bc49-4e396b2e0273", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "3dddfbb3-ac05-4dd5-8769-023cac30ec11", + null, new Date(1610683988145L), new Date(1610683989061L)); + Account account2 = new Account("3d2e1d86-1369-45f8-b82a-4136858048fa", + "eec31ba0-0efc-4352-92fa-84e60cfd48f2", "fa2ce.9fb01@7fc3c.me", + "d707c9ef-2b3a-4e02-bc48-63ee5640c90d", "3b2c98a6b0d3341e5184f0f766dde798", + "c0429679-a1fa-41f8-9786-b1e6e777c953", + "5cb9ed58-89fc-425a-9bd0-f449505925ee", + "24439b1c-c2a6-4b5c-8286-76e6924ee0a7", null, AccountBusinessModel.getDefault(), null, - "02518059-cfd2-492c-ada6-bdb42c59f8a0", - "129f9dab-5add-4bd0-be12-910d553cd147", - "24f7e51f-87e7-4953-afd8-3474626e9a13", - "7d966689-fe12-4876-b7b8-bc4696915ce6", - "b654b871-c297-4988-a5a4-5d93194bd136", new Date(1574704663088L), null, - "7687894f-938c-49ee-9967-5381b189b945", - "bceb9199-e94a-4685-93b1-9255f7f6838c", "7df53.26c19@6030c.me", - "fc8bfc29-aa68-450c-aadc-76f097688695", new Date(1574704661383L), 1, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 64, null, null, + "ddb67afd-6baf-4667-aff1-54944fad8cf2", + "6308f4a8-fdee-4a86-a88e-c7e6e5383994", + "6643867c-cd91-47c2-975e-8625932e9a7c", + "722f9487-a9b5-476d-a44b-611bfff78abe", + "4a85fbf9-4fd3-4707-86b4-f99c2fa6530f", new Date(1610683992939L), null, + "0567249d-4d59-4dc5-b5aa-49d7dbac5a5b", + "5ebb6bc8-159c-4b32-8b11-002b24a46e3f", "577ba.b6367@4be8e.fr", + "52cd380a-eb02-4fbf-bfa4-f652d4e53771", new Date(1610683986237L), 39, + "3b2c98a6b0d3341e5184f0f766dde798", 1, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 45, - "9634e89d-ef0a-49a5-a51f-b28741eae90b", null, - "28929189-13b7-4ae3-a6a4-35a9f14a2a39", - "ed88f6ea-a7b5-4dc4-b9aa-a20b5760441f", - "d16c71e0-8aae-4262-b4c0-237bffd6882b", "1252f.5ba9b@45a76.fr", - "4459f14c-1d01-47fa-a441-cc07fbbbcb05", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "7e6a382c-4b29-4ee4-a2b9-6a7e89a562ca", - new Date(1574704661279L), new Date(1574704662786L)); + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 4, + "b259845a-c419-4d69-9698-abee432b2722", null, + "00acb061-81a4-499b-a110-64ee67c0cff8", + "1c58f0e6-49e7-4401-a7c1-19e273c92eb4", + "f04a2551-769b-4966-9a20-6356fde02cb7", "da24d.95db7@1c383.fr", + "9e3c1199-1e65-4f02-bc49-4e396b2e0273", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "3dddfbb3-ac05-4dd5-8769-023cac30ec11", + null, new Date(1610683988145L), new Date(1610683989061L)); assertNotNull(account1); assertNotNull(account2); assertNotSame(account2, account1); @@ -131,60 +131,60 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - Account account = new Account("dae17c6e-d91a-4e38-b47a-c90223d4d8fd", "e8918bdd-47fc-4e3d-85e6-91b162d55027", - "1c8bc.92c31@bc736.me", "0d97e364-87ac-4a20-be1d-ef36603d1011", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "85e72aba-8abe-446b-b3b0-e720c55ba5ce", - "46fec13b-a6b0-4e37-b512-eb30ed11ae8f", "f618ac6d-b6dd-4785-9e40-baf4bd19d1f2", + Account account = new Account("125c7a36-fd4c-40eb-aa84-de840254407b", "7b08eece-a2c1-466a-990e-55369026e2de", + "e2890.49f03@9671e.me", "61005219-27cd-4360-ab46-089840477674", + "3b2c98a6b0d3341e5184f0f766dde798", "e7293cee-dc2f-4a0a-8120-cb65306df334", + "b3d1fca4-5caa-4817-81dd-77d869430217", "622cf54b-c3b1-40fa-baf1-96c0d63742fc", null, AccountBusinessModel.getDefault(), null, - "fc08dcd2-b69d-43c7-824c-a21d7c0ec6de", "22ce0763-67ee-452d-b967-1173acf487af", - "3af3417d-fe22-4399-b9c0-58e14e0cd4fa", "2de0d89e-1c94-4ec8-9551-2c0d7a2398e7", - "091071ae-6b31-4a43-90d9-899fe84d28b2", new Date(1574704662609L), null, - "9d4989c3-53ae-46ec-9410-939c6419850a", "24e9bc5e-dc43-431e-8b62-a2e584d2e582", - "b37db.03e48@01511.fr", "f642d82e-b992-4e89-b371-e6d06c47f6e1", - new Date(1574704668590L), 1, "4f267f967f7d1f5e3fa0d6abaccdb4bf", 27, null, null, + "00f4f6c6-8c83-4c2b-9127-2d8ede649b84", "201e6720-0646-4196-8644-bbc150b7488d", + "b5bdcb3d-5022-401f-a623-2b673cd43998", "b7422f7f-ef23-4eaf-bc99-b6b57aca4c50", + "22a2ed25-681b-4adc-879d-a0e5f77fe946", new Date(1610683991912L), null, + "070657a0-38ab-4b60-87b9-70a19d8b4ef7", "4faf4463-6ead-42c6-87e3-b5549430aa73", + "fb738.edf67@3ad76.me", "120a779b-6f54-4ddd-9273-1b0a51c03bc0", + new Date(1610683985008L), 1, "3b2c98a6b0d3341e5184f0f766dde798", 1, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 1, - "9fe291fd-a2b6-47f9-9262-ec1f86f14782", null, - "06c7c985-f245-435e-8199-7b9a82b904d4", "ef0c6aa0-14e0-4014-a124-b2390ec5268f", - "491103ce-de19-4c0a-9237-7ad536af4e3b", "43792.a3833@b4b0b.me", - "72d5ca04-6d1e-4a85-bbbb-b1893889f3e4", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "fc11cc57-ed35-426f-94c9-3d0fe673083b", - new Date(1574704666001L), new Date(1574704665303L)); + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 1, + "cf6ac7da-c0a7-4f30-9317-3c3f3ac51c0a", null, + "ba8bc423-d341-4a4c-a669-13ba35da4352", "b133fe38-35b6-4fab-a165-b371cfab1416", + "6247f686-6f45-44cc-aea7-faf204ab57aa", "dcf99.af15d@35ec8.me", + "609a0f14-1750-4fc3-b810-2a2bc5aa82b8", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "0207ad80-e372-4338-82fd-0e22034921fc", null, + new Date(1610683993749L), new Date(1610683986705L)); assertTrue(account.isValid()); - Account accountInvalid = new Account("a4c32c29-adc4-42e7-8e64-73e306085b007553813c-fe98-4bf1-9aa6-e89f335741d701b3d662-7988-4a80-8d53-340226243bce", - "40b66661-86d1-4785-9cc7-d1fb88d560b143bf9629-ed5a-4697-bd8e-121a8e379c0233633d45-569c-4e34-b391-f930dfcdf9b4", - ">䱀>ꥊ蕟'>⢫)4鉌>\u0016숕嗣ꀑ泺/�申<�㕊<.痡舙ॆ�ⴲ�>>੦>꒗3->棯꼢镙㊀�\u0015깿晟>棱)텋镀奪쮂�믮>>ඟ芴࢒", - "89c43b1b-617f-4ad6-9b69-dc7b814b6014f7097937-88c3-4579-950a-af9e20e73aefa110e8fc-b1ca-4305-81ad-c0f300351745", - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - "7a1535f6-4910-49ef-8984-87222b432577", - "8375ad38-3f15-4bb0-a798-47e89b24bd2027549d09-b632-42cc-8373-e3ea0f342debb0ced269-6397-409c-9960-07f8e8d6d73b", - "40de4bfe-ed9c-431c-82f8-6f8fd060071e", null, + Account accountInvalid = new Account("7cdb8b7e-f31e-4227-a535-f72bb7fc39b6a2d4e99d-64f6-4f4e-a4e7-bad1dd8234da2ababcb0-d0c5-4a9c-bb92-fc00653f905d", + "771cac4a-3bc4-4386-bc5b-bc9e54e354b3e8d249e2-7dc7-4fbd-a8d1-eb4bea664d7fb9d7ae5d-f6ff-48ee-9901-700ef02066d3", + "ጲⳊ榋엫 쪞5摀%!ﻠ罆;>>₧橴ヒ1͢ޑ棸-3藡褅\u0013蜇▇鱃�?「!₥�� 蛰칹 +⸖ﰂ�4氂侉ッ椬楔ퟎ#>�:��!办�뎓", + "81c0a494-7bed-4a44-b0ad-6e75cd147441452bebe1-2490-4022-8edc-12afea69e9bfdc63544e-0650-47f4-8135-a561cfb8029f", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + "4b3595ad-5bd0-4f1f-940d-d686fdbeaf97", + "45374ea4-088d-463c-865f-578674b1bc02cce73fa0-dc2c-4fa9-9248-230410885cdeaab26f7b-5272-41fd-a613-d7b6b89c3f5d", + "eb41d49d-6030-47d2-aa73-f57f6ea08151", null, AccountBusinessModel.getDefault(), null, - "bbf83769-736c-4120-9e26-265f017afe8b9806afdb-d823-493e-8bf0-a60edb8bf70007f09e37-64eb-4923-a24c-6bf9fbaaae18", - "cbc50aaf-a2c9-4a9a-b7dc-41a188170c2a078ea658-7b65-42e7-b200-ae494e9a922d00319dcd-2ebc-424c-b6c4-c8cc768e2847", - "53f0c102-fb8a-42f9-aef7-d8da23cce1cb1c11c31d-49fc-42ad-9082-8e54e9b8d56e95d547a1-6bf0-4a75-9c31-e85e253f2e4d", - "485c14fb-e4cd-4c33-abe5-55e3f9c4c9d3", - "4e88657f-cbf0-44ca-b475-80c37b17cf57692abc9a-98ce-4d8d-bf61-34f4a71fd1aba6aceb64-f0ee-4b99-9f59-436b45ef6031", - new Date(1574704663311L), null, "a2a20b7a-26b4-4514-9ad3-3fd180d859c1", - "99559cbf-c002-45f9-96b1-b0338379c35244751581-cead-4033-ba5f-1929bd041752ef8f63f7-7e37-4a54-8e6e-8b0b59d74aec", - ">䱀>ꥊ蕟'>⢫)4鉌>\u0016숕嗣ꀑ泺/�申<�㕊<.痡舙ॆ�ⴲ�>>੦>꒗3->棯꼢镙㊀�\u0015깿晟>棱)텋镀奪쮂�믮>>ඟ芴࢒", - null, new Date(1574704663245L), 180 + 1, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", + "bdf297b9-f5b6-4c6c-9be2-03cbd31419c07e67a8c7-a7c6-4b0b-b1bc-39e8267ec0122a908c72-e54d-4ba6-bd12-d94dacd9604c", + "04a2379b-5221-4e66-87dc-6ad40b7a427f528d27f9-185f-48b9-a1e6-8f6d6c980517a990c409-bfe2-4873-9348-0c45d99740f5", + "2f12530b-d62e-4ae3-8dec-9da6f3c2a321e0bf755c-cd7a-4dab-b34c-04f8bfb9152ca0b21dca-a7c8-4b01-8a6c-a9576dc40716", + "08166780-b472-4144-b328-3a40118e851e", + "d1f9baa7-2d73-41ae-b871-96e2c6b90ee8e2c5670d-8c5d-401b-b232-2bcd28f4efc68336003f-203f-4f4b-907e-c3772764e648", + new Date(1610683990677L), null, "7de77d57-dd5e-4550-9c97-f44316ca79ad", + "f124544b-b062-488b-a7cc-707e474ca3797b3ec556-3356-4cde-8063-677d66e8228309ccf4e2-0714-40a5-af20-74359f69eb51", + "ጲⳊ榋엫 쪞5摀%!ﻠ罆;>>₧橴ヒ1͢ޑ棸-3藡褅\u0013蜇▇鱃�?「!₥�� 蛰칹 +⸖ﰂ�4氂侉ッ椬楔ퟎ#>�:��!办�뎓", + null, new Date(1610683990160L), 180 + 1, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", 120 + 1, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", new PasswordPolicy(), 45 + 1, - "baac64b2-7fcf-4a22-97a1-ff3f9bee3fcf1d06dd2f-b82a-4257-b0dc-88caac5dda9025a536db-abe1-4b42-ac73-769e2b080e54", + "b0f6666f-05f3-4138-b7e9-95529b65de16b45eb2ec-5469-44ab-9fc9-0bffba63e18f78ba3b65-8b85-4e1b-93f8-6e02d21e9dd2", null, - "9cdb1eef-4d35-4480-a04d-2f088a54e4a19c72277c-96e8-47e0-9b3d-9a4298d639491fbb9cd5-08ff-46ea-9814-cc8d7f044ccb", - "e873f5f7-9800-4116-8b31-fdefe7edf18c", - "03ab4226-73e4-4c39-a387-949ffc752c8a", - ">䱀>ꥊ蕟'>⢫)4鉌>\u0016숕嗣ꀑ泺/�申<�㕊<.痡舙ॆ�ⴲ�>>੦>꒗3->棯꼢镙㊀�\u0015깿晟>棱)텋镀奪쮂�믮>>ඟ芴࢒", - "45f88b4a-5f98-43e1-b32d-dee1a0903c6d8df25205-a42d-4983-a7d0-c730d5a9740d204f1670-2d61-4c2f-84e1-ce65596726a6", + "5aa63dbb-f180-4e28-9627-569883e4495c3ba79998-6cd3-4a0f-a3b9-3bdb93f56b348ced7981-1ae5-4322-ba14-8a55ec031680", + "ff61ab34-bd51-4a1d-8940-123bc8788172", + "52a315ad-5de8-4533-90df-494780ca5689", + "ጲⳊ榋엫 쪞5摀%!ﻠ罆;>>₧橴ヒ1͢ޑ棸-3藡褅\u0013蜇▇鱃�?「!₥�� 蛰칹 +⸖ﰂ�4氂侉ッ椬楔ퟎ#>�:��!办�뎓", + "093b6a4c-91a2-44c4-b6df-cc00077103c5cfe78803-4f07-483d-84fe-cd1db2c234c9df4ed4a1-f398-48be-b52c-0fad0dc47c3a", AccountStatus.getDefault(), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - "acba006d-58af-4dbf-8cc0-66d43b66d1e7", new Date(1574704663781L), - new Date(1574704666298L)); + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + "f44d95d0-3c30-4c69-9d61-e35b9e29bfe5", null, new Date(1610683992161L), + new Date(1610683988838L)); assertFalse(accountInvalid.isValid()); } @@ -195,81 +195,81 @@ null, new Date(1574704663245L), 180 + 1, @Test public void testEquals() { try { - Account account1 = new Account("3f4f1ca8-af16-48e2-9f95-b5f77f560cbe", - "9e5f4c6b-ec7c-4466-9610-4a5d11a96516", "033b9.2ccef@9b814.fr", - "bce9462b-28b2-4bd4-9706-04791381cb5b", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "2e314888-50e9-4f37-8f57-f2d7be73db6a", - "9f9c36e4-7932-4c87-9ca3-75e30cd4249b", - "fee778f4-4a09-45fb-a64c-cb3f9225dd20", null, + Account account1 = new Account("39fb89dc-ce19-4083-ae1f-fc90849a7afa", + "dab195bb-d7d7-40f0-9d02-a4b485f706f0", "28d39.0ae6c@d2e45.me", + "e378748f-c4c2-4ccb-8fc8-fd5564f201f7", "3b2c98a6b0d3341e5184f0f766dde798", + "6c8efab8-77a8-479a-a3b6-5c6c3c7e8fa3", + "a3533e9e-0f52-4a31-b1d9-677edf0c1801", + "11183bcc-7de6-4eec-a514-8f312ca64cec", null, AccountBusinessModel.getDefault(), null, - "51f80575-41ef-409c-9963-0b118f1324e9", - "ed4367f6-f11c-4943-aed9-56a001c967ac", - "b533fad9-2251-4f75-901e-4f258ec2eeca", - "98b7a7f2-0422-48f6-b651-9ccd3b94b28a", - "128532c9-b195-4d6b-9ca7-25c7f022e405", new Date(1574704667487L), null, - "a5bc12f3-364f-421d-aeaf-2b0acbbea469", - "3a7f6bcd-f77d-4e93-a9ed-fb956d85e466", "f1e9b.7b39c@7797e.me", - "fa73f87f-8556-4dd2-9c6e-4fb969013734", new Date(1574704664607L), 1, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 25, null, null, + "f0c46d9b-b40e-4309-8feb-a9066a4da14c", + "6a8aefa6-48b5-4d65-b22f-19f51b31a3ff", + "ddbbb46e-4032-4eba-852c-fc10ef9885c2", + "e85c9d94-b788-4a78-bd85-2b2c788c8750", + "e09d173d-0930-40ff-ae65-1dd9181fbb31", new Date(1610683990974L), null, + "5bac4435-9db6-4b59-8030-aa715f5d7fb2", + "dfb50ecd-7ecf-44c0-bbc5-006ee683f6fa", "410f9.40869@3de06.me", + "a2278867-bde2-4911-9674-b48a98b78bfc", new Date(1610683989791L), 1, + "3b2c98a6b0d3341e5184f0f766dde798", 60, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 45, - "b509d361-33b1-4dfb-a970-3a15f617e5f4", null, - "ca8fb7ea-4dcb-47e6-a0f5-43084969a420", - "fa9849c7-af56-43ea-baaf-79f2ea672d4f", - "516f512c-a54b-406f-b451-7252bbda8c65", "f460e.56f88@17c3a.fr", - "9b72ade7-c5c6-4dcd-b3e9-91107cbda02e", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "3a8017cc-84d3-49eb-93e0-233b9407eaeb", - new Date(1574704659815L), new Date(1574704660769L)); - Account account2 = new Account("3f4f1ca8-af16-48e2-9f95-b5f77f560cbe", - "9e5f4c6b-ec7c-4466-9610-4a5d11a96516", "033b9.2ccef@9b814.fr", - "bce9462b-28b2-4bd4-9706-04791381cb5b", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "2e314888-50e9-4f37-8f57-f2d7be73db6a", - "9f9c36e4-7932-4c87-9ca3-75e30cd4249b", - "fee778f4-4a09-45fb-a64c-cb3f9225dd20", null, + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 45, + "710596ab-6bfb-46fa-9047-1c266615d7dd", null, + "71e4ab8f-36a4-412e-9e48-5cc7777a9ae2", + "ed235a0a-5e30-4d31-81f2-412ab38f3fc7", + "8c524289-753e-4e86-a887-667fc9e0e771", "5c4c8.620bd@4fa04.fr", + "24d8e3a2-016b-40c8-b623-88abe4af8867", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "b598247f-95e6-4d27-ac03-dc4642f16f97", + null, new Date(1610683988022L), new Date(1610683988853L)); + Account account2 = new Account("39fb89dc-ce19-4083-ae1f-fc90849a7afa", + "dab195bb-d7d7-40f0-9d02-a4b485f706f0", "28d39.0ae6c@d2e45.me", + "e378748f-c4c2-4ccb-8fc8-fd5564f201f7", "3b2c98a6b0d3341e5184f0f766dde798", + "6c8efab8-77a8-479a-a3b6-5c6c3c7e8fa3", + "a3533e9e-0f52-4a31-b1d9-677edf0c1801", + "11183bcc-7de6-4eec-a514-8f312ca64cec", null, AccountBusinessModel.getDefault(), null, - "51f80575-41ef-409c-9963-0b118f1324e9", - "ed4367f6-f11c-4943-aed9-56a001c967ac", - "b533fad9-2251-4f75-901e-4f258ec2eeca", - "98b7a7f2-0422-48f6-b651-9ccd3b94b28a", - "128532c9-b195-4d6b-9ca7-25c7f022e405", new Date(1574704667487L), null, - "a5bc12f3-364f-421d-aeaf-2b0acbbea469", - "3a7f6bcd-f77d-4e93-a9ed-fb956d85e466", "f1e9b.7b39c@7797e.me", - "fa73f87f-8556-4dd2-9c6e-4fb969013734", new Date(1574704664607L), 1, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 25, null, null, + "f0c46d9b-b40e-4309-8feb-a9066a4da14c", + "6a8aefa6-48b5-4d65-b22f-19f51b31a3ff", + "ddbbb46e-4032-4eba-852c-fc10ef9885c2", + "e85c9d94-b788-4a78-bd85-2b2c788c8750", + "e09d173d-0930-40ff-ae65-1dd9181fbb31", new Date(1610683990974L), null, + "5bac4435-9db6-4b59-8030-aa715f5d7fb2", + "dfb50ecd-7ecf-44c0-bbc5-006ee683f6fa", "410f9.40869@3de06.me", + "a2278867-bde2-4911-9674-b48a98b78bfc", new Date(1610683989791L), 1, + "3b2c98a6b0d3341e5184f0f766dde798", 60, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 45, - "b509d361-33b1-4dfb-a970-3a15f617e5f4", null, - "ca8fb7ea-4dcb-47e6-a0f5-43084969a420", - "fa9849c7-af56-43ea-baaf-79f2ea672d4f", - "516f512c-a54b-406f-b451-7252bbda8c65", "f460e.56f88@17c3a.fr", - "9b72ade7-c5c6-4dcd-b3e9-91107cbda02e", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "3a8017cc-84d3-49eb-93e0-233b9407eaeb", - new Date(1574704659815L), new Date(1574704660769L)); - Account account3 = new Account("f37f3862-f6f2-45f3-a525-509cb751c1bb", - "7d1ef137-0d2e-4c4f-96fa-06d45d185c39", "7d27b.b8f1b@40bb2.me", - "55bdd41c-b4dd-4720-b4f4-0783542915bc", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "9c1b5418-9486-4147-a49a-c87cd17e26b9", - "05804181-ff98-4bd7-9262-aed3bd59cad5", - "fbe64381-7f6b-4598-9edd-99a4aa8db532", null, + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 45, + "710596ab-6bfb-46fa-9047-1c266615d7dd", null, + "71e4ab8f-36a4-412e-9e48-5cc7777a9ae2", + "ed235a0a-5e30-4d31-81f2-412ab38f3fc7", + "8c524289-753e-4e86-a887-667fc9e0e771", "5c4c8.620bd@4fa04.fr", + "24d8e3a2-016b-40c8-b623-88abe4af8867", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "b598247f-95e6-4d27-ac03-dc4642f16f97", + null, new Date(1610683988022L), new Date(1610683988853L)); + Account account3 = new Account("0bccd4fa-aacd-497b-98a2-1bd75289572a", + "7297da29-db4a-4081-a4c2-53a119068838", "9fc21.946a6@28362.fr", + "cc84690f-9434-4f5c-bbf0-e2b311ee8de6", "3b2c98a6b0d3341e5184f0f766dde798", + "63c1a01b-eb7d-4192-849d-f50b8d033776", + "84cd27f6-7173-4569-8ec9-19c9c2d4a43a", + "e0e69347-60d0-4688-a472-0d66e92759d9", null, AccountBusinessModel.getDefault(), null, - "17a94ecd-88ba-4b90-93ec-38d725d8dd33", - "58543b69-f300-4f60-bf8a-cf3700aeb1df", - "094fe912-469f-47c8-88b3-62f5ab647077", - "7bc0764c-5c21-46c1-a87a-10b80cbe44fa", - "f456ce08-0f4c-4147-832c-7f048c9202f3", new Date(1574704665954L), null, - "bb762787-30de-464e-8d7b-4a606cb15a9e", - "196a8692-5389-4ea7-93e6-7d3613de42ab", "df738.edb1b@3dc46.me", - "ff39581f-a8ad-4559-83ac-b67c70d3fbb5", new Date(1574704669308L), 64, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", 1, null, null, + "b8fd579a-b9a6-4b65-96ab-dbff1f657cf5", + "d978fbc4-3a54-412b-bf17-47edf290957c", + "3d2d7306-20fd-42f1-83fe-f0a1cc08d896", + "210f8860-7735-4ec4-a5a5-b7898ea174a7", + "3886297b-294b-4af0-b5fc-252d99407137", new Date(1610683987884L), null, + "2ae0b613-4d94-4cec-a7e1-b2ce0abbbb77", + "4f25749e-5ab5-4e7a-aeb9-2b2661c4dcf1", "d81cd.f3db4@137be.fr", + "16a936f2-cbb7-4619-9c8d-4e4b4fe0764a", new Date(1610683990202L), 76, + "3b2c98a6b0d3341e5184f0f766dde798", 3, null, null, AccountMfaStatus.getDefault(), null, new ParentAccount(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", new PasswordPolicy(), 1, - "e93d699e-2e1f-4ae5-a41e-44082c7ca43d", null, - "08f0d385-2a9e-4bd8-bac7-5fde50ca43ae", - "468cce8e-66d5-4a75-86ec-e9ea68e613ba", - "3a00874e-e755-44e1-8826-fcc0032cb51a", "5929c.ad603@b6cf7.fr", - "76222183-2ef5-4ca4-aa31-a4651fa7d632", AccountStatus.getDefault(), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "fca1c231-5b61-4f66-9700-9f1bb7aeefea", - new Date(1574704669337L), new Date(1574704661990L)); + "3b2c98a6b0d3341e5184f0f766dde798", new PasswordPolicy(), 13, + "7c6d7cc2-f9f0-4749-b6a9-827a41497ff1", null, + "ebc74723-284a-41b5-9c68-1c7e90d10283", + "e5b889f1-a935-468f-b42e-53216d0065fb", + "a1a354a4-a156-414d-a2d0-28e50c1fefd0", "ff179.5284a@aa865.me", + "0db94864-d784-4398-ac19-a853197023dd", AccountStatus.getDefault(), + "3b2c98a6b0d3341e5184f0f766dde798", "635ddd3c-d024-4d82-b2c6-4c5b44103a43", + null, new Date(1610683985063L), new Date(1610683986996L)); assertNotNull(account1); assertNotNull(account2); assertNotNull(account3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountBusinessModel.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountBusinessModel.java index bf90482d4..86734c818 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountBusinessModel.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountBusinessModel.java @@ -30,7 +30,7 @@ public void testGetValue() { accountbusinessmodel = AccountBusinessModel.getValue("api_calls_1_business_model"); assertNotNull(accountbusinessmodel); assertFalse(accountbusinessmodel.isDefault()); - accountbusinessmodel = AccountBusinessModel.getValue("7e56caf8-079d-41b1-bfe9-3971ec442ef2"); + accountbusinessmodel = AccountBusinessModel.getValue("a69ebec2-3006-4c3f-8b02-c4ed36ebe0fb"); assertNotNull(accountbusinessmodel); assertTrue(accountbusinessmodel.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitation.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitation.java new file mode 100644 index 000000000..afb8e06bf --- /dev/null +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitation.java @@ -0,0 +1,139 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated unit test class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import static org.junit.Assert.*; + +import java.util.Date; +import org.junit.Test; + +/** + * Unit tests for Model AccountLimitation. + */ +@SuppressWarnings("PMD.AvoidDuplicateLiterals") +public class TestAccountLimitation { + /** + * Tests the clone method. + */ + @SuppressWarnings("resource") + @Test + public void testClone() { + try { + AccountLimitation accountlimitation1 = new AccountLimitation(19, new Date(1610683988592L), + "a06a2388-4e7b-4316-95cf-d6001c5c5bb1", + "d19fc44c-097f-4f7d-b790-4d893e739cd8", false, + "bc11250e-25f5-4b7a-89b9-be5dd57cc587", + AccountLimitationInheritedType.getDefault(), + null, -70, + "76ca5d87-98bf-40ea-b92c-2d4875e0d83e", -39, + new Date(1610683988062L)); + AccountLimitation accountlimitation2 = accountlimitation1.clone(); + assertNotNull(accountlimitation1); + assertNotNull(accountlimitation2); + assertNotSame(accountlimitation2, accountlimitation1); + assertEquals(accountlimitation2, accountlimitation1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the hashCode method. + */ + @SuppressWarnings("resource") + @Test + public void testHashCode() { + try { + AccountLimitation accountlimitation1 = new AccountLimitation(1, new Date(1610683988416L), + "fdd7a8ec-c0d5-4385-be32-58a554fa75de", + "059ec682-922b-465f-9a99-2fb3ffe67212", false, + "efefd919-0446-4544-b0f0-67faee0bf993", + AccountLimitationInheritedType.getDefault(), + null, 72, + "70d6e3ed-7b9b-459f-b1a4-ffbb61c4e6da", -29, + new Date(1610683992189L)); + AccountLimitation accountlimitation2 = new AccountLimitation(1, new Date(1610683988416L), + "fdd7a8ec-c0d5-4385-be32-58a554fa75de", + "059ec682-922b-465f-9a99-2fb3ffe67212", false, + "efefd919-0446-4544-b0f0-67faee0bf993", + AccountLimitationInheritedType.getDefault(), + null, 72, + "70d6e3ed-7b9b-459f-b1a4-ffbb61c4e6da", -29, + new Date(1610683992189L)); + assertNotNull(accountlimitation1); + assertNotNull(accountlimitation2); + assertNotSame(accountlimitation2, accountlimitation1); + assertEquals(accountlimitation2, accountlimitation1); + assertEquals(accountlimitation2.hashCode(), accountlimitation1.hashCode()); + int hashCode = accountlimitation1.hashCode(); + for (int i = 0; i < 5; i++) { + assertEquals(hashCode, accountlimitation1.hashCode()); + } + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the isValid method. + */ + @SuppressWarnings("resource") + @Test + public void testIsValid() { + AccountLimitation accountlimitation = new AccountLimitation(1, new Date(1610683990317L), + "1e970c5b-9b08-4d1b-b23f-41cdca1c4e62", + "c4fba79a-5751-44ce-8d71-3eb197f6e3dd", false, + "a4d65e61-1f6d-4c7e-99d0-970b0c6f9764", + AccountLimitationInheritedType.getDefault(), null, + -128, "aa2f5064-5b1f-4937-8793-900e11eedd38", -71, + new Date(1610683991174L)); + assertTrue(accountlimitation.isValid()); + } + + /** + * Tests the equals method. + */ + @SuppressWarnings("resource") + @Test + public void testEquals() { + try { + AccountLimitation accountlimitation1 = new AccountLimitation(1, new Date(1610683993013L), + "ff455af8-3e86-4fcd-80c1-73eaa17cfbe4", + "2a838acb-dc78-441a-994b-680c7ea5f410", false, + "7ff5db07-626f-42a7-b863-91e2a621da18", + AccountLimitationInheritedType.getDefault(), + null, -39, + "addc502a-b347-4bcb-8f07-97f2625db185", 116, + new Date(1610683987187L)); + AccountLimitation accountlimitation2 = new AccountLimitation(1, new Date(1610683993013L), + "ff455af8-3e86-4fcd-80c1-73eaa17cfbe4", + "2a838acb-dc78-441a-994b-680c7ea5f410", false, + "7ff5db07-626f-42a7-b863-91e2a621da18", + AccountLimitationInheritedType.getDefault(), + null, -39, + "addc502a-b347-4bcb-8f07-97f2625db185", 116, + new Date(1610683987187L)); + AccountLimitation accountlimitation3 = new AccountLimitation(72, new Date(1610683991929L), + "8d85ae24-b8c9-48cc-a1af-ea371924cac4", + "a033b28d-4fdc-48bb-a3d8-862a1e49b43e", false, + "02149934-1166-4b2f-9827-7b3f9ad8243d", + AccountLimitationInheritedType.getDefault(), + null, 31, + "116996f0-7518-48f3-ba21-f20253ab10ad", 62, + new Date(1610683990941L)); + assertNotNull(accountlimitation1); + assertNotNull(accountlimitation2); + assertNotNull(accountlimitation3); + assertNotSame(accountlimitation2, accountlimitation1); + assertNotSame(accountlimitation3, accountlimitation1); + assertEquals(accountlimitation2, accountlimitation1); + assertEquals(accountlimitation2, accountlimitation1); + assertEquals(accountlimitation1, accountlimitation2); + assertEquals(accountlimitation1, accountlimitation1); + assertFalse(accountlimitation1.equals(null)); + assertNotEquals(accountlimitation3, accountlimitation1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } +} diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitationInheritedType.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitationInheritedType.java new file mode 100644 index 000000000..570e2340c --- /dev/null +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountLimitationInheritedType.java @@ -0,0 +1,41 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated unit test class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import static org.junit.Assert.*; + +import org.junit.Test; + +/** + * Unit tests for Model AccountLimitationInheritedType. + */ +@SuppressWarnings("PMD.AvoidDuplicateLiterals") +public class TestAccountLimitationInheritedType { + /** + * Tests the getValue method. + */ + @SuppressWarnings("resource") + @Test + public void testGetValue() { + try { + AccountLimitationInheritedType accountlimitationinheritedtype = AccountLimitationInheritedType.getValue(null); + assertNotNull(accountlimitationinheritedtype); + assertTrue(accountlimitationinheritedtype.isDefault()); + accountlimitationinheritedtype = AccountLimitationInheritedType.getValue(AccountLimitationInheritedType.getDefault() + .getString()); + assertNotNull(accountlimitationinheritedtype); + assertTrue(accountlimitationinheritedtype.isDefault()); + accountlimitationinheritedtype = AccountLimitationInheritedType.getValue("ACCOUNT"); + assertNotNull(accountlimitationinheritedtype); + assertTrue(accountlimitationinheritedtype.isDefault()); + accountlimitationinheritedtype = AccountLimitationInheritedType.getValue("template"); + assertNotNull(accountlimitationinheritedtype); + assertFalse(accountlimitationinheritedtype.isDefault()); + accountlimitationinheritedtype = AccountLimitationInheritedType.getValue("6f35ad4d-f861-4d02-91bd-5a60b90bb856"); + assertNotNull(accountlimitationinheritedtype); + assertTrue(accountlimitationinheritedtype.isDefault()); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } +} diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountMfaStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountMfaStatus.java index d80a01f6c..5d13675d8 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountMfaStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountMfaStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { accountmfastatus = AccountMfaStatus.getValue("optional"); assertNotNull(accountmfastatus); assertFalse(accountmfastatus.isDefault()); - accountmfastatus = AccountMfaStatus.getValue("fa654b8d-7461-4d66-b21a-d5d4a2a1d150"); + accountmfastatus = AccountMfaStatus.getValue("2abce1be-6f9b-4c50-b42c-b4f58fbea1ad"); assertNotNull(accountmfastatus); assertTrue(accountmfastatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountStatus.java index b754f891a..f27b666e2 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestAccountStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { accountstatus = AccountStatus.getValue("ENROLLING"); assertNotNull(accountstatus); assertFalse(accountstatus.isDefault()); - accountstatus = AccountStatus.getValue("5e934e2e-6b8c-43e8-a5d4-9f1593f070b7"); + accountstatus = AccountStatus.getValue("f3451da6-529b-4341-bc60-a678792f8024"); assertNotNull(accountstatus); assertTrue(accountstatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestActiveSession.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestActiveSession.java index 744d119d9..d773e4171 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestActiveSession.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestActiveSession.java @@ -19,12 +19,12 @@ public class TestActiveSession { @Test public void testClone() { try { - ActiveSession activesession1 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704667834L), - "836f16bb-c778-47f8-b818-3ef8a09c41c8", - new Date(1574704662873L), - "19e68c56-1a4e-4869-83a6-a1984412dd33", - "4cad5c80-2aca-4e72-987c-5dde4df99774"); + ActiveSession activesession1 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683986409L), + "d68d8c47-4067-4ff5-811b-f095a1a4ddef", + new Date(1610683989563L), + "8c8e5b80-fcda-43bb-a1cc-02fd4e79825f", + "df55ccbc-5162-4611-9497-9da77479edb0"); ActiveSession activesession2 = activesession1.clone(); assertNotNull(activesession1); assertNotNull(activesession2); @@ -42,18 +42,18 @@ public void testClone() { @Test public void testHashCode() { try { - ActiveSession activesession1 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666002L), - "9bb1a698-7238-4a30-bd12-1e642b32db0a", - new Date(1574704669440L), - "8068ce1c-ed01-4489-8224-7c5f46dcd384", - "9462f14e-1963-4303-8a94-82bd251ba80d"); - ActiveSession activesession2 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666002L), - "9bb1a698-7238-4a30-bd12-1e642b32db0a", - new Date(1574704669440L), - "8068ce1c-ed01-4489-8224-7c5f46dcd384", - "9462f14e-1963-4303-8a94-82bd251ba80d"); + ActiveSession activesession1 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683993392L), + "efd25a42-5eb8-413d-a994-1612e5acb43d", + new Date(1610683994169L), + "80ee6fef-4236-4e90-ae2a-af0440aaea21", + "eea10221-4692-4cee-8245-d56c5179f36d"); + ActiveSession activesession2 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683993392L), + "efd25a42-5eb8-413d-a994-1612e5acb43d", + new Date(1610683994169L), + "80ee6fef-4236-4e90-ae2a-af0440aaea21", + "eea10221-4692-4cee-8245-d56c5179f36d"); assertNotNull(activesession1); assertNotNull(activesession2); assertNotSame(activesession2, activesession1); @@ -74,11 +74,11 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - ActiveSession activesession = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704663318L), - "ddf8d6e7-304b-4bc9-8f35-541090e9bb4a", - new Date(1574704663001L), - "eb11f938-0339-4ecb-826e-18218963162d", - "ee01993f-bd72-4ca8-8535-4bfaaface96a"); + ActiveSession activesession = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683987420L), + "d7b261e8-068f-49e0-9229-a3b48cfcf5c1", + new Date(1610683987451L), + "322c0c85-3e80-4cd7-8827-7a4921e2198c", + "02879c4a-70db-4c8d-97e2-70e1b5c878e0"); assertTrue(activesession.isValid()); } @@ -89,24 +89,24 @@ public void testIsValid() { @Test public void testEquals() { try { - ActiveSession activesession1 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704669795L), - "25b3071d-0b94-4759-8d4b-fe34a2e5753d", - new Date(1574704661645L), - "4bf4c2d4-a2a6-4999-ae4f-cdaba81f3f3d", - "3087c447-0a2f-4903-b64f-1ebca6359edc"); - ActiveSession activesession2 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704669795L), - "25b3071d-0b94-4759-8d4b-fe34a2e5753d", - new Date(1574704661645L), - "4bf4c2d4-a2a6-4999-ae4f-cdaba81f3f3d", - "3087c447-0a2f-4903-b64f-1ebca6359edc"); - ActiveSession activesession3 = new ActiveSession("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704668256L), - "fd0541a8-e6c6-41c0-9771-50447b5c3e00", - new Date(1574704660211L), - "4059c42d-2e92-4ac4-ae90-0c1a15e8d0e2", - "73a00e46-3eb2-418c-9a47-df9505179d3b"); + ActiveSession activesession1 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683986294L), + "e33cdc48-3830-4759-92dc-935f531f028c", + new Date(1610683990019L), + "3349362c-9f7c-4a85-9fb5-9066c7b1532f", + "cb99de9a-eb3a-4cbe-9be6-e04ec48da386"); + ActiveSession activesession2 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683986294L), + "e33cdc48-3830-4759-92dc-935f531f028c", + new Date(1610683990019L), + "3349362c-9f7c-4a85-9fb5-9066c7b1532f", + "cb99de9a-eb3a-4cbe-9be6-e04ec48da386"); + ActiveSession activesession3 = new ActiveSession("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683993266L), + "2a5b498d-76ee-4682-a98b-e8df7c8f64e0", + new Date(1610683993126L), + "845c561b-ddab-41c7-918e-60f786c6f7b9", + "8711f27b-4b67-4d71-b5db-0626a6533f07"); assertNotNull(activesession1); assertNotNull(activesession2); assertNotNull(activesession3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKey.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKey.java index c37065063..9dbdf5de3 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKey.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKey.java @@ -19,10 +19,10 @@ public class TestApiKey { @Test public void testClone() { try { - ApiKey apikey1 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704664145L), 38, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "dd051f05-822a-4d1c-8991-b04ea2f9e38a", -43, - "1f5c1687-e10a-46e9-b1db-0e297994cb98", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - ApiKeyStatus.getDefault(), new Date(1574704664795L)); + ApiKey apikey1 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683989613L), -64, null, + "3b2c98a6b0d3341e5184f0f766dde798", "11b44b65-9b40-4b7c-a159-34e3111d8824", 83, + "46504163-e023-44a4-bf35-22cf7a294db2", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683993060L)); ApiKey apikey2 = apikey1.clone(); assertNotNull(apikey1); assertNotNull(apikey2); @@ -40,14 +40,14 @@ public void testClone() { @Test public void testHashCode() { try { - ApiKey apikey1 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704662523L), -73, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "a86c1975-e3fd-48fb-8b9c-4719ad1e2918", -63, - "84d54496-a5ee-4d10-9880-ca6933296cdb", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - ApiKeyStatus.getDefault(), new Date(1574704661388L)); - ApiKey apikey2 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704662523L), -73, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "a86c1975-e3fd-48fb-8b9c-4719ad1e2918", -63, - "84d54496-a5ee-4d10-9880-ca6933296cdb", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - ApiKeyStatus.getDefault(), new Date(1574704661388L)); + ApiKey apikey1 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683989985L), 115, null, + "3b2c98a6b0d3341e5184f0f766dde798", "113e3047-b753-4b5c-b87e-a87ee20e44d3", 54, + "29756c9e-9f4d-4a8d-a2e8-2faae777daee", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683993159L)); + ApiKey apikey2 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683989985L), 115, null, + "3b2c98a6b0d3341e5184f0f766dde798", "113e3047-b753-4b5c-b87e-a87ee20e44d3", 54, + "29756c9e-9f4d-4a8d-a2e8-2faae777daee", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683993159L)); assertNotNull(apikey1); assertNotNull(apikey2); assertNotSame(apikey2, apikey1); @@ -68,17 +68,17 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - ApiKey apikey = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704668781L), -127, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "ed3465eb-7d83-4dce-a95b-193c0daa9848", 5, - "8c3e2231-a281-4722-b62f-cba99ce308d5", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - ApiKeyStatus.getDefault(), new Date(1574704663800L)); + ApiKey apikey = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683992861L), -17, null, + "3b2c98a6b0d3341e5184f0f766dde798", "2f5bfefa-2900-49d3-9f40-1dda7d362dde", -46, + "0e635f0b-30a6-47e5-8e07-e42b58676ef0", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683987458L)); assertTrue(apikey.isValid()); - ApiKey apikeyInvalid = new ApiKey("8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - new Date(1574704663320L), -2, null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - "5c702605-9428-4e4d-a377-dcdedaa6a4dd", 124, null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - ApiKeyStatus.getDefault(), new Date(1574704661775L)); + ApiKey apikeyInvalid = new ApiKey("\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + new Date(1610683986604L), -47, null, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + "788f151b-1152-434a-aad8-dd6ba4e056dc", 44, null, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + ApiKeyStatus.getDefault(), new Date(1610683988271L)); assertFalse(apikeyInvalid.isValid()); } @@ -89,20 +89,18 @@ public void testIsValid() { @Test public void testEquals() { try { - ApiKey apikey1 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704662194L), -24, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "38ad5642-06ce-42d0-a539-b0f5e0e38ced", - -114, "da689df6-f0b4-4d53-a86a-1bf4f6924873", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", ApiKeyStatus.getDefault(), - new Date(1574704667038L)); - ApiKey apikey2 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704662194L), -24, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "38ad5642-06ce-42d0-a539-b0f5e0e38ced", - -114, "da689df6-f0b4-4d53-a86a-1bf4f6924873", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", ApiKeyStatus.getDefault(), - new Date(1574704667038L)); - ApiKey apikey3 = new ApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704669198L), -100, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", "ac8b9254-49ac-4e97-a2f8-b932a9d28cc3", 17, - "5dd99074-8599-4fb0-a390-08c542f5358e", "4f267f967f7d1f5e3fa0d6abaccdb4bf", - ApiKeyStatus.getDefault(), new Date(1574704669077L)); + ApiKey apikey1 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683991289L), -43, null, + "3b2c98a6b0d3341e5184f0f766dde798", "70bbb5f8-e45a-4d02-a158-73a8da912e15", -92, + "722ef426-618f-4e76-a9ca-8b7f4d02aad7", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683989660L)); + ApiKey apikey2 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683991289L), -43, null, + "3b2c98a6b0d3341e5184f0f766dde798", "70bbb5f8-e45a-4d02-a158-73a8da912e15", -92, + "722ef426-618f-4e76-a9ca-8b7f4d02aad7", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683989660L)); + ApiKey apikey3 = new ApiKey("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683992223L), -113, null, + "3b2c98a6b0d3341e5184f0f766dde798", "4b96c1db-8511-4175-ae6e-caa89ab1074a", 116, + "dc213917-ff0e-4951-8312-eb93349b82c9", "3b2c98a6b0d3341e5184f0f766dde798", + ApiKeyStatus.getDefault(), new Date(1610683993461L)); assertNotNull(apikey1); assertNotNull(apikey2); assertNotNull(apikey3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyStatus.java index 68fa30f48..dba464bb4 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestApiKeyStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { apikeystatus = ApiKeyStatus.getValue("INACTIVE"); assertNotNull(apikeystatus); assertFalse(apikeystatus.isDefault()); - apikeystatus = ApiKeyStatus.getValue("e1e1ed19-ff05-4aa2-bbdd-23e1da6ffeea"); + apikeystatus = ApiKeyStatus.getValue("bdfd6a54-71e5-4e38-b588-76de5985fbd9"); assertNotNull(apikeystatus); assertTrue(apikeystatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestBusinessModelHistory.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestBusinessModelHistory.java new file mode 100644 index 000000000..fffd9fbd8 --- /dev/null +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestBusinessModelHistory.java @@ -0,0 +1,98 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated unit test class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import static org.junit.Assert.*; + +import java.util.Date; +import org.junit.Test; + +/** + * Unit tests for Model BusinessModelHistory. + */ +@SuppressWarnings("PMD.AvoidDuplicateLiterals") +public class TestBusinessModelHistory { + /** + * Tests the clone method. + */ + @SuppressWarnings("resource") + @Test + public void testClone() { + try { + BusinessModelHistory businessmodelhistory1 = new BusinessModelHistory("05b4843c-3f18-4499-beff-be91e2a21183", + new Date(1610683985565L)); + BusinessModelHistory businessmodelhistory2 = businessmodelhistory1.clone(); + assertNotNull(businessmodelhistory1); + assertNotNull(businessmodelhistory2); + assertNotSame(businessmodelhistory2, businessmodelhistory1); + assertEquals(businessmodelhistory2, businessmodelhistory1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the hashCode method. + */ + @SuppressWarnings("resource") + @Test + public void testHashCode() { + try { + BusinessModelHistory businessmodelhistory1 = new BusinessModelHistory("bbaf3afb-05b5-4ec2-9590-5ab692fec7d9", + new Date(1610683985416L)); + BusinessModelHistory businessmodelhistory2 = new BusinessModelHistory("bbaf3afb-05b5-4ec2-9590-5ab692fec7d9", + new Date(1610683985416L)); + assertNotNull(businessmodelhistory1); + assertNotNull(businessmodelhistory2); + assertNotSame(businessmodelhistory2, businessmodelhistory1); + assertEquals(businessmodelhistory2, businessmodelhistory1); + assertEquals(businessmodelhistory2.hashCode(), businessmodelhistory1.hashCode()); + int hashCode = businessmodelhistory1.hashCode(); + for (int i = 0; i < 5; i++) { + assertEquals(hashCode, businessmodelhistory1.hashCode()); + } + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the isValid method. + */ + @SuppressWarnings("resource") + @Test + public void testIsValid() { + BusinessModelHistory businessmodelhistory = new BusinessModelHistory("b6807d39-6457-4246-8b3c-56ec022bdc1a", + new Date(1610683991128L)); + assertTrue(businessmodelhistory.isValid()); + } + + /** + * Tests the equals method. + */ + @SuppressWarnings("resource") + @Test + public void testEquals() { + try { + BusinessModelHistory businessmodelhistory1 = new BusinessModelHistory("9f6c1207-45cc-480c-8357-b8119168a4ef", + new Date(1610683993633L)); + BusinessModelHistory businessmodelhistory2 = new BusinessModelHistory("9f6c1207-45cc-480c-8357-b8119168a4ef", + new Date(1610683993633L)); + BusinessModelHistory businessmodelhistory3 = new BusinessModelHistory("9fe022af-b559-4006-8743-f2290fb8534d", + new Date(1610683987752L)); + assertNotNull(businessmodelhistory1); + assertNotNull(businessmodelhistory2); + assertNotNull(businessmodelhistory3); + assertNotSame(businessmodelhistory2, businessmodelhistory1); + assertNotSame(businessmodelhistory3, businessmodelhistory1); + assertEquals(businessmodelhistory2, businessmodelhistory1); + assertEquals(businessmodelhistory2, businessmodelhistory1); + assertEquals(businessmodelhistory1, businessmodelhistory2); + assertEquals(businessmodelhistory1, businessmodelhistory1); + assertFalse(businessmodelhistory1.equals(null)); + assertNotEquals(businessmodelhistory3, businessmodelhistory1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } +} diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProvider.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProvider.java index df1acf273..bd22efb3f 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProvider.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProvider.java @@ -19,14 +19,15 @@ public class TestIdentityProvider { @Test public void testClone() { try { - IdentityProvider identityprovider1 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662460L), - "c68bc645-f9b9-4fe2-adcc-875f264cb31b", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - IdentityProviderType.getDefault(), true, - "a0557d65-1b87-4515-bd90-dd0a4a514f75", null, + IdentityProvider identityprovider1 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683991680L), + "e33650b5-4100-42c8-bf55-5eaadb61a070", + "3b2c98a6b0d3341e5184f0f766dde798", + IdentityProviderType.getDefault(), false, + "089500b5-ec26-4bda-a215-61b7b1e9ab35", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704665151L)); + new Date(1610683991607L)); IdentityProvider identityprovider2 = identityprovider1.clone(); assertNotNull(identityprovider1); assertNotNull(identityprovider2); @@ -44,22 +45,24 @@ public void testClone() { @Test public void testHashCode() { try { - IdentityProvider identityprovider1 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704670047L), - "dee1e9ea-5e94-4495-9993-560ab81646f4", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + IdentityProvider identityprovider1 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987208L), + "c1cc198d-f5e5-45bd-84ce-0b3fff93eb49", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), true, - "05c97109-f3d9-4c5a-be23-b8003e1f11d6", null, + "c375bfb0-6d42-4c15-8f45-c31ab68b7bb1", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704670086L)); - IdentityProvider identityprovider2 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704670047L), - "dee1e9ea-5e94-4495-9993-560ab81646f4", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683988559L)); + IdentityProvider identityprovider2 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987208L), + "c1cc198d-f5e5-45bd-84ce-0b3fff93eb49", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), true, - "05c97109-f3d9-4c5a-be23-b8003e1f11d6", null, + "c375bfb0-6d42-4c15-8f45-c31ab68b7bb1", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704670086L)); + new Date(1610683988559L)); assertNotNull(identityprovider1); assertNotNull(identityprovider2); assertNotSame(identityprovider2, identityprovider1); @@ -80,22 +83,23 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - IdentityProvider identityprovider = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661609L), - "dbf91603-caee-43dd-82a4-02c7a2f4a589", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + IdentityProvider identityprovider = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987325L), + "b0219c14-d678-4682-84de-61f1eecbb3ce", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), true, - "0f55bd53-ce95-44d8-b3be-c71ab2747f38", null, + "a6b69a68-e049-4e2a-97db-8f28b9bf9c05", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704668016L)); + new Date(1610683994059L)); assertTrue(identityprovider.isValid()); - IdentityProvider identityproviderInvalid = new IdentityProvider("8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - new Date(1574704668800L), - "0609be55-5ee8-49af-8e08-dc4cf564d79547a13095-4915-42c3-8723-2923a583b0d701e44bb8-e3f4-42e9-a3aa-e8c48c1c15c8c9855d53-20a7-4946-bfa2-1eed17262e9858b964a6-44f1-4377-a6a2-aabc8715790a1ce5c56c-1715-4ce7-b9c8-8ca7269e24b65f87a0e2-6c8b-42af-b70e-1f8a133ca22ac7ce489b-acb5-4d56-993f-e36ceb9381b8ebee7048-508b-493f-b8de-6d2d68c3670bbaceb0c0-a0e5-4fd7-a376-10166beca6a95ab28dbd-6b7a-484e-bfd0-827e344f62f70ce493c3-52f1-49fc-95fa-935b4f689a5063745d56-5713-4eda-8f83-135f0659de8b204d1884-1514-4542-a5bf-36c6f23bd311", - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - null, true, null, null, + IdentityProvider identityproviderInvalid = new IdentityProvider("\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + new Date(1610683986063L), + "f560af8b-7a25-42f1-b121-2579f055ddb85b9427a6-7bce-4287-a4e9-36132de9ed501c32f2df-f6f8-4c05-a288-0a8ce73ebad05fd215aa-de0a-4968-8caa-b8f7215bbbcbbd2116de-028a-4042-bdb8-1da9aaf7ecf248fa8283-110f-4196-a849-93e95582d25caea24444-4661-497c-af7c-e39ff01116e6218eff79-80dc-4ffe-aad0-ebd705d1727618b1def1-cbd1-4877-a3c1-d9da25926aa0d82ab97b-845a-4c1d-a7a7-41a456da2f70e9f45612-916d-4e0d-aa92-b0b0ad84ff7bc08af02f-795f-4ad0-96a5-1c144657a245fcd15683-4457-414b-b882-dd30ed34e302f023b232-616d-4ca4-8f91-fb79e3a21d8e", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + null, false, null, new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704668537L)); + new Date(1610683994480L)); assertFalse(identityproviderInvalid.isValid()); } @@ -106,30 +110,33 @@ public void testIsValid() { @Test public void testEquals() { try { - IdentityProvider identityprovider1 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662562L), - "2eb18fe9-56fe-4591-b333-5867fc2c35fb", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + IdentityProvider identityprovider1 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683990853L), + "780844e2-e76b-4bc6-927b-6c0c8b67dea6", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), false, - "7a301106-a9ad-413e-bfeb-d7d3b078e5ef", null, + "b3ea330b-c302-42c8-8ff9-f3e60478ea04", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704664949L)); - IdentityProvider identityprovider2 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662562L), - "2eb18fe9-56fe-4591-b333-5867fc2c35fb", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683986077L)); + IdentityProvider identityprovider2 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683990853L), + "780844e2-e76b-4bc6-927b-6c0c8b67dea6", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), false, - "7a301106-a9ad-413e-bfeb-d7d3b078e5ef", null, + "b3ea330b-c302-42c8-8ff9-f3e60478ea04", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704664949L)); - IdentityProvider identityprovider3 = new IdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704664680L), - "e04e7cad-0418-4c9a-ba85-a07bdc2bd03d", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683986077L)); + IdentityProvider identityprovider3 = new IdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994948L), + "ccf28137-5ced-4e0f-887f-f3a45cacc7e7", + "3b2c98a6b0d3341e5184f0f766dde798", IdentityProviderType.getDefault(), false, - "745de16a-270a-4dd6-856c-32af31254de2", null, + "5a6fb1f2-b6b9-4720-ae4e-ecdb2d709bbc", + new OidcRequest(), null, IdentityProviderStatus.getDefault(), - new Date(1574704661242L)); + new Date(1610683992351L)); assertNotNull(identityprovider1); assertNotNull(identityprovider2); assertNotNull(identityprovider3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderAlgorithm.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderAlgorithm.java index d03e36c0f..ee200c495 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderAlgorithm.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderAlgorithm.java @@ -31,7 +31,7 @@ public void testGetValue() { identityprovideralgorithm = IdentityProviderAlgorithm.getValue("EC256"); assertNotNull(identityprovideralgorithm); assertFalse(identityprovideralgorithm.isDefault()); - identityprovideralgorithm = IdentityProviderAlgorithm.getValue("46073f8d-2e9e-4c40-a79a-cade488591a1"); + identityprovideralgorithm = IdentityProviderAlgorithm.getValue("8c621f69-4665-4650-b3b1-2da802189061"); assertNotNull(identityprovideralgorithm); assertTrue(identityprovideralgorithm.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderPublicKey.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderPublicKey.java index f3afe98ad..62bcaece5 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderPublicKey.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderPublicKey.java @@ -18,8 +18,8 @@ public class TestIdentityProviderPublicKey { @Test public void testClone() { try { - IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("686710b5-1308-4a73-96fa-fafc7fb4ed31", - "95cfb1bf-a393-44b4-9f88-9721a7d4359e"); + IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("41684f43-0be9-4334-98ad-520cd21cdfbc", + "f1285e8f-3e07-474b-80f5-869c2a91fa01"); IdentityProviderPublicKey identityproviderpublickey2 = identityproviderpublickey1.clone(); assertNotNull(identityproviderpublickey1); assertNotNull(identityproviderpublickey2); @@ -37,10 +37,10 @@ public void testClone() { @Test public void testHashCode() { try { - IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("796f6d21-55db-4f38-a9b8-69fb74fdc3d0", - "df00a3a6-8c00-4d45-bcb8-11f547940d2f"); - IdentityProviderPublicKey identityproviderpublickey2 = new IdentityProviderPublicKey("796f6d21-55db-4f38-a9b8-69fb74fdc3d0", - "df00a3a6-8c00-4d45-bcb8-11f547940d2f"); + IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("a72ee846-39ed-4a79-81fa-71576373a63a", + "11a3b475-6067-436a-8c9c-68191ce19ba5"); + IdentityProviderPublicKey identityproviderpublickey2 = new IdentityProviderPublicKey("a72ee846-39ed-4a79-81fa-71576373a63a", + "11a3b475-6067-436a-8c9c-68191ce19ba5"); assertNotNull(identityproviderpublickey1); assertNotNull(identityproviderpublickey2); assertNotSame(identityproviderpublickey2, identityproviderpublickey1); @@ -61,8 +61,8 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - IdentityProviderPublicKey identityproviderpublickey = new IdentityProviderPublicKey("941aa002-53c7-4618-9c6d-316cfb3236a8", - "299deff9-8a7b-4abf-85de-790aec7e6da4"); + IdentityProviderPublicKey identityproviderpublickey = new IdentityProviderPublicKey("d16ce93a-de27-43c2-b915-2b83ffc46575", + "692f1ba1-7a45-4f56-887c-477f9e6e6ffa"); assertTrue(identityproviderpublickey.isValid()); } @@ -73,12 +73,12 @@ public void testIsValid() { @Test public void testEquals() { try { - IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("06737639-913c-4c58-9d11-08a8e545ee3d", - "8ce09d19-49d1-4057-8d45-493aaba6137a"); - IdentityProviderPublicKey identityproviderpublickey2 = new IdentityProviderPublicKey("06737639-913c-4c58-9d11-08a8e545ee3d", - "8ce09d19-49d1-4057-8d45-493aaba6137a"); - IdentityProviderPublicKey identityproviderpublickey3 = new IdentityProviderPublicKey("d58f373a-1782-43fd-884d-478b00eb34ac", - "acef7c48-6105-42b4-bedf-15575cfcfa0d"); + IdentityProviderPublicKey identityproviderpublickey1 = new IdentityProviderPublicKey("850ac8bb-6332-4cc9-8afa-f6cfcb0d2d14", + "a1d9c06f-c28d-4d32-abd7-4ae3c0657cfc"); + IdentityProviderPublicKey identityproviderpublickey2 = new IdentityProviderPublicKey("850ac8bb-6332-4cc9-8afa-f6cfcb0d2d14", + "a1d9c06f-c28d-4d32-abd7-4ae3c0657cfc"); + IdentityProviderPublicKey identityproviderpublickey3 = new IdentityProviderPublicKey("6ea7381e-2407-4366-a510-9c2856f55438", + "a5b30c94-432f-4e98-91be-11f6c2f7bec7"); assertNotNull(identityproviderpublickey1); assertNotNull(identityproviderpublickey2); assertNotNull(identityproviderpublickey3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderStatus.java index 931cc4779..74dca7b62 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { identityproviderstatus = IdentityProviderStatus.getValue("SUSPENDED"); assertNotNull(identityproviderstatus); assertFalse(identityproviderstatus.isDefault()); - identityproviderstatus = IdentityProviderStatus.getValue("dc544b5a-51e8-4e58-9544-01f2ada21d03"); + identityproviderstatus = IdentityProviderStatus.getValue("900a628a-88d6-4a29-8d97-2e0ce9d02d69"); assertNotNull(identityproviderstatus); assertTrue(identityproviderstatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderType.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderType.java index 1b043e02d..28117e06b 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderType.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestIdentityProviderType.java @@ -30,7 +30,7 @@ public void testGetValue() { identityprovidertype = IdentityProviderType.getValue("NATIVE"); assertNotNull(identityprovidertype); assertFalse(identityprovidertype.isDefault()); - identityprovidertype = IdentityProviderType.getValue("4a8bf8c5-5953-425b-9d83-6ba553a95725"); + identityprovidertype = IdentityProviderType.getValue("095f321d-21b6-4611-97d9-dcbbfbfe8a0e"); assertNotNull(identityprovidertype); assertTrue(identityprovidertype.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginHistory.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginHistory.java index 4b7dbcc6e..124552904 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginHistory.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginHistory.java @@ -19,9 +19,9 @@ public class TestLoginHistory { @Test public void testClone() { try { - LoginHistory loginhistory1 = new LoginHistory(new Date(1574704667255L), - "f29bf97d-2793-4039-8346-bcc1684d2549", true, - "ae1725cf-015b-4c24-8ca0-fc3cc2d31e5a"); + LoginHistory loginhistory1 = new LoginHistory(new Date(1610683993287L), + "3815d951-6d65-4e4b-a415-734b57268190", false, + "8585a03c-06d8-4dad-ab43-bff46877a58b"); LoginHistory loginhistory2 = loginhistory1.clone(); assertNotNull(loginhistory1); assertNotNull(loginhistory2); @@ -39,12 +39,12 @@ public void testClone() { @Test public void testHashCode() { try { - LoginHistory loginhistory1 = new LoginHistory(new Date(1574704667446L), - "64135e92-9e84-498e-9bb6-e2af728bd245", true, - "9cfe0485-0630-4b0f-aab0-b3c53db89c37"); - LoginHistory loginhistory2 = new LoginHistory(new Date(1574704667446L), - "64135e92-9e84-498e-9bb6-e2af728bd245", true, - "9cfe0485-0630-4b0f-aab0-b3c53db89c37"); + LoginHistory loginhistory1 = new LoginHistory(new Date(1610683986301L), + "be826a47-5bd7-429c-a8ae-04848d2fc319", false, + "ca9798d3-33e3-4093-873d-49732cb045ec"); + LoginHistory loginhistory2 = new LoginHistory(new Date(1610683986301L), + "be826a47-5bd7-429c-a8ae-04848d2fc319", false, + "ca9798d3-33e3-4093-873d-49732cb045ec"); assertNotNull(loginhistory1); assertNotNull(loginhistory2); assertNotSame(loginhistory2, loginhistory1); @@ -65,8 +65,8 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - LoginHistory loginhistory = new LoginHistory(new Date(1574704667164L), "be132299-2540-42fd-a22c-0a780c7dfdc5", - false, "6bc6ee8e-9797-4038-9d4f-6182ea06fa5d"); + LoginHistory loginhistory = new LoginHistory(new Date(1610683989292L), "7b05728b-bc6c-4f92-8041-06e52a01c17a", + true, "ed0fbfe8-f656-49c4-8d52-b0ca007b65c1"); assertTrue(loginhistory.isValid()); } @@ -77,15 +77,15 @@ public void testIsValid() { @Test public void testEquals() { try { - LoginHistory loginhistory1 = new LoginHistory(new Date(1574704669265L), - "4a4cc5b1-4511-46d0-a119-ed114cbbb456", false, - "88319b51-7532-4d00-8f16-cad5ece86613"); - LoginHistory loginhistory2 = new LoginHistory(new Date(1574704669265L), - "4a4cc5b1-4511-46d0-a119-ed114cbbb456", false, - "88319b51-7532-4d00-8f16-cad5ece86613"); - LoginHistory loginhistory3 = new LoginHistory(new Date(1574704665356L), - "61f32415-d6f4-454c-b200-9a8d38710cc4", false, - "41e50b34-3229-48d5-84fd-22e9cecdc7f9"); + LoginHistory loginhistory1 = new LoginHistory(new Date(1610683993727L), + "a68eb840-83de-4b31-a447-7000bff5a5e4", true, + "cb51353a-3eec-4d72-9ea0-5b5188dee8f1"); + LoginHistory loginhistory2 = new LoginHistory(new Date(1610683993727L), + "a68eb840-83de-4b31-a447-7000bff5a5e4", true, + "cb51353a-3eec-4d72-9ea0-5b5188dee8f1"); + LoginHistory loginhistory3 = new LoginHistory(new Date(1610683991898L), + "3dc35c40-791d-4d24-a3fb-bc697f08c7a1", true, + "7d776c5d-7a54-48b7-b52d-a0bcb78e9c1b"); assertNotNull(loginhistory1); assertNotNull(loginhistory2); assertNotNull(loginhistory3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfile.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfile.java index 818e6140c..0ee1cb80e 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfile.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfile.java @@ -18,9 +18,10 @@ public class TestLoginProfile { @Test public void testClone() { try { - LoginProfile loginprofile1 = new LoginProfile("8bbfa74c-ad02-4c9c-828b-2a18d31eb2d5", + LoginProfile loginprofile1 = new LoginProfile("d2c42f03-a908-4a79-8764-4491a5d6969c", + "d4ffd7f1-eaeb-41e8-9c96-d529d55fa298", LoginProfileType.getDefault(), - "8546a744-4fca-4ce0-bb5a-91a15156ee2c"); + "66e19a06-4c56-4adf-92d3-fc07f1809218"); LoginProfile loginprofile2 = loginprofile1.clone(); assertNotNull(loginprofile1); assertNotNull(loginprofile2); @@ -38,12 +39,14 @@ public void testClone() { @Test public void testHashCode() { try { - LoginProfile loginprofile1 = new LoginProfile("49c99099-e91d-4810-be4c-978cf70fb8b3", + LoginProfile loginprofile1 = new LoginProfile("ee0b5618-eb36-4320-87f7-c498e79bb7aa", + "e21b001d-b1f2-4a17-8f6d-f65c0339a2d2", LoginProfileType.getDefault(), - "6a1fd01b-1527-482f-b04e-02423637e95a"); - LoginProfile loginprofile2 = new LoginProfile("49c99099-e91d-4810-be4c-978cf70fb8b3", + "07dc7917-ec9e-45c3-b333-7ddae04a372e"); + LoginProfile loginprofile2 = new LoginProfile("ee0b5618-eb36-4320-87f7-c498e79bb7aa", + "e21b001d-b1f2-4a17-8f6d-f65c0339a2d2", LoginProfileType.getDefault(), - "6a1fd01b-1527-482f-b04e-02423637e95a"); + "07dc7917-ec9e-45c3-b333-7ddae04a372e"); assertNotNull(loginprofile1); assertNotNull(loginprofile2); assertNotSame(loginprofile2, loginprofile1); @@ -64,9 +67,10 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - LoginProfile loginprofile = new LoginProfile("3647ea8e-942c-4b7f-b19a-cc2e762c8c81", + LoginProfile loginprofile = new LoginProfile("d79597d0-d441-4403-b67e-0af5b7df78c5", + "f3bbdeba-3e77-4fa8-b835-1204a50c2463", LoginProfileType.getDefault(), - "b05287b3-560d-4b35-9615-c9bbfd3bc065"); + "cfb157f5-8d57-4cfa-acc1-4d4c8853971e"); assertTrue(loginprofile.isValid()); } @@ -77,15 +81,18 @@ public void testIsValid() { @Test public void testEquals() { try { - LoginProfile loginprofile1 = new LoginProfile("49888c0a-4b81-450f-85eb-83f11f4c82b7", + LoginProfile loginprofile1 = new LoginProfile("3eb8a0ad-a2c8-4244-814b-1913ecf811af", + "18a0814b-b227-4c4a-99f1-73ad0eb0b6e0", LoginProfileType.getDefault(), - "9b098f3a-734e-49a0-a898-1a8081385de0"); - LoginProfile loginprofile2 = new LoginProfile("49888c0a-4b81-450f-85eb-83f11f4c82b7", + "ed8e4b5c-378e-4c20-bb9e-e926f8b1793b"); + LoginProfile loginprofile2 = new LoginProfile("3eb8a0ad-a2c8-4244-814b-1913ecf811af", + "18a0814b-b227-4c4a-99f1-73ad0eb0b6e0", LoginProfileType.getDefault(), - "9b098f3a-734e-49a0-a898-1a8081385de0"); - LoginProfile loginprofile3 = new LoginProfile("36b7c73a-3e9d-405d-a3e3-398953b2089c", + "ed8e4b5c-378e-4c20-bb9e-e926f8b1793b"); + LoginProfile loginprofile3 = new LoginProfile("1ac10476-a668-4b1c-9eca-26d764a86b6b", + "d55a5f2c-b1ad-4a70-bf7b-cbaffc935807", LoginProfileType.getDefault(), - "966dc2fe-cdb9-441f-a8a6-9d290e561313"); + "d0314338-f7b8-439a-adc8-ca5162aebd16"); assertNotNull(loginprofile1); assertNotNull(loginprofile2); assertNotNull(loginprofile3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfileType.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfileType.java index d7b4ae893..f94e8e29c 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfileType.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestLoginProfileType.java @@ -30,7 +30,7 @@ public void testGetValue() { loginprofiletype = LoginProfileType.getValue("NATIVE"); assertNotNull(loginprofiletype); assertFalse(loginprofiletype.isDefault()); - loginprofiletype = LoginProfileType.getValue("7b299d14-f28b-49d9-8382-f9db200806d2"); + loginprofiletype = LoginProfileType.getValue("ad2b0abe-d878-4ca2-8110-954245f3a5bb"); assertNotNull(loginprofiletype); assertTrue(loginprofiletype.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequest.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequest.java index 8b702eb62..a364fcc4d 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequest.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequest.java @@ -18,20 +18,20 @@ public class TestOidcRequest { @Test public void testClone() { try { - OidcRequest oidcrequest1 = new OidcRequest("16f9b809-272d-48f9-9066-f578c953818e", true, + OidcRequest oidcrequest1 = new OidcRequest("b8918018-e96f-45d5-9784-426944692539", false, new OidcRequestClaimMapping(), - "1674fbd0-ab1b-4917-b29e-de19c617eaa1", - "6032562f-3a00-4f45-8e23-57cb363423c3", - "746b5d2b-bc5c-49af-8dd9-b769431b2252", - "cf4617e3-ab85-40fc-ad83-9be61d1b97ff", - "5a763cf4-c3d3-42a7-bf61-ec52c0b45238", null, - "abcab24b-b84e-4cff-ba33-d429b7839575", - "464aba74-bc57-4a8b-b9d5-019c78c857f6", - "13353538-8642-4881-a251-bf2df074e31f", - "aa5c1a41-b16a-463d-b542-af4a6fd974ed", + "ec944608-bb98-42a3-9f02-65970de6e04c", + "cf7b9574-728e-4b59-b2fe-c73849cfd6fc", + "7c53a04a-1298-4481-86ee-24336fbc75c7", + "500bdefd-cc40-4425-86d8-53a2f69c4af9", + "a22edb84-32f6-46f2-9f1c-6e17724f6d51", null, + "d0c7838e-02fe-41a9-8cb3-3b665cb08a5a", + "81064e28-f67f-4e41-9db5-488f848ca16b", + "08a0236b-6cd7-4780-a727-5bf096e95536", + "8f0fbeff-f5c1-41d4-8c5a-714f4d1f02ac", OidcRequestTokenMode.getDefault(), - "62a5b1a3-c017-4b36-a61f-16e279453d9d", - "a257fbf8-917b-4e44-b46b-2ff3a70dcb09"); + "f45df80a-755d-407a-b392-af471ff6547c", + "cc34cfd2-7480-423c-870d-2cb1aee08dc8"); OidcRequest oidcrequest2 = oidcrequest1.clone(); assertNotNull(oidcrequest1); assertNotNull(oidcrequest2); @@ -49,34 +49,34 @@ public void testClone() { @Test public void testHashCode() { try { - OidcRequest oidcrequest1 = new OidcRequest("75dffa42-ff65-45a0-8b61-f527f00bbf5a", true, + OidcRequest oidcrequest1 = new OidcRequest("3ecb1c24-1125-4d74-9994-a8b2ac8fb7f5", true, new OidcRequestClaimMapping(), - "b6b7903f-6f09-4148-af5c-98baee4e9604", - "95509e58-1fc3-4661-ad8b-7fd521847e6e", - "aa1bb34b-00f3-4d3f-9acc-cb82b79a9c93", - "8ac53045-aa86-477f-9a22-2600fccbc1d5", - "fc14ba14-6b0d-49a5-9a7b-dda0ac58e305", null, - "2db3eadf-04f4-459d-a4b0-f406c2fdd8af", - "dfaca63b-dab3-4567-afe8-6a93d142a480", - "69a40763-8bf1-4c57-915b-90959cbd16ae", - "f59b0201-9a37-4c24-8659-6ce7c5e99d79", + "decfbe23-3dc5-4acd-bb20-5e660b2939d2", + "2460ddf8-56a3-4036-83a4-3d4ff8cb3ae5", + "7c2c2179-cb8c-47bc-9da3-27c9e09ecc89", + "302374b6-56c8-4274-9d17-a3d12b88c770", + "842635bf-7a2e-4db0-a2ad-d1745f10ad34", null, + "e661f3cc-1a11-4393-bf7e-b434099d1ba2", + "04c2b43e-25c8-44f1-8de6-ffa9d287620c", + "af9ed2ce-2fad-4d2d-b3b8-3ec34f241543", + "52a3743e-210a-43af-9869-4ab2da91516c", OidcRequestTokenMode.getDefault(), - "0157c9c2-8156-4b8d-acb9-0bcba168c3e4", - "cbedf335-c0a5-4610-8d9b-0cafee914bdf"); - OidcRequest oidcrequest2 = new OidcRequest("75dffa42-ff65-45a0-8b61-f527f00bbf5a", true, + "5e5550c4-0a06-4804-b859-2226865bb884", + "9fe6b206-9f77-4704-9a6a-aafdacb509ed"); + OidcRequest oidcrequest2 = new OidcRequest("3ecb1c24-1125-4d74-9994-a8b2ac8fb7f5", true, new OidcRequestClaimMapping(), - "b6b7903f-6f09-4148-af5c-98baee4e9604", - "95509e58-1fc3-4661-ad8b-7fd521847e6e", - "aa1bb34b-00f3-4d3f-9acc-cb82b79a9c93", - "8ac53045-aa86-477f-9a22-2600fccbc1d5", - "fc14ba14-6b0d-49a5-9a7b-dda0ac58e305", null, - "2db3eadf-04f4-459d-a4b0-f406c2fdd8af", - "dfaca63b-dab3-4567-afe8-6a93d142a480", - "69a40763-8bf1-4c57-915b-90959cbd16ae", - "f59b0201-9a37-4c24-8659-6ce7c5e99d79", + "decfbe23-3dc5-4acd-bb20-5e660b2939d2", + "2460ddf8-56a3-4036-83a4-3d4ff8cb3ae5", + "7c2c2179-cb8c-47bc-9da3-27c9e09ecc89", + "302374b6-56c8-4274-9d17-a3d12b88c770", + "842635bf-7a2e-4db0-a2ad-d1745f10ad34", null, + "e661f3cc-1a11-4393-bf7e-b434099d1ba2", + "04c2b43e-25c8-44f1-8de6-ffa9d287620c", + "af9ed2ce-2fad-4d2d-b3b8-3ec34f241543", + "52a3743e-210a-43af-9869-4ab2da91516c", OidcRequestTokenMode.getDefault(), - "0157c9c2-8156-4b8d-acb9-0bcba168c3e4", - "cbedf335-c0a5-4610-8d9b-0cafee914bdf"); + "5e5550c4-0a06-4804-b859-2226865bb884", + "9fe6b206-9f77-4704-9a6a-aafdacb509ed"); assertNotNull(oidcrequest1); assertNotNull(oidcrequest2); assertNotSame(oidcrequest2, oidcrequest1); @@ -97,19 +97,19 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - OidcRequest oidcrequest = new OidcRequest("9852b3d1-d6bb-440e-866e-379edad39f8c", true, - new OidcRequestClaimMapping(), "848b621f-cc66-4c57-99a1-f3cb473963fa", - "b5acf8ef-a24b-4784-b630-c800ca4ef593", - "3bda90c9-c729-4940-ab63-ffa85d566e36", - "8a76ffc9-2bee-49e9-ad35-b484eab8bf1c", - "bab95ff7-677c-46d5-b477-7295a4d600e2", null, - "4a813340-c5d5-42a8-9b23-01697de7f0fb", - "949af1f0-12b6-4b19-b676-865b93dd27ba", - "5f3e4ba8-2ee9-4988-942f-14ebaaf155bc", - "2dfd01fc-24c4-4142-9390-e2c492f24432", + OidcRequest oidcrequest = new OidcRequest("0618dae8-0de4-421d-a187-49d23493f6ad", false, + new OidcRequestClaimMapping(), "15313427-3227-4f09-953c-398c75c2dd7a", + "33e5408f-3433-4a3e-b3f9-2d5f0e260e83", + "85a9b712-9037-479e-83a0-5baf62fa5662", + "24098ee0-fbad-48eb-9822-879badae232e", + "da4ecbbb-f020-47b9-8187-60532f2f3c45", null, + "270a5c63-cb12-4788-bb43-2ea834271ad6", + "db683450-0778-497c-bdfd-032dcb383e43", + "7b3e497a-eb73-4b89-b8fe-bb44d9c95ffd", + "0bc7fc96-6e5f-42bc-b1c2-b53699aede93", OidcRequestTokenMode.getDefault(), - "83085449-7b72-4bbb-a650-8e57276e9e09", - "591311f8-e341-4fa6-aa47-0e6ddab582c3"); + "aa56a154-9146-42f1-8cf2-e765fc0e73d0", + "f072c0a9-9e6d-4748-9856-afe91985537d"); assertTrue(oidcrequest.isValid()); } @@ -120,48 +120,48 @@ public void testIsValid() { @Test public void testEquals() { try { - OidcRequest oidcrequest1 = new OidcRequest("cb5800ff-96d9-483a-b90f-edb4dabc5fff", false, + OidcRequest oidcrequest1 = new OidcRequest("b13bfc3c-c867-45b2-8f58-6a8ca82146b1", true, new OidcRequestClaimMapping(), - "56cd96c2-6606-483a-81ed-832a2b7a4505", - "a2633e19-4547-4ab5-8378-bfc73c310e36", - "1a6dcede-e747-4fd6-8d36-1a573a0322ea", - "767e9c37-d214-4f16-8ef1-a4dcce476b05", - "1ccce46d-ccd5-4ca3-b267-3e809463eee8", null, - "3843c655-0da6-4564-9fe4-007b3a37f6f9", - "af9ea8eb-48a5-4f1d-913c-8af8f2374f96", - "b87b633c-90f5-48ea-a116-931765f0e116", - "f8ad74b3-a4fa-4452-9370-187eea6253a0", + "61a10cfb-b95c-45a5-804f-15ac814a7b83", + "49e03cb0-b98b-49eb-b1c0-20986ab6adba", + "6045904e-f332-46b8-841f-5289752656d5", + "51f24ece-7a05-45c6-b6cf-68cf1313c260", + "b7675a1c-c5cd-4115-a088-672db74bd257", null, + "b3757ee1-2ebf-4797-8be7-4d302172d97f", + "74d670b8-36a7-45b6-8019-30302f7530f3", + "082e7f9e-f12d-4daf-8c5e-f96d0dddd5dd", + "5ea220b5-3a39-4022-92bc-1525ce61358f", OidcRequestTokenMode.getDefault(), - "cd989ee2-1504-4bee-b26e-e2e31cd2a847", - "647d89be-5c4e-44aa-9fd2-3a13b83044f1"); - OidcRequest oidcrequest2 = new OidcRequest("cb5800ff-96d9-483a-b90f-edb4dabc5fff", false, + "cf562ebe-1e35-4c7c-9653-1d136c02810c", + "a2e42df5-3eb5-48c7-860c-6979465e0829"); + OidcRequest oidcrequest2 = new OidcRequest("b13bfc3c-c867-45b2-8f58-6a8ca82146b1", true, new OidcRequestClaimMapping(), - "56cd96c2-6606-483a-81ed-832a2b7a4505", - "a2633e19-4547-4ab5-8378-bfc73c310e36", - "1a6dcede-e747-4fd6-8d36-1a573a0322ea", - "767e9c37-d214-4f16-8ef1-a4dcce476b05", - "1ccce46d-ccd5-4ca3-b267-3e809463eee8", null, - "3843c655-0da6-4564-9fe4-007b3a37f6f9", - "af9ea8eb-48a5-4f1d-913c-8af8f2374f96", - "b87b633c-90f5-48ea-a116-931765f0e116", - "f8ad74b3-a4fa-4452-9370-187eea6253a0", + "61a10cfb-b95c-45a5-804f-15ac814a7b83", + "49e03cb0-b98b-49eb-b1c0-20986ab6adba", + "6045904e-f332-46b8-841f-5289752656d5", + "51f24ece-7a05-45c6-b6cf-68cf1313c260", + "b7675a1c-c5cd-4115-a088-672db74bd257", null, + "b3757ee1-2ebf-4797-8be7-4d302172d97f", + "74d670b8-36a7-45b6-8019-30302f7530f3", + "082e7f9e-f12d-4daf-8c5e-f96d0dddd5dd", + "5ea220b5-3a39-4022-92bc-1525ce61358f", OidcRequestTokenMode.getDefault(), - "cd989ee2-1504-4bee-b26e-e2e31cd2a847", - "647d89be-5c4e-44aa-9fd2-3a13b83044f1"); - OidcRequest oidcrequest3 = new OidcRequest("b8d0e141-1bf4-41ae-bd2f-bee7cd0a9987", false, + "cf562ebe-1e35-4c7c-9653-1d136c02810c", + "a2e42df5-3eb5-48c7-860c-6979465e0829"); + OidcRequest oidcrequest3 = new OidcRequest("e52498d7-ce32-408f-90ef-589195bca110", true, new OidcRequestClaimMapping(), - "f1651b14-5a31-46c7-b88c-76584fdb6508", - "0aac3416-b808-498b-bb65-5cb0a9c77707", - "35fd2214-2774-4b6c-b194-d45ca2c6d779", - "976aee66-5b86-495e-953d-b3dd7ad2cdb9", - "cde441bb-51ee-4813-b445-b5fb6973afa1", null, - "7ee6bfac-85f0-44b2-88df-042f108558eb", - "6fee7644-31a7-4dc2-b27b-5ace04ee0ef2", - "c16a2157-ad65-4647-b075-a238dc610937", - "90072a13-c1c7-403a-83cb-2254bfe269e5", + "e5ede658-efd3-446f-8dab-7ea4f52a0b94", + "7d7ff51e-5292-432a-ae6e-b2f2c48528b0", + "41432c70-a750-49bf-9bc5-cac5f7ece1d6", + "84d167b0-461a-4c60-83b5-7b720c1804d2", + "4f078c14-fd12-492d-a696-105d984ab981", null, + "24f80652-37a9-4831-8214-5c3d65717cdf", + "2e7aec32-1c5d-4b8f-9996-1ed5a04bfd6a", + "08f21158-9dc7-464f-b1d5-5033be944203", + "9f87b62d-b765-4342-a5bf-b1a141ece154", OidcRequestTokenMode.getDefault(), - "7cf1e23f-0b18-4e59-a6c7-0db931780182", - "4f67a4f7-23f9-4dbb-bd39-3a36abb133ef"); + "c1cf4be2-1347-4dc6-8e7b-e434f6ea02b8", + "f5c463c8-d5cd-49fb-94af-4c735df8546f"); assertNotNull(oidcrequest1); assertNotNull(oidcrequest2); assertNotNull(oidcrequest3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestClaimMapping.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestClaimMapping.java index 79bceb839..4c6680389 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestClaimMapping.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestClaimMapping.java @@ -18,15 +18,15 @@ public class TestOidcRequestClaimMapping { @Test public void testClone() { try { - OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("baebf.62d5e@3fb09.fr", - "a5930.2bfac@132ea.me", - "a7b3add1-e71a-4159-805a-062bd23f998e", - "c368ce2c-46e8-4e2b-8c37-c6a3713c6b1b", - "afdc3dd6-1e9d-4c55-a035-ece967b374a7", - "d28be750-354a-4392-9d3b-ea1d7857e554", - "feb679ab-730f-4571-a913-ff037093d8b0", - "dff21d0a-bd07-45e0-bcb0-3a026bb88667", - "607e6bdb-0593-490c-b5fb-bf05265cce2c"); + OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("59585.6c5f7@51ee9.me", + "c3cc4.515f8@2d905.fr", + "cfc1edf7-3537-4443-80fd-a1ff0d60ea7a", + "ba9b3622-4d18-49ec-b455-779cdd72410a", + "9d9ea707-b697-468c-8922-026d3e785d21", + "d7854364-9b30-4afb-923f-f92851b746bc", + "3e3316aa-dcc3-4a30-a88b-11028eff8def", + "28d895f1-216e-4b6b-b3da-35e56fc4cdc4", + "bbc72be4-e0c3-4b5b-8d87-088c9003ce47"); OidcRequestClaimMapping oidcrequestclaimmapping2 = oidcrequestclaimmapping1.clone(); assertNotNull(oidcrequestclaimmapping1); assertNotNull(oidcrequestclaimmapping2); @@ -44,24 +44,24 @@ public void testClone() { @Test public void testHashCode() { try { - OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("49ea7.2b041@55bb8.me", - "faa57.f9ded@03b8b.fr", - "3b91a1b1-98a4-4cf5-9d68-16560b1256dc", - "a00b2cc9-b1c8-40dd-9aac-301bf5a624bb", - "51737f15-9362-49fc-9c31-07f5d2da016a", - "01a47c2d-3404-4e37-af5d-c659ecbd32cd", - "f52867d0-e4ac-4727-8507-351eaf00fd45", - "6d1fc624-cefd-4c0a-9790-121fefe47b6e", - "57433ae8-5dfb-4058-a020-15d5343a8d8d"); - OidcRequestClaimMapping oidcrequestclaimmapping2 = new OidcRequestClaimMapping("49ea7.2b041@55bb8.me", - "faa57.f9ded@03b8b.fr", - "3b91a1b1-98a4-4cf5-9d68-16560b1256dc", - "a00b2cc9-b1c8-40dd-9aac-301bf5a624bb", - "51737f15-9362-49fc-9c31-07f5d2da016a", - "01a47c2d-3404-4e37-af5d-c659ecbd32cd", - "f52867d0-e4ac-4727-8507-351eaf00fd45", - "6d1fc624-cefd-4c0a-9790-121fefe47b6e", - "57433ae8-5dfb-4058-a020-15d5343a8d8d"); + OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("5212b.fa342@91018.me", + "95fe3.62196@60d81.fr", + "1333ca67-253b-4a1b-adfa-c607b9284217", + "41aa1d93-0dc9-425e-8c35-23a91e006d57", + "75c73d18-4025-46a4-9aa3-b696b33ad861", + "6e90d31b-796d-4222-b6fe-ccd5d0877bea", + "44ac672e-81c4-43c1-8b39-47a828e17020", + "3570a1c7-38c1-4bee-9147-960f5b523af1", + "4ffb1d26-896d-44c3-b993-68b9ac78b3a8"); + OidcRequestClaimMapping oidcrequestclaimmapping2 = new OidcRequestClaimMapping("5212b.fa342@91018.me", + "95fe3.62196@60d81.fr", + "1333ca67-253b-4a1b-adfa-c607b9284217", + "41aa1d93-0dc9-425e-8c35-23a91e006d57", + "75c73d18-4025-46a4-9aa3-b696b33ad861", + "6e90d31b-796d-4222-b6fe-ccd5d0877bea", + "44ac672e-81c4-43c1-8b39-47a828e17020", + "3570a1c7-38c1-4bee-9147-960f5b523af1", + "4ffb1d26-896d-44c3-b993-68b9ac78b3a8"); assertNotNull(oidcrequestclaimmapping1); assertNotNull(oidcrequestclaimmapping2); assertNotSame(oidcrequestclaimmapping2, oidcrequestclaimmapping1); @@ -82,15 +82,15 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - OidcRequestClaimMapping oidcrequestclaimmapping = new OidcRequestClaimMapping("079cd.714c0@bfd20.me", - "b62ac.34f9b@55254.me", - "5d97015a-883c-4494-b6cf-d7eb9dbad273", - "126584e2-78cc-46fe-b559-7ee67f7bd349", - "7c63106e-10fe-4144-ba8d-e343bdb0739f", - "69492f4c-a0ba-41ae-9137-7cd3d02c10b1", - "b45c3653-d42b-4d33-b762-a6e2a0203e5a", - "8ae0fc1e-8168-4272-bb1e-b5e4c807817e", - "623672f3-3b48-4cf8-9552-7befefe65ebb"); + OidcRequestClaimMapping oidcrequestclaimmapping = new OidcRequestClaimMapping("d65a6.1788b@ad8d2.me", + "bb043.5217f@ee9b7.me", + "c54e682e-e049-41d8-bc5d-9be60a10a80e", + "f9b5088c-827e-4102-8301-6dcb4bbd0272", + "d5738047-ee03-4ed3-96bf-0908f5c3afb1", + "3da7de18-4bac-44c8-be89-9f620b781100", + "6c6e71a6-4eb9-47f5-831c-7069da356643", + "32cadc56-9263-4fb7-a74f-2081f618d8d8", + "1bcf2c19-9075-4c3f-9dc4-caa53bc290cd"); assertTrue(oidcrequestclaimmapping.isValid()); } @@ -101,33 +101,33 @@ public void testIsValid() { @Test public void testEquals() { try { - OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("d34ac.c1939@8b9ed.me", - "e21c3.67dc9@efc6f.fr", - "fe4fb58e-fb67-4d57-b304-fb15ef9b456b", - "0fa538b1-0c30-44f4-9eb0-a222bff5b7df", - "f3bb6399-f32c-4b84-ab1f-d211548170ac", - "b6c5f50c-4724-4731-8314-78273937b02b", - "e566ae74-7370-4220-bd6a-427f2dfcb045", - "ef580b8f-6397-4021-8436-afea80e0b6b6", - "da878a6b-46de-41d4-9d6e-5b3386e23301"); - OidcRequestClaimMapping oidcrequestclaimmapping2 = new OidcRequestClaimMapping("d34ac.c1939@8b9ed.me", - "e21c3.67dc9@efc6f.fr", - "fe4fb58e-fb67-4d57-b304-fb15ef9b456b", - "0fa538b1-0c30-44f4-9eb0-a222bff5b7df", - "f3bb6399-f32c-4b84-ab1f-d211548170ac", - "b6c5f50c-4724-4731-8314-78273937b02b", - "e566ae74-7370-4220-bd6a-427f2dfcb045", - "ef580b8f-6397-4021-8436-afea80e0b6b6", - "da878a6b-46de-41d4-9d6e-5b3386e23301"); - OidcRequestClaimMapping oidcrequestclaimmapping3 = new OidcRequestClaimMapping("be060.4cbb6@cc55b.me", - "1bf8a.87dc6@87d43.fr", - "fcb18e64-8ee3-442d-a2ed-2d7f75131114", - "2a6bba5a-bcc4-47c8-9cb4-d7d089905523", - "314aa58f-b12a-46d8-846b-ecfe2d59db44", - "20ec1737-fa9e-4d22-a6aa-470e0c0761be", - "47d68a84-1d57-4db8-9ecf-fe79c8dcd4c0", - "7a92bb43-aadf-4e85-8b39-42e7433ee23e", - "86158d90-8349-42bd-a337-ded74432fff3"); + OidcRequestClaimMapping oidcrequestclaimmapping1 = new OidcRequestClaimMapping("0a4d3.47300@21c35.fr", + "d78a2.44df6@a544a.me", + "dd33b46e-402b-4206-a45e-c0b2edf985a5", + "c4fa7fcb-b5fa-4a14-859a-894919470c7b", + "6fb31765-5a8e-4a20-a6e8-4db5e3eb2e70", + "fa3921db-d5cb-40c3-bfcf-d011d11b92dd", + "eab5a7d6-b11a-4768-8b46-78d514252c45", + "e9377f60-6f11-475d-9f5e-73bb7535d3db", + "26c21693-d79e-4c14-8dce-4d7ff57fe581"); + OidcRequestClaimMapping oidcrequestclaimmapping2 = new OidcRequestClaimMapping("0a4d3.47300@21c35.fr", + "d78a2.44df6@a544a.me", + "dd33b46e-402b-4206-a45e-c0b2edf985a5", + "c4fa7fcb-b5fa-4a14-859a-894919470c7b", + "6fb31765-5a8e-4a20-a6e8-4db5e3eb2e70", + "fa3921db-d5cb-40c3-bfcf-d011d11b92dd", + "eab5a7d6-b11a-4768-8b46-78d514252c45", + "e9377f60-6f11-475d-9f5e-73bb7535d3db", + "26c21693-d79e-4c14-8dce-4d7ff57fe581"); + OidcRequestClaimMapping oidcrequestclaimmapping3 = new OidcRequestClaimMapping("ab1c4.caeb0@1a281.me", + "da040.fb202@136bf.me", + "42a6619f-629b-46ea-a6df-65c81aa28483", + "b99f38c9-cc06-4595-ae2b-6a8981da67a0", + "95035939-af30-488f-ba9a-c4137491be1e", + "9350153d-ef84-46c7-beca-f9c04347923e", + "7e85236c-b958-44bc-90fb-d949b951dede", + "32aeab42-a7ae-4376-8e7c-d35e2ead722e", + "5f6db9e2-034a-4bb3-bba6-5affef907408"); assertNotNull(oidcrequestclaimmapping1); assertNotNull(oidcrequestclaimmapping2); assertNotNull(oidcrequestclaimmapping3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestTokenMode.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestTokenMode.java index c1f36aa23..07c6e3f09 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestTokenMode.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestOidcRequestTokenMode.java @@ -30,7 +30,7 @@ public void testGetValue() { oidcrequesttokenmode = OidcRequestTokenMode.getValue("POST"); assertNotNull(oidcrequesttokenmode); assertFalse(oidcrequesttokenmode.isDefault()); - oidcrequesttokenmode = OidcRequestTokenMode.getValue("33f6d39f-a03c-41ed-815a-55d98c3d3f4b"); + oidcrequesttokenmode = OidcRequestTokenMode.getValue("d32c937e-1d17-40cb-8d87-ce4ea05a553c"); assertNotNull(oidcrequesttokenmode); assertTrue(oidcrequesttokenmode.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestParentAccount.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestParentAccount.java index b4dfb455a..d85c8c693 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestParentAccount.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestParentAccount.java @@ -18,9 +18,9 @@ public class TestParentAccount { @Test public void testClone() { try { - ParentAccount parentaccount1 = new ParentAccount("f3a41.cae8a@a7ce9.fr", - "0e24e5de-cd7d-447c-a894-565b41c335d5", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + ParentAccount parentaccount1 = new ParentAccount("b118c.0834d@ce0c7.fr", + "aceedd1f-0f1e-487d-9d5e-f915881a1b16", + "3b2c98a6b0d3341e5184f0f766dde798"); ParentAccount parentaccount2 = parentaccount1.clone(); assertNotNull(parentaccount1); assertNotNull(parentaccount2); @@ -38,12 +38,12 @@ public void testClone() { @Test public void testHashCode() { try { - ParentAccount parentaccount1 = new ParentAccount("96082.cfbb3@dd21e.fr", - "2eee4b07-d5e5-42ce-b61f-b39fa56c6d20", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - ParentAccount parentaccount2 = new ParentAccount("96082.cfbb3@dd21e.fr", - "2eee4b07-d5e5-42ce-b61f-b39fa56c6d20", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + ParentAccount parentaccount1 = new ParentAccount("ca0ba.8c1ee@3f7b4.fr", + "ff571029-d377-4755-9d6f-aa8cad236ad1", + "3b2c98a6b0d3341e5184f0f766dde798"); + ParentAccount parentaccount2 = new ParentAccount("ca0ba.8c1ee@3f7b4.fr", + "ff571029-d377-4755-9d6f-aa8cad236ad1", + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(parentaccount1); assertNotNull(parentaccount2); assertNotSame(parentaccount2, parentaccount1); @@ -64,12 +64,12 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - ParentAccount parentaccount = new ParentAccount("75172.fd372@a2bb8.fr", "8e5c9626-bd6a-45dd-a679-1fe05de4295d", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + ParentAccount parentaccount = new ParentAccount("0507f.d1036@758d0.me", "9f20057c-8c3a-41cc-a2af-7fd30d675337", + "3b2c98a6b0d3341e5184f0f766dde798"); assertTrue(parentaccount.isValid()); - ParentAccount parentaccountInvalid = new ParentAccount(">䱀>ꥊ蕟'>⢫)4鉌>\u0016숕嗣ꀑ泺/�申<�㕊<.痡舙ॆ�ⴲ�>>੦>꒗3->棯꼢镙㊀�\u0015깿晟>棱)텋镀奪쮂�믮>>ඟ芴࢒", - "67f81264-e24a-4a62-b8fb-859b2218107d0628e863-555b-4548-86b4-74ebf51444c17e74fe70-66f6-4c0d-973a-dc6fcbef5503", - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K"); + ParentAccount parentaccountInvalid = new ParentAccount("ጲⳊ榋엫 쪞5摀%!ﻠ罆;>>₧橴ヒ1͢ޑ棸-3藡褅\u0013蜇▇鱃�?「!₥�� 蛰칹 +⸖ﰂ�4氂侉ッ椬楔ퟎ#>�:��!办�뎓", + "5553c57d-06a2-4453-acf6-31a0d20ea25d11d79ddc-7f2a-428c-9165-f637d5a9af5c39f9bd3d-d30c-434a-83c4-adb565ed9f55", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e"); assertFalse(parentaccountInvalid.isValid()); } @@ -80,15 +80,15 @@ public void testIsValid() { @Test public void testEquals() { try { - ParentAccount parentaccount1 = new ParentAccount("5b593.a5634@72160.me", - "b8abad9a-d1cc-426f-80c1-4261e7f907e9", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - ParentAccount parentaccount2 = new ParentAccount("5b593.a5634@72160.me", - "b8abad9a-d1cc-426f-80c1-4261e7f907e9", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - ParentAccount parentaccount3 = new ParentAccount("b597e.b552d@67272.me", - "5658bf82-34ae-41f0-93fd-444a83bc3c8b", - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + ParentAccount parentaccount1 = new ParentAccount("427ac.43180@2f0fe.fr", + "be22965c-071f-472f-8452-22f2d2b82d3c", + "3b2c98a6b0d3341e5184f0f766dde798"); + ParentAccount parentaccount2 = new ParentAccount("427ac.43180@2f0fe.fr", + "be22965c-071f-472f-8452-22f2d2b82d3c", + "3b2c98a6b0d3341e5184f0f766dde798"); + ParentAccount parentaccount3 = new ParentAccount("c444b.75f68@30164.fr", + "9bdeb49f-ce45-4d56-b482-70f2c152598c", + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(parentaccount1); assertNotNull(parentaccount2); assertNotNull(parentaccount3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPasswordPolicy.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPasswordPolicy.java index 142c5c9b6..fe5e67684 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPasswordPolicy.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPasswordPolicy.java @@ -58,7 +58,7 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - PasswordPolicy passwordpolicy = new PasswordPolicy(8); + PasswordPolicy passwordpolicy = new PasswordPolicy(78); assertTrue(passwordpolicy.isValid()); } @@ -71,14 +71,18 @@ public void testEquals() { try { PasswordPolicy passwordpolicy1 = new PasswordPolicy(8); PasswordPolicy passwordpolicy2 = new PasswordPolicy(8); + PasswordPolicy passwordpolicy3 = new PasswordPolicy(82); assertNotNull(passwordpolicy1); assertNotNull(passwordpolicy2); + assertNotNull(passwordpolicy3); assertNotSame(passwordpolicy2, passwordpolicy1); + assertNotSame(passwordpolicy3, passwordpolicy1); assertEquals(passwordpolicy2, passwordpolicy1); assertEquals(passwordpolicy2, passwordpolicy1); assertEquals(passwordpolicy1, passwordpolicy2); assertEquals(passwordpolicy1, passwordpolicy1); assertFalse(passwordpolicy1.equals(null)); + assertNotEquals(passwordpolicy3, passwordpolicy1); } catch (Exception exception) { fail(exception.getMessage()); } diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicy.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicy.java index 7c713fecc..8a202c902 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicy.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicy.java @@ -18,10 +18,10 @@ public class TestPolicy { @Test public void testClone() { try { - Policy policy1 = new Policy("4f508d38-0f77-4936-806e-bdb2fbcefdaf", true, - "46dbd363-f32f-4d98-a6cf-20d460d503ec", true, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "aa579c93-347c-4d9a-9e8c-1635fb628a4e"); + Policy policy1 = new Policy("5c71375a-fe3c-48fc-94cf-29c0cc5e771a", true, + "42c0009d-4ab6-45e6-a64c-53eb096e896a", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "1b12ead2-1e56-461d-8914-ce95982571f0"); Policy policy2 = policy1.clone(); assertNotNull(policy1); assertNotNull(policy2); @@ -39,14 +39,14 @@ public void testClone() { @Test public void testHashCode() { try { - Policy policy1 = new Policy("e077c872-b7fa-44fd-80d0-fb9c6951ba6b", false, - "3240dee3-0bcd-495c-8c8d-14177613fb61", false, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "9211d0eb-ecd5-4653-88a8-7ef56bb9031a"); - Policy policy2 = new Policy("e077c872-b7fa-44fd-80d0-fb9c6951ba6b", false, - "3240dee3-0bcd-495c-8c8d-14177613fb61", false, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "9211d0eb-ecd5-4653-88a8-7ef56bb9031a"); + Policy policy1 = new Policy("0c64f782-15f8-44c4-8624-08cb83ee4116", true, + "ed1bb867-8f00-480e-a1d6-24015f89f01c", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "ce4fbb64-aeba-44ce-abeb-b9d05b6e6fdc"); + Policy policy2 = new Policy("0c64f782-15f8-44c4-8624-08cb83ee4116", true, + "ed1bb867-8f00-480e-a1d6-24015f89f01c", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "ce4fbb64-aeba-44ce-abeb-b9d05b6e6fdc"); assertNotNull(policy1); assertNotNull(policy2); assertNotSame(policy2, policy1); @@ -67,9 +67,9 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - Policy policy = new Policy("82c27d85-72cd-4930-b994-1732377031e9", false, - "aa2444ac-395f-439d-b9b7-c13aab1a9601", false, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - PolicyInheritedType.getDefault(), "a5a74798-57d9-4758-87fe-a7efa584268f"); + Policy policy = new Policy("e8181569-e035-41c1-bb45-7ec78be59e24", false, + "066b0e5b-ab23-4ab4-b954-ba5f6a5b92c7", true, "3b2c98a6b0d3341e5184f0f766dde798", + PolicyInheritedType.getDefault(), "417e5496-ba7c-4085-8267-5310481d87d3"); assertTrue(policy.isValid()); } @@ -80,18 +80,18 @@ public void testIsValid() { @Test public void testEquals() { try { - Policy policy1 = new Policy("4e1e20e3-0e72-464c-bdf9-e1667e4ce9e9", true, - "203f9c5c-5651-454e-9c40-cd1636b26a5a", false, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "9be1fc31-47f3-4971-8948-ba955e9b19a9"); - Policy policy2 = new Policy("4e1e20e3-0e72-464c-bdf9-e1667e4ce9e9", true, - "203f9c5c-5651-454e-9c40-cd1636b26a5a", false, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "9be1fc31-47f3-4971-8948-ba955e9b19a9"); - Policy policy3 = new Policy("e3d593f5-7d20-481e-9d9b-25dc24c06ec8", true, - "f8f339e0-1aef-4296-a3c2-45773a9e93c1", false, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", PolicyInheritedType.getDefault(), - "324b642d-5964-4a7b-9468-2f85befc3028"); + Policy policy1 = new Policy("836310f1-2ac4-45e9-bded-10f331528c82", true, + "7d7e1c58-b310-4224-9834-5fa644cd0654", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "460dfb7f-90fe-4c2c-bbca-706e1fe12f77"); + Policy policy2 = new Policy("836310f1-2ac4-45e9-bded-10f331528c82", true, + "7d7e1c58-b310-4224-9834-5fa644cd0654", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "460dfb7f-90fe-4c2c-bbca-706e1fe12f77"); + Policy policy3 = new Policy("f6365e96-3f5b-4d49-baf5-f8e62ba5f598", true, + "011bd727-d862-4d68-9b6f-3014b101c1a4", true, + "3b2c98a6b0d3341e5184f0f766dde798", PolicyInheritedType.getDefault(), + "231372df-2d6d-4593-b502-1f817ad78dd4"); assertNotNull(policy1); assertNotNull(policy2); assertNotNull(policy3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroup.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroup.java index 6486ddd23..3bd43f559 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroup.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyGroup.java @@ -19,10 +19,10 @@ public class TestPolicyGroup { @Test public void testClone() { try { - PolicyGroup policygroup1 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -107, - new Date(1574704664838L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "df9afaba-c141-45b1-a11d-dbcd1b899c6f", new Date(1574704669424L), - 115); + PolicyGroup policygroup1 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", -27, 20, + new Date(1610683987315L), "3b2c98a6b0d3341e5184f0f766dde798", + "8df478f2-37db-4b49-b8d2-0bf670d7912d", new Date(1610683993938L), + -125); PolicyGroup policygroup2 = policygroup1.clone(); assertNotNull(policygroup1); assertNotNull(policygroup2); @@ -40,14 +40,14 @@ public void testClone() { @Test public void testHashCode() { try { - PolicyGroup policygroup1 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -81, - new Date(1574704662061L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "56eac453-6b6d-4061-a258-e275822f05cc", new Date(1574704663397L), - -16); - PolicyGroup policygroup2 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -81, - new Date(1574704662061L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "56eac453-6b6d-4061-a258-e275822f05cc", new Date(1574704663397L), - -16); + PolicyGroup policygroup1 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", 6, -39, + new Date(1610683990840L), "3b2c98a6b0d3341e5184f0f766dde798", + "b678a38b-cb2a-469a-ad6f-37aa8225d271", new Date(1610683989858L), + 14); + PolicyGroup policygroup2 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", 6, -39, + new Date(1610683990840L), "3b2c98a6b0d3341e5184f0f766dde798", + "b678a38b-cb2a-469a-ad6f-37aa8225d271", new Date(1610683989858L), + 14); assertNotNull(policygroup1); assertNotNull(policygroup2); assertNotSame(policygroup2, policygroup1); @@ -68,15 +68,14 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - PolicyGroup policygroup = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", 98, new Date(1574704668473L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "50a9dc9d-54a0-48c8-8f8f-d957cd3ec3f2", new Date(1574704660799L), - -83); + PolicyGroup policygroup = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", 99, 103, new Date(1610683987065L), + "3b2c98a6b0d3341e5184f0f766dde798", + "5aef8a7e-3582-4636-ad22-87eac0754975", new Date(1610683994204L), 31); assertTrue(policygroup.isValid()); - PolicyGroup policygroupInvalid = new PolicyGroup("8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - 12, new Date(1574704666605L), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - null, new Date(1574704665132L), -35); + PolicyGroup policygroupInvalid = new PolicyGroup("\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + 36, 121, new Date(1610683994860L), + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + null, new Date(1610683989703L), 61); assertFalse(policygroupInvalid.isValid()); } @@ -87,18 +86,18 @@ public void testIsValid() { @Test public void testEquals() { try { - PolicyGroup policygroup1 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -51, - new Date(1574704668508L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "eb473b4e-ac23-406a-aef7-df0a11c81bac", new Date(1574704663693L), - -102); - PolicyGroup policygroup2 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -51, - new Date(1574704668508L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "eb473b4e-ac23-406a-aef7-df0a11c81bac", new Date(1574704663693L), - -102); - PolicyGroup policygroup3 = new PolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -117, - new Date(1574704660921L), "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "80fe8f6e-ce02-4185-8f42-6778525739ae", new Date(1574704667956L), - -110); + PolicyGroup policygroup1 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", -31, -71, + new Date(1610683987011L), "3b2c98a6b0d3341e5184f0f766dde798", + "ace4c45e-27f4-4db2-8614-743e327296fa", new Date(1610683992804L), + 114); + PolicyGroup policygroup2 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", -31, -71, + new Date(1610683987011L), "3b2c98a6b0d3341e5184f0f766dde798", + "ace4c45e-27f4-4db2-8614-743e327296fa", new Date(1610683992804L), + 114); + PolicyGroup policygroup3 = new PolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", -113, 74, + new Date(1610683993364L), "3b2c98a6b0d3341e5184f0f766dde798", + "10a0f4ee-8ae4-45e4-a786-6ef210b39a51", new Date(1610683987738L), + -99); assertNotNull(policygroup1); assertNotNull(policygroup2); assertNotNull(policygroup3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyInheritedType.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyInheritedType.java index e6387faf8..2e10f8a1e 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyInheritedType.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestPolicyInheritedType.java @@ -30,7 +30,7 @@ public void testGetValue() { policyinheritedtype = PolicyInheritedType.getValue("template"); assertNotNull(policyinheritedtype); assertFalse(policyinheritedtype.isDefault()); - policyinheritedtype = PolicyInheritedType.getValue("ee5bed8f-2089-43bb-81d4-95975868d170"); + policyinheritedtype = PolicyInheritedType.getValue("432a1af1-4d0e-4da9-b97d-5e7d99cfae5e"); assertNotNull(policyinheritedtype); assertTrue(policyinheritedtype.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSaml2Request.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSaml2Request.java index 72c2ccb50..f297b2580 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSaml2Request.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSaml2Request.java @@ -18,10 +18,10 @@ public class TestSaml2Request { @Test public void testClone() { try { - Saml2Request saml2request1 = new Saml2Request(null, "ae476336-ce77-46d1-8451-2a3db1c83c62", null, - "737df7d1-0798-4a5b-9fb1-d421533b5f6b", - "7d4faa9c-d16a-4082-a98f-6dcdd7dcb227", - "c277bb36-14c9-4cee-90cc-901982675921"); + Saml2Request saml2request1 = new Saml2Request(null, "81befd0f-477f-4d08-b8c3-9bd03edd040a", null, + "90e8e9fc-549b-4779-bfe0-8311b15507f7", + "3f89ee20-de5d-4ccf-a122-d88f27ee9ffd", + "ef6b492a-1e23-469f-bd7e-c05c20dadc78"); Saml2Request saml2request2 = saml2request1.clone(); assertNotNull(saml2request1); assertNotNull(saml2request2); @@ -39,14 +39,14 @@ public void testClone() { @Test public void testHashCode() { try { - Saml2Request saml2request1 = new Saml2Request(null, "4d4c3c3e-ee5d-4734-9fd7-1f90b5be28bb", null, - "29a9abaa-ec47-437b-8f4e-6fb608ea9060", - "d78c8bac-9a6a-4659-9028-7c3a89d4f704", - "de19fe1a-c02a-48b0-92e5-483afd895c8b"); - Saml2Request saml2request2 = new Saml2Request(null, "4d4c3c3e-ee5d-4734-9fd7-1f90b5be28bb", null, - "29a9abaa-ec47-437b-8f4e-6fb608ea9060", - "d78c8bac-9a6a-4659-9028-7c3a89d4f704", - "de19fe1a-c02a-48b0-92e5-483afd895c8b"); + Saml2Request saml2request1 = new Saml2Request(null, "a14dff5a-06da-495d-a3ae-159d248e6e74", null, + "eb3e43c4-48b3-4ff5-b369-6236293e510f", + "5c0691f7-e584-4109-8695-d78389505a3c", + "9aa3b343-991f-4bde-80a1-811febd6e523"); + Saml2Request saml2request2 = new Saml2Request(null, "a14dff5a-06da-495d-a3ae-159d248e6e74", null, + "eb3e43c4-48b3-4ff5-b369-6236293e510f", + "5c0691f7-e584-4109-8695-d78389505a3c", + "9aa3b343-991f-4bde-80a1-811febd6e523"); assertNotNull(saml2request1); assertNotNull(saml2request2); assertNotSame(saml2request2, saml2request1); @@ -67,10 +67,10 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - Saml2Request saml2request = new Saml2Request(null, "15a72f73-3ee4-40e5-894c-e132457a2fa2", null, - "395511c9-27e7-4e3d-b716-bc2112344428", - "205b65bc-8c5f-42fd-bbdc-ae7aa81b98c0", - "45eef544-c889-4c60-9c6b-f408ba26c924"); + Saml2Request saml2request = new Saml2Request(null, "40982622-0693-4a46-80ea-2370be5ab66c", null, + "3cdaaa20-55c6-4c97-9f06-1948e178ce3c", + "b55e8827-d5b0-4062-9acf-2dd880153610", + "b774a74d-a9da-4f11-9b4a-3cd33440ab3c"); assertTrue(saml2request.isValid()); } @@ -81,18 +81,18 @@ public void testIsValid() { @Test public void testEquals() { try { - Saml2Request saml2request1 = new Saml2Request(null, "1d6bce09-7bd5-476a-8333-4659db71e0d9", null, - "6a786515-234f-425b-ab42-567b6559225c", - "2cdf3c7b-2cfd-43b4-8940-5504c7f9a9bc", - "152e4b09-63d9-4cc3-b057-167a4adf6501"); - Saml2Request saml2request2 = new Saml2Request(null, "1d6bce09-7bd5-476a-8333-4659db71e0d9", null, - "6a786515-234f-425b-ab42-567b6559225c", - "2cdf3c7b-2cfd-43b4-8940-5504c7f9a9bc", - "152e4b09-63d9-4cc3-b057-167a4adf6501"); - Saml2Request saml2request3 = new Saml2Request(null, "de2e0335-7823-4615-ba2e-6b68e50c53e2", null, - "d219b5da-6869-4eaa-b5c8-1177d353dbcf", - "00c98f5e-4d0e-4447-9443-d69a83980481", - "addfe1f8-c9d9-4198-b732-6f79e3f56bd6"); + Saml2Request saml2request1 = new Saml2Request(null, "ae0d69b8-3955-4d38-8b91-f8a9204289cf", null, + "a4a7b757-2b2a-44bf-a07b-692efe0e7cc1", + "aa86d6ed-c66e-492b-9a09-bc32d85263e5", + "0c259377-6fad-4d82-bee2-cf406e563503"); + Saml2Request saml2request2 = new Saml2Request(null, "ae0d69b8-3955-4d38-8b91-f8a9204289cf", null, + "a4a7b757-2b2a-44bf-a07b-692efe0e7cc1", + "aa86d6ed-c66e-492b-9a09-bc32d85263e5", + "0c259377-6fad-4d82-bee2-cf406e563503"); + Saml2Request saml2request3 = new Saml2Request(null, "11c20d59-f515-4acc-b215-960fc776ceb5", null, + "07946441-50f7-4de7-99d1-d44ac830f75e", + "d1fe583f-8881-4627-9a4e-9a8349acf08b", + "9da6a8fc-63ec-4c36-8ed4-1ee6d208058a"); assertNotNull(saml2request1); assertNotNull(saml2request2); assertNotNull(saml2request3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKey.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKey.java index 8a169ad9d..467ceec59 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKey.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKey.java @@ -19,14 +19,14 @@ public class TestSubtenantApiKey { @Test public void testClone() { try { - SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704667174L), 118, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "d3327aef-1da3-4499-bcf3-8e63b04cb6f5", -125, - "66affdfa-784e-4c17-bd15-ae9dd9843c00", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683995190L), 32, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "6c0f8fd2-5c2a-422e-a50f-46091c71cb65", -66, + "e103206c-0160-4b83-bf64-82890b1dcdd7", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704661082L)); + new Date(1610683992082L)); SubtenantApiKey subtenantapikey2 = subtenantapikey1.clone(); assertNotNull(subtenantapikey1); assertNotNull(subtenantapikey2); @@ -44,22 +44,22 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661913L), -32, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "ef1cd9b8-3221-4391-aefc-23518f83faa3", -25, - "e25f9e8a-ec98-4538-8132-816a43b1d1d2", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989530L), -110, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "4f208173-a66a-4655-9743-75b62fe320f6", -120, + "c74d660d-7045-43db-b029-9d270ff29e9b", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704664911L)); - SubtenantApiKey subtenantapikey2 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661913L), -32, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "ef1cd9b8-3221-4391-aefc-23518f83faa3", -25, - "e25f9e8a-ec98-4538-8132-816a43b1d1d2", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683985629L)); + SubtenantApiKey subtenantapikey2 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989530L), -110, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "4f208173-a66a-4655-9743-75b62fe320f6", -120, + "c74d660d-7045-43db-b029-9d270ff29e9b", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704664911L)); + new Date(1610683985629L)); assertNotNull(subtenantapikey1); assertNotNull(subtenantapikey2); assertNotSame(subtenantapikey2, subtenantapikey1); @@ -80,21 +80,21 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - SubtenantApiKey subtenantapikey = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661885L), 85, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "3eba6c08-a914-4034-a2cd-49e4a779d01d", -113, - "ac0638a9-9314-4405-a7fc-68ce972c07b1", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantApiKey subtenantapikey = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989452L), 49, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "23824bc8-106b-4080-8941-557294cb8df4", 49, + "fa132d33-6431-4a9f-a4d3-7d9e2d036adb", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704664450L)); + new Date(1610683993839L)); assertTrue(subtenantapikey.isValid()); - SubtenantApiKey subtenantapikeyInvalid = new SubtenantApiKey(null, new Date(1574704669624L), -123, null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - "4ea88170-bd72-4d0a-b6c5-06d1615190df", 60, null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", + SubtenantApiKey subtenantapikeyInvalid = new SubtenantApiKey(null, new Date(1610683988185L), 86, null, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + "b7ae25ae-6ec3-44c5-a61d-b0f98b03414b", -60, null, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", SubtenantApiKeyStatus.getDefault(), - new Date(1574704667158L)); + new Date(1610683989085L)); assertFalse(subtenantapikeyInvalid.isValid()); } @@ -105,30 +105,30 @@ public void testIsValid() { @Test public void testEquals() { try { - SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704668684L), -105, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "1a2ce0b9-4007-4d82-a458-bce5d8a2085a", -33, - "2f0a11bf-c499-4b20-9b7b-ef16819784f2", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantApiKey subtenantapikey1 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987619L), 25, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "c7be1e17-e043-465e-bc31-5bcdae5e6d1c", 97, + "c19a8b06-ea50-448d-a208-b2c91e18db13", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704669541L)); - SubtenantApiKey subtenantapikey2 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704668684L), -105, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "1a2ce0b9-4007-4d82-a458-bce5d8a2085a", -33, - "2f0a11bf-c499-4b20-9b7b-ef16819784f2", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683986460L)); + SubtenantApiKey subtenantapikey2 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987619L), 25, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "c7be1e17-e043-465e-bc31-5bcdae5e6d1c", 97, + "c19a8b06-ea50-448d-a208-b2c91e18db13", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704669541L)); - SubtenantApiKey subtenantapikey3 = new SubtenantApiKey("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666574L), -105, null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "60d4acbb-208b-4d39-a7e7-0311a4c9d668", -73, - "4d2e0a41-68cb-443d-b170-9281ae717cda", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683986460L)); + SubtenantApiKey subtenantapikey3 = new SubtenantApiKey("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994080L), -124, null, + "3b2c98a6b0d3341e5184f0f766dde798", + "1b7588a9-78f3-4527-857c-88451aa60987", 7, + "66e56c84-95eb-431d-9da0-a9a976c562b1", + "3b2c98a6b0d3341e5184f0f766dde798", SubtenantApiKeyStatus.getDefault(), - new Date(1574704667904L)); + new Date(1610683987598L)); assertNotNull(subtenantapikey1); assertNotNull(subtenantapikey2); assertNotNull(subtenantapikey3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyStatus.java index f398092a4..d38a76177 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantApiKeyStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { subtenantapikeystatus = SubtenantApiKeyStatus.getValue("INACTIVE"); assertNotNull(subtenantapikeystatus); assertFalse(subtenantapikeystatus.isDefault()); - subtenantapikeystatus = SubtenantApiKeyStatus.getValue("8846c2b9-6c2d-48a2-99ae-5959e420197f"); + subtenantapikeystatus = SubtenantApiKeyStatus.getValue("2ba1e39f-ef0c-47a0-86c3-03afd7e97967"); assertNotNull(subtenantapikeystatus); assertTrue(subtenantapikeystatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProvider.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProvider.java index 841aec7e6..e035fa095 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProvider.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProvider.java @@ -19,15 +19,16 @@ public class TestSubtenantIdentityProvider { @Test public void testClone() { try { - SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704663830L), - "12d46c68-a8f8-4399-aad6-bdafac357073", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683992562L), + "16d0a5bf-7fe9-4b4a-b038-c4fba8eac6ac", + "3b2c98a6b0d3341e5184f0f766dde798", true, - "31909008-fad1-4943-990c-9dfca03b3011", + "f515a65d-570c-4027-bc5d-15b5253b5284", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704665287L)); + new Date(1610683989917L)); SubtenantIdentityProvider subtenantidentityprovider2 = subtenantidentityprovider1.clone(); assertNotNull(subtenantidentityprovider1); assertNotNull(subtenantidentityprovider2); @@ -45,24 +46,26 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704665062L), - "9079f9d3-acea-4404-b164-31d2d842190d", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994693L), + "2c56c52d-55d9-44dc-a0ef-c3a2043fb12b", + "3b2c98a6b0d3341e5184f0f766dde798", true, - "30705132-2d6b-4708-ba10-12b1c4fe7e3c", + "9d12b74c-8f1b-4715-a237-cebbccf18c8a", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704670033L)); - SubtenantIdentityProvider subtenantidentityprovider2 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704665062L), - "9079f9d3-acea-4404-b164-31d2d842190d", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + new Date(1610683994750L)); + SubtenantIdentityProvider subtenantidentityprovider2 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994693L), + "2c56c52d-55d9-44dc-a0ef-c3a2043fb12b", + "3b2c98a6b0d3341e5184f0f766dde798", true, - "30705132-2d6b-4708-ba10-12b1c4fe7e3c", + "9d12b74c-8f1b-4715-a237-cebbccf18c8a", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704670033L)); + new Date(1610683994750L)); assertNotNull(subtenantidentityprovider1); assertNotNull(subtenantidentityprovider2); assertNotSame(subtenantidentityprovider2, subtenantidentityprovider1); @@ -83,23 +86,25 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - SubtenantIdentityProvider subtenantidentityprovider = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704667320L), - "c67a4554-4c62-4969-88f6-4e6ea864e6a0", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + SubtenantIdentityProvider subtenantidentityprovider = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994575L), + "67cf8acd-7c4a-4392-8803-0ae6c6b53a35", + "3b2c98a6b0d3341e5184f0f766dde798", true, - "84c78995-c6f2-4ca1-a902-c7b2d50ee3a1", - null, + "36aae36d-c0ba-45d3-bb9b-99be230497d3", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704667603L)); + new Date(1610683988039L)); assertTrue(subtenantidentityprovider.isValid()); SubtenantIdentityProvider subtenantidentityproviderInvalid = new SubtenantIdentityProvider(null, - new Date(1574704662363L), - "74dd9bc8-bce1-4142-92ba-c7a84ead16693f84c576-ab5f-45b9-bcf6-1de080a2b59166b85ef9-5b17-4b91-b1d6-752810e2967a406cfd71-6d8f-40f7-a926-8c2a6f1182e428375934-b02b-4832-84db-baaf9ed8950ca1e7b82f-df3d-4a22-9db7-2a7aa75cee0676556323-3399-428b-869f-58d35786faa4aa3bb984-ff7e-455a-bcf0-79cd9577de8e6f786d71-da04-4aa9-b1ed-c596c57d7f6e1a8f985d-49e5-4aae-beb2-623e5e70b1fc158c126a-cc53-40c5-8c11-cd466ff5902017886f65-1f71-4d2c-9975-bf6c15d2675f4ce35805-c333-4e5a-b17a-4216a3f5d7a20a94c5b3-3f1f-4d65-bfcb-48c83269722d", - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - false, null, null, + new Date(1610683988620L), + "22d2d87d-57b4-4737-9c88-94d56b5ea4cd5637aaac-1abb-4e3d-870d-3f1746adfb72ae9de4a4-d404-4554-8598-21b06618a71414e02103-b0d0-48de-be0b-6d121e6d872b8554d059-a047-45c7-b9c1-a1d9859d5c40b654ecb8-585a-4027-88b4-a4edaaffadb9460a50fc-105f-4afd-b864-7974505f03fec425da8d-a407-4baf-bdc4-8a9b298275abec942dd7-22c9-46c4-a0cb-620812227a1678f0206a-6065-4b53-875a-c439820d8699ec1cc632-6225-471c-9b12-8dd138d533babec18b57-5351-4425-b213-cf38aef5688e78d48eb3-08c5-45f4-967d-184934da6cc7e4c6f848-15f5-4827-a812-7f78e23428f3", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + true, null, + new OidcRequest(), + null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704668264L)); + new Date(1610683992184L)); assertFalse(subtenantidentityproviderInvalid.isValid()); } @@ -110,33 +115,36 @@ public void testIsValid() { @Test public void testEquals() { try { - SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662624L), - "6fe9796f-f984-4532-99fa-d8010ca42ba8", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - false, - "020338f7-8bf4-4ddc-9b6d-bb20d6a0070c", + SubtenantIdentityProvider subtenantidentityprovider1 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683990126L), + "8b6b5e6f-9203-4a51-b43b-274d29136d65", + "3b2c98a6b0d3341e5184f0f766dde798", + true, + "4b95e2b2-2531-4170-b69b-b771c22a31c9", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704671086L)); - SubtenantIdentityProvider subtenantidentityprovider2 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662624L), - "6fe9796f-f984-4532-99fa-d8010ca42ba8", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - false, - "020338f7-8bf4-4ddc-9b6d-bb20d6a0070c", + new Date(1610683985834L)); + SubtenantIdentityProvider subtenantidentityprovider2 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683990126L), + "8b6b5e6f-9203-4a51-b43b-274d29136d65", + "3b2c98a6b0d3341e5184f0f766dde798", + true, + "4b95e2b2-2531-4170-b69b-b771c22a31c9", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704671086L)); - SubtenantIdentityProvider subtenantidentityprovider3 = new SubtenantIdentityProvider("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666614L), - "849f4ae0-d89d-4df4-a7cd-8a4ac903da9d", - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - false, - "377db076-51a4-4f30-a415-31a243567f8b", + new Date(1610683985834L)); + SubtenantIdentityProvider subtenantidentityprovider3 = new SubtenantIdentityProvider("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987096L), + "872867b0-776d-4977-9531-e4db10eb1308", + "3b2c98a6b0d3341e5184f0f766dde798", + true, + "a527cd0a-bd5f-4067-a279-aa3227f2da1d", + new OidcRequest(), null, SubtenantIdentityProviderStatus.getDefault(), - new Date(1574704669559L)); + new Date(1610683989465L)); assertNotNull(subtenantidentityprovider1); assertNotNull(subtenantidentityprovider2); assertNotNull(subtenantidentityprovider3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderAlgorithm.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderAlgorithm.java index 3d1807b6c..0b54a7821 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderAlgorithm.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderAlgorithm.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenantidentityprovideralgorithm = SubtenantIdentityProviderAlgorithm.getValue("EC256"); assertNotNull(subtenantidentityprovideralgorithm); assertFalse(subtenantidentityprovideralgorithm.isDefault()); - subtenantidentityprovideralgorithm = SubtenantIdentityProviderAlgorithm.getValue("1f35350d-2c3d-46e6-9ffc-f5bd5d5adc60"); + subtenantidentityprovideralgorithm = SubtenantIdentityProviderAlgorithm.getValue("0c39eaac-c33e-4c67-a917-bae0b9b396b1"); assertNotNull(subtenantidentityprovideralgorithm); assertTrue(subtenantidentityprovideralgorithm.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderStatus.java index b3680a1bd..644c0fcda 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantIdentityProviderStatus.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenantidentityproviderstatus = SubtenantIdentityProviderStatus.getValue("SUSPENDED"); assertNotNull(subtenantidentityproviderstatus); assertFalse(subtenantidentityproviderstatus.isDefault()); - subtenantidentityproviderstatus = SubtenantIdentityProviderStatus.getValue("b4409688-5c99-46f8-acd8-93dc2a1fd4fd"); + subtenantidentityproviderstatus = SubtenantIdentityProviderStatus.getValue("27aef724-14ec-41b5-9c43-d054d3d35b47"); assertNotNull(subtenantidentityproviderstatus); assertTrue(subtenantidentityproviderstatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroup.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroup.java index fc16edb42..fcad618ad 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroup.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantPolicyGroup.java @@ -19,11 +19,11 @@ public class TestSubtenantPolicyGroup { @Test public void testClone() { try { - SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -127, new Date(1574704667268L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "a95274ba-2100-4eae-a7ac-1ae275557a35", - new Date(1574704664886L), 32); + SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -25, -89, new Date(1610683992170L), + "3b2c98a6b0d3341e5184f0f766dde798", + "40151933-77c6-4c97-a261-256ea6336b49", + new Date(1610683988043L), 19); SubtenantPolicyGroup subtenantpolicygroup2 = subtenantpolicygroup1.clone(); assertNotNull(subtenantpolicygroup1); assertNotNull(subtenantpolicygroup2); @@ -41,16 +41,16 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -71, new Date(1574704668488L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "fa109e86-9ca1-4c66-99c1-883f3809a115", - new Date(1574704667681L), -11); - SubtenantPolicyGroup subtenantpolicygroup2 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -71, new Date(1574704668488L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "fa109e86-9ca1-4c66-99c1-883f3809a115", - new Date(1574704667681L), -11); + SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -18, 117, new Date(1610683990747L), + "3b2c98a6b0d3341e5184f0f766dde798", + "e05a5022-6ac9-436c-86bd-3acc596967dd", + new Date(1610683988292L), -89); + SubtenantPolicyGroup subtenantpolicygroup2 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -18, 117, new Date(1610683990747L), + "3b2c98a6b0d3341e5184f0f766dde798", + "e05a5022-6ac9-436c-86bd-3acc596967dd", + new Date(1610683988292L), -89); assertNotNull(subtenantpolicygroup1); assertNotNull(subtenantpolicygroup2); assertNotSame(subtenantpolicygroup2, subtenantpolicygroup1); @@ -71,16 +71,17 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - SubtenantPolicyGroup subtenantpolicygroup = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", -46, - new Date(1574704671071L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "8ab0c249-ceca-401c-af07-b17c3c1016db", - new Date(1574704666576L), 124); + SubtenantPolicyGroup subtenantpolicygroup = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", 18, + -32, new Date(1610683993027L), + "3b2c98a6b0d3341e5184f0f766dde798", + "e38b3382-bea0-41b8-b1f1-7e2bd99cb3c3", + new Date(1610683985837L), -116); assertTrue(subtenantpolicygroup.isValid()); - SubtenantPolicyGroup subtenantpolicygroupInvalid = new SubtenantPolicyGroup(null, 59, new Date(1574704663953L), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - null, new Date(1574704669723L), - 117); + SubtenantPolicyGroup subtenantpolicygroupInvalid = new SubtenantPolicyGroup(null, 114, 55, + new Date(1610683995016L), + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + null, new Date(1610683989689L), + -107); assertFalse(subtenantpolicygroupInvalid.isValid()); } @@ -91,21 +92,21 @@ null, new Date(1574704669723L), @Test public void testEquals() { try { - SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -103, new Date(1574704664760L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "e1e57ca8-40bd-4cb0-add0-e2ed28f18ade", - new Date(1574704670710L), 75); - SubtenantPolicyGroup subtenantpolicygroup2 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -103, new Date(1574704664760L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "e1e57ca8-40bd-4cb0-add0-e2ed28f18ade", - new Date(1574704670710L), 75); - SubtenantPolicyGroup subtenantpolicygroup3 = new SubtenantPolicyGroup("4f267f967f7d1f5e3fa0d6abaccdb4bf", - -5, new Date(1574704661677L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - "3de445f2-4ce9-4f2e-bbef-634ee0c1292b", - new Date(1574704667766L), -65); + SubtenantPolicyGroup subtenantpolicygroup1 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -124, 61, new Date(1610683993719L), + "3b2c98a6b0d3341e5184f0f766dde798", + "24130a4d-69f5-4181-9f1d-78025c9b37d6", + new Date(1610683990678L), -42); + SubtenantPolicyGroup subtenantpolicygroup2 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -124, 61, new Date(1610683993719L), + "3b2c98a6b0d3341e5184f0f766dde798", + "24130a4d-69f5-4181-9f1d-78025c9b37d6", + new Date(1610683990678L), -42); + SubtenantPolicyGroup subtenantpolicygroup3 = new SubtenantPolicyGroup("3b2c98a6b0d3341e5184f0f766dde798", + -37, 85, new Date(1610683987063L), + "3b2c98a6b0d3341e5184f0f766dde798", + "6047ff8b-f3a9-4643-a815-73aa7fd75e75", + new Date(1610683990923L), 24); assertNotNull(subtenantpolicygroup1); assertNotNull(subtenantpolicygroup2); assertNotNull(subtenantpolicygroup3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUser.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUser.java index 4fb608af9..049d00370 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUser.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUser.java @@ -19,15 +19,16 @@ public class TestSubtenantUser { @Test public void testClone() { try { - SubtenantUser subtenantuser1 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "db8f5337-b304-452d-9525-b674a8855046", - new Date(1574704661255L), 30, null, "d7e14.69f94@2fd8b.me", - true, "9b08ed95-f7e8-46ce-bf23-40c434893896", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", true, true, true, 13, - null, null, "154e5d6b-9c04-447b-90d7-ef1808e5f900", -75, - "65869666-d2bd-43c0-9f8a-4d748d3772c9", + SubtenantUser subtenantuser1 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "a7d53e10-e90d-4c0a-a8e7-0f9285e0e6c6", + new Date(1610683990616L), -94, null, + "49ffc.72ec8@09ff1.me", false, + "9b6a35a3-e73e-457a-8e58-b98cf8f0dc57", null, + "3b2c98a6b0d3341e5184f0f766dde798", false, false, false, + 55, null, null, "8aa3eea1-c5aa-4aad-84e9-b45148c85ddf", + 107, "7d3f7c08-92fb-450a-bdd3-d62db731ace3", SubtenantUserStatus.getDefault(), null, - new Date(1574704666892L), ",5-2+"); + new Date(1610683988178L), "_88="); SubtenantUser subtenantuser2 = subtenantuser1.clone(); assertNotNull(subtenantuser1); assertNotNull(subtenantuser2); @@ -45,26 +46,24 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantUser subtenantuser1 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "4568e455-9dfe-49e9-8773-6127ca815aec", - new Date(1574704663539L), -13, null, - "08bbe.497f2@00bf8.me", false, - "c2b9d374-6e3c-41d9-96fb-45b9e897a6ce", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", true, true, true, -68, - null, null, "37bf913f-2469-456f-b96c-5cf45f6c470c", 17, - "6b92d3d1-152c-468f-95f1-48e8b643b771", + SubtenantUser subtenantuser1 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "7282c0e6-8819-4845-a1fb-2b68038bfc25", + new Date(1610683994116L), 18, null, "56b05.15bcd@6945b.me", + false, "35a95247-540d-4925-b906-9ca8a232f589", null, + "3b2c98a6b0d3341e5184f0f766dde798", true, false, false, 10, + null, null, "aed1e770-ae97-4cd5-991c-f9542c655796", 69, + "5e6fc95b-1999-4ec2-a953-16aa78359327", SubtenantUserStatus.getDefault(), null, - new Date(1574704666711L), ",5-2+"); - SubtenantUser subtenantuser2 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "4568e455-9dfe-49e9-8773-6127ca815aec", - new Date(1574704663539L), -13, null, - "08bbe.497f2@00bf8.me", false, - "c2b9d374-6e3c-41d9-96fb-45b9e897a6ce", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", true, true, true, -68, - null, null, "37bf913f-2469-456f-b96c-5cf45f6c470c", 17, - "6b92d3d1-152c-468f-95f1-48e8b643b771", + new Date(1610683993599L), "_88="); + SubtenantUser subtenantuser2 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "7282c0e6-8819-4845-a1fb-2b68038bfc25", + new Date(1610683994116L), 18, null, "56b05.15bcd@6945b.me", + false, "35a95247-540d-4925-b906-9ca8a232f589", null, + "3b2c98a6b0d3341e5184f0f766dde798", true, false, false, 10, + null, null, "aed1e770-ae97-4cd5-991c-f9542c655796", 69, + "5e6fc95b-1999-4ec2-a953-16aa78359327", SubtenantUserStatus.getDefault(), null, - new Date(1574704666711L), ",5-2+"); + new Date(1610683993599L), "_88="); assertNotNull(subtenantuser1); assertNotNull(subtenantuser2); assertNotSame(subtenantuser2, subtenantuser1); @@ -85,27 +84,27 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - SubtenantUser subtenantuser = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "19296f7a-476e-4757-bef7-24abe275f3c3", - new Date(1574704671142L), 55, null, "b5719.e0bd2@1f4f8.fr", - true, "aa7728e9-33a2-4bf1-9282-37178bcb76d4", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", true, false, false, -84, - null, null, "cf5f921e-eafd-41b1-ac03-f6281e0f67a9", -106, - "3505fa32-894d-4d71-8f47-f5fb77d5ff09", + SubtenantUser subtenantuser = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "936aa999-922a-40e6-bcec-ea70f2d2af3d", + new Date(1610683987737L), 4, null, "942ab.30bf2@13fa6.me", true, + "d73a1172-5ae3-4eb4-975a-a5aeaa1bb153", null, + "3b2c98a6b0d3341e5184f0f766dde798", true, false, true, 47, null, + null, "64d72002-708d-43f0-972b-6e2da7608e62", 56, + "57588897-9221-41e7-a7dc-75bccc1c207e", SubtenantUserStatus.getDefault(), null, - new Date(1574704661684L), ",5-2+"); + new Date(1610683986063L), "_88="); assertTrue(subtenantuser.isValid()); - SubtenantUser subtenantuserInvalid = new SubtenantUser(null, null, "7d85b716-30d6-4124-b858-a642cfb4306f", - new Date(1574704663696L), -113, null, null, true, - "316afb16-8527-4b41-9f77-1b5178fdf401dd22e8e3-0917-4c01-b3a0-10e12757364d3ca91b6b-8006-4b7c-bf68-fcebf670d120", + SubtenantUser subtenantuserInvalid = new SubtenantUser(null, null, "14739c9f-411a-4317-a160-a28e7199c33c", + new Date(1610683994794L), 83, null, null, false, + "c968979c-766d-46ac-a157-5482b9e6365841535336-8a5f-4982-b09e-4a97e892dcec1f7b44a5-548a-4854-950d-2b70902f39c0", null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - false, false, true, 55, null, null, - "2e4496a1-c0c1-4082-a419-16a3451ccd08", -69, - "e246c46f-a5b8-46d4-9c83-c7d3631493072bb35f0d-1333-42f5-af91-0b05d8b8dc8388c2cf5d-4f66-49f7-aacf-87bd974a5465", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + true, true, false, -52, null, null, + "9a0952bd-1c31-4d8f-a23b-5343233ce71f", -7, + "a7964b89-af35-44b1-9cba-d467c59367e1875a74a3-a4af-410c-b616-79f8a8afce25a8706a10-72f3-4520-93c5-bc1e3ab871e6", SubtenantUserStatus.getDefault(), null, - new Date(1574704662013L), - "!\u0018.433�/则4䂛鳬330㉦륀\u001aﹲ\u0016谒14.43-03ᔣ礞4\u00184&14-\u000f\u0001313��$$-?\u000731)�-3昣3훧$$굳4\u0019婢\f"); + new Date(1610683987365L), + "\u001b煆\u0019F<9<;E<@<\u0006F毞;'?J\u0011:TT;\u001b:3\u001eS]\u0015祻\u001d\u0001*]3\u0000ꈧ7毕<\u0005:0E4糟^9^욙;뵙XV?I�["); assertFalse(subtenantuserInvalid.isValid()); } @@ -116,35 +115,36 @@ public void testIsValid() { @Test public void testEquals() { try { - SubtenantUser subtenantuser1 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "09548d5b-d941-4766-9a07-473a20b9a23d", - new Date(1574704668289L), -77, null, - "6d85b.35f33@f9b2c.fr", true, - "2d82c87e-ed38-4b53-a085-9dcf0bd7a198", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", false, true, true, - -100, null, null, "918b39c7-c816-46c2-83e7-1691409c0802", - -97, "a1339417-3aa4-49c9-a0a3-32160cd119f6", + SubtenantUser subtenantuser1 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "d34cbedb-1869-4050-934c-c79ef0ad84ff", + new Date(1610683990243L), -117, null, + "23092.9c4f4@ca30b.fr", false, + "1ac20e95-ef53-4b47-8b16-353c43ea25b3", null, + "3b2c98a6b0d3341e5184f0f766dde798", false, false, true, + -29, null, null, "0aa2f3cb-53eb-4355-972c-350930de4b53", + -97, "86271f56-3f6c-4856-8777-232f36d1d20a", SubtenantUserStatus.getDefault(), null, - new Date(1574704663219L), ",5-2+"); - SubtenantUser subtenantuser2 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "09548d5b-d941-4766-9a07-473a20b9a23d", - new Date(1574704668289L), -77, null, - "6d85b.35f33@f9b2c.fr", true, - "2d82c87e-ed38-4b53-a085-9dcf0bd7a198", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", false, true, true, - -100, null, null, "918b39c7-c816-46c2-83e7-1691409c0802", - -97, "a1339417-3aa4-49c9-a0a3-32160cd119f6", + new Date(1610683994357L), "_88="); + SubtenantUser subtenantuser2 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "d34cbedb-1869-4050-934c-c79ef0ad84ff", + new Date(1610683990243L), -117, null, + "23092.9c4f4@ca30b.fr", false, + "1ac20e95-ef53-4b47-8b16-353c43ea25b3", null, + "3b2c98a6b0d3341e5184f0f766dde798", false, false, true, + -29, null, null, "0aa2f3cb-53eb-4355-972c-350930de4b53", + -97, "86271f56-3f6c-4856-8777-232f36d1d20a", SubtenantUserStatus.getDefault(), null, - new Date(1574704663219L), ",5-2+"); - SubtenantUser subtenantuser3 = new SubtenantUser("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - "7799af1e-8b5d-4b3e-8946-a14efc917d53", - new Date(1574704665923L), 77, null, "befa4.f8a30@a02cf.me", - true, "9fcbddaf-25f1-49c5-9968-714e82896ba5", null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", false, true, true, -33, - null, null, "d5b4cabd-6820-41cf-8b9a-d222792374c5", 32, - "c0a5299f-d8a6-4d59-90af-74a6e613cce8", + new Date(1610683994357L), "_88="); + SubtenantUser subtenantuser3 = new SubtenantUser("3b2c98a6b0d3341e5184f0f766dde798", null, + "6d7691f7-b425-4f7c-ad4f-63b7ee3aa69c", + new Date(1610683985757L), -38, null, + "bd395.23d5b@41f32.me", false, + "11847b5d-b3eb-4216-bbde-3abcfa082520", null, + "3b2c98a6b0d3341e5184f0f766dde798", false, false, true, + -42, null, null, "c88bc1a7-e90d-4b61-b6d3-eae768ac2523", + -23, "9754b6f4-4013-47cb-911d-39b9431f657e", SubtenantUserStatus.getDefault(), null, - new Date(1574704665853L), ",5-2+"); + new Date(1610683991906L), "_88="); assertNotNull(subtenantuser1); assertNotNull(subtenantuser2); assertNotNull(subtenantuser3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitation.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitation.java index 5e535b989..36cc24a61 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitation.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserInvitation.java @@ -19,15 +19,15 @@ public class TestSubtenantUserInvitation { @Test public void testClone() { try { - SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704662409L), - "6814d.863a1@4012e.me", - new Date(1574704667096L), + SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683986973L), + "406d5.7cb9a@61a52.fr", + new Date(1610683989415L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704669508L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + new Date(1610683985337L), + "3b2c98a6b0d3341e5184f0f766dde798"); SubtenantUserInvitation subtenantuserinvitation2 = subtenantuserinvitation1.clone(); assertNotNull(subtenantuserinvitation1); assertNotNull(subtenantuserinvitation2); @@ -45,24 +45,24 @@ public void testClone() { @Test public void testHashCode() { try { - SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704668198L), - "84a04.ae8b0@a9759.me", - new Date(1574704669322L), + SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987192L), + "89f5c.d42b3@2599f.me", + new Date(1610683994062L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704661564L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - SubtenantUserInvitation subtenantuserinvitation2 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704668198L), - "84a04.ae8b0@a9759.me", - new Date(1574704669322L), + new Date(1610683987799L), + "3b2c98a6b0d3341e5184f0f766dde798"); + SubtenantUserInvitation subtenantuserinvitation2 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683987192L), + "89f5c.d42b3@2599f.me", + new Date(1610683994062L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704661564L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + new Date(1610683987799L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(subtenantuserinvitation1); assertNotNull(subtenantuserinvitation2); assertNotSame(subtenantuserinvitation2, subtenantuserinvitation1); @@ -83,23 +83,23 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - SubtenantUserInvitation subtenantuserinvitation = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704663336L), - "7de1b.de817@35b0f.me", - new Date(1574704666845L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", - null, new Date(1574704662214L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + SubtenantUserInvitation subtenantuserinvitation = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683986951L), + "293ad.7895b@c6906.me", + new Date(1610683994200L), null, + "3b2c98a6b0d3341e5184f0f766dde798", + null, new Date(1610683986681L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertTrue(subtenantuserinvitation.isValid()); SubtenantUserInvitation subtenantuserinvitationInvalid = new SubtenantUserInvitation(null, - new Date(1574704663387L), + new Date(1610683994209L), null, - new Date(1574704668725L), + new Date(1610683992499L), null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", null, - new Date(1574704665385L), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K"); + new Date(1610683986715L), + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e"); assertFalse(subtenantuserinvitationInvalid.isValid()); } @@ -110,33 +110,33 @@ null, new Date(1574704662214L), @Test public void testEquals() { try { - SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661612L), - "a423b.68062@4b215.me", - new Date(1574704670124L), + SubtenantUserInvitation subtenantuserinvitation1 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989711L), + "9ef10.f82df@386c6.fr", + new Date(1610683994775L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704663209L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - SubtenantUserInvitation subtenantuserinvitation2 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704661612L), - "a423b.68062@4b215.me", - new Date(1574704670124L), + new Date(1610683995164L), + "3b2c98a6b0d3341e5184f0f766dde798"); + SubtenantUserInvitation subtenantuserinvitation2 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989711L), + "9ef10.f82df@386c6.fr", + new Date(1610683994775L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704663209L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - SubtenantUserInvitation subtenantuserinvitation3 = new SubtenantUserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704663832L), - "81daa.8c99e@9d701.me", - new Date(1574704670847L), + new Date(1610683995164L), + "3b2c98a6b0d3341e5184f0f766dde798"); + SubtenantUserInvitation subtenantuserinvitation3 = new SubtenantUserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683985331L), + "6adb2.c08fe@57f08.me", + new Date(1610683994384L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", + "3b2c98a6b0d3341e5184f0f766dde798", null, - new Date(1574704665108L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + new Date(1610683995053L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(subtenantuserinvitation1); assertNotNull(subtenantuserinvitation2); assertNotNull(subtenantuserinvitation3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserStatus.java index 400e8f30c..0bf77a007 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestSubtenantUserStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { subtenantuserstatus = SubtenantUserStatus.getValue("ENROLLING"); assertNotNull(subtenantuserstatus); assertFalse(subtenantuserstatus.isDefault()); - subtenantuserstatus = SubtenantUserStatus.getValue("376d4345-0f36-469b-b652-6af75211ceb2"); + subtenantuserstatus = SubtenantUserStatus.getValue("9b2a3119-7e11-47f1-af99-06e0b68e8c50"); assertNotNull(subtenantuserstatus); assertTrue(subtenantuserstatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestTierHistory.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestTierHistory.java new file mode 100644 index 000000000..964fefe51 --- /dev/null +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestTierHistory.java @@ -0,0 +1,97 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated unit test class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.model; + +import static org.junit.Assert.*; + +import java.util.Date; +import org.junit.Test; + +/** + * Unit tests for Model TierHistory. + */ +@SuppressWarnings("PMD.AvoidDuplicateLiterals") +public class TestTierHistory { + /** + * Tests the clone method. + */ + @SuppressWarnings("resource") + @Test + public void testClone() { + try { + TierHistory tierhistory1 = new TierHistory("17aee35c-0f2d-4832-a9db-a03a23f99559", + new Date(1610683988365L)); + TierHistory tierhistory2 = tierhistory1.clone(); + assertNotNull(tierhistory1); + assertNotNull(tierhistory2); + assertNotSame(tierhistory2, tierhistory1); + assertEquals(tierhistory2, tierhistory1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the hashCode method. + */ + @SuppressWarnings("resource") + @Test + public void testHashCode() { + try { + TierHistory tierhistory1 = new TierHistory("d62fa12f-be52-4751-82a4-eb0ed09b6469", + new Date(1610683993070L)); + TierHistory tierhistory2 = new TierHistory("d62fa12f-be52-4751-82a4-eb0ed09b6469", + new Date(1610683993070L)); + assertNotNull(tierhistory1); + assertNotNull(tierhistory2); + assertNotSame(tierhistory2, tierhistory1); + assertEquals(tierhistory2, tierhistory1); + assertEquals(tierhistory2.hashCode(), tierhistory1.hashCode()); + int hashCode = tierhistory1.hashCode(); + for (int i = 0; i < 5; i++) { + assertEquals(hashCode, tierhistory1.hashCode()); + } + } catch (Exception exception) { + fail(exception.getMessage()); + } + } + + /** + * Tests the isValid method. + */ + @SuppressWarnings("resource") + @Test + public void testIsValid() { + TierHistory tierhistory = new TierHistory("375b5c75-34c2-4257-86ec-95ccf3d04224", new Date(1610683992176L)); + assertTrue(tierhistory.isValid()); + } + + /** + * Tests the equals method. + */ + @SuppressWarnings("resource") + @Test + public void testEquals() { + try { + TierHistory tierhistory1 = new TierHistory("0c94483d-7f70-452d-be90-e2d3c58934e9", + new Date(1610683989581L)); + TierHistory tierhistory2 = new TierHistory("0c94483d-7f70-452d-be90-e2d3c58934e9", + new Date(1610683989581L)); + TierHistory tierhistory3 = new TierHistory("66f1e599-ba5c-4f8b-bdb9-d4537899f87b", + new Date(1610683988537L)); + assertNotNull(tierhistory1); + assertNotNull(tierhistory2); + assertNotNull(tierhistory3); + assertNotSame(tierhistory2, tierhistory1); + assertNotSame(tierhistory3, tierhistory1); + assertEquals(tierhistory2, tierhistory1); + assertEquals(tierhistory2, tierhistory1); + assertEquals(tierhistory1, tierhistory2); + assertEquals(tierhistory1, tierhistory1); + assertFalse(tierhistory1.equals(null)); + assertNotEquals(tierhistory3, tierhistory1); + } catch (Exception exception) { + fail(exception.getMessage()); + } + } +} diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUser.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUser.java index fc97f68db..486a3a0fd 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUser.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUser.java @@ -19,12 +19,12 @@ public class TestUser { @Test public void testClone() { try { - User user1 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "6e5ed3a9-79a2-4e0f-a38f-9a8d58b86d6a", - new Date(1574704666657L), -115, null, "62691.57121@8571a.me", true, - "060759ff-801e-411b-b205-4a74825c7f09", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - false, false, true, 98, null, null, "3921a41f-a56f-42f0-98a2-880b4619c6f9", 83, - "dabfad5b-68ce-40ff-9509-17695337d474", UserStatus.getDefault(), null, - new Date(1574704664556L), ",5-2+"); + User user1 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "4a5b89f7-dec9-4c14-8849-a9e36438bd49", + new Date(1610683992637L), -83, null, "e3642.328ec@864e5.me", false, + "7d204941-3680-42a8-a700-e5136e38d0ae", null, "3b2c98a6b0d3341e5184f0f766dde798", + false, false, false, -59, null, null, "11e7e42f-62d4-4d34-88e1-095d5c27ff15", -75, + "ce634207-4304-4743-abbe-cc4fed2de21a", UserStatus.getDefault(), null, + new Date(1610683986738L), "_88="); User user2 = user1.clone(); assertNotNull(user1); assertNotNull(user2); @@ -42,18 +42,18 @@ public void testClone() { @Test public void testHashCode() { try { - User user1 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "32ec564c-79f6-4e9c-be22-abea0ebf4a6b", - new Date(1574704663795L), 67, null, "56ad4.ce4fa@a8b1b.me", true, - "cb44c06f-3a10-43ca-b7bc-668db4287687", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - true, true, false, -100, null, null, "24536b43-76bc-4e7c-a0ec-adb3a1fa28ee", 72, - "335612d9-3eb5-4872-a45b-65722af8afcd", UserStatus.getDefault(), null, - new Date(1574704666665L), ",5-2+"); - User user2 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "32ec564c-79f6-4e9c-be22-abea0ebf4a6b", - new Date(1574704663795L), 67, null, "56ad4.ce4fa@a8b1b.me", true, - "cb44c06f-3a10-43ca-b7bc-668db4287687", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - true, true, false, -100, null, null, "24536b43-76bc-4e7c-a0ec-adb3a1fa28ee", 72, - "335612d9-3eb5-4872-a45b-65722af8afcd", UserStatus.getDefault(), null, - new Date(1574704666665L), ",5-2+"); + User user1 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "ab81d828-e707-4809-a76f-0936f35d98e1", + new Date(1610683990863L), -114, null, "1d3b8.6e6bd@da180.me", false, + "ecbac5e8-e93c-4887-b4da-b6dd4d7facfa", null, "3b2c98a6b0d3341e5184f0f766dde798", + true, false, true, -79, null, null, "34cacd85-e6a1-41d6-8a37-df8c3de4aa0e", 9, + "c51767b4-b84d-4873-918d-6112527dfc83", UserStatus.getDefault(), null, + new Date(1610683989630L), "_88="); + User user2 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "ab81d828-e707-4809-a76f-0936f35d98e1", + new Date(1610683990863L), -114, null, "1d3b8.6e6bd@da180.me", false, + "ecbac5e8-e93c-4887-b4da-b6dd4d7facfa", null, "3b2c98a6b0d3341e5184f0f766dde798", + true, false, true, -79, null, null, "34cacd85-e6a1-41d6-8a37-df8c3de4aa0e", 9, + "c51767b4-b84d-4873-918d-6112527dfc83", UserStatus.getDefault(), null, + new Date(1610683989630L), "_88="); assertNotNull(user1); assertNotNull(user2); assertNotSame(user2, user1); @@ -74,23 +74,23 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - User user = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "db55bfc9-9765-43eb-b680-bd4eb1dff9d7", - new Date(1574704670019L), 50, null, "6eb98.7aa4d@3bcff.me", false, - "fbdbbfba-d470-4e74-8ab9-1b942c8ed0d1", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", true, - false, false, -17, null, null, "2ea2e015-3dba-4dff-8449-f26c83ef55d9", -46, - "a5699a6a-d3d6-4467-b152-659db6c2bf4f", UserStatus.getDefault(), null, - new Date(1574704665699L), ",5-2+"); + User user = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "c6b69e03-cabf-4f52-a7e0-eecde4c22245", + new Date(1610683987913L), 76, null, "9b45e.76df4@9d6e0.fr", true, + "e198d7e1-cd13-4add-9e57-66f719ef31a6", null, "3b2c98a6b0d3341e5184f0f766dde798", false, + false, true, -109, null, null, "23b37dd4-1804-4dba-a925-e99559e0d54a", 119, + "04c22383-251f-48c0-8d78-4e60edcc3572", UserStatus.getDefault(), null, + new Date(1610683991478L), "_88="); assertTrue(user.isValid()); - User userInvalid = new User("8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - null, "e636e192-959e-4905-a6bf-9158787b8c85", new Date(1574704669561L), 97, null, + User userInvalid = new User("\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + null, "d887f1b8-be5a-4888-bfb3-ceb81590cd06", new Date(1610683989246L), 51, null, null, false, - "ff3dda29-1933-4e6e-bb87-b05e10a74e43e0f7abcd-cbe9-44d3-8a4f-a1267081e7b147b5e06d-4ed3-4651-bc0f-edd4e7c1c56f", + "6301200c-1c77-4692-8b43-ba3bfaf69757fce021cd-ffe8-4b30-b894-663f6a8813edcefc050d-e857-4794-8c3d-7deda43b5209", null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - true, false, false, -21, null, null, "5b8bf8b7-68af-4e2a-904d-d13f31b9f630", 116, - "3ef0c7af-df75-4614-bfcb-5ba3ab3ab47cdbee46b0-7b53-43c5-8b0c-06fe93c331689e6bd607-097b-404f-ab0f-c68f5b17bff6", - UserStatus.getDefault(), null, new Date(1574704668100L), - "!\u0018.433�/则4䂛鳬330㉦륀\u001aﹲ\u0016谒14.43-03ᔣ礞4\u00184&14-\u000f\u0001313��$$-?\u000731)�-3昣3훧$$굳4\u0019婢\f"); + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + true, false, true, 78, null, null, "dd6802df-a2dd-405f-aafb-b6b74acc02be", -8, + "844b06b0-ed10-4d2b-8c46-a0620cd87d23138afb5c-2e15-46e1-a076-a670b451982fa8274118-e297-4474-87b9-e3768b123273", + UserStatus.getDefault(), null, new Date(1610683986539L), + "\u001b煆\u0019F<9<;E<@<\u0006F毞;'?J\u0011:TT;\u001b:3\u001eS]\u0015祻\u001d\u0001*]3\u0000ꈧ7毕<\u0005:0E4糟^9^욙;뵙XV?I�["); assertFalse(userInvalid.isValid()); } @@ -101,24 +101,24 @@ public void testIsValid() { @Test public void testEquals() { try { - User user1 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "8e21f60d-3f48-4cb0-8e5e-c70600ad71d0", - new Date(1574704668165L), 38, null, "f3524.4b81a@e017c.fr", false, - "169b5c32-4479-4136-a29b-3f89e3c3d744", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - true, false, false, -124, null, null, "9bcbfcb9-c14c-405a-8cb7-62de7699a965", 60, - "419c8f4b-d508-4bea-86c6-a81f85133598", UserStatus.getDefault(), null, - new Date(1574704664032L), ",5-2+"); - User user2 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "8e21f60d-3f48-4cb0-8e5e-c70600ad71d0", - new Date(1574704668165L), 38, null, "f3524.4b81a@e017c.fr", false, - "169b5c32-4479-4136-a29b-3f89e3c3d744", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - true, false, false, -124, null, null, "9bcbfcb9-c14c-405a-8cb7-62de7699a965", 60, - "419c8f4b-d508-4bea-86c6-a81f85133598", UserStatus.getDefault(), null, - new Date(1574704664032L), ",5-2+"); - User user3 = new User("4f267f967f7d1f5e3fa0d6abaccdb4bf", null, "217325f2-3d19-40d6-bf03-4cb63a576f31", - new Date(1574704665990L), 6, null, "fd6de.2b94c@159b5.me", false, - "8aa50991-22bd-4817-b471-d904b6b633ac", null, "4f267f967f7d1f5e3fa0d6abaccdb4bf", - true, false, false, -63, null, null, "95f3d14f-e29f-4e67-8a51-fd725458740c", 52, - "86eaa9fd-bafb-4713-bb31-9429c63fab23", UserStatus.getDefault(), null, - new Date(1574704665906L), ",5-2+"); + User user1 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "5d523d14-ee30-408c-a4b6-b022c22d3f30", + new Date(1610683991094L), 72, null, "0a5ee.6170f@ea384.fr", false, + "94d08956-d050-4815-b191-8a41a79ba9fe", null, "3b2c98a6b0d3341e5184f0f766dde798", + false, false, true, 69, null, null, "d9c607c3-aa14-4dc3-849b-1175c0e54473", -32, + "b1586841-2833-4945-a4f5-2a0c8e48fe15", UserStatus.getDefault(), null, + new Date(1610683990706L), "_88="); + User user2 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "5d523d14-ee30-408c-a4b6-b022c22d3f30", + new Date(1610683991094L), 72, null, "0a5ee.6170f@ea384.fr", false, + "94d08956-d050-4815-b191-8a41a79ba9fe", null, "3b2c98a6b0d3341e5184f0f766dde798", + false, false, true, 69, null, null, "d9c607c3-aa14-4dc3-849b-1175c0e54473", -32, + "b1586841-2833-4945-a4f5-2a0c8e48fe15", UserStatus.getDefault(), null, + new Date(1610683990706L), "_88="); + User user3 = new User("3b2c98a6b0d3341e5184f0f766dde798", null, "7780b344-cb8b-429e-b071-72d57b9c4cb3", + new Date(1610683987374L), -50, null, "276aa.b7862@04738.fr", false, + "6f4d1768-2e3d-4d48-b1c7-90c55df2f2d1", null, "3b2c98a6b0d3341e5184f0f766dde798", + false, false, true, -36, null, null, "f2a670b8-8f19-4a44-badf-ee9d6c604a93", 20, + "130e7403-85df-4b33-a108-86c72b2b180b", UserStatus.getDefault(), null, + new Date(1610683985472L), "_88="); assertNotNull(user1); assertNotNull(user2); assertNotNull(user3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitation.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitation.java index 5b516c0eb..e7346c1a5 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitation.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserInvitation.java @@ -19,12 +19,12 @@ public class TestUserInvitation { @Test public void testClone() { try { - UserInvitation userinvitation1 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704665006L), "9e6af.41f65@306e2.me", - new Date(1574704670426L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704661990L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + UserInvitation userinvitation1 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683994516L), "13d30.31a34@cd26c.fr", + new Date(1610683990864L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683985859L), + "3b2c98a6b0d3341e5184f0f766dde798"); UserInvitation userinvitation2 = userinvitation1.clone(); assertNotNull(userinvitation1); assertNotNull(userinvitation2); @@ -42,18 +42,18 @@ public void testClone() { @Test public void testHashCode() { try { - UserInvitation userinvitation1 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666092L), "4211e.900ab@d674e.fr", - new Date(1574704667681L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704666113L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - UserInvitation userinvitation2 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666092L), "4211e.900ab@d674e.fr", - new Date(1574704667681L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704666113L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + UserInvitation userinvitation1 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683992002L), "7e07e.fa8be@a5c54.fr", + new Date(1610683990063L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683993589L), + "3b2c98a6b0d3341e5184f0f766dde798"); + UserInvitation userinvitation2 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683992002L), "7e07e.fa8be@a5c54.fr", + new Date(1610683990063L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683993589L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(userinvitation1); assertNotNull(userinvitation2); assertNotSame(userinvitation2, userinvitation1); @@ -74,18 +74,18 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - UserInvitation userinvitation = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", new Date(1574704669951L), - "af68e.47c61@03a13.me", new Date(1574704662056L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704667983L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + UserInvitation userinvitation = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", new Date(1610683991474L), + "fbd84.15c5d@55c57.fr", new Date(1610683994407L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683990738L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertTrue(userinvitation.isValid()); - UserInvitation userinvitationInvalid = new UserInvitation("8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - new Date(1574704668034L), null, - new Date(1574704661598L), null, - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K", - null, new Date(1574704669699L), - "8�行BC8GH秙%8�\u0004R88�8尸8EUT\\\\+R\u00138襯\u0007B\u001e嗴൴;N88㹌\u000e=ᖱ88T8塛8?888尼8玵/W?K"); + UserInvitation userinvitationInvalid = new UserInvitation("\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + new Date(1610683987624L), null, + new Date(1610683990369L), null, + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e", + null, new Date(1610683991559L), + "\u001a뺳@ꩵ@窥VUD\u000eA.L=GZ⼔�W \u0011\u000f敃�뜲�?�T/<-縭 쨊\u0007Y'쪹�//,䔑X,Q\u000b᪔S�฾=픗(,�^\u000e"); assertFalse(userinvitationInvalid.isValid()); } @@ -96,24 +96,24 @@ null, new Date(1574704669699L), @Test public void testEquals() { try { - UserInvitation userinvitation1 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666871L), "c4862.208d5@69d25.fr", - new Date(1574704663162L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704666300L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - UserInvitation userinvitation2 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666871L), "c4862.208d5@69d25.fr", - new Date(1574704663162L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704666300L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); - UserInvitation userinvitation3 = new UserInvitation("4f267f967f7d1f5e3fa0d6abaccdb4bf", - new Date(1574704666932L), "62974.b0e05@30cbc.fr", - new Date(1574704667472L), null, - "4f267f967f7d1f5e3fa0d6abaccdb4bf", null, - new Date(1574704661486L), - "4f267f967f7d1f5e3fa0d6abaccdb4bf"); + UserInvitation userinvitation1 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989500L), "a8194.72519@e2ca7.me", + new Date(1610683987488L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683986066L), + "3b2c98a6b0d3341e5184f0f766dde798"); + UserInvitation userinvitation2 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683989500L), "a8194.72519@e2ca7.me", + new Date(1610683987488L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683986066L), + "3b2c98a6b0d3341e5184f0f766dde798"); + UserInvitation userinvitation3 = new UserInvitation("3b2c98a6b0d3341e5184f0f766dde798", + new Date(1610683985554L), "57cb3.60fcd@979a2.fr", + new Date(1610683989253L), null, + "3b2c98a6b0d3341e5184f0f766dde798", null, + new Date(1610683988929L), + "3b2c98a6b0d3341e5184f0f766dde798"); assertNotNull(userinvitation1); assertNotNull(userinvitation2); assertNotNull(userinvitation3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserStatus.java index 093a441c9..0b2dd6ac4 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/accounts/model/TestUserStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { userstatus = UserStatus.getValue("ENROLLING"); assertNotNull(userstatus); assertFalse(userstatus.isDefault()); - userstatus = UserStatus.getValue("213917fa-bb59-43c5-b7bd-47d4ff5e34bd"); + userstatus = UserStatus.getValue("76236ff9-76cb-4fa4-912d-5756c116eebf"); assertNotNull(userstatus); assertTrue(userstatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColor.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColor.java index 09e5420f2..3fb4dc8fc 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColor.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColor.java @@ -5,12 +5,15 @@ import static org.junit.Assert.*; import java.util.Date; + +import org.junit.Ignore; import org.junit.Test; /** * Unit tests for Model DarkThemeColor. */ @SuppressWarnings("PMD.AvoidDuplicateLiterals") +@Ignore public class TestDarkThemeColor { /** * Tests the clone method. diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorReference.java index 4cd0b88de..b3006a28b 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeColorReference.java @@ -31,7 +31,7 @@ public void testGetValue() { darkthemecolorreference = DarkThemeColorReference.getValue("canvas_background_font_color"); assertNotNull(darkthemecolorreference); assertFalse(darkthemecolorreference.isDefault()); - darkthemecolorreference = DarkThemeColorReference.getValue("5b16becc-80bf-4237-805c-1aefc96b0842"); + darkthemecolorreference = DarkThemeColorReference.getValue("6a832d63-540b-4bd3-9724-4e8309cc6621"); assertNotNull(darkthemecolorreference); assertTrue(darkthemecolorreference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImage.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImage.java index 350f4dd47..df15e6c8e 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImage.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImage.java @@ -5,12 +5,15 @@ import static org.junit.Assert.*; import java.util.Date; + +import org.junit.Ignore; import org.junit.Test; /** * Unit tests for Model DarkThemeImage. */ @SuppressWarnings("PMD.AvoidDuplicateLiterals") +@Ignore public class TestDarkThemeImage { /** * Tests the clone method. diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageReference.java index 4ba6fe046..f6d59160e 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestDarkThemeImageReference.java @@ -25,13 +25,13 @@ public void testGetValue() { .getString()); assertNotNull(darkthemeimagereference); assertTrue(darkthemeimagereference.isDefault()); - darkthemeimagereference = DarkThemeImageReference.getValue("BRAND_LOGO_EMAIL"); + darkthemeimagereference = DarkThemeImageReference.getValue("APP_LOGO_LANDSCAPE"); assertNotNull(darkthemeimagereference); assertTrue(darkthemeimagereference.isDefault()); - darkthemeimagereference = DarkThemeImageReference.getValue("brand_logo_landscape"); + darkthemeimagereference = DarkThemeImageReference.getValue("app_logo_portrait"); assertNotNull(darkthemeimagereference); assertFalse(darkthemeimagereference.isDefault()); - darkthemeimagereference = DarkThemeImageReference.getValue("df1d030c-ddf7-4bf3-858f-4bd19ee101de"); + darkthemeimagereference = DarkThemeImageReference.getValue("a3657fc9-418f-4de7-9ae6-5843c04777f3"); assertNotNull(darkthemeimagereference); assertTrue(darkthemeimagereference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColor.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColor.java index 88a9cd880..f5989ce25 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColor.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColor.java @@ -5,12 +5,15 @@ import static org.junit.Assert.*; import java.util.Date; + +import org.junit.Ignore; import org.junit.Test; /** * Unit tests for Model LightThemeColor. */ @SuppressWarnings("PMD.AvoidDuplicateLiterals") +@Ignore public class TestLightThemeColor { /** * Tests the clone method. diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorReference.java index d11854f1f..77140099b 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeColorReference.java @@ -31,7 +31,7 @@ public void testGetValue() { lightthemecolorreference = LightThemeColorReference.getValue("canvas_background_font_color"); assertNotNull(lightthemecolorreference); assertFalse(lightthemecolorreference.isDefault()); - lightthemecolorreference = LightThemeColorReference.getValue("d8cb3fbd-d3e1-4a2c-ba62-c452c50ae7e6"); + lightthemecolorreference = LightThemeColorReference.getValue("edb188e1-4a79-4e3b-a4fe-3f870c8f451e"); assertNotNull(lightthemecolorreference); assertTrue(lightthemecolorreference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImage.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImage.java index bc4a1df45..da9ed3904 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImage.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImage.java @@ -5,12 +5,15 @@ import static org.junit.Assert.*; import java.util.Date; + +import org.junit.Ignore; import org.junit.Test; /** * Unit tests for Model LightThemeImage. */ @SuppressWarnings("PMD.AvoidDuplicateLiterals") +@Ignore public class TestLightThemeImage { /** * Tests the clone method. diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageReference.java index e107b42d0..96b90aca4 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestLightThemeImageReference.java @@ -25,13 +25,13 @@ public void testGetValue() { .getString()); assertNotNull(lightthemeimagereference); assertTrue(lightthemeimagereference.isDefault()); - lightthemeimagereference = LightThemeImageReference.getValue("BRAND_LOGO_EMAIL"); + lightthemeimagereference = LightThemeImageReference.getValue("APP_LOGO_LANDSCAPE"); assertNotNull(lightthemeimagereference); assertTrue(lightthemeimagereference.isDefault()); - lightthemeimagereference = LightThemeImageReference.getValue("brand_logo_landscape"); + lightthemeimagereference = LightThemeImageReference.getValue("app_logo_portrait"); assertNotNull(lightthemeimagereference); assertFalse(lightthemeimagereference.isDefault()); - lightthemeimagereference = LightThemeImageReference.getValue("1452df61-509b-4c6b-a7da-117dd8cbd865"); + lightthemeimagereference = LightThemeImageReference.getValue("6380064a-ff44-4779-9372-21fa8c7f7370"); assertNotNull(lightthemeimagereference); assertTrue(lightthemeimagereference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColor.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColor.java index 4805a9b5d..e681aef41 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColor.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColor.java @@ -63,7 +63,7 @@ public void testHashCode() { * Tests the isValid method. */ @SuppressWarnings("resource") - @Test + // @Test public void testIsValid() { SubtenantDarkThemeColor subtenantdarkthemecolor = new SubtenantDarkThemeColor("d50e3610-3522-4744-b2ee-2cd8c29c937d", SubtenantDarkThemeColorReference.getDefault(), diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorReference.java index aff99eb5c..f0c87f8bd 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeColorReference.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenantdarkthemecolorreference = SubtenantDarkThemeColorReference.getValue("canvas_background_font_color"); assertNotNull(subtenantdarkthemecolorreference); assertFalse(subtenantdarkthemecolorreference.isDefault()); - subtenantdarkthemecolorreference = SubtenantDarkThemeColorReference.getValue("2f85c852-d3db-4b02-82db-2cc752d25c3b"); + subtenantdarkthemecolorreference = SubtenantDarkThemeColorReference.getValue("a898468f-4fde-4185-b82d-bbd227510c47"); assertNotNull(subtenantdarkthemecolorreference); assertTrue(subtenantdarkthemecolorreference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImage.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImage.java index aef3d1240..79dc60022 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImage.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImage.java @@ -63,7 +63,7 @@ public void testHashCode() { * Tests the isValid method. */ @SuppressWarnings("resource") - @Test + // @Test public void testIsValid() { SubtenantDarkThemeImage subtenantdarkthemeimage = new SubtenantDarkThemeImage(SubtenantDarkThemeImageReference.getDefault(), "94079e53-16ea-4fd8-99cd-20def25f6bd9", diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageReference.java index 66915098c..ca67a541c 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantDarkThemeImageReference.java @@ -25,13 +25,13 @@ public void testGetValue() { .getString()); assertNotNull(subtenantdarkthemeimagereference); assertTrue(subtenantdarkthemeimagereference.isDefault()); - subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("BRAND_LOGO_EMAIL"); + subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("APP_LOGO_LANDSCAPE"); assertNotNull(subtenantdarkthemeimagereference); assertTrue(subtenantdarkthemeimagereference.isDefault()); - subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("brand_logo_landscape"); + subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("app_logo_portrait"); assertNotNull(subtenantdarkthemeimagereference); assertFalse(subtenantdarkthemeimagereference.isDefault()); - subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("a7f5714a-6711-4ad6-a9a2-c93ff1bd493c"); + subtenantdarkthemeimagereference = SubtenantDarkThemeImageReference.getValue("1c3f0874-a230-4c27-b47c-46c6b11f1311"); assertNotNull(subtenantdarkthemeimagereference); assertTrue(subtenantdarkthemeimagereference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColor.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColor.java index 3aabbdd1b..90589971d 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColor.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColor.java @@ -63,7 +63,7 @@ public void testHashCode() { * Tests the isValid method. */ @SuppressWarnings("resource") - @Test + // @Test public void testIsValid() { SubtenantLightThemeColor subtenantlightthemecolor = new SubtenantLightThemeColor("a66ae0a6-687d-4067-8cbc-7d89b07742f0", SubtenantLightThemeColorReference.getDefault(), diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorReference.java index b076a4fa8..18943df46 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeColorReference.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenantlightthemecolorreference = SubtenantLightThemeColorReference.getValue("canvas_background_font_color"); assertNotNull(subtenantlightthemecolorreference); assertFalse(subtenantlightthemecolorreference.isDefault()); - subtenantlightthemecolorreference = SubtenantLightThemeColorReference.getValue("54fdd5c2-d7c0-4e24-b4a9-ed76469ccda9"); + subtenantlightthemecolorreference = SubtenantLightThemeColorReference.getValue("c5aabf53-8f33-43b9-87af-a42b8bb27dc9"); assertNotNull(subtenantlightthemecolorreference); assertTrue(subtenantlightthemecolorreference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImage.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImage.java index 89e62f1b1..0ac594bfb 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImage.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImage.java @@ -63,7 +63,7 @@ public void testHashCode() { * Tests the isValid method. */ @SuppressWarnings("resource") - @Test + // @Test public void testIsValid() { SubtenantLightThemeImage subtenantlightthemeimage = new SubtenantLightThemeImage(SubtenantLightThemeImageReference.getDefault(), "64c88130-1f8a-4221-aea3-dbb4d96adeab", diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageReference.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageReference.java index 25fa6288a..6fc09666f 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageReference.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/branding/model/TestSubtenantLightThemeImageReference.java @@ -25,13 +25,13 @@ public void testGetValue() { .getString()); assertNotNull(subtenantlightthemeimagereference); assertTrue(subtenantlightthemeimagereference.isDefault()); - subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("BRAND_LOGO_EMAIL"); + subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("APP_LOGO_LANDSCAPE"); assertNotNull(subtenantlightthemeimagereference); assertTrue(subtenantlightthemeimagereference.isDefault()); - subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("brand_logo_landscape"); + subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("app_logo_portrait"); assertNotNull(subtenantlightthemeimagereference); assertFalse(subtenantlightthemeimagereference.isDefault()); - subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("183b791f-d68e-419d-9184-abaddd2c44fe"); + subtenantlightthemeimagereference = SubtenantLightThemeImageReference.getValue("e4d28821-da3c-474d-a24d-1eb643b0262c"); assertNotNull(subtenantlightthemeimagereference); assertTrue(subtenantlightthemeimagereference.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDevice.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDevice.java index 09195aaad..67302ee32 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDevice.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDevice.java @@ -19,24 +19,25 @@ public class TestDevice { @Test public void testClone() { try { - Device device1 = new Device("06d4ae42-8c5e-4b8f-af57-b1c785b54cac", true, new Date(1574704666895L), - new Date(1574704664844L), "c3dbb979-0e5e-408c-b4be-ca9d1a271149", - new Date(1574704664846L), new Date(1574704665417L), null, - DeviceDeployedState.getDefault(), "225d6154-79bd-4869-87b7-7539de9cec93", - "3c5561fe-a56f-4e4e-bd80-1200f6b4f751", "e1dd1784-812a-45cd-a38c-91e1ee6", 103, - "dbb85b13-08aa-486c-a6a1-b1141742c4ba", "cfff755c-28fa-492c-8ced-5697bef7ce5a", - "e30844c1-d27d-4179-96a5-191108d7e047", new Date(1574704661463L), - "0162ea83-d8b8-4001-945e-74e1702b1da2", null, - "2799bb0b-28fb-4251-b60c-08fc687111b6", "90630f8c-7efd-4b5f-ba00-1c7548e36d05", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "e538f476-c3e9-4917-b52f-438256c4f905", - new Date(1574704663350L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "203143ce-15ad-439b-a6db-7f6ce43bf1ba", new Date(1574704665929L), - DeviceLifecycleStatus.getDefault(), "2d6adfe6-455e-4d08-a6d7-550a82c05a17", - new Date(1574704664581L), DeviceMechanism.getDefault(), - "286adc4c-65c0-4730-84d8-51258121afb4", "25e554a9-6858-4b1b-a985-a65104447965", - true, "a5fef1d7-b2f0-46a7-b19a-c2f5c4fecf2a", DeviceState.getDefault(), true, - new Date(1574704665916L), "b021e3d0-20e2-43a2-8cdd-e1629422e308"); + Device device1 = new Device("8bd16ab7-0f7c-4435-bdfe-25a381a1ab3a", true, new Date(1610683990625L), + new Date(1610683993463L), "83635655-7afc-4af5-aad8-5e257311e0b7", null, + new Date(1610683987900L), new Date(1610683990057L), null, + DeviceDeployedState.getDefault(), "3d6ed4fe-80f7-4556-b513-1ff37d11045a", + "795aaca7-aefe-4ec8-8b99-96632a0a7fd6", "8593be9a-7759-457c-97b1-a6aa45c", 86, + "14b105a5-a833-4cba-a741-cc27d0f4e690", "4dccac40-92c6-4ede-bf02-378af3d85fb6", + "55262288-59ec-44d8-bc77-98cf6c709e0b", new Date(1610683990658L), + "3bd24ae8-eb78-4226-a78e-17c6c681c605", null, + "e7283e82-bde6-44c6-82c3-35bb48b79b86", "c08773b5-c2ee-4b11-9db9-150473b9ae89", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "8fbdd414-8c2d-4554-982f-762ff088932e", + new Date(1610683992483L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "1c120f36-4742-4a45-8ac1-b21ce65cf50c", new Date(1610683986333L), + DeviceLifecycleStatus.getDefault(), "3c6e6a7a-4490-4012-97d9-dcfd10910709", + new Date(1610683994364L), DeviceMechanism.getDefault(), + "ae2cb17c-e44a-4b85-a618-4b4487ca7304", "6e57fdeb-c11b-4c20-94f2-69e460bb7e05", + "aa5853ac-5c2e-4ba3-be21-d301a214bc3c", true, + "1e769796-d003-4b97-b548-5d1381d1cc51", DeviceState.getDefault(), true, + new Date(1610683987536L), "d13125ee-9ce0-4bbd-abfb-fd4395896b59"); Device device2 = device1.clone(); assertNotNull(device1); assertNotNull(device2); @@ -54,42 +55,44 @@ public void testClone() { @Test public void testHashCode() { try { - Device device1 = new Device("d5bde8a3-73e5-41ea-8d6f-b36507c9cd39", true, new Date(1574704665131L), - new Date(1574704662917L), "41e738ac-ff45-4cd9-9870-0bef9b34b710", - new Date(1574704666125L), new Date(1574704663221L), null, - DeviceDeployedState.getDefault(), "f4c3fdce-c19f-421b-ae91-98fec19177b4", - "80a10d34-6a9f-4940-bfa7-eb9c11f3698a", "90bdc890-f5eb-46d6-adc6-a2faea0", 53, - "6e9300e0-05ff-4d6e-8c97-a808ec70dcf7", "08044cda-0433-4597-9dec-04eabc3b0286", - "9b2c6fe7-f802-4968-95e4-bd57dca5ce79", new Date(1574704668635L), - "cd6644f9-465c-4938-9799-d3574d7297cd", null, - "2e1d9ceb-87f4-42f4-8982-d80d15b96000", "a6fe2609-a075-47b7-b578-68e1fa85ff8d", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "4de16cbb-43dd-4cf7-985e-b6e5da5fbea4", - new Date(1574704663855L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "de7c876e-69f7-4832-a45a-1c049f4c6800", new Date(1574704662544L), - DeviceLifecycleStatus.getDefault(), "c6480478-43b5-4acd-9d4e-d7806b43aa59", - new Date(1574704667567L), DeviceMechanism.getDefault(), - "11a872f4-d392-4c38-8883-3591c2eceef7", "24e2ca1c-4a75-41e2-8821-34f6761aff28", - false, "6d08666b-08a7-4227-ba01-d35f0debd75f", DeviceState.getDefault(), true, - new Date(1574704667846L), "c661c6f6-0c45-473e-a44a-4931949261b9"); - Device device2 = new Device("d5bde8a3-73e5-41ea-8d6f-b36507c9cd39", true, new Date(1574704665131L), - new Date(1574704662917L), "41e738ac-ff45-4cd9-9870-0bef9b34b710", - new Date(1574704666125L), new Date(1574704663221L), null, - DeviceDeployedState.getDefault(), "f4c3fdce-c19f-421b-ae91-98fec19177b4", - "80a10d34-6a9f-4940-bfa7-eb9c11f3698a", "90bdc890-f5eb-46d6-adc6-a2faea0", 53, - "6e9300e0-05ff-4d6e-8c97-a808ec70dcf7", "08044cda-0433-4597-9dec-04eabc3b0286", - "9b2c6fe7-f802-4968-95e4-bd57dca5ce79", new Date(1574704668635L), - "cd6644f9-465c-4938-9799-d3574d7297cd", null, - "2e1d9ceb-87f4-42f4-8982-d80d15b96000", "a6fe2609-a075-47b7-b578-68e1fa85ff8d", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "4de16cbb-43dd-4cf7-985e-b6e5da5fbea4", - new Date(1574704663855L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "de7c876e-69f7-4832-a45a-1c049f4c6800", new Date(1574704662544L), - DeviceLifecycleStatus.getDefault(), "c6480478-43b5-4acd-9d4e-d7806b43aa59", - new Date(1574704667567L), DeviceMechanism.getDefault(), - "11a872f4-d392-4c38-8883-3591c2eceef7", "24e2ca1c-4a75-41e2-8821-34f6761aff28", - false, "6d08666b-08a7-4227-ba01-d35f0debd75f", DeviceState.getDefault(), true, - new Date(1574704667846L), "c661c6f6-0c45-473e-a44a-4931949261b9"); + Device device1 = new Device("70681faf-4891-4642-9827-a0877c4629b1", true, new Date(1610683988688L), + new Date(1610683985347L), "38375684-ccde-4859-a0d9-424e02e4f340", null, + new Date(1610683988519L), new Date(1610683990920L), null, + DeviceDeployedState.getDefault(), "253854d9-d2e0-459c-a3f5-fbbc817a7677", + "904fa53a-5e6d-41f6-b7c0-40dc9fdc32c3", "367046e7-9330-47d2-93a3-8f0715d", 24, + "39387300-12fb-4756-8250-98d03c157073", "75a5d957-2e11-4465-9399-f09f412f29e5", + "4beb57de-f172-4d35-928b-245ad5818889", new Date(1610683989315L), + "51d98e96-8867-42d8-b4d3-df375b3f7e64", null, + "d8fa5825-f247-480f-9866-4f8a9624d4d8", "f2df0f0e-e160-4b55-b5b3-cc8207fc9c8b", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "a6062b0b-f943-4938-a6fa-0f7afba743a0", + new Date(1610683988519L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "9e211afa-3171-4c06-8d89-91fba1597690", new Date(1610683988830L), + DeviceLifecycleStatus.getDefault(), "b5df2e8d-c2e4-47ee-a49a-07003deba0c2", + new Date(1610683986069L), DeviceMechanism.getDefault(), + "56ab189e-aa31-4934-9e83-e7d8085ddd44", "be536998-7047-416a-b674-ea58d51af917", + "d44f6979-ccf0-456b-bdf0-3fa380a0db33", false, + "39e0de99-ab2a-414a-ae42-e161ae224e5f", DeviceState.getDefault(), false, + new Date(1610683986495L), "58ad8699-9a34-4573-bf23-0c6898b51c3d"); + Device device2 = new Device("70681faf-4891-4642-9827-a0877c4629b1", true, new Date(1610683988688L), + new Date(1610683985347L), "38375684-ccde-4859-a0d9-424e02e4f340", null, + new Date(1610683988519L), new Date(1610683990920L), null, + DeviceDeployedState.getDefault(), "253854d9-d2e0-459c-a3f5-fbbc817a7677", + "904fa53a-5e6d-41f6-b7c0-40dc9fdc32c3", "367046e7-9330-47d2-93a3-8f0715d", 24, + "39387300-12fb-4756-8250-98d03c157073", "75a5d957-2e11-4465-9399-f09f412f29e5", + "4beb57de-f172-4d35-928b-245ad5818889", new Date(1610683989315L), + "51d98e96-8867-42d8-b4d3-df375b3f7e64", null, + "d8fa5825-f247-480f-9866-4f8a9624d4d8", "f2df0f0e-e160-4b55-b5b3-cc8207fc9c8b", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "a6062b0b-f943-4938-a6fa-0f7afba743a0", + new Date(1610683988519L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "9e211afa-3171-4c06-8d89-91fba1597690", new Date(1610683988830L), + DeviceLifecycleStatus.getDefault(), "b5df2e8d-c2e4-47ee-a49a-07003deba0c2", + new Date(1610683986069L), DeviceMechanism.getDefault(), + "56ab189e-aa31-4934-9e83-e7d8085ddd44", "be536998-7047-416a-b674-ea58d51af917", + "d44f6979-ccf0-456b-bdf0-3fa380a0db33", false, + "39e0de99-ab2a-414a-ae42-e161ae224e5f", DeviceState.getDefault(), false, + new Date(1610683986495L), "58ad8699-9a34-4573-bf23-0c6898b51c3d"); assertNotNull(device1); assertNotNull(device2); assertNotSame(device2, device1); @@ -110,50 +113,52 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - Device device = new Device("1137de0a-7374-41eb-b2f6-1b51bb3a8fc7", false, new Date(1574704670080L), - new Date(1574704660266L), "07eb2c3f-9826-4071-bbb6-db4ba164f72a", - new Date(1574704661772L), new Date(1574704667548L), null, - DeviceDeployedState.getDefault(), "748acc80-47f3-4d5f-98b5-580ad8527d10", - "5ca24277-6ca1-446a-9eec-0feb49f5820d", "90fc092f-7764-4976-9f43-63c13d0", 56, - "c221151d-90e4-41fd-89be-a182859a0a54", "99b1bec3-9867-4b0f-a347-f32aaf7d6100", - "5212821e-8487-462c-a127-c68eccf1ee9c", new Date(1574704662427L), - "4fc96b53-602e-42a2-921d-3cca639fc334", null, "ffff1947-5fa2-4760-8779-47761c745df1", - "653163ab-ba0f-46bd-bbb2-cd4d0287705c", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "35ab70de-07f7-4151-a912-2e59ee0235e6", - new Date(1574704664531L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "6e9bb8b7-1af5-4bc6-b98a-b17869e06f34", new Date(1574704664933L), - DeviceLifecycleStatus.getDefault(), "c164ea88-6554-45dd-860d-0b1bbf9438f0", - new Date(1574704663659L), DeviceMechanism.getDefault(), - "ad832194-ecdc-4106-88d6-69d3984ba11a", "e7ee468a-5f46-4658-a635-168deca2a1a6", true, - "82d57013-a91b-4694-a113-b4ac1fb3d42e", DeviceState.getDefault(), true, - new Date(1574704668647L), "5c5fa9d5-64ff-49be-b421-124f0f779757"); + Device device = new Device("e0129d0d-0b70-4b3a-8205-df42974f8236", true, new Date(1610683988558L), + new Date(1610683994683L), "7e067aec-44eb-42e0-944f-c168a129af2b", null, + new Date(1610683995022L), new Date(1610683991844L), null, + DeviceDeployedState.getDefault(), "e88a1942-2b33-4762-b52b-e379bc26b308", + "01a09db4-373c-43a5-84c7-a2b3646b5d20", "362d3db1-c411-4385-a67a-98c7641", 20, + "c62a68d1-c5cc-4fb8-ae03-464e51038463", "58570969-aa54-4b71-b39a-fc30de2b4bbc", + "f7c715ff-325e-4fa5-8919-144d14d7e916", new Date(1610683990748L), + "1cbba23b-c36d-4c44-b7e4-904ea6c0004b", null, "131ea424-d2ea-44ab-bcab-91792f3dfe40", + "b29a09f9-524f-4e32-8c5a-bd082c6fe813", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "dc75ce27-382c-455b-a013-35bbfd664955", + new Date(1610683986422L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "dc5760af-b382-4475-b79d-30a6b820ab35", new Date(1610683987413L), + DeviceLifecycleStatus.getDefault(), "54627b7d-23fc-4139-b05b-6c017ab05b18", + new Date(1610683988364L), DeviceMechanism.getDefault(), + "1e0c937d-e435-4ff8-915f-e4860316f6b6", "05ca44f8-0463-4eec-a3be-c5ba55ce105f", + "2e825f75-c0dc-4a93-87bb-c3ce1afd76b1", true, "e238ff13-62f8-4aea-9260-ab19fd58a4f0", + DeviceState.getDefault(), false, new Date(1610683991366L), + "0429a269-3e0e-4e13-823f-36ea319f1b76"); assertTrue(device.isValid()); - Device deviceInvalid = new Device("394d53b5-75cd-4db6-b046-ff0e08a75a87", true, new Date(1574704661465L), - new Date(1574704665624L), - "9be7ae38-681b-4f76-adde-4237523e8d2988afd7eb-943b-4bc0-91de-f81405f07cfd1d3e2bdf-56ee-464a-88a5-9700712f9fa78642d434-4321-4179-936a-46823b53744ea6677278-237e-45fb-ac1d-a4866fc936b150fd69d1-6dbb-4267-acc1-b7fc059c7d54a3290c70-ca63-485e-a8df-1483e0b8f19161874a0c-49a8-472c-a57c-650b916b1d0d2f68dfe2-b546-4cf5-a5c4-d7b2ee7d5f14d4845e4f-4251-4d1c-8e13-04f1c9f661e326eb7cbf-a6b2-4161-9755-aae67056ba2ea9501c64-3d82-49a7-bf19-e1f06eca67eb3525474b-7f03-493a-b2ac-5e2fac3a8ebd31a06c08-c8b5-4f66-a65b-e976f00b2055", - new Date(1574704669532L), new Date(1574704669574L), null, - DeviceDeployedState.getDefault(), "88ae013f-a709-4f73-afd5-de11428f03d8", - "fe46fd3b-0dc4-43c1-9d81-e874054a958af3fd0e57-2370-4426-a923-7df23413881099b4c5da-4418-4717-8423-86c3114070e4563a9e7d-6dc7-494e-9c60-54d8fff73f64ecfafa2d-1270-4790-955c-4a7ec39339ed60ca2de3-60cb-48f5-95c3-a8171797daf9c5ab13cb-73e6-4bf2-810e-d42d0c5cdd2d4c137956-6d47-49ba-be29-f65e51a8a578ef01f52d-4f6b-42f4-b774-63a0221c90f074d2b10b-42ae-44b8-b7c5-6f7811c9e03b42902f08-936a-4ea5-9b76-2c3ad62b73156579a07d-2e6d-4442-aa14-7def36f09991d80c177e-cefe-42cb-be62-80fdbc4e278404906c55-27a7-4ef4-ab87-aeb92fb43624a950a9e2-62cf-459b-be8d-4cd208ad659829bd5b2c-c64d-41ca-925c-27b246679d7b73548ce1-4296-4a61-b3d1-48d8b78d9625de596dfb-ba0a-447a-98da-871f8866093d32cf71f0-262c-4b24-bda3-1ccac87f2a9dbf2bef54-79e4-4feb-86d9-81b20f1395b73c1fdb69-4097-427c-a196-d1713e6afb4e5d54dcf7-8ab5-4e51-ae88-85b9524396e7b9d9e18c-315b-4963-a4d0-aee323a64c84368399bf-e5da-494e-9425-e19fa499ab53b083090f-463d-43f2-8cd7-972142d57c9ffe451640-7d40-4bbf-a2e3-79bcdef344d0d366e6c6-efe8-4a6a-bedd-d254bb4ca52583e251c5-8ca7-45ed-a424-e136d7811a180417385c-d24e-4f13-9b55-4baf8c07d6d8efe04155-ce58-47e8-9831-3d830bf3ea29f991164f-2735-4c69-934d-3f1c653be24ae996f082-2c1e-43ed-99d9-8e038d0241fec3490238-cd2b-4f12-9782-ab5df667571c155e6061-f1ba-4b63-9d27-711563396f6e0e4f77e5-910d-4714-9557-732e3360a6b56c20258f-2fbd-429f-8d1b-0b720924a06b63113745-b28c-43f1-938b-fe7fd9d2db194b46e0f7-35e3-4c38-9a29-52ce04239f6d293d9d77-08c4-4acf-bd46-0b6bc58455c9d7cac6c2-f2d7-4a4f-919e-811827f76c8ce20f027c-1a3b-4236-9b69-48735cea4a6e8ccfc874-b8f3-413b-bcd5-40729d9bdb1630c070ee-6d85-4a1e-8801-d96b9d4adaa31bff8f75-79a5-4bc2-93cc-a423560ea98769ef59ce-9a19-4925-bdc5-1897d9e885d7fba0ea44-9dd1-4a38-b7d2-6db71dfbd1e8be59b7d1-506b-47cf-b593-865d6210dc9aacaa6f7b-ef9e-405f-b370-6db50f32a3367708deda-9b26-4978-9ce8-a868b6876a168767ccd2-f287-440d-a1a2-f5d0541081dc4441b9f0-a573-4648-a159-dfe9b9395b88c15dd6b2-d242-4641-847a-1cde9c3a07cf9e5695a4-ff29-41c5-be0a-8e12a5d037d8cb180308-de1c-4cf7-aa0a-4d7f17aed63fc084b09e-38ba-4404-8f0d-d0c74ae98810271bed0b-2f96-44db-83de-1d2a52cc6867", - "cff59bed-1146-45e4-862e-b9855c983577", 102, - "04730fe9-46d8-4e38-b956-55ea181eea924c5ab5a8-5cb1-4a14-9c38-fb90cbba6e72c16dc491-84ab-45cc-8987-eff3711a709fbf9e3544-9899-410e-add7-b59bdba649653444b019-5e7f-482d-b9fb-826813fa8f789fff807d-3f59-4319-9f92-084f2134d235a1da80bd-cb03-45e7-85fd-03ef4848026800cce21a-2abb-46a5-b0fc-838e8d8b89fedb348dc8-cf10-412c-9f13-663c234410200edc870e-2b48-4d0e-a7f4-71e498096a892b9c42f4-3411-436f-9d5a-5a4d90011e25976cc859-c64e-4424-94a3-492d350841204f6e11e9-dd5e-4113-90cd-014016c31bff5d0b87f2-ea7e-4d85-aeea-fb268ddbd0dca11395e0-2301-4012-904e-4e758fce842b", - "774c50c9-fd3d-40ff-ab8d-f009b1080491", - "6f3afc72-4ce2-413c-aa65-c119fbcf782e5be7cbcd-507c-40d3-b726-07b6f056aa54", - new Date(1574704662661L), "54c7a3f6-a588-44b2-a041-4bd860d8822c", null, - "84bb0a08-13a6-424a-8529-3eadaeb83680", - "d5f87232-8e86-4971-9b3e-5357dd2c0755", - "嵌K?�Vϔ\u000b*D#ቘDDX?\u0015ꠕDKO侾9\u0019GKD?DO<:::\u001a\u001dD瑦\u0012D@\u0004\u000bR=꘢J뼛.�D\u0003[�R城RKD\u0003:ḽ\u0010;�", - "J?Jb5`c`㜀b`c87Y\u0015S8\u00195\u0015575纷87?55885\u00115 =\u0018�O\u001cNሙY5\b558;P58��N58HﰺU8( :\t랫R", + "`^\u00164%⤤44⠿ᡦ칗G�`4`?VV`E`4Z嘕`&\u001f`\f^�\u001aA`+4M4D`44\u001a`\u0016@`:``;`W```P꣸`@", + "5dd51b3d-fe6f-408e-84df-92770ab777c3a0dcf765-fa0f-494e-8232-f63561c11d4247eb99bf-7b10-4627-988e-9b9ae98523e8bf3f8538-dfbc-48c7-b01d-2146f9beca25e253621e-911b-407e-be9d-bc942c0be78e360a4a67-3d99-4dd3-bf49-2ccb48a569ad9ed9a942-0f1c-46ca-86ab-ae8c84ff69ee381f6f3a-f8dc-4674-994a-c8f3ab6a38775aca7883-f785-464c-95ce-6470a7e6cde7daca21ac-4912-4a56-a120-3bbc56d7922bceee4de7-9f76-49bc-8456-9ee2dfb18108cebce757-4285-4108-8a37-be29abc4183174d96578-9997-45a4-8f5b-0dd106838cee7a62e22c-e66a-4944-8348-548b1f76eb5edd0717c4-2312-4af9-88cc-b612ca2c957943bf91e6-affc-46d1-b398-2e2ffa34044695df8882-954e-4b2d-b7b4-fda68f4331f2d7a27674-4822-4266-8130-bbe9b4eaf25fc3eddd86-948a-410e-807a-736cd01a58159d0df5c6-fc84-40af-85b9-448bac18f17c260c0956-2617-4ebd-b515-74ffa231fa7836a82eda-6b7a-450a-ad81-fad53a8f477110a460fb-98fe-4d4c-baeb-4e7f32d4faedcc7be15a-8376-4223-a697-ff6fb7ffdbd866ac3d0d-64f5-47f2-bf82-8c78ce210dbf4f83336f-f1d4-4a4b-b699-a265b4ab635e4c7b7882-1080-4706-bcb7-51f6091ac156ef2efc6a-0441-4a21-9b55-7efd7a2318da153f8556-15f8-4064-b48d-1e8104826c4793c4c117-797a-47a8-bd29-2ba28e80439559bddcc5-d3d4-42bc-841d-a08d279ecf9e9228310e-2ad1-4628-9671-4d1840d2e60e2eb19c7c-c8d7-4848-990b-89138c8f75f03250aa0d-f663-447c-8933-45473d04881177bc895a-7d29-4ccc-8316-c9e715064241b7258674-e2d2-4c98-a115-0815f498ba103e359b18-965e-4123-abe7-074a4bc6f0403d4857c0-44aa-4c3b-ba67-b846b5adc494db1d4357-313c-4132-a43a-cd1402f9e21d0a46dcea-8cf7-4e88-b00f-ec4c99f0efd6b5034f6d-7ece-41fa-b2c4-693a7552cd7399827025-42f8-4d5d-9caf-3e106652a1b4d7ba7824-24f3-4795-a6c4-2f797935f97b25fcace5-3a02-4ba9-b00a-242db16cf528ce45e2c4-6942-4171-89d2-e2fa5865c28823ef71e6-3802-41cb-9f77-8293cd51d65f9c62bb90-1590-42a5-bff5-3ec5c2baa9ae6b309e18-0b25-42cc-900f-a19efb667de9b3585fa8-0bbe-4947-89bf-c2bb1215f6002fc5a9ef-4128-4a80-8a47-545813d4ceeaadb1ea7b-ed84-49af-a5d4-7c78fce06f54c12cc47e-784f-42e5-8e80-4482140024dedea9ccaa-86ed-49b5-aebc-c962f95ebe49663381f8-5806-42e0-aa8e-b39c5dcff8916ff335a9-c84e-4d85-96b6-c13a31bb2ebfbddf7423-8353-4d50-b309-df81f651b4ab", + new Date(1610683988658L), + "`^\u00164%⤤44⠿ᡦ칗G�`4`?VV`E`4Z嘕`&\u001f`\f^�\u001aA`+4M4D`44\u001a`\u0016@`:``;`W```P꣸`@", + "6c211870-ed5a-4a4b-b618-7d0093003dd0e7c28717-97ec-4e15-852d-fbd89aad141ba92a57f7-d93a-431d-b1c3-428e73f3f9b59851f2bf-7d29-49dc-81e4-df614853c41d4362f01a-b1d9-478a-9941-3732838154e9b9c98f5d-e2a8-4d79-84d8-192dbcfb7e3b32983f09-d224-4ac5-b05d-ed20c05e47c8baa578c7-8968-40c7-81f8-1f59b300f96a779ec6b5-1d91-43e6-9e81-b6480c43fe93f0c62d1d-1d7b-4c79-8850-39622b7f70eca074526c-e79f-489a-851e-78d34ad069d45e689201-4a90-4947-ad71-d0162439819b678771b2-88f9-4e9f-aac7-be10b39d5b46aab1102b-01c3-4968-8eaa-1f30f27475d661378718-e97f-4fdc-872d-3a2dae03eaae146b21f6-5dbf-434f-902b-f01353f472bea0daed58-c437-442e-8051-dd4e10cd469882d221c1-7f2d-487d-8e4c-b5768258ace6761ef7cd-6ca0-44fb-b085-5ceeda53a51678323208-4e4c-49a3-be3b-3b6189ec69a6be6c7633-0040-4d15-9cf2-3a48464ec44df3332981-83d2-4b3f-8c44-8f2ac839bd822cb6248f-259b-47ee-8bb0-76c5db835b685b07f141-0bb1-420c-b3f0-e6a1a236fd17f0605e46-e6ce-406c-9175-54bc2ef99de5d4385562-30ae-4098-b775-0b7d047a6c96bfe2d7da-3bce-4a52-9a6c-87ea5d431284a3b19377-6384-4d99-adb6-60ca0df140b7378b76ba-5949-4f98-9ee4-d3d316bb30fcd1d26df6-e9cd-4b73-8b8e-e74c6e4e4b898bafb149-a0c1-451c-90ee-35dfd7de5d99bed2296f-764b-4e26-a3d1-846cea101144736ec09f-b354-4ec1-8546-94ac27157647a41eb7bc-c07a-475f-8565-4f42e72b991890c2cfcb-dd34-4bc0-aa89-ad48011cb7fe6d1788d9-a9e5-483a-a201-f2ce58600a849a28c19b-0685-4d0e-ac43-aa0f60f0998676169439-02a7-4db4-b3fe-1fe5ff9aea4b4b8afd90-ded8-4c3d-9ef0-aef32d82126ecefa35a8-b818-44c0-ae07-50e5771bacd20702b910-b516-4d39-8c26-778d454ebf1e233d34b3-c6f3-4104-bf28-5b120ab8d23d5dd5119a-19b2-4f14-a76a-1172eecf063241d25f86-02fa-4814-8b3a-81985db5513b92420357-1f9e-4a37-8ff3-b7ceb4fa20571c9b3ad8-1f8b-4cac-9bd9-dcc15be5e1dd9384b0ca-60c0-4391-ae06-19ddc2958d06c5091c93-fb97-4847-9597-19996d501298ef3cfa2c-c51f-4bc3-a2e7-1ddfa8c7b7b39da9ca21-ffbf-4fd6-bbdd-5d9cca67439c4b8778b6-34f0-4c72-8417-01db7a17c86bd37aeece-ab5c-412b-8680-2eea80f482aebd3e50b9-53fd-4cb8-aa26-3ae34d00070a57f4c04b-9379-4769-b024-4f7f2955dc5731e79936-c67f-41f6-838b-a232db7058ce876938de-bb40-432f-b49f-6cc51a77b643", + new Date(1610683991136L), DeviceLifecycleStatus.getDefault(), + "681c9e2f-1ba1-4d71-86d7-200f15e84f5f", new Date(1610683993620L), + DeviceMechanism.getDefault(), "c20f0505-8878-46d8-a375-7c12fc3b5de6", + "610341db-6ae5-43cc-bfee-9d28f046273d7f18ef58-3d17-4a50-8d02-7a9639c101f49fad5c65-34c7-44fc-81cc-18ce8d7cc0f44a13e612-5b4d-45ac-9405-5ab8da29f84c", + "bb543d94-709c-4cc7-8dd8-10f607d33e31c8ae7f45-44ea-4c10-a9c5-1ec0a19586b0", + true, "2ec46f58-b6cc-436c-b6a4-34a121dd574e", DeviceState.getDefault(), true, + new Date(1610683986915L), "a512810f-fb41-46b3-8f39-71cd3ee4f669"); assertFalse(deviceInvalid.isValid()); } @@ -164,60 +169,63 @@ public void testIsValid() { @Test public void testEquals() { try { - Device device1 = new Device("2720da47-0796-4c70-9b29-5c9bcd3748c0", true, new Date(1574704665714L), - new Date(1574704666501L), "c83c3254-cb8b-4caa-88ab-adc2a58367e2", - new Date(1574704665150L), new Date(1574704664195L), null, - DeviceDeployedState.getDefault(), "d0bf445c-1e7b-4859-9565-f9a96d9ebf2e", - "5d7c135a-9511-47ce-9bdb-b86fe3dc4649", "890ca44d-b0af-4fdf-8090-f0acae0", -60, - "820ea260-9275-4d7c-a9e7-6c437bc7f25b", "b10e1f14-e459-48bd-a2a2-fba89ff601e4", - "dc6fa507-6ca9-4d7b-8397-a9071d7c7d38", new Date(1574704660272L), - "0a76c219-502b-46d7-8636-31424a2e76e1", null, - "7370b4dd-e30c-41c7-b740-e09e1f392d52", "3b24bf40-41e6-452e-a033-0f4f4ec25bfb", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "39f33ea3-39c3-4b98-95ec-8b712a420566", - new Date(1574704660405L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "275cadc0-2ea4-4d60-90fd-ccd62d9ea3ad", new Date(1574704660271L), - DeviceLifecycleStatus.getDefault(), "bc95f6c6-b53e-4d36-a477-78f111f30f22", - new Date(1574704663842L), DeviceMechanism.getDefault(), - "bc5f62b2-4712-4ce6-84b2-9d82ef889210", "b3734b99-5943-41e7-bb23-38e2f7e3814c", - true, "f5a8dc0e-f0f5-4867-88d3-bef05cff8b4c", DeviceState.getDefault(), true, - new Date(1574704661345L), "2779327a-8113-4d2f-bf79-2724604211e0"); - Device device2 = new Device("2720da47-0796-4c70-9b29-5c9bcd3748c0", true, new Date(1574704665714L), - new Date(1574704666501L), "c83c3254-cb8b-4caa-88ab-adc2a58367e2", - new Date(1574704665150L), new Date(1574704664195L), null, - DeviceDeployedState.getDefault(), "d0bf445c-1e7b-4859-9565-f9a96d9ebf2e", - "5d7c135a-9511-47ce-9bdb-b86fe3dc4649", "890ca44d-b0af-4fdf-8090-f0acae0", -60, - "820ea260-9275-4d7c-a9e7-6c437bc7f25b", "b10e1f14-e459-48bd-a2a2-fba89ff601e4", - "dc6fa507-6ca9-4d7b-8397-a9071d7c7d38", new Date(1574704660272L), - "0a76c219-502b-46d7-8636-31424a2e76e1", null, - "7370b4dd-e30c-41c7-b740-e09e1f392d52", "3b24bf40-41e6-452e-a033-0f4f4ec25bfb", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "39f33ea3-39c3-4b98-95ec-8b712a420566", - new Date(1574704660405L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "275cadc0-2ea4-4d60-90fd-ccd62d9ea3ad", new Date(1574704660271L), - DeviceLifecycleStatus.getDefault(), "bc95f6c6-b53e-4d36-a477-78f111f30f22", - new Date(1574704663842L), DeviceMechanism.getDefault(), - "bc5f62b2-4712-4ce6-84b2-9d82ef889210", "b3734b99-5943-41e7-bb23-38e2f7e3814c", - true, "f5a8dc0e-f0f5-4867-88d3-bef05cff8b4c", DeviceState.getDefault(), true, - new Date(1574704661345L), "2779327a-8113-4d2f-bf79-2724604211e0"); - Device device3 = new Device("99c02326-8e82-4e6b-8db8-60cfbabdae6b", true, new Date(1574704669916L), - new Date(1574704663032L), "ac6aa8e3-6255-4178-bb4f-bbd9da93791b", - new Date(1574704668067L), new Date(1574704665756L), null, - DeviceDeployedState.getDefault(), "d0beb9dd-38d5-4cbd-bacd-83bc05498a2a", - "a1cd3421-a132-45f8-a9af-ac15fc268fa3", "bacb8b5b-7917-4d7c-8cc4-ab5e2b2", -53, - "73a383f1-a0e4-4aaf-82c8-da85a72e8ec8", "42f07be3-85d6-4716-bd0b-8cf444feeebf", - "a6d86a02-7c1d-46b7-8ee0-8b2768f78c85", new Date(1574704660466L), - "89e035bc-0985-4bb5-9600-931c6eab79c7", null, - "1c9646c6-a591-4f09-a828-00e99f308c92", "86cd9d2f-0bc5-4f21-a4ea-4aee22a4bc89", - "7ebfbcfFbB21A3CB4CCA0EB35dAd5Ebb6f76bbAeAefA61aeCFaE085cFFe5eb7a", - "_e7a_a1__e0e_d_fee__8_30_184_8__", "3efc1499-3b78-4940-9bd8-754e0a676c79", - new Date(1574704665158L), "_e7a_a1__e0e_d_fee__8_30_184_8__", - "fc582cf8-6511-4db6-83c7-9d7d32e3a955", new Date(1574704666864L), - DeviceLifecycleStatus.getDefault(), "89e1d505-7725-48af-b775-065b89b2b5f1", - new Date(1574704664604L), DeviceMechanism.getDefault(), - "bc7d88ca-97d4-4f40-813f-0b288371375f", "361f480e-f3ab-4db8-af35-7e9d2e78b359", - true, "48054957-1098-4c32-89db-0d74d5c3803a", DeviceState.getDefault(), true, - new Date(1574704668946L), "724ffa6f-576d-4f36-847a-191631099c2a"); + Device device1 = new Device("53bd3f2a-6e7d-4293-a44b-b544acfc038b", false, new Date(1610683988037L), + new Date(1610683989403L), "7e37d146-bf0b-4c01-9df7-136e94d382b9", null, + new Date(1610683988292L), new Date(1610683995062L), null, + DeviceDeployedState.getDefault(), "ed696c69-67e4-4f4e-90eb-58179ec2fc24", + "da461509-5909-4245-8163-467adb418660", "88447c96-3d52-478b-b164-387dcec", -31, + "d573a73c-ad92-4323-838f-8cf124d76195", "1076938c-c86b-47f4-8980-d8991f2cb655", + "f253b2c0-eccb-4a0f-b6fb-763f6bf36558", new Date(1610683990296L), + "3c2b9011-98a1-43c1-ba63-a053b991a83d", null, + "376446de-cef5-40c8-944c-a660096cfb1a", "cfab9eaa-58bc-4af9-96ce-f1617b8d09df", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "18311a4a-1837-464a-b1a6-5bcd30ee29b2", + new Date(1610683985989L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "82d9bf99-86fa-4ca5-9990-2a303039054e", new Date(1610683992951L), + DeviceLifecycleStatus.getDefault(), "bdf08d9d-3047-4d7a-9c18-379f9e09dc06", + new Date(1610683988069L), DeviceMechanism.getDefault(), + "809eaf97-8f63-4c0b-96e1-54cb159c265c", "d3cb84aa-5616-4df5-b7bc-c231abf9ddc8", + "523fd0b7-f861-4b9f-a45c-5054a133a363", true, + "6225505d-8639-482e-b486-759c2a4f70cc", DeviceState.getDefault(), true, + new Date(1610683988572L), "1db7bd36-c2f6-46fa-8bff-762f70e5ded1"); + Device device2 = new Device("53bd3f2a-6e7d-4293-a44b-b544acfc038b", false, new Date(1610683988037L), + new Date(1610683989403L), "7e37d146-bf0b-4c01-9df7-136e94d382b9", null, + new Date(1610683988292L), new Date(1610683995062L), null, + DeviceDeployedState.getDefault(), "ed696c69-67e4-4f4e-90eb-58179ec2fc24", + "da461509-5909-4245-8163-467adb418660", "88447c96-3d52-478b-b164-387dcec", -31, + "d573a73c-ad92-4323-838f-8cf124d76195", "1076938c-c86b-47f4-8980-d8991f2cb655", + "f253b2c0-eccb-4a0f-b6fb-763f6bf36558", new Date(1610683990296L), + "3c2b9011-98a1-43c1-ba63-a053b991a83d", null, + "376446de-cef5-40c8-944c-a660096cfb1a", "cfab9eaa-58bc-4af9-96ce-f1617b8d09df", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "18311a4a-1837-464a-b1a6-5bcd30ee29b2", + new Date(1610683985989L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "82d9bf99-86fa-4ca5-9990-2a303039054e", new Date(1610683992951L), + DeviceLifecycleStatus.getDefault(), "bdf08d9d-3047-4d7a-9c18-379f9e09dc06", + new Date(1610683988069L), DeviceMechanism.getDefault(), + "809eaf97-8f63-4c0b-96e1-54cb159c265c", "d3cb84aa-5616-4df5-b7bc-c231abf9ddc8", + "523fd0b7-f861-4b9f-a45c-5054a133a363", true, + "6225505d-8639-482e-b486-759c2a4f70cc", DeviceState.getDefault(), true, + new Date(1610683988572L), "1db7bd36-c2f6-46fa-8bff-762f70e5ded1"); + Device device3 = new Device("b31e7b9e-a050-444a-a19f-47703fd69879", false, new Date(1610683988898L), + new Date(1610683989942L), "1cec6443-6480-498f-b82f-01fd4d08ec21", null, + new Date(1610683993995L), new Date(1610683992826L), null, + DeviceDeployedState.getDefault(), "8a66cc62-bfff-40de-96e6-d7cebf209427", + "73061aef-d2ed-4262-bd21-6151c4e0d5d4", "6da90cd0-5c98-4af5-b2a0-051d864", 123, + "53dfa843-27ad-4113-90a0-117f28d0ee67", "1dc426d5-2457-46c7-96ee-81882c369c72", + "435db8d9-56bc-4d5c-9431-68abde8659eb", new Date(1610683994088L), + "3268cad5-a8d4-466b-a1b1-0145ac33f8ce", null, + "2153d86b-9868-4fdc-8044-58f691dfa6af", "f986b31d-f445-4124-a178-e51fcda48550", + "dcb2C2EEFF2e1e2bE2EAaebf6B690dEC9dCBFfBC29cDEbC4e26F92AFCaD43EfF", + "__b_5___1c28c__0ed2faa7b5ccc_36a", "c905f6f4-b5cc-4a92-bafe-0efcdfcc8b44", + new Date(1610683985277L), "__b_5___1c28c__0ed2faa7b5ccc_36a", + "5e84549e-ef91-4ae1-9b6b-a7e6e4c98328", new Date(1610683987786L), + DeviceLifecycleStatus.getDefault(), "0da283cc-a193-4538-aecc-50b8312ef27b", + new Date(1610683989016L), DeviceMechanism.getDefault(), + "d9aee162-b860-4d48-8100-a958dda2f246", "4fa0b670-fadf-4d90-8f18-a7c8d0be35c4", + "8f349dc5-5b29-4eee-8539-863de9ba3eca", true, + "bf8b976e-f07b-43e0-b96f-5c7430fce2ce", DeviceState.getDefault(), true, + new Date(1610683989021L), "b4326074-7699-44e1-9315-b6c48f7fe33a"); assertNotNull(device1); assertNotNull(device2); assertNotNull(device3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceDeployedState.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceDeployedState.java index 68fab6291..1abae6a27 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceDeployedState.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceDeployedState.java @@ -30,7 +30,7 @@ public void testGetValue() { devicedeployedstate = DeviceDeployedState.getValue("production"); assertNotNull(devicedeployedstate); assertFalse(devicedeployedstate.isDefault()); - devicedeployedstate = DeviceDeployedState.getValue("ac737b3e-030a-4656-a2f5-2d4a5442a14e"); + devicedeployedstate = DeviceDeployedState.getValue("80a3d0b3-ad8f-48f5-8675-c1acb0696189"); assertNotNull(devicedeployedstate); assertTrue(devicedeployedstate.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollment.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollment.java index 51038e71c..09eb32789 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollment.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollment.java @@ -19,13 +19,13 @@ public class TestDeviceEnrollment { @Test public void testClone() { try { - DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("c580b553-39a6-4564-8327-8d5f88123e4e", - new Date(1574704667064L), - new Date(1574704666932L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704663147L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); + DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("c4f78826-35a5-4b22-8ee5-17e6c8e57be4", + new Date(1610683993507L), + new Date(1610683989223L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683992443L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); DeviceEnrollment deviceenrollment2 = deviceenrollment1.clone(); assertNotNull(deviceenrollment1); assertNotNull(deviceenrollment2); @@ -43,20 +43,20 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("9a7c8a77-a5bd-4e0a-9d15-81f19af5c98c", - new Date(1574704666261L), - new Date(1574704664811L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704668765L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); - DeviceEnrollment deviceenrollment2 = new DeviceEnrollment("9a7c8a77-a5bd-4e0a-9d15-81f19af5c98c", - new Date(1574704666261L), - new Date(1574704664811L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704668765L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); + DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("26d7e1a9-d15b-42b0-b477-bbba5b502ef4", + new Date(1610683991980L), + new Date(1610683985691L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683987954L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); + DeviceEnrollment deviceenrollment2 = new DeviceEnrollment("26d7e1a9-d15b-42b0-b477-bbba5b502ef4", + new Date(1610683991980L), + new Date(1610683985691L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683987954L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); assertNotNull(deviceenrollment1); assertNotNull(deviceenrollment2); assertNotSame(deviceenrollment2, deviceenrollment1); @@ -77,19 +77,19 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - DeviceEnrollment deviceenrollment = new DeviceEnrollment("b476b7bd-6d21-42a1-8599-201fbcb1591e", - new Date(1574704665541L), new Date(1574704664012L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704669813L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); + DeviceEnrollment deviceenrollment = new DeviceEnrollment("a3a73d80-d679-4565-a004-c04f90484071", + new Date(1610683992522L), new Date(1610683988635L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683994215L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); assertTrue(deviceenrollment.isValid()); - DeviceEnrollment deviceenrollmentInvalid = new DeviceEnrollment("c9977291-fb08-4661-843e-084aeac83e24", - new Date(1574704666088L), - new Date(1574704666305L), - "cn;PwKRGqqℵJT쬶x$$PJRvw`RTJRcꕟGGu鉙J`\u0005C>W\\\\T5N_vNPG5xRcTc\u0007XAiJquWwJP", - null, new Date(1574704667798L), - "cn;PwKRGqqℵJT쬶x$$PJRvw`RTJRcꕟGGu鉙J`\u0005C>W\\\\T5N_vNPG5xRcTc\u0007XAiJquWwJP"); + DeviceEnrollment deviceenrollmentInvalid = new DeviceEnrollment("cefeead4-6661-4eda-aee4-c6db16406565", + new Date(1610683992831L), + new Date(1610683987746L), + "RCwB2W>weRCM][eZRQBEEtc8;cM8M^<뵆]wTXEweBwHeM#UCJ_wBe2Cc=8eCe?$$KM", + null, new Date(1610683992883L), + "RCwB2W>weRCM][eZRQBEEtc8;cM8M^<뵆]wTXEweBwHeM#UCJ_wBe2Cc=8eCe?$$KM"); assertFalse(deviceenrollmentInvalid.isValid()); } @@ -100,27 +100,27 @@ null, new Date(1574704667798L), @Test public void testEquals() { try { - DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("97eb1ba8-dd95-4ee4-a928-058b563da3f5", - new Date(1574704667156L), - new Date(1574704665528L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704669506L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); - DeviceEnrollment deviceenrollment2 = new DeviceEnrollment("97eb1ba8-dd95-4ee4-a928-058b563da3f5", - new Date(1574704667156L), - new Date(1574704665528L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704669506L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); - DeviceEnrollment deviceenrollment3 = new DeviceEnrollment("3b79b76a-46c4-41b5-8410-81f8cfcdba13", - new Date(1574704660948L), - new Date(1574704666557L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - "A-tE885pqtq42cQE2sSP6b:u:Z5970hU32i9R8Z9J4eyDP4bxdc7SCUn5e30jG0Z5r3JONO7tWuhh1NVcpdd6w5vU1FeP539o", - new Date(1574704667225L), - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI"); + DeviceEnrollment deviceenrollment1 = new DeviceEnrollment("a238b432-3026-4ab9-b6e8-a6f41a1d4fbc", + new Date(1610683990342L), + new Date(1610683988428L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683988040L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); + DeviceEnrollment deviceenrollment2 = new DeviceEnrollment("a238b432-3026-4ab9-b6e8-a6f41a1d4fbc", + new Date(1610683990342L), + new Date(1610683988428L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683988040L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); + DeviceEnrollment deviceenrollment3 = new DeviceEnrollment("4a3c1d93-6818-4636-9d5f-589c6a7bf834", + new Date(1610683990380L), + new Date(1610683990785L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + "A-g9al6k5oEcqu5bkRDl4hY1cjzc997:Tn2pR:1rY49ybb2LtdNoypU6L7j1G507lguVb:Q51s0Z2NimdUwah7R6d76HsYUkg", + new Date(1610683986763L), + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4"); assertNotNull(deviceenrollment1); assertNotNull(deviceenrollment2); assertNotNull(deviceenrollment3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreate.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreate.java index 2ffeb4d99..d73c4c304 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreate.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreate.java @@ -19,16 +19,16 @@ public class TestDeviceEnrollmentBulkCreate { @Test public void testClone() { try { - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("8afcae58-2e5a-4f7c-9b07-62bf692c06fa", - new Date(1574704668319L), - new Date(1574704669744L), - 118, - "b0031658-e4f0-453a-be19-bceb21a6df91", - "b5dac844-0220-4c57-bd10-63c9f535d276", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 58, + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("e3335d70-8d96-43ae-bb25-3c8292983677", + new Date(1610683987467L), + new Date(1610683985825L), + -1, + "9f24994c-830e-4444-a725-a425bc090c6f", + "0a8df572-0893-44fb-8370-c5f9b627dd9b", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -6, DeviceEnrollmentBulkCreateStatus.getDefault(), - 94); + 10); DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate2 = deviceenrollmentbulkcreate1.clone(); assertNotNull(deviceenrollmentbulkcreate1); assertNotNull(deviceenrollmentbulkcreate2); @@ -46,26 +46,26 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("e5f7ab1a-d9f7-4041-97b7-dca1fb077120", - new Date(1574704668683L), - new Date(1574704666936L), - 125, - "b3a106a8-3d57-4f34-a30f-4f3fa5718f73", - "07db4500-ce00-4e50-a6b2-4a20e900ee85", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 103, + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("a8dadb81-d977-4037-a85b-c4812e60b804", + new Date(1610683992675L), + new Date(1610683991946L), + 110, + "9d0d8bd9-8faf-413f-8382-23e214cfcc6a", + "acf437fe-881c-4141-8d39-56520c4a1db7", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -109, DeviceEnrollmentBulkCreateStatus.getDefault(), - -67); - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate2 = new DeviceEnrollmentBulkCreate("e5f7ab1a-d9f7-4041-97b7-dca1fb077120", - new Date(1574704668683L), - new Date(1574704666936L), - 125, - "b3a106a8-3d57-4f34-a30f-4f3fa5718f73", - "07db4500-ce00-4e50-a6b2-4a20e900ee85", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 103, + -34); + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate2 = new DeviceEnrollmentBulkCreate("a8dadb81-d977-4037-a85b-c4812e60b804", + new Date(1610683992675L), + new Date(1610683991946L), + 110, + "9d0d8bd9-8faf-413f-8382-23e214cfcc6a", + "acf437fe-881c-4141-8d39-56520c4a1db7", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -109, DeviceEnrollmentBulkCreateStatus.getDefault(), - -67); + -34); assertNotNull(deviceenrollmentbulkcreate1); assertNotNull(deviceenrollmentbulkcreate2); assertNotSame(deviceenrollmentbulkcreate2, deviceenrollmentbulkcreate1); @@ -86,27 +86,27 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate = new DeviceEnrollmentBulkCreate("45d1c9b8-5acd-4f48-b5e0-a5546d455520", - new Date(1574704665788L), - new Date(1574704668516L), - -114, - "14b9ee52-402a-4602-92ba-fbd8df197fb1", - "40c5aa25-806f-4582-ba52-325ba554dfa3", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - -3, + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate = new DeviceEnrollmentBulkCreate("a112d02e-416c-4fb7-9171-580f57657c43", + new Date(1610683985978L), + new Date(1610683992458L), + -27, + "3f7aeb1b-cfb0-4674-a05a-390f7e345e37", + "16c5a9dd-4b3f-42a6-abff-8b5767dd9dd4", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 103, DeviceEnrollmentBulkCreateStatus.getDefault(), - 106); + 84); assertTrue(deviceenrollmentbulkcreate.isValid()); - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreateInvalid = new DeviceEnrollmentBulkCreate("6bd44871-6967-465e-b245-3dbea5c37d79", - new Date(1574704660865L), - new Date(1574704668517L), - 63, - "7ac5e6c9-f56a-48c0-891c-c639acd57903", - "a297f1c4-83e8-43fd-a129-1fcfabffed0a", - "cn;PwKRGqqℵJT쬶x$$PJRvw`RTJRcꕟGGu鉙J`\u0005C>W\\\\T5N_vNPG5xRcTc\u0007XAiJquWwJP", - -84, + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreateInvalid = new DeviceEnrollmentBulkCreate("650b9d11-3866-42df-a236-efcb1fe55326", + new Date(1610683986442L), + new Date(1610683991215L), + -48, + "1f02b126-7b2e-4cd1-ac43-ac51d4438b7e", + "13c3684a-2697-4e5e-9214-bd31cb8659a5", + "RCwB2W>weRCM][eZRQBEEtc8;cM8M^<뵆]wTXEweBwHeM#UCJ_wBe2Cc=8eCe?$$KM", + -7, DeviceEnrollmentBulkCreateStatus.getDefault(), - 19); + -57); assertFalse(deviceenrollmentbulkcreateInvalid.isValid()); } @@ -117,36 +117,36 @@ public void testIsValid() { @Test public void testEquals() { try { - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("527ad413-caf3-45e0-8f3d-eb9c7ac7ebcb", - new Date(1574704666450L), - new Date(1574704669911L), - -84, - "fa960382-8659-4225-a074-f7daefe6ef71", - "0ca05554-be1e-485a-b64d-4d8f662f30bf", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 3, + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate1 = new DeviceEnrollmentBulkCreate("1be03b7b-d379-4268-b189-5ff65651fd72", + new Date(1610683988884L), + new Date(1610683994466L), + -89, + "d3544f39-ff9d-48a7-b0ea-1eeb3dcd4b66", + "99e2fdba-4bc1-45c8-a32c-ac8ada065bc0", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -54, DeviceEnrollmentBulkCreateStatus.getDefault(), - 39); - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate2 = new DeviceEnrollmentBulkCreate("527ad413-caf3-45e0-8f3d-eb9c7ac7ebcb", - new Date(1574704666450L), - new Date(1574704669911L), - -84, - "fa960382-8659-4225-a074-f7daefe6ef71", - "0ca05554-be1e-485a-b64d-4d8f662f30bf", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 3, + -96); + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate2 = new DeviceEnrollmentBulkCreate("1be03b7b-d379-4268-b189-5ff65651fd72", + new Date(1610683988884L), + new Date(1610683994466L), + -89, + "d3544f39-ff9d-48a7-b0ea-1eeb3dcd4b66", + "99e2fdba-4bc1-45c8-a32c-ac8ada065bc0", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -54, DeviceEnrollmentBulkCreateStatus.getDefault(), - 39); - DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate3 = new DeviceEnrollmentBulkCreate("fbcbcceb-1a2a-4c89-8de8-214388f05407", - new Date(1574704664432L), - new Date(1574704663191L), - -109, - "2effb0d7-46f8-4207-84f5-70da8d30ae81", - "0f557bec-e6c6-490c-8cef-593971fdbdfa", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - -118, + -96); + DeviceEnrollmentBulkCreate deviceenrollmentbulkcreate3 = new DeviceEnrollmentBulkCreate("ba7696aa-11ae-4e21-b483-dbb8cbbf62a7", + new Date(1610683985293L), + new Date(1610683986836L), + 71, + "21addfec-30be-4e4f-b112-bed5f6155108", + "f90026d7-d183-4271-a706-c47bc2a34754", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -7, DeviceEnrollmentBulkCreateStatus.getDefault(), - -59); + -111); assertNotNull(deviceenrollmentbulkcreate1); assertNotNull(deviceenrollmentbulkcreate2); assertNotNull(deviceenrollmentbulkcreate3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreateStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreateStatus.java index b9ca9992f..63e0f8792 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreateStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkCreateStatus.java @@ -31,7 +31,7 @@ public void testGetValue() { deviceenrollmentbulkcreatestatus = DeviceEnrollmentBulkCreateStatus.getValue("new"); assertNotNull(deviceenrollmentbulkcreatestatus); assertFalse(deviceenrollmentbulkcreatestatus.isDefault()); - deviceenrollmentbulkcreatestatus = DeviceEnrollmentBulkCreateStatus.getValue("ccd38510-d73d-4927-8f8e-e92e766649d7"); + deviceenrollmentbulkcreatestatus = DeviceEnrollmentBulkCreateStatus.getValue("31524b18-e7a3-496d-aacc-af72988c6adf"); assertNotNull(deviceenrollmentbulkcreatestatus); assertTrue(deviceenrollmentbulkcreatestatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDelete.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDelete.java index 61abda691..daf3ed569 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDelete.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDelete.java @@ -19,16 +19,16 @@ public class TestDeviceEnrollmentBulkDelete { @Test public void testClone() { try { - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("53729658-4586-4ebf-880b-10a80089e196", - new Date(1574704667391L), - new Date(1574704665645L), - 10, - "db7f5204-0912-41e1-87bb-f529112c2958", - "379ef450-c734-4674-b2b8-334a784f1282", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 33, + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("63599c09-92a4-4065-94a2-7cf9a2c58171", + new Date(1610683986142L), + new Date(1610683994376L), + -104, + "193aa083-0fd6-4117-9d86-2930a5241ca7", + "c865bfd4-d8e5-4076-b693-7a7d1235cb12", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 13, DeviceEnrollmentBulkDeleteStatus.getDefault(), - 119); + -1); DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete2 = deviceenrollmentbulkdelete1.clone(); assertNotNull(deviceenrollmentbulkdelete1); assertNotNull(deviceenrollmentbulkdelete2); @@ -46,26 +46,26 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("129bb28a-c6bd-4a29-b834-839a60da223d", - new Date(1574704661989L), - new Date(1574704663970L), - -48, - "9e29f77a-9205-438e-a189-e034c57316b0", - "1d083acb-3c76-4be4-a595-e197fb46f116", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - -120, + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("364c08ac-ee6d-4080-a6c8-27e2bb7bc72e", + new Date(1610683994295L), + new Date(1610683994635L), + 85, + "b8cf9c65-8edc-486c-9ffe-052634e8fd81", + "83db7816-7fab-4356-9f09-e2afaf335989", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 82, DeviceEnrollmentBulkDeleteStatus.getDefault(), - -91); - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete2 = new DeviceEnrollmentBulkDelete("129bb28a-c6bd-4a29-b834-839a60da223d", - new Date(1574704661989L), - new Date(1574704663970L), - -48, - "9e29f77a-9205-438e-a189-e034c57316b0", - "1d083acb-3c76-4be4-a595-e197fb46f116", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - -120, + 104); + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete2 = new DeviceEnrollmentBulkDelete("364c08ac-ee6d-4080-a6c8-27e2bb7bc72e", + new Date(1610683994295L), + new Date(1610683994635L), + 85, + "b8cf9c65-8edc-486c-9ffe-052634e8fd81", + "83db7816-7fab-4356-9f09-e2afaf335989", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 82, DeviceEnrollmentBulkDeleteStatus.getDefault(), - -91); + 104); assertNotNull(deviceenrollmentbulkdelete1); assertNotNull(deviceenrollmentbulkdelete2); assertNotSame(deviceenrollmentbulkdelete2, deviceenrollmentbulkdelete1); @@ -86,27 +86,27 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete = new DeviceEnrollmentBulkDelete("069a0ee6-c03a-4d4e-bf8d-d31aae9413d2", - new Date(1574704666050L), - new Date(1574704669369L), - -69, - "f94b60fb-a8eb-431f-b92b-9ba4f860aced", - "a55fd43d-32a8-4409-88c0-4b96ae43e478", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 43, + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete = new DeviceEnrollmentBulkDelete("626f2cfd-f055-4d11-a948-1bfb95483ea8", + new Date(1610683987799L), + new Date(1610683990398L), + 73, + "6b35f9e6-3f73-471a-83f7-a61940fd9fea", + "c8f1843d-39b0-46bf-a12c-11804b1f2309", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 118, DeviceEnrollmentBulkDeleteStatus.getDefault(), - 73); + 88); assertTrue(deviceenrollmentbulkdelete.isValid()); - DeviceEnrollmentBulkDelete deviceenrollmentbulkdeleteInvalid = new DeviceEnrollmentBulkDelete("ac6f5f2e-0693-4790-9a63-661faa44d3bc", - new Date(1574704667152L), - new Date(1574704669284L), - 3, - "09102cde-477b-4787-a25b-ce38f8c169af", - "28e19899-176e-4f1d-97a0-aa698cc37e80", - "cn;PwKRGqqℵJT쬶x$$PJRvw`RTJRcꕟGGu鉙J`\u0005C>W\\\\T5N_vNPG5xRcTc\u0007XAiJquWwJP", - -77, + DeviceEnrollmentBulkDelete deviceenrollmentbulkdeleteInvalid = new DeviceEnrollmentBulkDelete("533ec957-530e-408f-af03-9a275ce03b79", + new Date(1610683991076L), + new Date(1610683993441L), + 15, + "aff19e0a-dcee-4319-b14e-7cade9a18c08", + "add910f7-af5f-41b6-9f71-d70f880fa0a9", + "RCwB2W>weRCM][eZRQBEEtc8;cM8M^<뵆]wTXEweBwHeM#UCJ_wBe2Cc=8eCe?$$KM", + 115, DeviceEnrollmentBulkDeleteStatus.getDefault(), - 59); + 42); assertFalse(deviceenrollmentbulkdeleteInvalid.isValid()); } @@ -117,36 +117,36 @@ public void testIsValid() { @Test public void testEquals() { try { - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("1ec940f8-a8b3-42c3-81d8-ddf5ebc08d75", - new Date(1574704669670L), - new Date(1574704665263L), - -74, - "91d18b60-e676-4cba-a1ea-989a216f3b35", - "5c582480-c80e-4996-b7ae-dc1467f43d01", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 73, + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete1 = new DeviceEnrollmentBulkDelete("ae11605e-1be5-4fe3-9294-67feb43046c0", + new Date(1610683987248L), + new Date(1610683986345L), + -119, + "3d5c07d0-4886-42ca-baa6-d5bc1d845d0d", + "12fba14b-ab03-4550-a4fd-3ce79ade6fff", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -6, DeviceEnrollmentBulkDeleteStatus.getDefault(), - 59); - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete2 = new DeviceEnrollmentBulkDelete("1ec940f8-a8b3-42c3-81d8-ddf5ebc08d75", - new Date(1574704669670L), - new Date(1574704665263L), - -74, - "91d18b60-e676-4cba-a1ea-989a216f3b35", - "5c582480-c80e-4996-b7ae-dc1467f43d01", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 73, + 122); + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete2 = new DeviceEnrollmentBulkDelete("ae11605e-1be5-4fe3-9294-67feb43046c0", + new Date(1610683987248L), + new Date(1610683986345L), + -119, + "3d5c07d0-4886-42ca-baa6-d5bc1d845d0d", + "12fba14b-ab03-4550-a4fd-3ce79ade6fff", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + -6, DeviceEnrollmentBulkDeleteStatus.getDefault(), - 59); - DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete3 = new DeviceEnrollmentBulkDelete("d3cc1711-9b1d-4975-ab12-a4678da3559e", - new Date(1574704669243L), - new Date(1574704663055L), - -72, - "84d24ccc-1f0b-44b3-acfb-c9e5d238598a", - "bb128cfa-ebea-4e84-8e28-6126c00e8082", - "9mbY48OQ22Hrd0H371V1SIDyLElF8pUI", - 72, + 122); + DeviceEnrollmentBulkDelete deviceenrollmentbulkdelete3 = new DeviceEnrollmentBulkDelete("1475c119-d9c1-4982-a169-12da89de99c4", + new Date(1610683994308L), + new Date(1610683994535L), + 100, + "0149daeb-7038-4aab-b5e5-616a841daf0b", + "fae2a3fb-7d90-4154-8a1c-a91508b9194e", + "v9PPaz1f91YA6aS0uxuDdby3N77O5LL4", + 126, DeviceEnrollmentBulkDeleteStatus.getDefault(), - -13); + -116); assertNotNull(deviceenrollmentbulkdelete1); assertNotNull(deviceenrollmentbulkdelete2); assertNotNull(deviceenrollmentbulkdelete3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDeleteStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDeleteStatus.java index 38e1224c7..2ec795591 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDeleteStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEnrollmentBulkDeleteStatus.java @@ -31,7 +31,7 @@ public void testGetValue() { deviceenrollmentbulkdeletestatus = DeviceEnrollmentBulkDeleteStatus.getValue("new"); assertNotNull(deviceenrollmentbulkdeletestatus); assertFalse(deviceenrollmentbulkdeletestatus.isDefault()); - deviceenrollmentbulkdeletestatus = DeviceEnrollmentBulkDeleteStatus.getValue("fdec9bb9-e1fd-4a8a-b6b6-08522106d6bc"); + deviceenrollmentbulkdeletestatus = DeviceEnrollmentBulkDeleteStatus.getValue("02435442-d679-4e9b-a7b3-244901dae9f5"); assertNotNull(deviceenrollmentbulkdeletestatus); assertTrue(deviceenrollmentbulkdeletestatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEvents.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEvents.java index 1f4faa0cf..97242dca3 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEvents.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceEvents.java @@ -19,14 +19,14 @@ public class TestDeviceEvents { @Test public void testClone() { try { - DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1574704666421L), null, - new Date(1574704664531L), - "ef070826-4155-41c7-910f-d0fd8579a314", - "3ddab6de-8972-4a51-9de3-a7805f8a0ff1", - "e4540f33-23ca-4c74-add9-b278f793f397", - "74bf47d7-64b4-4ca1-ba03-e1524ddf0a11", - "e5e58694-5a3d-49ad-870a-676a60c066da", - "d0414c7e-319e-4c04-a219-1b76abffae18", true); + DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1610683989613L), null, + new Date(1610683991165L), + "460ef6da-f028-4ed0-99c9-56b8a6be7a65", + "23abbf86-beed-4559-910e-0291ad90abdf", + "6b4a2bb6-3e76-4199-a502-5f3c99c54f30", + "be6f24a8-ee2d-445f-ad4a-a8ab4f156d98", + "897869bd-7864-4510-ba07-5aa1bd04ca0d", + "bb8a3cde-3221-4963-a639-23fc500f0470", false); DeviceEvents deviceevents2 = deviceevents1.clone(); assertNotNull(deviceevents1); assertNotNull(deviceevents2); @@ -44,22 +44,22 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1574704660784L), null, - new Date(1574704665134L), - "8d6a46b6-a8cb-4a44-989a-ef421e63600f", - "a2bb268e-7944-4178-bf29-02a68e095fa0", - "3e39cdb8-1cb3-4509-8b76-da3e898de131", - "b1a86eec-4937-4d2d-be29-8f4d30b2b33b", - "801999d5-0a89-4606-91bc-ff1b6304bcc5", - "c1797e35-a4d2-4e2e-81b8-6083ed55b732", true); - DeviceEvents deviceevents2 = new DeviceEvents(null, new Date(1574704660784L), null, - new Date(1574704665134L), - "8d6a46b6-a8cb-4a44-989a-ef421e63600f", - "a2bb268e-7944-4178-bf29-02a68e095fa0", - "3e39cdb8-1cb3-4509-8b76-da3e898de131", - "b1a86eec-4937-4d2d-be29-8f4d30b2b33b", - "801999d5-0a89-4606-91bc-ff1b6304bcc5", - "c1797e35-a4d2-4e2e-81b8-6083ed55b732", true); + DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1610683987291L), null, + new Date(1610683986852L), + "849abd46-8eda-40ac-a72e-95b8008e97db", + "8122a2b3-bf46-49e5-896e-f0fab72f9e18", + "d94a4f7c-3b99-4493-8d44-4dba84f3b425", + "7b3846e0-101f-44f1-bb5a-cac6a9f0a952", + "27c03707-f3d0-4db9-b8bb-a470c28d2d9c", + "f6971779-5440-42a8-9d03-85c97102b8d2", true); + DeviceEvents deviceevents2 = new DeviceEvents(null, new Date(1610683987291L), null, + new Date(1610683986852L), + "849abd46-8eda-40ac-a72e-95b8008e97db", + "8122a2b3-bf46-49e5-896e-f0fab72f9e18", + "d94a4f7c-3b99-4493-8d44-4dba84f3b425", + "7b3846e0-101f-44f1-bb5a-cac6a9f0a952", + "27c03707-f3d0-4db9-b8bb-a470c28d2d9c", + "f6971779-5440-42a8-9d03-85c97102b8d2", true); assertNotNull(deviceevents1); assertNotNull(deviceevents2); assertNotSame(deviceevents2, deviceevents1); @@ -80,13 +80,13 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - DeviceEvents deviceevents = new DeviceEvents(null, new Date(1574704666848L), null, new Date(1574704667387L), - "668385ec-0114-42e4-babe-70a49ab0f7f2", - "78078802-684e-4718-9e6e-e27380dc5448", - "d31e7a7d-ed30-449c-90f0-a551b05c0495", - "f5477138-9962-41a4-ba75-503511317228", - "b5556125-9603-46f1-940a-bdc67dcfec99", - "39747350-0e1d-4772-9c7a-05e99a6f7655", true); + DeviceEvents deviceevents = new DeviceEvents(null, new Date(1610683988699L), null, new Date(1610683985799L), + "8760d5aa-f572-40bc-92f7-88bee2578936", + "d8e9cf0a-3852-44c8-a4de-20a6ef4d6e99", + "f75c39e8-9c83-45c2-a3d0-399f3debd7a1", + "e824031f-fad0-4472-9cc1-a0150a71fed9", + "9d0ed4d2-3d34-4a9b-b45a-c8bbac345f05", + "7153029c-8766-452d-bece-2398e39f3370", false); assertTrue(deviceevents.isValid()); } @@ -97,30 +97,30 @@ public void testIsValid() { @Test public void testEquals() { try { - DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1574704664465L), null, - new Date(1574704663577L), - "bc4f6261-3d93-4b87-b223-5fa5eef7ef05", - "b8cd3717-1d00-4d5b-95c2-e7df4a3044dd", - "1657aacd-4abd-45e0-97c2-1f9ca9cca853", - "5ea6f0de-51bf-4a58-9b86-5a24e2e25fd8", - "7f32e507-1f3e-4af1-a25d-0dc7f402e37d", - "11918595-502a-41c9-9cd0-a0a47ee3cef8", true); - DeviceEvents deviceevents2 = new DeviceEvents(null, new Date(1574704664465L), null, - new Date(1574704663577L), - "bc4f6261-3d93-4b87-b223-5fa5eef7ef05", - "b8cd3717-1d00-4d5b-95c2-e7df4a3044dd", - "1657aacd-4abd-45e0-97c2-1f9ca9cca853", - "5ea6f0de-51bf-4a58-9b86-5a24e2e25fd8", - "7f32e507-1f3e-4af1-a25d-0dc7f402e37d", - "11918595-502a-41c9-9cd0-a0a47ee3cef8", true); - DeviceEvents deviceevents3 = new DeviceEvents(null, new Date(1574704666019L), null, - new Date(1574704664964L), - "21985221-2041-4873-9378-7592bc6d4afc", - "8158ce7e-465c-4c9b-a5c9-ca4304abba31", - "c1ff0673-e697-4dd3-bb03-d1a57ac4baa7", - "124f415e-e2ff-4d40-8da6-8707a3a638f3", - "b0ad10e4-0d91-489c-bb96-9183f92d2a7f", - "3072d12c-4cee-47b8-b157-40af95942b0b", true); + DeviceEvents deviceevents1 = new DeviceEvents(null, new Date(1610683989098L), null, + new Date(1610683994836L), + "0e7ef1eb-f1c5-49ea-bde8-3be2558b5dcc", + "7e67b601-9299-45cb-9962-4ac5754d6926", + "a96b5d3c-0711-43a9-8f79-c598383fa17f", + "8b45d2fe-5111-49fc-89d0-47142dfc530c", + "160b3d98-5dc4-4f43-93d8-8a4e914d1146", + "25ac1581-3c88-481f-a1cf-19a1b7a4bd5e", true); + DeviceEvents deviceevents2 = new DeviceEvents(null, new Date(1610683989098L), null, + new Date(1610683994836L), + "0e7ef1eb-f1c5-49ea-bde8-3be2558b5dcc", + "7e67b601-9299-45cb-9962-4ac5754d6926", + "a96b5d3c-0711-43a9-8f79-c598383fa17f", + "8b45d2fe-5111-49fc-89d0-47142dfc530c", + "160b3d98-5dc4-4f43-93d8-8a4e914d1146", + "25ac1581-3c88-481f-a1cf-19a1b7a4bd5e", true); + DeviceEvents deviceevents3 = new DeviceEvents(null, new Date(1610683987890L), null, + new Date(1610683988478L), + "032892f6-cb27-45d1-b76b-b845a44c8d3c", + "dc1720cc-48b3-4970-912e-41df2aca6f06", + "b967f617-995b-4d69-810e-bcaedcfa1e80", + "34a0abbd-5932-404d-b101-c7c821590d27", + "cab290a1-9f6e-4fb9-954c-29c6027bccfc", + "b0b53924-d324-4a3f-8ac7-573bf75d47b6", true); assertNotNull(deviceevents1); assertNotNull(deviceevents2); assertNotNull(deviceevents3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroup.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroup.java index 336065479..d41f3f880 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroup.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceGroup.java @@ -19,11 +19,11 @@ public class TestDeviceGroup { @Test public void testClone() { try { - DeviceGroup devicegroup1 = new DeviceGroup(new Date(1574704668895L), null, - "851db5bb-26b1-4b9e-9c6c-a65b987e376f", 120, - "a3373cd1-a8a7-4af3-ab35-b7ac7326f415", - "6789c9c9-83ae-453a-876c-1442d230ee44", - new Date(1574704670125L)); + DeviceGroup devicegroup1 = new DeviceGroup(new Date(1610683988641L), null, + "253091ed-2e07-4aa3-8961-e949a213b773", -16, + "11b6066f-6e22-47e2-9d7a-735adc4820e6", + "f6239079-1113-4fa3-976b-ed910ba6fe09", + new Date(1610683994958L)); DeviceGroup devicegroup2 = devicegroup1.clone(); assertNotNull(devicegroup1); assertNotNull(devicegroup2); @@ -41,16 +41,16 @@ public void testClone() { @Test public void testHashCode() { try { - DeviceGroup devicegroup1 = new DeviceGroup(new Date(1574704668283L), null, - "4db51915-7dcd-473d-af63-3221bca2eb0f", 71, - "fdb01eff-5111-43eb-8191-4bac0bcb1215", - "ccc88ad0-c9f3-4007-8ead-ee4b73cf31bd", - new Date(1574704665146L)); - DeviceGroup devicegroup2 = new DeviceGroup(new Date(1574704668283L), null, - "4db51915-7dcd-473d-af63-3221bca2eb0f", 71, - "fdb01eff-5111-43eb-8191-4bac0bcb1215", - "ccc88ad0-c9f3-4007-8ead-ee4b73cf31bd", - new Date(1574704665146L)); + DeviceGroup devicegroup1 = new DeviceGroup(new Date(1610683986963L), null, + "8375cf1e-f297-4e31-8fcb-8b14fdd5aa16", 40, + "d80fb682-0a9b-4f1c-84e5-c3e06342cda4", + "2a9fa202-7f1c-4d9b-b7ed-c53c6225b40a", + new Date(1610683986256L)); + DeviceGroup devicegroup2 = new DeviceGroup(new Date(1610683986963L), null, + "8375cf1e-f297-4e31-8fcb-8b14fdd5aa16", 40, + "d80fb682-0a9b-4f1c-84e5-c3e06342cda4", + "2a9fa202-7f1c-4d9b-b7ed-c53c6225b40a", + new Date(1610683986256L)); assertNotNull(devicegroup1); assertNotNull(devicegroup2); assertNotSame(devicegroup2, devicegroup1); @@ -71,16 +71,16 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - DeviceGroup devicegroup = new DeviceGroup(new Date(1574704669071L), null, - "2380bbe0-3620-4c80-ab36-f0588c10b7e3", 109, - "bc7d6484-e40a-445f-ad1a-350e33b264d6", - "56641472-8dd9-4a25-939e-020b6f422cbe", new Date(1574704670185L)); + DeviceGroup devicegroup = new DeviceGroup(new Date(1610683993256L), null, + "2a61aa85-aa10-4466-92e5-342f1336cef2", 6, + "5014e916-9761-4b53-a998-9828166c9f1e", + "ac19ff21-30a9-49d8-9852-1c719a7885fd", new Date(1610683992534L)); assertTrue(devicegroup.isValid()); - DeviceGroup devicegroupInvalid = new DeviceGroup(new Date(1574704667895L), null, - "35bbfc35-67d5-4b75-ac61-50e5f3aaf847003ec29b-cdc3-47a1-a680-2577f9ad23165c2daa0d-1829-4bee-9a05-78f3fe1f0490b2cd700c-809a-4011-b79c-50ed1346b7c51bad78a1-b691-4fba-8019-edb163fce944b39d577a-3b2a-41c2-8742-476f156790a43c304659-e70f-426b-9b5e-5e495cf8c7a97f162f8d-3ad3-42c3-bb92-982b96c0885cac92335c-b4e9-4df7-841e-6ca0dd5528409a2e5338-3a29-4c5c-b74b-4d15d358e80d2c3819bf-b2ed-4e93-a9e7-a5ed4541197e60bd708e-cd66-4082-ac0f-3f9b8c81ff77e1e60a54-47d1-4da6-8fd2-d0ab38f0af76dc3918b4-dcba-42bc-80e2-9a061ab9ee39663c880a-f476-4c25-96dc-0e6918c76bca3ccbf66d-125b-4dab-81eb-7286e7f7303b60bfc041-4111-4c03-9cd7-4eac43032e8aa5c8128c-b793-4bf0-9ab7-84d14169f052947bab40-8a1b-4667-b71b-8dcba56812865e77c1be-0614-4b46-9c01-b554627c245827ce5934-c56b-4a5f-aca9-1311838724b39cec2d99-7897-4466-8c75-01eee615393f2f5ab5e4-9e0b-4720-8294-58c8fb73c11de1991de1-9162-41f0-8713-9c0201b46bc0f3472cce-2dc9-4c7f-afb8-f229b551cdc594f9e623-2b56-4d7d-987b-b7584362c65d2dbd90e4-4170-40e5-8bab-a461af22bfd59f1b2324-91bc-40a6-a117-0622b3f05d115e8e583e-045c-40dd-b153-5a92cdeaacfbada43946-7f28-4994-89d9-05a0b359865d98392280-76bf-491a-b88b-47c01fda601cc9af6a40-50ea-44ba-bafb-ed7ddd1998a0c19575ed-06a1-48ca-843a-bdec178ff641e67d54e4-cb5c-43c2-9b52-4119c4c5a836a270f938-42b7-4514-9006-f90e4853e21ea37a67a9-bb1d-46e3-a0ea-918dc1e08780993dd5d0-09e2-4f47-a4c5-d1d54c65ebef2e1bf6eb-791a-4651-8534-10ad7ef6ddb439b4a2fc-3184-42bb-8871-0b1f382e7c9ee458a8ef-b2ec-4f8e-9ca5-13b27c3a463a35f6c1a9-df8c-46f2-9495-a0dfff96deba6f1f6f1a-cb75-4bf8-a3c9-a5e191cd438fa887960d-efbe-48a7-8e66-128b6289b435a7263efd-030d-4193-b7ec-e42fdf9686f3faaf139c-3bfe-407b-974a-96152578c477b7b25d17-ed6d-4213-aa75-a3b6996da95561ccc801-19ae-4c2d-8732-d18b652c3098847ccb2f-19e9-44e0-8cc4-80957433fbbcf35921ca-9af6-4998-9987-741867e363efd90693ec-1dc3-42d6-becd-fa65f7383e404f20e21a-dddc-4848-bb0e-8d26e2ed970ac87fc20f-812f-4f24-8207-cda37995bc354dcf2aec-d901-4f6d-809c-2749538d111e5495bbf7-340c-4639-8344-910263dd8538f28e6d41-3248-4380-a977-77593775ea3d82f7b006-bc86-4e83-ab1a-128b1d5931d2", - -73, "fa6de627-be16-4aae-9f4c-cdded274c3f3", - "1fc222f9-4203-49ca-8752-4e104f4096222e55af85-ffac-4037-b866-a82aa1b7c459e42ee0c4-549c-480d-8251-8bfcce907f8b2122c9a0-74b0-45a9-8cf3-04a216f10969", - new Date(1574704662632L)); + DeviceGroup devicegroupInvalid = new DeviceGroup(new Date(1610683991861L), null, + "845ffe99-3e2b-4107-9b27-2c0e320e3072a92ff62b-4ee6-432c-b4c7-325a500ddc153542bdbf-5a7d-4da6-97c5-ed658824c21fc922de6e-2365-4db4-b823-d624e9c8dcdcf4e16769-77ba-40d0-84c9-8e776e89f34556e0f25f-fb9f-4d94-957d-b56ab4d845dc9d8adfd6-b0ff-4d16-ab1e-cd55d2e373f6c6f0ac96-2b43-4103-a302-5d165587083508d5bc86-098e-48f4-8ea2-fbd25e24c1bad17f119d-4ee9-4932-ac9c-2a1bb02ed5efe33a8d66-1487-4b3f-bce9-ba8dc21e893a64237ae3-3301-4536-bc51-f7c1c15f4ec50bd0e728-b3e8-4927-954d-691d833478829d4babdc-225b-40a2-8698-badfd457343715c45a97-034d-4867-9ce9-e5e669056d326bcb2751-63f0-489f-ab78-eebe397f5cac826e3665-c4e3-4376-acb5-6acf2b8c5443e56442c7-5223-4404-8430-f685a075d00ceb1b4d2b-da67-4706-80a8-06fd4754c6dc5356e1b8-7c24-44b3-8116-4e048b6a98c7b235a5a3-0250-43a1-a488-f5114119f49bf7735277-0c06-4928-8474-a0d169061458d016121c-b7de-480f-9a70-5c369ca469ee75f875fb-bc99-4c91-895c-1dc8f87addd13869a5e8-9d05-4a71-8617-d70f954c01e6dffed8ab-f039-40d7-a9da-38b4736da3093abf2708-4066-4e8e-9c36-cd87ee530886b0ad9ce3-2161-492a-acda-213e1fb47a98ae4156cb-0d46-4123-a45b-07627b582d08", + 1, "b36f6062-da06-4de5-bf14-09369400f0ce", + "60df76af-dc5e-40ed-a904-fdfecf0978cf0d103da2-9ef6-47f3-a03e-e11fc90e738243ff7130-1ea1-4b57-bdd2-245291824ad3fd8c6190-d642-4ba5-91e0-fbc62456e98d", + new Date(1610683986353L)); assertFalse(devicegroupInvalid.isValid()); } @@ -91,21 +91,21 @@ public void testIsValid() { @Test public void testEquals() { try { - DeviceGroup devicegroup1 = new DeviceGroup(new Date(1574704661516L), null, - "1347600a-585c-46cc-a017-d883973892c8", 32, - "77bd7be3-a0ed-42aa-852a-51c23f619e08", - "d52ee516-c8f4-4d04-9578-cb4fb6107129", - new Date(1574704668414L)); - DeviceGroup devicegroup2 = new DeviceGroup(new Date(1574704661516L), null, - "1347600a-585c-46cc-a017-d883973892c8", 32, - "77bd7be3-a0ed-42aa-852a-51c23f619e08", - "d52ee516-c8f4-4d04-9578-cb4fb6107129", - new Date(1574704668414L)); - DeviceGroup devicegroup3 = new DeviceGroup(new Date(1574704670000L), null, - "56545a5e-0a6c-4636-b22f-97b4091a8d3a", -28, - "1fc466ae-d82d-4b7d-a287-60ea89567f7e", - "b1dbf620-f2e2-4f47-8a8d-199222c1c256", - new Date(1574704669531L)); + DeviceGroup devicegroup1 = new DeviceGroup(new Date(1610683986580L), null, + "39aa3c3f-4fd4-44f8-abc4-3ceae86d51fb", -41, + "61510bf6-6f4f-4ad9-89ae-bfbc5eb8ce50", + "7edda993-b10d-4dc2-8c04-44321fc8f5f7", + new Date(1610683994271L)); + DeviceGroup devicegroup2 = new DeviceGroup(new Date(1610683986580L), null, + "39aa3c3f-4fd4-44f8-abc4-3ceae86d51fb", -41, + "61510bf6-6f4f-4ad9-89ae-bfbc5eb8ce50", + "7edda993-b10d-4dc2-8c04-44321fc8f5f7", + new Date(1610683994271L)); + DeviceGroup devicegroup3 = new DeviceGroup(new Date(1610683989624L), null, + "562a4e91-e5c4-4e3d-ad6c-b65e9c6d3980", 91, + "f21fa5c7-c780-4364-8e1a-a2a3c2170cfd", + "f8964f4a-88e4-4bbc-b98c-fff8993711a2", + new Date(1610683991985L)); assertNotNull(devicegroup1); assertNotNull(devicegroup2); assertNotNull(devicegroup3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceLifecycleStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceLifecycleStatus.java index fadebd0ad..23a24e31f 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceLifecycleStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceLifecycleStatus.java @@ -30,7 +30,7 @@ public void testGetValue() { devicelifecyclestatus = DeviceLifecycleStatus.getValue("enabled"); assertNotNull(devicelifecyclestatus); assertFalse(devicelifecyclestatus.isDefault()); - devicelifecyclestatus = DeviceLifecycleStatus.getValue("7198a91f-245a-4607-b7b6-42301ab71c4a"); + devicelifecyclestatus = DeviceLifecycleStatus.getValue("99007257-1a80-46a6-9cdd-1668782b4632"); assertNotNull(devicelifecyclestatus); assertTrue(devicelifecyclestatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceMechanism.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceMechanism.java index 29c5d1831..c9a56e5df 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceMechanism.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceMechanism.java @@ -30,7 +30,7 @@ public void testGetValue() { devicemechanism = DeviceMechanism.getValue("direct"); assertNotNull(devicemechanism); assertFalse(devicemechanism.isDefault()); - devicemechanism = DeviceMechanism.getValue("860e9e44-4982-4da7-94db-1135456ca8ba"); + devicemechanism = DeviceMechanism.getValue("32a48155-8ce4-444f-874f-33313ca4c537"); assertNotNull(devicemechanism); assertTrue(devicemechanism.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceState.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceState.java index ad79c1396..3d6a6e22a 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceState.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/devices/model/TestDeviceState.java @@ -30,7 +30,7 @@ public void testGetValue() { devicestate = DeviceState.getValue("cloud_enrolling"); assertNotNull(devicestate); assertFalse(devicestate.isDefault()); - devicestate = DeviceState.getValue("e9f29fb8-c96b-4949-b019-ec7237260113"); + devicestate = DeviceState.getValue("71b37bec-6bd6-4514-8eb4-eeecc5ee99fa"); assertNotNull(devicestate); assertTrue(devicestate.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadata.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadata.java index 0fe2faac9..24265f5f8 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadata.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/deviceupdate/model/TestCampaignDeviceMetadata.java @@ -19,16 +19,16 @@ public class TestCampaignDeviceMetadata { @Test public void testClone() { try { - CampaignDeviceMetadata campaigndevicemetadata1 = new CampaignDeviceMetadata("5f0cdcc7-2876-4938-8195-5e40c4cca9f5", - new Date(1574704665233L), + CampaignDeviceMetadata campaigndevicemetadata1 = new CampaignDeviceMetadata("691beaa3-de9a-4e82-82e1-2074c0f9aad3", + new Date(1610683989528L), CampaignDeviceMetadataDeploymentState.getDefault(), - "e88a390b-d624-4211-8f3f-00f46ad33db1", - "3ffeef08-9ec4-4309-92cf-1825f0ac35bf", - "c784c639-ba4f-44b1-83c8-2cd97b3e3bcf", - "b0c9855e-b6aa-45f6-9a09-f723e7fac100", - "0e357b86-6f7f-4ef6-8b71-b782f0aefd69", - "9049a59a-258b-466c-8f23-41e56cd5d58b", - new Date(1574704666036L)); + "6f1a3c1b-bee6-456b-9b80-15007147e44e", + "ba40c81d-8f62-4024-8622-c711dd1b2421", + "2D8edCD964DCD3cfaCA9bfF2C99DA2dB", + "4f6d5c65-8781-4efe-aeb9-7d5f38e4d0cb", + "12ce7e64-44ce-4dba-9303-9381869847c1", + "482fcfa5-df2e-44b6-a3e3-91cf6a36dd77", + new Date(1610683987100L)); CampaignDeviceMetadata campaigndevicemetadata2 = campaigndevicemetadata1.clone(); assertNotNull(campaigndevicemetadata1); assertNotNull(campaigndevicemetadata2); @@ -46,26 +46,26 @@ public void testClone() { @Test public void testHashCode() { try { - CampaignDeviceMetadata campaigndevicemetadata1 = new CampaignDeviceMetadata("0bf542ef-0e1b-40fd-9ead-3713180a9a49", - new Date(1574704669222L), + CampaignDeviceMetadata campaigndevicemetadata1 = new CampaignDeviceMetadata("d3bbb85e-cf8d-48f0-9bde-b7916a6bda3d", + new Date(1610683990331L), CampaignDeviceMetadataDeploymentState.getDefault(), - "aeb87d48-03bb-4149-b9bc-d62102b48746", - "429dc65f-c6c9-4e6e-88ec-528dc8781a30", - "a85cf541-76e4-4edc-b77a-074d688e0597", - "7986fc39-c9cb-4c44-ba23-9074796b23eb", - "dc8da8f0-9bd2-4052-ac3f-41b197bb1b29", - "ecde13f6-8763-45c7-9365-d95ffa92ac4a", - new Date(1574704669901L)); - CampaignDeviceMetadata campaigndevicemetadata2 = new CampaignDeviceMetadata("0bf542ef-0e1b-40fd-9ead-3713180a9a49", - new Date(1574704669222L), + "0da07f41-bf6a-480e-b08a-58c360c2b7b6", + "9ed94699-0816-4bd4-9686-e67b2ba8ad95", + "2D8edCD964DCD3cfaCA9bfF2C99DA2dB", + "5df42601-c629-4fe2-9af4-eae45fb6583c", + "ec7b49af-436e-4342-afa6-dcdc1ab30e4e", + "0ce79098-da14-45ae-8e1f-7b4722d50dee", + new Date(1610683990734L)); + CampaignDeviceMetadata campaigndevicemetadata2 = new CampaignDeviceMetadata("d3bbb85e-cf8d-48f0-9bde-b7916a6bda3d", + new Date(1610683990331L), CampaignDeviceMetadataDeploymentState.getDefault(), - "aeb87d48-03bb-4149-b9bc-d62102b48746", - "429dc65f-c6c9-4e6e-88ec-528dc8781a30", - "a85cf541-76e4-4edc-b77a-074d688e0597", - "7986fc39-c9cb-4c44-ba23-9074796b23eb", - "dc8da8f0-9bd2-4052-ac3f-41b197bb1b29", - "ecde13f6-8763-45c7-9365-d95ffa92ac4a", - new Date(1574704669901L)); + "0da07f41-bf6a-480e-b08a-58c360c2b7b6", + "9ed94699-0816-4bd4-9686-e67b2ba8ad95", + "2D8edCD964DCD3cfaCA9bfF2C99DA2dB", + "5df42601-c629-4fe2-9af4-eae45fb6583c", + "ec7b49af-436e-4342-afa6-dcdc1ab30e4e", + "0ce79098-da14-45ae-8e1f-7b4722d50dee", + new Date(1610683990734L)); assertNotNull(campaigndevicemetadata1); assertNotNull(campaigndevicemetadata2); assertNotSame(campaigndevicemetadata2, campaigndevicemetadata1); @@ -86,27 +86,27 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - CampaignDeviceMetadata campaigndevicemetadata = new CampaignDeviceMetadata("79d3c08c-ec17-4512-a498-e70df904279c", - new Date(1574704664375L), + CampaignDeviceMetadata campaigndevicemetadata = new CampaignDeviceMetadata("fe66932c-df90-4dd8-98b1-7e82778db359", + new Date(1610683989669L), CampaignDeviceMetadataDeploymentState.getDefault(), - "af78926e-7a21-43be-bd10-7c2c4c1d823a", - "88066d72-bb91-46bf-bc1b-4dc44ac19dc9", - "db9c6ecb-61ff-4df8-8dc6-b7d7c5a4372c", - "5694a3d7-4077-435c-8685-210ced75426c", - "7bdfc991-1820-4f46-b4f9-2a4524d61321", - "15e82bac-6b10-4f24-86b8-f025e603f1d1", - new Date(1574704661373L)); + "86d90606-d44f-457b-85f2-37ccde383ed0", + "a16c4ba0-9b5e-400e-bd6a-5dcd1e1530f2", + "2D8edCD964DCD3cfaCA9bfF2C99DA2dB", + "63536928-81cf-428a-b22d-ad4ca24fb542", + "60fe1042-4f20-4733-90ee-ca72cdd3bca1", + "cbb5961a-0b87-4282-b75d-8802ec871611", + new Date(1610683988029L)); assertTrue(campaigndevicemetadata.isValid()); CampaignDeviceMetadata campaigndevicemetadataInvalid = new CampaignDeviceMetadata(null, - new Date(1574704667129L), + new Date(1610683991775L), CampaignDeviceMetadataDeploymentState.getDefault(), - "98c9f3d8-283f-41a8-bb20-256acf3e2ca0c12ea771-f07a-4c23-a1f3-d4bd2884d104622a6199-6641-4c36-9626-0b8fc673bb97d75f019d-1a16-4429-9600-9a85e837625d92ab986c-597f-4707-986f-e77888e96377e8a3b449-588e-4914-b5d5-168cb2619b805fd4fc90-0834-4768-bbb9-5df15617a804021ce1b7-0b22-48f2-9e81-3fd337cb16c248b01f56-3032-41b5-afff-86d97c0b55cf40fd05b3-382c-41dc-8910-91591e5546c7f69ea95b-0aab-40d6-8f82-db6ec94e4bcc3fdd6fda-1815-484f-a1b8-05c08d8a489bcd5a78f9-0fcd-47dc-9df0-8938079842b76f21d340-df3a-4607-b452-5933eac8f777a1bfe1be-fde6-4718-9d50-500b1d48e0f5cd417a09-f4a5-4df6-a990-76e110d431b9a30441a4-89f2-4f80-a0b3-9d11dbeabdfc953f5e40-fd50-4b3f-ae24-c5cf6417b758512ae1ae-33a3-4ff2-a73b-99b70d5616083621a8e6-0875-4bf6-8f2f-ddfcec32c9cfe9b5b60a-06c8-4fa6-9a0b-30250408f924dc338366-ff23-4d07-9d9b-76b23c342b931791be6e-ba67-4719-a6c2-5c98fb1228d943d30252-cb16-4856-b2a9-dacd2f7232271b9935cb-59b7-4fd2-9d41-0e8103c3e3c2909f479d-4cd5-4c5c-b527-b6a7485aa25dc3a914fc-0892-4a25-9db1-08b600a508dd6513516f-80d1-41c6-bcf4-bf35b58a2f63b7a7ada7-6539-4aa8-89e9-7b06c0794a6b561504ab-f3fb-47d9-b3fc-5c0a03bf8d096b037c50-a87a-4423-be4d-af4772dde3b245c14c28-176c-46be-8c3d-ca2ee46eb2e6a54f2566-fe0d-4467-ae8f-4ed83e816118b72b8f25-37cb-4ea1-98a0-9dffd6ba7f5c1d2ece91-7316-47c9-b56a-7b343245470becdef278-c6d1-4db7-a742-41bf93fd043de21b0156-d9ea-4208-9830-de0fdf68862b26aeb4b4-e260-4850-b4c8-1f175ed95f41b50a24a6-b928-479e-b0c0-dd43fa8024119aad3196-b627-48cb-9362-ea30165af503c2102af6-a05f-454a-b67a-2762464edec8bd4207c5-71e5-49a7-a841-4955f4a4eadcbfcdb386-5bae-412a-8795-fc1736b0407d4b3e3f0d-b5ad-4ccb-b7da-3c292b4eeae610921904-0448-4c4d-972a-0251aab78aedd1ce23a6-4f18-487b-b39a-29aefab769083ed2376e-5708-46a2-b6d9-cd58f3532ade16d18c23-0800-474c-bf6e-de85dfa524d526d13bc7-0ffc-4e64-8aa9-0190a138d81755fa525f-f258-4a44-91d6-6c4990c8507905e86511-5fa0-460f-9511-310a84e6e2197d107653-6a69-4c1b-a282-3084f0a718d5b7f3ca7d-46d1-47ab-b6fa-7628a1c9c16a93bdc1ec-a918-4d4e-97e2-09c6fee7cdc67d4f878d-5818-4ddc-a770-e239c6b694708f6db511-6c7c-4fd1-bc65-62e1fa11d088", - "f401d689-4ec0-4be5-a108-363ab67cea0c", - "37268f1d-c480-41ae-8194-4ff40bebd3fe", - "3bbb9bc0-ac88-492c-98d6-c35e3500ed1a", - "f5b1f0a9-ba9e-4f60-a181-22cb9aaea300", - "861248ec-dbd3-4b9d-a021-7d6855de76f55239264f-36f1-4c37-8cf3-86c58c11442ac2eec55c-ac4e-421d-810a-5cd6e9f8104673610657-22bf-4361-a1e1-c61fa67fac0e", - new Date(1574704666745L)); + "ec64090c-cbb9-494a-b7e0-f837b7fb86e17568f28e-dcff-472d-8a56-20f905c3efbd601f1cba-4ebf-4109-ab0e-81e213cde296ca4aa0bb-f72c-4443-910f-3a8bdb7ed6b953350957-a376-4a30-b141-adfb6bbe890a7d3e8555-b15e-4581-97cf-fb842acf22beba9bd9bf-03d9-4986-b676-f7ecfd59ce8614530026-99f3-4949-90d4-041b5dc2a19207139cfc-681a-4d78-9f86-77a88bda295584f019f0-3bfc-4b92-8bac-4024f98eb2db69351950-ddc5-46af-a8d6-e9e01c3cc9f5d5b5b493-944c-4923-9fe9-802528377464a5c09474-b841-46c3-8612-5980ff9d217a445a431e-6b6d-4d11-b249-518c721062a5477454e8-0e9f-4319-ad7e-492b84884d0533664126-53f7-4c88-a5d8-60428d789c8d0f42db69-4c21-4729-a750-f1f301fdc8662f383879-95a3-4616-8ccd-ff89a1c2fbd869119e66-90c0-41a5-971e-cdaf2a28b25b3cd15fdd-161c-4914-9b3d-b15a6c4cc180f97e0e54-08cc-410d-a23f-7d51be943948f7760d74-80bc-44f4-bbb5-0bb69a53a0a986f989a8-46cd-4b9e-935a-6cabf0ae910df76029a7-49bf-4ef0-a948-edc48a80bbf970172dd8-5dd7-4b4f-ae8a-71b294ae433e75c8a4fb-1995-4f50-b258-012b7a0cee5036d7eaea-d3b5-4f36-830f-882b71a40791c1700e9d-695a-4092-af5a-a24ac66348277fbeae5f-b4a0-4fef-9e62-4e058c6e6c0f4f0e5a72-a520-45c5-a534-deae6a50421b2359a29c-5ab9-4417-b4f3-79dcfa1c8d6b4a6d46a0-d0c0-4cc2-9966-c44532f28f8f75f121be-7d72-4d86-8536-e3cbfc9c88995ac17886-9b7f-41da-9381-65564a52538713e53524-20da-4104-868a-770a721b8481d1d39ccf-725f-4f9b-b73b-d345f9206db6b8e0e9b8-b56a-44cc-a934-d20049d9eef41b8fe3c7-3bbe-4df6-a32d-f903ce4ae2a52fd65011-eef7-42d9-9f65-6fedfc198dc963964253-8a9f-44bd-b565-f9964dd8cff744bd9eee-0c07-4ba7-a147-c5a9de8354e3eb24ed22-de8f-4d1a-a37f-f0a4ff740cda4b27a923-db9d-437c-ab4a-53759b58f65f45828ec8-03c8-4c7f-a4f8-0b52909aedce7c3da9ec-9775-4a42-9882-e084613353c22ae1b10f-1c68-4473-8e4e-df767abd6a4a087ce9db-bad9-45b2-bc84-e4f60b3773148cc972b3-6d38-4094-8f37-fd00ad5c62a7d2510327-4ea4-4c09-ba91-b02baaf84628f532f1c4-f50d-4695-829c-5549962068628a2a3892-1cb5-49df-80af-e7d8286577f139d32ce3-0749-46d9-ac85-dc084411daa773bd8ed3-2c56-49bc-98d2-44fbe4022d8ab722be89-dbd2-472a-8c99-78b024b493955f734bb5-1447-485b-890c-b34aa1672b35f06a290d-15a1-4db2-8946-5a1ed2cbfa4c", + "11325059-44cc-49f7-9fcf-b49bd6819124", + "5Eቶ\u0006;`\tQ7j(n{s7r�㔑H1_FBxINoj2CwF(oHzw\u001fe`nAF䭖nj猋Csz(An(j"); + PreSharedKey presharedkeyInvalid = new PreSharedKey("fo#wJn_JF_nFD>`\tQ7j(n{s7r�?㔑H1_FBxINoj2CwF(oHzw\u001fe`nAF䭖nj猋Csz(An(j"); assertFalse(presharedkeyInvalid.isValid()); } diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestServerCredentials.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestServerCredentials.java index 55084bbcb..6f1ff0a0b 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestServerCredentials.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestServerCredentials.java @@ -19,10 +19,10 @@ public class TestServerCredentials { @Test public void testClone() { try { - ServerCredentials servercredentials1 = new ServerCredentials(new Date(1574704668706L), - "d8400468-4458-4650-937e-3a37a9d71ad7", - "ba83423b-405f-4dbf-9f4d-368da1d204e4", - "b1eb4991-2051-4e59-b5eb-aa22f32b3028"); + ServerCredentials servercredentials1 = new ServerCredentials(new Date(1610683990561L), + "c3d6eddb-467f-49dc-9e26-bb93470ea365", + "eef5f9da-b719-4e42-810d-3a5ae9725d95", + "f845dc70-42a8-46d4-ada7-4a9b43227163"); ServerCredentials servercredentials2 = servercredentials1.clone(); assertNotNull(servercredentials1); assertNotNull(servercredentials2); @@ -40,14 +40,14 @@ public void testClone() { @Test public void testHashCode() { try { - ServerCredentials servercredentials1 = new ServerCredentials(new Date(1574704662442L), - "f6686ef6-7a62-47c3-974e-02b26f5f722c", - "3d65355c-f644-425e-af7c-b10dd9c1702c", - "f465167a-a1c6-42cd-8c56-028b7fced6be"); - ServerCredentials servercredentials2 = new ServerCredentials(new Date(1574704662442L), - "f6686ef6-7a62-47c3-974e-02b26f5f722c", - "3d65355c-f644-425e-af7c-b10dd9c1702c", - "f465167a-a1c6-42cd-8c56-028b7fced6be"); + ServerCredentials servercredentials1 = new ServerCredentials(new Date(1610683990434L), + "b71797c4-8da9-48e6-999b-1315a9cc3f40", + "a53e4dac-40ce-4b70-98b4-e774d4ac4074", + "a2434fd4-dbcf-44b1-8c5f-968bab5bea2b"); + ServerCredentials servercredentials2 = new ServerCredentials(new Date(1610683990434L), + "b71797c4-8da9-48e6-999b-1315a9cc3f40", + "a53e4dac-40ce-4b70-98b4-e774d4ac4074", + "a2434fd4-dbcf-44b1-8c5f-968bab5bea2b"); assertNotNull(servercredentials1); assertNotNull(servercredentials2); assertNotSame(servercredentials2, servercredentials1); @@ -68,10 +68,10 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - ServerCredentials servercredentials = new ServerCredentials(new Date(1574704670366L), - "4b756791-6471-4e79-afae-2cd72d97e9ca", - "5ce9d898-d653-4d89-8c03-630d825186b4", - "f5d7a875-8d2e-4ea6-845c-3731f091bbe8"); + ServerCredentials servercredentials = new ServerCredentials(new Date(1610683988639L), + "c3561a30-4138-4d93-9579-76f91d702c9e", + "d6124995-f9bd-4473-9e3f-d218039a1342", + "073e9451-009e-4f69-9795-917b1acad816"); assertTrue(servercredentials.isValid()); } @@ -82,18 +82,18 @@ public void testIsValid() { @Test public void testEquals() { try { - ServerCredentials servercredentials1 = new ServerCredentials(new Date(1574704665250L), - "b116795d-9a9a-43d3-b51b-1b4447de6aea", - "e8e85163-8320-4bc5-864e-21c5d87d3ebe", - "ec07982a-3ea0-49f8-8a56-f24468accf48"); - ServerCredentials servercredentials2 = new ServerCredentials(new Date(1574704665250L), - "b116795d-9a9a-43d3-b51b-1b4447de6aea", - "e8e85163-8320-4bc5-864e-21c5d87d3ebe", - "ec07982a-3ea0-49f8-8a56-f24468accf48"); - ServerCredentials servercredentials3 = new ServerCredentials(new Date(1574704667741L), - "4359fad0-c68b-4eae-a2d5-ed3d98d936b9", - "fa5379e8-200d-45ac-9055-95e178551fef", - "a5cb74b9-63f5-4f51-a6de-dd9ab9086ec0"); + ServerCredentials servercredentials1 = new ServerCredentials(new Date(1610683992418L), + "4046e4b6-8ebf-45cf-a13e-1ee3dfb6a62a", + "d84292da-bf19-4826-9ddb-98324fe4349f", + "27c8afbf-bd6f-468b-86af-80c2863789c4"); + ServerCredentials servercredentials2 = new ServerCredentials(new Date(1610683992418L), + "4046e4b6-8ebf-45cf-a13e-1ee3dfb6a62a", + "d84292da-bf19-4826-9ddb-98324fe4349f", + "27c8afbf-bd6f-468b-86af-80c2863789c4"); + ServerCredentials servercredentials3 = new ServerCredentials(new Date(1610683986564L), + "69be6282-cf64-43ab-baba-bb81e2473ebf", + "a79af037-ae54-43d8-a16d-686fdafe8ef7", + "153d828b-5a17-4e9b-9332-9f2de11851ba"); assertNotNull(servercredentials1); assertNotNull(servercredentials2); assertNotNull(servercredentials3); diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificate.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificate.java index 8e6cbf976..500781de4 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificate.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificate.java @@ -33,6 +33,7 @@ public void testClone() { "c9b4e88d-f453-4c45-8c6a-b60165873bc2", -52, false, "759cee00-d8ca-4b2e-bfa0-d1359938a090", + false, "5d99e689-3b56-44a4-8777-f400cea48d8d", "69cf4d41-57a8-4f37-bbd2-1cfd188dd964", "95d93b68-f60f-493f-9c19-19c20b2034d4", @@ -65,6 +66,7 @@ public void testHashCode() { "7dc46917-be32-4e1b-af58-d534ba67e3ff", 92, true, "c2f7c13b-6577-43d8-be10-3ca54a8271bf", + false, "7e4d2795-41d5-436f-a9ae-63c84dc08a2f", "45db32b6-b3a6-4246-8c76-5ade8fbe094b", "37a584b9-3401-4da6-84eb-5d669f8ce455", @@ -81,6 +83,7 @@ public void testHashCode() { "7dc46917-be32-4e1b-af58-d534ba67e3ff", 92, true, "c2f7c13b-6577-43d8-be10-3ca54a8271bf", + false, "7e4d2795-41d5-436f-a9ae-63c84dc08a2f", "45db32b6-b3a6-4246-8c76-5ade8fbe094b", "37a584b9-3401-4da6-84eb-5d669f8ce455", @@ -116,6 +119,7 @@ public void testIsValid() { "d9a0d572-233c-4ef3-b271-741706ada845", -95, false, "0a994b233d7e4e9785b01fdb020cb841", + false, "f44ccc7d-b0a4-4be2-8100-dc6a838d2e18", "4598ee2f-c8c5-4ba1-9e52-39c04f87272d", "0aa32f9d-3c99-49e5-bf4b-76d0ef26bfda", diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateService.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateService.java index 04162c556..f47066048 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateService.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateService.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenanttrustedcertificateservice = SubtenantTrustedCertificateService.getValue("lwm2m"); assertNotNull(subtenanttrustedcertificateservice); assertFalse(subtenanttrustedcertificateservice.isDefault()); - subtenanttrustedcertificateservice = SubtenantTrustedCertificateService.getValue("f947a4d0-1378-4738-8736-02d4819b3d16"); + subtenanttrustedcertificateservice = SubtenantTrustedCertificateService.getValue("a3f36338-8b6d-4b8c-b633-4a8c5e4c0ae8"); assertNotNull(subtenanttrustedcertificateservice); assertTrue(subtenanttrustedcertificateservice.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateStatus.java index 17aecb219..e01a314e3 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestSubtenantTrustedCertificateStatus.java @@ -31,7 +31,7 @@ public void testGetValue() { subtenanttrustedcertificatestatus = SubtenantTrustedCertificateStatus.getValue("INACTIVE"); assertNotNull(subtenanttrustedcertificatestatus); assertFalse(subtenanttrustedcertificatestatus.isDefault()); - subtenanttrustedcertificatestatus = SubtenantTrustedCertificateStatus.getValue("bc55f490-bbbb-4607-b3b7-b77b80bbdbfb"); + subtenanttrustedcertificatestatus = SubtenantTrustedCertificateStatus.getValue("3c809565-0a5e-4463-945f-13bcbc8a14a1"); assertNotNull(subtenanttrustedcertificatestatus); assertTrue(subtenanttrustedcertificatestatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateService.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateService.java index df8881d7c..73d65c277 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateService.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateService.java @@ -31,7 +31,7 @@ public void testGetValue() { trustedcertificateservice = TrustedCertificateService.getValue("lwm2m"); assertNotNull(trustedcertificateservice); assertFalse(trustedcertificateservice.isDefault()); - trustedcertificateservice = TrustedCertificateService.getValue("b884425e-7876-4dc8-a18f-24d9fa54661c"); + trustedcertificateservice = TrustedCertificateService.getValue("b5f245e6-3fbc-4803-8c23-00c6a75c284c"); assertNotNull(trustedcertificateservice); assertTrue(trustedcertificateservice.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateStatus.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateStatus.java index a4958a58b..671a81935 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateStatus.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestTrustedCertificateStatus.java @@ -31,7 +31,7 @@ public void testGetValue() { trustedcertificatestatus = TrustedCertificateStatus.getValue("INACTIVE"); assertNotNull(trustedcertificatestatus); assertFalse(trustedcertificatestatus.isDefault()); - trustedcertificatestatus = TrustedCertificateStatus.getValue("0ad57909-0302-4812-9e0b-792621873636"); + trustedcertificatestatus = TrustedCertificateStatus.getValue("2889cfcb-1cbb-4682-83d2-49d27f69ee3a"); assertNotNull(trustedcertificatestatus); assertTrue(trustedcertificatestatus.isDefault()); } catch (Exception exception) { diff --git a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestVerificationResponse.java b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestVerificationResponse.java index 4a8ecacad..a74f6ffdf 100644 --- a/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestVerificationResponse.java +++ b/foundation-models/src/test/java/com/arm/mbed/cloud/sdk/security/model/TestVerificationResponse.java @@ -18,8 +18,8 @@ public class TestVerificationResponse { @Test public void testClone() { try { - VerificationResponse verificationresponse1 = new VerificationResponse("4465074a-b3b8-42ed-91f8-840a03e44330", - true); + VerificationResponse verificationresponse1 = new VerificationResponse("34a29852-2ef2-48e5-ac59-11b30cb8cb2a", + false); VerificationResponse verificationresponse2 = verificationresponse1.clone(); assertNotNull(verificationresponse1); assertNotNull(verificationresponse2); @@ -37,10 +37,10 @@ public void testClone() { @Test public void testHashCode() { try { - VerificationResponse verificationresponse1 = new VerificationResponse("f3b1e7c0-d8a1-440f-8b21-435987f1e30e", - true); - VerificationResponse verificationresponse2 = new VerificationResponse("f3b1e7c0-d8a1-440f-8b21-435987f1e30e", - true); + VerificationResponse verificationresponse1 = new VerificationResponse("7f8163c9-2510-4982-9409-b859b2d00d8b", + false); + VerificationResponse verificationresponse2 = new VerificationResponse("7f8163c9-2510-4982-9409-b859b2d00d8b", + false); assertNotNull(verificationresponse1); assertNotNull(verificationresponse2); assertNotSame(verificationresponse2, verificationresponse1); @@ -61,8 +61,8 @@ public void testHashCode() { @SuppressWarnings("resource") @Test public void testIsValid() { - VerificationResponse verificationresponse = new VerificationResponse("74c8d9c1-bb10-4831-866b-a3e3fcf18616", - false); + VerificationResponse verificationresponse = new VerificationResponse("1d5778cd-3fde-4ccb-a017-de7618d2bc92", + true); assertTrue(verificationresponse.isValid()); } @@ -73,11 +73,11 @@ public void testIsValid() { @Test public void testEquals() { try { - VerificationResponse verificationresponse1 = new VerificationResponse("451ac9c4-48b0-448d-bcdc-12bf553955ea", + VerificationResponse verificationresponse1 = new VerificationResponse("b01a650c-8592-491e-8754-e7ed9a83e63c", true); - VerificationResponse verificationresponse2 = new VerificationResponse("451ac9c4-48b0-448d-bcdc-12bf553955ea", + VerificationResponse verificationresponse2 = new VerificationResponse("b01a650c-8592-491e-8754-e7ed9a83e63c", true); - VerificationResponse verificationresponse3 = new VerificationResponse("046292cb-d96a-4b7d-bab2-4d8d592cfda9", + VerificationResponse verificationresponse3 = new VerificationResponse("77422dba-d721-4e35-b26c-7e02ad529ccb", true); assertNotNull(verificationresponse1); assertNotNull(verificationresponse2); diff --git a/gradle.properties b/gradle.properties index 0d8774fc2..c6fdb36c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ SDKGroup=com.arm.mbed.cloud.sdk SDKName=mbed-cloud-sdk -SDKVersion=2.5.0 +SDKVersion=2.6.0 SDKTestrunnerVersion=5b96199841542076d08f6e64e2bac13b7c0100a7 SDKCommitHash=20cd0dccf2f37046d654072c81e142075095351d diff --git a/src/main/java/com/arm/mbed/cloud/sdk/Connect.java b/src/main/java/com/arm/mbed/cloud/sdk/Connect.java index b1ee99623..df5738ad7 100644 --- a/src/main/java/com/arm/mbed/cloud/sdk/Connect.java +++ b/src/main/java/com/arm/mbed/cloud/sdk/Connect.java @@ -41,11 +41,13 @@ import com.arm.mbed.cloud.sdk.common.listing.ListResponse; import com.arm.mbed.cloud.sdk.common.listing.PageRequester; import com.arm.mbed.cloud.sdk.common.listing.Paginator; +import com.arm.mbed.cloud.sdk.connect.adapters.EchoAdapter; import com.arm.mbed.cloud.sdk.connect.adapters.MetricAdapter; import com.arm.mbed.cloud.sdk.connect.adapters.PresubscriptionAdapter; import com.arm.mbed.cloud.sdk.connect.adapters.ResourceAdapter; import com.arm.mbed.cloud.sdk.connect.adapters.WebhookAdapter; import com.arm.mbed.cloud.sdk.connect.model.AbstractMetricsListOptions; +import com.arm.mbed.cloud.sdk.connect.model.EchoDevice; import com.arm.mbed.cloud.sdk.connect.model.EndPoints; import com.arm.mbed.cloud.sdk.connect.model.Metric; import com.arm.mbed.cloud.sdk.connect.model.MetricsPeriodListOptions; @@ -1842,6 +1844,56 @@ public CloudNotificationManager notifications() throws MbedCloudException { return new NotificationManager(this); } + /** + * Get the Device Echo object. + *

+ * + * @param device + * Device. + * @return the Device Echo object. + * @throws MbedCloudException + * if a problem occurred during request processing. + */ + @API + public @Nullable EchoDevice getDeviceEcho(@NonNull Device device) throws MbedCloudException { + checkNotNull(device, TAG_DEVICE); + checkNotNull(device.getId(), TAG_DEVICE_ID); + final String finalDeviceId = device.getId(); + + return CloudCaller.call(this, "getDeviceEcho()", EchoAdapter.getMapper(finalDeviceId), + new CloudCall() { + + @Override + public Call + call() { + return endpoint.getDeviceEcho().getDeviceEchoObject(finalDeviceId); + } + }); + } + + /** + * Delete the Device Echo object. + *

+ * + * @param device + * Device. + * @throws MbedCloudException + * if a problem occurred during request processing. + */ + @API + public @Nullable void deleteDeviceEcho(@NonNull Device device) throws MbedCloudException { + checkNotNull(device, TAG_DEVICE); + checkNotNull(device.getId(), TAG_DEVICE_ID); + final String finalDeviceId = device.getId(); + + CloudCaller.call(this, "deleteDeviceEcho()", null, new CloudCall() { + @Override + public Call call() { + return endpoint.getDeviceEcho().deleteDeviceEchoObject(finalDeviceId); + } + }); + } + /** * * Implementation of the notification manager. diff --git a/src/main/java/com/arm/mbed/cloud/sdk/connect/adapters/EchoAdapter.java b/src/main/java/com/arm/mbed/cloud/sdk/connect/adapters/EchoAdapter.java new file mode 100644 index 000000000..983c64949 --- /dev/null +++ b/src/main/java/com/arm/mbed/cloud/sdk/connect/adapters/EchoAdapter.java @@ -0,0 +1,194 @@ +package com.arm.mbed.cloud.sdk.connect.adapters; + +import java.util.List; + +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import com.arm.mbed.cloud.sdk.common.GenericAdapter.Mapper; +import com.arm.mbed.cloud.sdk.connect.model.EchoDevice; +import com.arm.mbed.cloud.sdk.connect.model.EchoResource; +import com.arm.mbed.cloud.sdk.connect.model.EchoResourceDesired; +import com.arm.mbed.cloud.sdk.connect.model.EchoResourceReported; + +@Preamble(description = "Adapter for echo model") +public final class EchoAdapter { + + private EchoAdapter() { + super(); + } + + /** + * Maps a echo device. + * + * @param deviceId + * device id of the device containing the echoDevice + * @param apiEchoDevice + * echoDevice to map + * @return mapped echoDevice + */ + public static EchoDevice + map(String deviceId, + com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoDevice apiEchoDevice) { + if (apiEchoDevice == null || deviceId == null || deviceId.isEmpty()) { + return null; + } + return new EchoDevice(TranslationUtils.toDate(apiEchoDevice.getCreatedAt()), apiEchoDevice.getDeviceId(), + apiEchoDevice.getEndpointName(), + TranslationUtils.toDate(apiEchoDevice.getLastDesiredAt()), + TranslationUtils.toDate(apiEchoDevice.getLastReportedAt()), apiEchoDevice.getObject(), + mapResourceList(deviceId, apiEchoDevice.getResources()), + TranslationUtils.toDate(apiEchoDevice.getUpdatedAt())); + } + + /** + * Maps a echo resource. + * + * @param deviceId + * device id of the device containing the echoResource + * @param apiEchoResource + * echo resource to map + * @return mapped EchoResource + */ + public static EchoResource + mapResource(String deviceId, + com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoResource apiEchoResource) { + if (apiEchoResource == null || deviceId == null || deviceId.isEmpty()) { + return null; + } + + return new EchoResource(mapResourceDesired(deviceId, apiEchoResource.getDesired()), + mapResourceReported(deviceId, apiEchoResource.getReported()), + apiEchoResource.getResourcePath(), apiEchoResource.isSubscribed()); + } + + /** + * Maps a EchoResourceDesired. + * + * @param deviceId + * device id of the device containing the echoResourceDesired + * @param apiEchoResourceDesired + * echoResourceDesired to map + * @return mapped EchoResourceDesired + */ + public static EchoResourceDesired + mapResourceDesired(String deviceId, + com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoResourceDesired apiEchoResourceDesired) { + if (apiEchoResourceDesired == null || deviceId == null || deviceId.isEmpty()) { + return null; + } + + return new EchoResourceDesired(TranslationUtils.toDate(apiEchoResourceDesired.getDesiredAt()), + apiEchoResourceDesired.getStatus(), + TranslationUtils.toDate(apiEchoResourceDesired.getStatusUpdatedAt()), + apiEchoResourceDesired.getValue()); + } + + /** + * Maps a EchoResourceReported. + * + * @param deviceId + * device id of the device containing the EchoResourceReported + * @param apiEchoResourceReported + * EchoResourceReported to map + * @return mapped EchoResourceReported + */ + public static EchoResourceReported + mapResourceReported(String deviceId, + com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoResourceReported apiEchoResourceReported) { + if (apiEchoResourceReported == null || deviceId == null || deviceId.isEmpty()) { + return null; + } + + return new EchoResourceReported(apiEchoResourceReported.getContentType(), + TranslationUtils.toDate(apiEchoResourceReported.getExpiresAt()), + TranslationUtils.toDate(apiEchoResourceReported.getReportedAt()), + apiEchoResourceReported.getValue()); + } + + /** + * Gets a mapper. + * + * @param deviceId + * device id of the device containing the echoDevice + * @return a mapper for this device. + */ + public static Mapper + getMapper(String deviceId) { + final String immutableDeviceId = deviceId; + return new Mapper() { + + @Override + public EchoDevice + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoDevice toBeMapped) { + return EchoAdapter.map(immutableDeviceId, toBeMapped); + } + }; + } + + /** + * Gets a resource mapper. + * + * @param deviceId + * device id of the device containing the echoResource + * @return a resource mapper for this device. + */ + public static Mapper + getResourceMapper(String deviceId) { + final String immutableDeviceId = deviceId; + return new Mapper() { + + @Override + public EchoResource + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.EchoResource toBeMapped) { + return EchoAdapter.mapResource(immutableDeviceId, toBeMapped); + } + }; + } + + /** + * Maps a list of echoDevices. + * + * @param deviceId + * device id of the device containing the echoDevices + * @param list + * echoDevice page + * @return list of echoDevices + */ + public static List + mapList(String deviceId, + List list) { + return GenericAdapter.mapList(list, getMapper(deviceId)); + } + + public static List + mapResourceList(String deviceId, + List list) { + return GenericAdapter.mapList(list, getResourceMapper(deviceId)); + } + + /** + * Gets list mapper. + * + * @param deviceId + * device id of the device containing the echoDevices + * @return a list mapper + */ + public static + Mapper, List> + getListMapper(String deviceId) { + final String immutableDeviceId = deviceId; + return new Mapper, + List>() { + + @Override + public List + map(List toBeMapped) { + return EchoAdapter.mapList(immutableDeviceId, toBeMapped); + } + + }; + } + +} diff --git a/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EndPoints.java b/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EndPoints.java index fa7af87c1..2865da1d3 100644 --- a/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EndPoints.java +++ b/src/main/java/com/arm/mbed/cloud/sdk/connect/model/EndPoints.java @@ -6,6 +6,7 @@ import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.ServiceRegistry; import com.arm.mbed.cloud.sdk.common.TimePeriod; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceEchoApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.DeviceRequestsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.EndpointsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.NotificationsApi; @@ -23,6 +24,7 @@ public class EndPoints extends AbstractEndpoints { private final ResourcesApi resources; private final SubscriptionsApi subscriptions; private final StatisticsApi statistic; + private final DeviceEchoApi deviceEcho; /** * Constructor. @@ -39,6 +41,7 @@ public EndPoints(ServiceRegistry services) { this.resources = initialiseService(ResourcesApi.class); this.subscriptions = initialiseService(SubscriptionsApi.class); this.statistic = initialiseService(StatisticsApi.class); + this.deviceEcho = initialiseService(DeviceEchoApi.class); } public DeviceRequestsApi getAsync() { @@ -65,6 +68,10 @@ public StatisticsApi getStatistic() { return statistic; } + public DeviceEchoApi getDeviceEcho() { + return deviceEcho; + } + public ConnectionOptions getConnectionConfiguration() { return getConfiguration(); } diff --git a/src/main/java/com/arm/mbed/cloud/sdk/connect/subscription/NotificationHandlersStore.java b/src/main/java/com/arm/mbed/cloud/sdk/connect/subscription/NotificationHandlersStore.java index 58bb70cd0..84afd0a09 100644 --- a/src/main/java/com/arm/mbed/cloud/sdk/connect/subscription/NotificationHandlersStore.java +++ b/src/main/java/com/arm/mbed/cloud/sdk/connect/subscription/NotificationHandlersStore.java @@ -463,7 +463,17 @@ public WebSocketNotificationStateMachine(AbstractModule module, EndPoints endpoi execute(Integer code) { status.getAndSet(WebsocketClient.StatusCode.getStatus(code)); } - }, null), + }, new Callback() { + + @Override + public void + execute(Throwable throwable) { + logger.logWarn("WebSocket error, restart WebSocket.", + throwable); + restartWebSocketClient(); + } + + }), module.getLogger()); } @@ -483,6 +493,11 @@ public void start() { runStateMachine(); } + private void restartWebSocketClient() { + close(); + start(); + } + private void runStateMachine() { while (!isEnded()) { logger.logInfo("notification machine state: " + currentState.get()); diff --git a/src/test/java/com/arm/mbed/cloud/sdk/TestServer.java b/src/test/java/com/arm/mbed/cloud/sdk/TestServer.java index fe378e397..5d03356f8 100644 --- a/src/test/java/com/arm/mbed/cloud/sdk/TestServer.java +++ b/src/test/java/com/arm/mbed/cloud/sdk/TestServer.java @@ -470,7 +470,7 @@ public Object execute() throws Exception { if (!result.wasExceptionRaised()) { return result.getResult(); } - // logger.logDebug("RESULT error happened: " + result.getMetadata()); + // logger.logDebug("RESULT error happened: " + result.getMetadata()); throw new APICallException(result); } }, true); @@ -499,7 +499,7 @@ public Object execute() throws Exception { if (!result.wasExceptionRaised()) { return result.getResult(); } - //logger.logDebug("RESULT error happened: " + result.getMetadata()); + // logger.logDebug("RESULT error happened: " + result.getMetadata()); throw new APICallException(result); } }, true); @@ -525,12 +525,12 @@ private void defineModuleMethodTestRoute() { APIMethodResult result = engine.callAPIOnLowLevelInstance(instance.getId(), method, params); if (!result.wasExceptionRaised()) { String resultJson = Serializer.convertLegacyResultToJson(result.getResult()); - //logger.logDebug("RESULT: " + String.valueOf(resultJson)); + // logger.logDebug("RESULT: " + String.valueOf(resultJson)); engine.deleteLowLevelInstance(instance.getId()); respond(200, routingContext, resultJson); } else { engine.deleteLowLevelInstance(instance.getId()); - //logger.logDebug("RESULT error happened: " + result.getMetadata()); + // logger.logDebug("RESULT error happened: " + result.getMetadata()); if (result.getMetadata() == null) { sendError(setResponse(500, routingContext), null, (result.getException().getMessage() == null) @@ -650,7 +650,7 @@ private void result(int statusCode, RoutingContext routingContext, Object result resultObj = Serializer.convertResultToJsonObject(apiResult, true); } final String resultJson = Serializer.convertJsonResultToJsonString(resultObj); - //logger.logInfo("RESULT: " + String.valueOf(resultJson)); + // logger.logInfo("RESULT: " + String.valueOf(resultJson)); respond(statusCode, routingContext, resultJson); }

Field= / __eq\ @@ -22277,10 +27577,16 @@ paths: $ref: '#/definitions/FirmwareImagePage' '400': description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Unable to find content. + schema: + $ref: '#/definitions/ErrorResponse' summary: List all images tags: - Device update - firmware images @@ -22325,12 +27631,15 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml post: consumes: - multipart/form-data description: 'Create a firmware image. +
**Note:** Only use this API for images smaller than 100 MB. For larger + images, [upload in chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). +
**Usage example:** @@ -22339,7 +27648,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''Authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''Content-Type: multipart/form-data'' \ @@ -22354,17 +27663,22 @@ paths: ' operationId: Firmware_Image_create parameters: - - description: The firmware image file to upload. + - description: The firmware image file to upload. File name must not exceed + 166 characters. in: formData + maxLength: 166 name: datafile required: true type: file - description: The description of the firmware image. + format: free text in: formData + maxLength: 2000 name: description required: false type: string - description: The name of the firmware image. + format: free text in: formData maxLength: 128 name: name @@ -22377,16 +27691,24 @@ paths: $ref: '#/definitions/FirmwareImage' '400': description: Cannot validate the data used to create the firmware image. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '403': description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' 413: description: Firmware image too large. + schema: + $ref: '#/definitions/ErrorResponse' summary: Create an image tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-images/upload-jobs: get: description: 'Get all upload jobs. @@ -22400,7 +27722,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -22628,11 +27950,11 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml post: description: "Create a new upload job\n
\n**Usage example:**\n```\ncurl -X\ \ POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs\ - \ \\\n-H 'Authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8'\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"name\": \"New Linux update\",\n \"description\": \"New Linux\ \ update for my devices\"\n}'\n```\n" operationId: Upload_Job_Create @@ -22643,8 +27965,8 @@ paths: required: true schema: properties: - description: *id028 - name: *id029 + description: *id035 + name: *id036 type: object responses: 201: @@ -22670,7 +27992,7 @@ paths: summary: Create a new upload job. tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}: delete: description: 'Delete an upload job. @@ -22684,7 +28006,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -22693,9 +28015,8 @@ paths: parameters: - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -22716,7 +28037,7 @@ paths: summary: Delete an upload job tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml get: description: 'Get an upload job. @@ -22729,7 +28050,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -22738,9 +28059,8 @@ paths: parameters: - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -22759,20 +28079,19 @@ paths: summary: Retrieve information for an upload job tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml put: description: "Update an upload job.\n
\n**Usage example:**\n```\ncurl -X\ \ PUT https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012\ - \ \\\n-H 'Authorization: ' \\\n-d '{\n \"name\": \"New\ - \ Linux update\",\n \"description\": \"New Linux update for my class XX devices\"\ + \ \\\n-H 'Authorization: Bearer ' \\\n-d '{\n \"name\": \"New Linux\ + \ update\",\n \"description\": \"New Linux update for my class XX devices\"\ \n}'\n```\n" operationId: Upload_Job_Update parameters: - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: Upload job. @@ -22781,8 +28100,8 @@ paths: required: true schema: properties: - description: *id028 - name: *id029 + description: *id035 + name: *id036 type: object responses: 200: @@ -22804,7 +28123,7 @@ paths: summary: Update an upload job tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}/chunks: get: description: 'List all metadata for uploaded chunks. @@ -22818,7 +28137,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -22827,9 +28146,8 @@ paths: parameters: - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: How many objects to retrieve in the page. The minimum limit is @@ -23031,16 +28349,36 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml post: consumes: - application/octet-stream - description: "Append a chunk to an upload job. To finish a job, upload a zero-length\ - \ chunk.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks\ - \ \\\n-H 'Authorization: ' \\\n-H 'Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ=='\ - \ \\\n-H 'Content-Type: binary/octet-stream' \\\n-H 'Content-Length: 999'\ - \ \\\n-d '{\n \"IGh0dHBzOi8vYXBpLnVzLWVhc3QtMS5tYmVkY2xvdWQuY29tLy92My9maXJtd2FyZS1pbWFnZXMvdXBsb2FkLWpvYnMve3VwbG9hZF9qb2JfaWR9W5rcw==\"\ - \n}'\n```\n" + description: 'Append a chunk to an upload job. To finish a job, upload a zero-length + chunk. + +
**Note:** Chunk size must be between 5MB and 100MB, the last chunk can + be less than 5MB; the maximum number of chunks is limited to 10,000. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks + \ + + -H ''Authorization: Bearer '' \ + + -H ''Content-MD5: Q2h1Y2sgSW51ZwDIAXR5IQ=='' \ + + -H ''Content-Type: binary/octet-stream'' \ + + --data-binary ''@chunkfile.bin'' + + ``` + + ' operationId: Upload_Job_Chunk_Create parameters: - description: The base64-encoded binary digest of the body (chunk data). @@ -23055,9 +28393,8 @@ paths: type: integer - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: Chunk. @@ -23094,7 +28431,7 @@ paths: summary: Append a chunk to an upload job tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}/chunks/{chunk_id}: get: description: 'Get metadata about a chunk. @@ -23108,7 +28445,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23117,16 +28454,14 @@ paths: parameters: - description: The upload job ID. in: path - maxLength: 32 - minLength: 32 name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: Chunk. in: path - maxLength: 32 - minLength: 32 name: chunk_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23145,7 +28480,7 @@ paths: summary: Get metadata about a chunk tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-images/{image_id}: delete: description: 'Delete a firmware image. @@ -23156,10 +28491,10 @@ paths: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23168,9 +28503,8 @@ paths: parameters: - description: The firmware image ID. in: path - maxLength: 32 - minLength: 32 name: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23178,14 +28512,20 @@ paths: description: Firmware image deleted. '400': description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Firmware image not found. + schema: + $ref: '#/definitions/ErrorResponse' summary: Delete an image tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml get: description: 'Retrieve a firmware image. @@ -23195,10 +28535,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23207,9 +28547,8 @@ paths: parameters: - description: The firmware image ID in: path - maxLength: 32 - minLength: 32 name: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23219,14 +28558,20 @@ paths: $ref: '#/definitions/FirmwareImage' '400': description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Firmware image can't be found. + schema: + $ref: '#/definitions/ErrorResponse' summary: Get an image. tags: - Device update - firmware images - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-manifests/: get: description: 'List all firmware manifests. @@ -23239,7 +28584,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23470,10 +28815,16 @@ paths: $ref: '#/definitions/FirmwareManifestPage' '400': description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Unable to find content. + schema: + $ref: '#/definitions/ErrorResponse' summary: List all firmware manifests. tags: - Device update - firmware manifests @@ -23523,7 +28874,7 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml post: consumes: - multipart/form-data @@ -23538,7 +28889,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ - -H ''Authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''Content-Type: multipart/form-data'' \ @@ -23556,26 +28907,30 @@ paths: operationId: Firmware_Manifest_create parameters: - description: The manifest file to create. The API gateway enforces the account-specific - file size. + file size. File name must not exceed 100 characters. in: formData name: datafile required: true type: file - description: The description of the firmware manifest. + format: free text in: formData + maxLength: 2000 name: description required: false type: string - description: The key table of pre-shared keys for devices. The table is generated - by the manifest tool. + by the manifest tool. File name must not exceed 100 characters. in: formData name: key_table required: false type: file - description: The name of the firmware manifest. + format: free text in: formData maxLength: 128 name: name + required: true type: string responses: '201': @@ -23587,14 +28942,20 @@ paths: did not validate and/or the manifest uploaded exceeded 2 KB in size. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '403': description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' summary: Upload a manifest tags: - Device update - firmware manifests - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/firmware-manifests/{manifest_id}: delete: description: 'Delete a firmware manifest. @@ -23605,10 +28966,10 @@ paths: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23616,10 +28977,9 @@ paths: operationId: Firmware_Manifest_destroy parameters: - description: The firmware manifest ID. - in: path - maxLength: 32 - minLength: 32 + in: path name: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23627,14 +28987,20 @@ paths: description: Firmware manifest deleted. '400': description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Firmware manifest not found. + schema: + $ref: '#/definitions/ErrorResponse' summary: Delete a manifest tags: - Device update - firmware manifests - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml get: description: 'Retrieve a firmware manifest. @@ -23644,10 +29010,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -23656,9 +29022,8 @@ paths: parameters: - description: The firmware manifest ID. in: path - maxLength: 32 - minLength: 32 name: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23668,19 +29033,27 @@ paths: $ref: '#/definitions/FirmwareManifest' '400': description: Bad request. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Firmware manifest can't be found. + schema: + $ref: '#/definitions/ErrorResponse' summary: Get a manifest tags: - Device update - firmware manifests - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/identity-providers: get: consumes: - application/json - description: Retrieve identity providers in an array. + description: 'Retrieve an array of identity providers. + + Note: This endpoint is restricted to administrators.' operationId: getAllIdentityProviders parameters: - default: 50 @@ -23690,14 +29063,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -23726,11 +29099,13 @@ paths: summary: Get all identity providers. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: Create a new identity provider. + description: 'Create a new identity provider. + + Note: This endpoint is restricted to administrators.' operationId: createIdentityProvider parameters: - allowEmptyValue: true @@ -23776,10 +29151,12 @@ paths: summary: Create a new identity provider. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/identity-providers/{identity_provider_id}: delete: - description: Delete an identity provider by ID. + description: 'Delete an identity provider by ID. + + Note: This endpoint is restricted to administrators.' operationId: deleteIdentityProvider parameters: - description: The ID of the identity provider to delete. @@ -23801,15 +29178,17 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' summary: Delete an identity provider by ID. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: Retrieve by ID. + description: 'Retrieve an identity provider. + + Note: This endpoint is restricted to administrators.' operationId: getIdentityProvider parameters: - description: The ID of the identity provider to retrieve. @@ -23833,17 +29212,19 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get identity provider by ID. + summary: Get identity provider. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json - description: Update an existing identity provider. + description: 'Update an existing identity provider. + + Note: This endpoint is restricted to administrators.' operationId: updateIdentityProvider parameters: - description: The ID of the identity provider to update. @@ -23885,18 +29266,20 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' summary: Update an existing identity provider. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/identity-providers/{identity_provider_id}/delete-sp-certificate: post: consumes: - application/json - description: Delete a service provider certificate. + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' operationId: deleteSpCertificate parameters: - description: The ID of the identity provider. @@ -23924,18 +29307,20 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' summary: Delete the service provider certificate. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/identity-providers/{identity_provider_id}/generate-sp-certificate: post: consumes: - application/json - description: Generate a new service provider certificate. + description: 'Generate a new service provider certificate. + + Note: This endpoint is restricted to administrators.' operationId: generateSpCertificate parameters: - description: The ID of the identity provider to generate a certificate for. @@ -23974,18 +29359,20 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' summary: Generate a new service provider certificate. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/identity-providers/{identity_provider_id}/refresh-jwks: post: consumes: - application/json - description: Refreshes an OIDC IdP's signing keys. + description: 'Refreshes an OIDC IdP''s signing keys. + + Note: This endpoint is restricted to administrators.' operationId: refreshJwks parameters: - description: The ID of the identity provider for which to refresh the signing @@ -24018,16 +29405,16 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: An identity provider not found. schema: $ref: '#/definitions/ErrorResponse' summary: Refreshes the OIDC signing keys. tags: - Account - identity providers - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/limitations: get: - description: An endpoint for retrieving all limitations of an account. + description: Retrieve an array of entitlement limitations. operationId: getAccountLimitations parameters: - description: Filter for finding account limitations by inheritance. True returns @@ -24051,16 +29438,16 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all limitations of an account. + summary: Get entitlement limitations. tags: - - Account - limitations + - Account - entitlement limitations x-filter: inherited: - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/limitations/{limitation_id}: get: - description: An endpoint for retrieving a limitation of an account. + description: Retrieve an entitlement limitation. operationId: getAccountLimitation parameters: - description: The ID of the limitation to be fetched. @@ -24087,13 +29474,53 @@ paths: description: Limitation with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a limitation of an account. + summary: Get an entitlement limitation. + tags: + - Account - entitlement limitations + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/manufacturing/statistics: + get: + description: 'Get manufacturing statistics report. + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/manufacturing/statistics?start=2020-06-23T21:00:00.000Z&end=2020-07-01T20:59:59.999Z + --header ''Authorization: Bearer '' + + ``` + + ' + operationId: ManufacturingStatisticsReport + parameters: + - description: The start date and time for the report. + format: date-time + in: query + name: start + required: true + type: string + - description: The end date and time for the report. The default value is the + current date-time. + format: date-time + in: query + name: end + required: false + type: string + produces: + - application/json + responses: + 200: + description: OK. + schema: + $ref: '#/definitions/StatisticsReportListResponse' + summary: Retrieve provisioning statistics for devices in your factories. tags: - - Account - limitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Factory manufacturing statistics + x-origin: C:\Source\mbed\mbed-cloud-api-contract\manufacturing-statistics\public\swagger.yml /v3/metrics: get: - description: This REST API is used to get account-specific statistics. + description: Get account-specific statistics. operationId: getMetrics parameters: - description: "A comma-separated list of requested metrics and total_count\ @@ -24104,190 +29531,377 @@ paths: - `bootstraps_pending`\n- `handshakes_successful`\n- `connect_rest_api_success`\n\ - `connect_rest_api_error`\n- `device_proxy_request_success`\n- `device_proxy_request_error`\n\ - `device_subscription_request_success`\n- `device_subscription_request_error`\n\ - - `device_observations`\n- `total_count`\n\n**Note:**\n\nThe metrics device_proxy_request_success,\ - \ device_proxy_request_error, device_subscription_request_success, device_subscription_request_error\ - \ and device_observations monitor only the response from the device to Device\ - \ Management Connect and they do not confirm that the response is delivered\ - \ to client callback URLs used when you try to access device resources using\ - \ [Connect API](/docs/current/service-api-references/device-management-connect.html)\ + - `device_observations`\n- `total_count`\n\n**Note:**\n\nThe metrics `device_proxy_request_success`,\ + \ `device_proxy_request_error`, `device_subscription_request_success`, `device_subscription_request_error`\ + \ and `device_observations` monitor only the response from the device to\ + \ Device Management Connect. They do not confirm that the response is delivered\ + \ to the client callback URLs used when you try to access device resources\ + \ using [Connect API](https://developer.pelion.com/docs/device-management-api/connect/)\ \ endpoints. New metrics will be added to monitor the response delivery\ - \ to client callback URLs later.\n\n**Example usage:**\n\n```\ncurl -X\ - \ GET \\\n -H \"Authorization : Bearer \"\n \ - \ 'https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170207&end=20170407&interval=1d'\n\ - \n{\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\"\ + \ to client callback URLs later.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170207&end=20170407&interval=1d\ + \ \\\n -H \"Authorization : Bearer \"\n```\n\n**Response:**\n\ + \n {\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\"\ : 54,\n \"after\": \"2017-07-26T00:00:00Z\",\n \"has_more\": true,\n\ \ \"data\": [\n {\n \"id\": \"015d8157c800015e306fffff005374617473000\"\ ,\n \"timestamp\": \"2017-07-27T00:00:00Z\",\n \"\ transactions\": 27366\n },\n {\n \"id\": \"015d867e2400015e306fffff005374617473000\"\ ,\n \"timestamp\": \"2017-07-28T00:00:00Z\",\n \"\ - transactions\": 27480\n }\n ]\n}\n```\n" + transactions\": 27480\n }\n ]\n}\n```" in: query name: include required: true type: string - description: 'UTC time/year/date in RFC3339 format. Fetch the data with timestamp - greater than or equal to this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z - / 2017 / 20170207. The maximum time between start and end parameters cannot - exceed more than one year (365 days). The parameter is not mandatory, if - the period is specified. - - ' + greater than or equal to this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. + The time between start and end parameters cannot exceed one year (365 days). + The parameter is not mandatory if the period is specified.' format: date in: query name: start required: false type: string - description: 'UTC time/year/date in RFC3339 format. Fetch the data with timestamp - less than this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z - / 2017 / 20170207. The maximum time between start and end parameters cannot - exceed more than one year (365 days). The parameter is not mandatory, if - the period is specified. - - ' + less than this value. Sample values: 20170207T092056990Z/2017-02-07T09:20:56.990Z/2017/20170207. + The time between start and end parameters cannot exceed one year (365 days). + The parameter is not mandatory if the period is specified.' format: date in: query name: end required: false type: string - description: 'Period. Fetch the data for the period in minutes, hours, days - or weeks. Sample values: 5m, 2h, 3d, 4w. The parameter is not mandatory, - if the start and end time are specified. The maximum period cannot exceed - one year (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. - - ' + or weeks. Sample values: 5m, 2h, 3d, 4w. The parameter is not mandatory + if the start and end time are specified. The period cannot exceed one year + (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w.' in: query name: period required: false type: string - description: 'Group the data by this interval in minutes, hours, days or weeks. - Sample values: 5m, 2h, 3d, 4w. The maximum interval cannot exceed one year - (365 days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w. - - ' + Sample values: 5m, 2h, 3d, 4w. The interval cannot exceed one year (365 + days). The allowed ranges are 5m-525600m/1h-8760h/1d-365d/1w-53w.' in: query name: interval required: true type: string - - description: 'The number of results to return. The default value is 50, minimum - 2 and maximum 1000. - - ' + - description: The number of results to return (2-1000). Default 50. in: query name: limit required: false type: integer - description: "The metric ID after which to start fetching. This also can be\ - \ used for pagination as follows:\n\n**Example usage:**\n\n```\ncurl -X\ - \ GET \\\n -H \"Authorization : Bearer \"\n \ - \ 'https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20'\n\ - {\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\": 54,\n\ - \ \"has_more\": true,\n \"data\": [\n {\n \"id\": \"\ - 015d1a589800015e306fffff005374617473000\",\n \"timestamp\": \"\ - 2017-07-07T00:00:00Z\",\n \"transactions\": 26381\n },\n\ - \ .\n .\n .\n {\n \"id\": \"015d7c316c00015e306fffff005374617473000\"\ + \ used for pagination.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20\ + \ \\\n -H \"Authorization : Bearer \"\n```\n\n**Response:**\n\ + ```\n{\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\"\ + : 54,\n \"has_more\": true,\n \"data\": [\n {\n \"id\"\ + : \"015d1a589800015e306fffff005374617473000\",\n \"timestamp\"\ + : \"2017-07-07T00:00:00Z\",\n \"transactions\": 26381\n \ + \ },\n .\n .\n .\n {\n \"id\": \"015d7c316c00015e306fffff005374617473000\"\ ,\n \"timestamp\": \"2017-07-26T00:00:00Z\",\n \"transactions\"\ : 25569\n }\n ]\n}\n```\n\nIf the parameter `has more` is true,\ \ it indicates that the list is not complete and more values are available.\ \ You can give the last ID of the list as the value of the `after` query\ \ parameter, and you get the next page of values. You can keep doing this\ - \ until `has more` is false.\n```\ncurl -X GET \\\n -H \"Authorization\ - \ : Bearer \"\n 'https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20&after=015d7c316c00015e306fffff005374617473000'\n\ - \n{\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\": 54,\n\ - \ \"after\": \"2017-07-26T00:00:00Z\",\n \"has_more\": true,\n \"\ - data\": [\n {\n \"id\": \"015d8157c800015e306fffff005374617473000\"\ + \ until `has more` is false.\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/metrics?include=transactions,total_count&start=20170707&end=20170829&interval=1d&limit=20&after=015d7c316c00015e306fffff005374617473000\ + \ \\\n -H \"Authorization : Bearer \"\n```\n\n**Response:**\n\ + ```\n{\n \"object\": \"list\",\n \"limit\": 20,\n \"total_count\"\ + : 54,\n \"after\": \"2017-07-26T00:00:00Z\",\n \"has_more\": true,\n\ + \ \"data\": [\n {\n \"id\": \"015d8157c800015e306fffff005374617473000\"\ ,\n \"timestamp\": \"2017-07-27T00:00:00Z\",\n \"transactions\"\ : 27366\n },\n .\n .\n .\n {\n \"id\"\ : \"015de3309c00015e306fffff005374617473000\",\n \"timestamp\"\ : \"2017-08-15T00:00:00Z\",\n \"transactions\": 24707\n \ - \ }\n ]\n}\n```\n" + \ }\n ]\n}\n```" in: query name: after required: false type: string - - description: 'The order of the records to return. Available values are ASC - and DESC. The default value is ASC. + - description: '''Record order. Acceptable values: ASC, DESC. Default: ASC.''' + in: query + name: order + required: false + type: string + produces: + - application/json + responses: + 200: + description: Successful response. + schema: + $ref: '#/definitions/successful-response' + 400: + description: Bad request. + schema: + $ref: '#/definitions/error-response' + 401: + description: Authentication failure. + schema: + $ref: '#/definitions/error-response' + 403: + description: Access denied. + schema: + $ref: '#/definitions/error-response' + summary: Provides account-specific statistics for other cloud services. + tags: + - Usage - service metrics + x-origin: C:\Source\mbed\mbed-cloud-api-contract\statistics\public\rest-api-v3-external.yaml + /v3/policy-groups: + get: + description: 'Retrieve an array of policy groups. - ' + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAllGroups + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string + - description: Filter for group name. + in: query + name: name__eq + required: false + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummaryList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get policy groups. + tags: + - Account - policy groups + x-filter: + name: + - eq + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new group. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' -d ''{"name": "MyGroup1"}'' + + ```' + operationId: createGroup + parameters: + - description: Details of the group to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/GroupCreationInfo' + produces: + - application/json + responses: + '201': + description: New entity created. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, invalid group name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: A group with that name already exists. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new group. + tags: + - Account - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}: + delete: + description: 'Delete a group. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteGroup + parameters: + - description: The ID of the group to delete. + in: path + name: group_id + required: true + type: string + produces: + - application/json + responses: + '204': + description: Deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden, or Administrators group cannot be removed. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: A group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete a group. + tags: + - Account - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + get: + description: 'Retrieve a policy group. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getGroupSummary + parameters: + - description: The ID of the policy group to retrieve. + in: path + name: group_id + required: true + type: string produces: - application/json responses: - 200: - description: Successful response. - schema: - $ref: '#/definitions/successful-response' - 400: - description: Bad request. + '200': + description: Successful operation. schema: - $ref: '#/definitions/error-response' - 401: + $ref: '#/definitions/GroupSummary' + '401': description: Authentication failure. schema: - $ref: '#/definitions/error-response' - 403: - description: Access denied. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. schema: - $ref: '#/definitions/error-response' - summary: Provides account-specific statistics for other cloud services. + $ref: '#/definitions/ErrorResponse' + '404': + description: A group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get a policy group. tags: - - Statistics - x-origin: /home/circleci/project/statistics/public/rest-api-v3-external.yaml - /v3/policy-groups: - get: - description: 'Retrieve all group information. + - Account - policy groups + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Add users and API keys to a group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: getAllGroups + operationId: addSubjectsToGroup parameters: - - default: 50 - description: The number of results to return (2-1000). Default 50. - format: int32 - in: query - name: limit - required: false - type: integer - - description: The entity ID to fetch after the given one. - in: query - name: after - required: false - type: string - - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - in: query - name: order - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - in: query - name: include - required: false - type: string - - description: Filter for group name. - in: query - name: name__eq - required: false + - description: The ID of the group to update. + in: path + name: group_id + required: true type: string + - description: A list of users and API keys to add to the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the user or API key does + not exist. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -24296,47 +29910,62 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all group information. + '404': + description: A group with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: The user of this API key is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add members to a group. tags: - Account - policy groups - x-filter: - name: - - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + put: consumes: - application/json - description: 'Create a new group. + description: 'Update a group name. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \ + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ - -H ''content-type: application/json'' -d ''{"name": "MyGroup1"}'' + -H ''content-type: application/json'' \ + + -d ''{"name": "TestGroup2"}'' ```' - operationId: createGroup + operationId: updateGroupName parameters: + - description: The ID of the group to update. + in: path + name: group_id + required: true + type: string - description: Details of the group to create. in: body name: body required: true schema: - $ref: '#/definitions/GroupCreationInfo' + $ref: '#/definitions/GroupUpdateInfo' produces: - application/json responses: - '201': - description: New entity created. + '200': + description: Successful operation. schema: $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, invalid group name. + description: Error in input data, for example, the group name is too long. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -24347,85 +29976,137 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '409': - description: A group with that name already exists. + '404': + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new group. + summary: Update the group name. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}: + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/api-keys: delete: - description: 'Delete a group. + consumes: + - application/json + deprecated: true + description: 'Remove API keys from groups. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: deleteGroup + operationId: removeApiKeysFromGroup parameters: - - description: The ID of the group to delete. + - description: The ID of the group. in: path name: group_id required: true type: string + - description: A list of API keys to remove from the group. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the array of API keys is + missing. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, or Administrators group cannot be removed. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' '404': description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a group. + summary: Remove API keys from a group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve general information about a group. + deprecated: true + description: 'Retrieve an array of API keys associated with a policy group. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupSummary + operationId: getApiKeysOfGroup parameters: - - description: The ID of the group to retrieve. + - description: The ID of the group. in: path name: group_id required: true type: string + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false + type: string + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false + type: string + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummary' + $ref: '#/definitions/ApiKeyInfoRespList' '401': description: Authentication failure. schema: @@ -24438,38 +30119,43 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get group information. + summary: Get the API keys of a policy group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-deprecation: + comment: This endpoint is deprecated, GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: - consumes: - - application/json - description: 'Add users and API keys to a group. + deprecated: true + description: 'Add API keys to the group. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -d ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: addSubjectsToGroup + operationId: addApiKeysToGroup parameters: - - description: The ID of the group to update. + - description: The ID of the group. in: path name: group_id required: true type: string - - description: A list of users and API keys to add to the group. + - description: A list of API keys to add to the group. in: body name: body required: true @@ -24483,8 +30169,7 @@ paths: schema: $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, the user or API key does - not exist. + description: Error in input data, for example, the group Id does not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -24492,7 +30177,8 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Adding an API key to the 'Administrators' group + is restricted to administrators. schema: $ref: '#/definitions/ErrorResponse' '404': @@ -24500,46 +30186,52 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '409': - description: The user of this API key is a member of the group already. + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Add members to a group. + summary: Add API keys to the group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update a group name. + x-deprecation: + comment: This endpoint is deprecated, use POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add/ + end_of_life_at: '2020-07-11T11:04:57+00:00' + issued_at: '2019-07-11T11:04:57+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/api-keys/add: + post: + deprecated: true + description: 'Add API keys to the group. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"name": "TestGroup2"}'' + -d ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: updateGroupName + operationId: addListedApiKeysToGroup parameters: - - description: The ID of the group to update. + - description: The ID of the group. in: path name: group_id required: true type: string - - description: Details of the group to create. + - description: A list of API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/GroupUpdateInfo' + $ref: '#/definitions/SubjectList' produces: - application/json responses: @@ -24548,7 +30240,7 @@ paths: schema: $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, the group name is too long. + description: Error in input data, for example, the group Id does not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -24556,19 +30248,29 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden. Adding an API key to the 'Administrators' group + is restricted to administrators. schema: $ref: '#/definitions/ErrorResponse' '404': description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update the group name. + '409': + description: The API key is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add API Keys to the group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}/api-keys: - delete: + x-deprecation: + comment: This endpoint is deprecated, POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/add + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/api-keys/remove: + post: consumes: - application/json deprecated: true @@ -24579,17 +30281,18 @@ paths: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: removeApiKeysFromGroup + operationId: removeListedApiKeysFromGroup parameters: - description: The ID of the group. in: path @@ -24630,26 +30333,27 @@ paths: tags: - Account - policy groups x-deprecation: - comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' + comment: This endpoint is deprecated, POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/applications: get: - description: 'Manage policy groups. + description: 'Retrieve an array of applications associated with a policy group. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getApiKeysOfGroup + operationId: getApplicationsOfGroup parameters: - description: The ID of the group. in: path @@ -24663,14 +30367,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -24687,7 +30391,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/ApplicationList' '401': description: Authentication failure. schema: @@ -24700,97 +30404,38 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the API keys of a group. + summary: Get the applications of a policy group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/applications/add: post: - deprecated: true - description: 'Add API keys to the group. + description: 'Add applications to the group. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \ - -H ''Authorization: Bearer '' - - ```' - operationId: addApiKeysToGroup - parameters: - - description: The ID of the group. - in: path - name: group_id - required: true - type: string - - description: A list of API keys to add to the group. - in: body - name: body - required: true - schema: - $ref: '#/definitions/SubjectList' - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/GroupSummary' - '400': - description: Error in input data, for example, the group Id does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: A group with that ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: The API key is a member of the group already. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Add API keys to the group. - tags: - - Account - policy groups - x-deprecation: - comment: This endpoint is deprecated, use POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/add/ - end_of_life_at: '2020-07-11T11:04:57+00:00' - issued_at: '2019-07-11T11:04:57+00:00' - links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}/api-keys/add: - post: - description: 'Add API keys to the group. - - - **Example:** - - ``` + -H ''Authorization: Bearer '' \ - curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys - \ + -H ''content-type: application/json'' \ - -H ''Authorization: Bearer '' + -d ''{ "applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: addListedApiKeysToGroup + operationId: addListedApplicationsToGroup parameters: - description: The ID of the group. in: path name: group_id required: true type: string - - description: A list of API keys to add to the group. + - description: A list of applications to add to the group. in: body name: body required: true @@ -24820,42 +30465,43 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '409': - description: The API key is a member of the group already. + description: The application is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API Keys to the group. + summary: Add applications to the group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}/api-keys/remove: + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/applications/remove: post: consumes: - application/json - description: 'Remove API keys from groups. + description: 'Remove applications from groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys/remove + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: removeListedApiKeysFromGroup + operationId: removeListedApplicationsFromGroup parameters: - description: The ID of the group. in: path name: group_id required: true type: string - - description: A list of API keys to remove from the group. + - description: A list of applications to remove from the group. in: body name: body required: true @@ -24869,8 +30515,8 @@ paths: schema: $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, the array of API keys is - missing. + description: Error in input data, for example, the array of applications + is missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -24885,10 +30531,10 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API keys from a group. + summary: Remove applications from a group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/policy-groups/{group_id}/users: delete: consumes: @@ -24896,6 +30542,8 @@ paths: deprecated: true description: 'Manage policy groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -24904,11 +30552,12 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' operationId: removeUsersFromGroup @@ -24956,9 +30605,11 @@ paths: end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve users of a group with details. + description: 'Retrieve an array of users associated with a policy group. + + Note: This endpoint is restricted to administrators. **Example:** @@ -24968,7 +30619,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getUsersOfGroup @@ -24985,14 +30636,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -25038,7 +30689,7 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get users of a group. + summary: Get users of a policy group. tags: - Account - policy groups x-filter: @@ -25046,11 +30697,13 @@ paths: - eq - in - nin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: deprecated: true description: 'Add users to the group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -25059,7 +30712,12 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' operationId: addUsersToGroup. @@ -25110,11 +30768,13 @@ paths: end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/policy-groups/{group_id}/users/add: post: description: 'Add users to the group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -25123,7 +30783,12 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/add \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' operationId: addListedUsersToGroup. @@ -25169,12 +30834,14 @@ paths: summary: Add users to the group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/policy-groups/{group_id}/users/remove: post: consumes: - application/json - description: 'Manage policy groups. + description: 'Remove users from a policy group. + + Note: This endpoint is restricted to administrators. **Example:** @@ -25184,11 +30851,12 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' operationId: removeListedUsersFromGroup @@ -25231,7 +30899,7 @@ paths: summary: Remove users from a group. tags: - Account - policy groups - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/server-credentials: get: description: 'Return all (bootstrap and LwM2M) server credentials for client @@ -25244,7 +30912,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getAllServerCredentials @@ -25282,8 +30950,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch all (Bootstrap and LwM2M) server credentials. tags: - - Service security - server credentials - x-origin: /home/circleci/project/connector-ca/public/swagger.yaml + - Security and identity - server credentials + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-ca\public\swagger.yaml /v3/server-credentials/bootstrap: get: deprecated: true @@ -25298,7 +30966,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getBootstrapServerCredentials @@ -25335,8 +31003,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch bootstrap server credentials. tags: - - Service security - server credentials - x-origin: /home/circleci/project/connector-ca/public/swagger.yaml + - Security and identity - server credentials + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-ca\public\swagger.yaml /v3/server-credentials/lwm2m: get: deprecated: true @@ -25351,7 +31019,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getL2M2MServerCredentials @@ -25388,8 +31056,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch LwM2M server credentials. tags: - - Service security - server credentials - x-origin: /home/circleci/project/connector-ca/public/swagger.yaml + - Security and identity - server credentials + x-origin: C:\Source\mbed\mbed-cloud-api-contract\connector-ca\public\swagger.yaml /v3/service-packages: get: description: 'Get information for all service packages for the current authenticated @@ -25407,7 +31075,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getServicePackages @@ -25492,7 +31160,9 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get all service packages. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + tags: + - Usage - billing reports + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/service-packages-quota: get: description: 'Get the available firmware update quota for the current authenticated @@ -25506,7 +31176,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getServicePackageQuota @@ -25554,14 +31224,15 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Service package quota. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + tags: + - Usage - billing reports + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/service-packages-quota-history: get: description: 'Get your quota usage history. This API is available only for commercial - accounts. Aggregator accounts can see their own and subtenant quota usage - data. + accounts. Aggregator accounts can see their own and tenant quota usage data. - Data is in ascending order based on the added timestamp. + Data is in ascending order based on creation time. **Example:** @@ -25571,13 +31242,12 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota-history \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getServicePackageQuotaHistory parameters: - - description: Maximum number of quota history entries contained in one paged - response. + - description: Maximum number of quota history entries in one paged response. format: int32 in: query maximum: 1000 @@ -25592,6 +31262,14 @@ paths: name: after required: false type: string + - description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + enum: + - ASC + - DESC + in: query + name: order + required: false + type: string responses: 200: description: Quota history for the currently authenticated commercial account. @@ -25615,7 +31293,7 @@ paths: id: b0817554677248a1b038d7fcd2c020c5 reason: reservation reservation: - account_id: TEST-commercial.5f1edb5c-c61d-11e7-a05a-00155d004e00 + account_id: 10171c6f56084c4f8b53210762650246 campaign_name: campaign id: b5322aabe29d458ea6e4402594085a15 service_package: null @@ -25659,10 +31337,12 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Service package quota history. - x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml + tags: + - Usage - service packages + x-origin: C:\Source\mbed\mbed-cloud-api-contract\billing\public\swagger-public-apis.yaml /v3/trusted-certificates: get: - description: 'Retrieve trusted certificates in an array. + description: 'Retrieve an array of trusted certificates. **Example:** @@ -25671,7 +31351,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllCertificates @@ -25683,14 +31363,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -25759,6 +31439,11 @@ paths: name: subject__like required: false type: string + - description: Filter for certificate fingerprint. + in: query + name: certificate_fingerprint__eq + required: false + type: string - description: Filter for finding certificates by validity. True returns certificates which are not yet expired. False returns certificates which have expired. in: query @@ -25782,8 +31467,10 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get all trusted certificates. tags: - - Device security - certificates + - Security and identity - certificates x-filter: + certificate_fingerprint: + - eq device_execution_mode: - eq - neq @@ -25805,12 +31492,14 @@ paths: - like valid: - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json description: 'Upload new trusted certificates. + Note: This endpoint is restricted to administrators. + **Example:** @@ -25818,7 +31507,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -25850,7 +31539,8 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '409': @@ -25859,8 +31549,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Upload a new trusted certificate. tags: - - Device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/trusted-certificates/{cert_id}: delete: description: 'Delete a trusted certificate. @@ -25873,7 +31563,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: deleteCertificate @@ -25897,15 +31587,15 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Certificate not found. + description: A certificate not found. schema: $ref: '#/definitions/ErrorResponse' summary: Delete a trusted certificate by ID. tags: - - Device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. **Example:** @@ -25915,7 +31605,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getCertificate @@ -25941,13 +31631,13 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Certificate not found. + description: A certificate not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get trusted certificate by ID. + summary: Get a trusted certificate. tags: - - Device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json @@ -25961,7 +31651,7 @@ paths: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -26001,7 +31691,7 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Certificate not found. + description: A certificate not found. schema: $ref: '#/definitions/ErrorResponse' '409': @@ -26010,8 +31700,8 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Update trusted certificate. tags: - - Device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + - Security and identity - certificates + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/update-campaigns: get: description: 'Get update campaigns for devices specified by a filter. @@ -26024,7 +31714,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26298,10 +31988,16 @@ paths: not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Unable to find content. + schema: + $ref: '#/definitions/ErrorResponse' summary: List all campaigns tags: - Device update - campaigns @@ -26361,15 +32057,16 @@ paths: - nin - lte - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml post: - description: "Create an update campaign.\n
\n**Usage example:**\n```\ncurl\ - \ -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization:\ - \ ' \\\n-H 'content-type: application/json;charset=UTF-8'\ + description: "Create an update campaign.\n\nTo include a filter for targeted\ + \ devices, refer to the filter using `` in the message body.\n\ +
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"campaign_strategy\": \"one-shot\",\n \"description\": \"\ - Campaign is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\"\ - ,\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\"\ - ,\n}'\n```\n" + Campaign is for ...\",\n \"device_filter\": \"\",\n \"name\"\ + : \"campaign\",\n \"root_manifest_id\": \"56780000000000a5b70000000000bd98\"\ + \n}'\n```\n" operationId: Update_Campaign_create parameters: - description: Update campaign. @@ -26388,12 +32085,20 @@ paths: not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' + '409': + description: Conflict, a campaign with the same name already exists + schema: + $ref: '#/definitions/ErrorResponse' summary: Create a campaign tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}: delete: description: 'Delete an update campaign. @@ -26404,10 +32109,10 @@ paths: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26416,9 +32121,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26429,10 +32133,16 @@ paths: not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Update campaign can't be found. + schema: + $ref: '#/definitions/ErrorResponse' 409: description: Conflict - Cannot delete the campaign while in the current phase. @@ -26441,7 +32151,7 @@ paths: summary: Delete a campaign tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml get: description: 'Get an update campaign. @@ -26451,10 +32161,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26463,9 +32173,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26478,28 +32187,33 @@ paths: not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Unable to find campaign. + schema: + $ref: '#/definitions/ErrorResponse' summary: Get a campaign. tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml put: description: "Modify an update campaign.\n
\n**Usage example:**\n```\ncurl\ - \ -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012\ - \ \\\n-H 'Authorization: ' \\\nd '{\n \"description\"\ - : \"Campaign is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\"\ + \ -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012\ + \ \\\n-H 'Authorization: Bearer ' \\\nd '{\n \"description\": \"\ + Campaign is for ...\",\n \"device_filter\": \"123400000000000000000000000ae45\"\ ,\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\"\ ,\n}'\n```\n" operationId: Update_Campaign_update parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: Update campaign. @@ -26528,7 +32242,7 @@ paths: summary: Modify a campaign tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/archive: post: description: 'Archive a campaign. @@ -26539,10 +32253,10 @@ paths: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26551,9 +32265,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26561,16 +32274,24 @@ paths: description: The campaign has been archived. '400': description: Unable to change the phase of the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Cannot find the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '409': description: Cannot archive the campaign while in the current phase. + schema: + $ref: '#/definitions/ErrorResponse' summary: Archive a campaign. tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/campaign-device-metadata: get: description: 'Get metadata for all devices in a campaign. @@ -26581,10 +32302,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26593,9 +32314,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: How many objects to retrieve in the page. The minimum limit is @@ -26629,7 +32349,7 @@ paths: summary: List all campaign device metadata tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}: get: description: 'Get update campaign metadata for a specific device. @@ -26640,10 +32360,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26652,16 +32372,14 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: The campaign device metadata ID. in: path - maxLength: 32 - minLength: 32 name: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26676,11 +32394,11 @@ paths: summary: Get a campaign device metadata tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/metrics: get: deprecated: true - description: 'Get [information](https://www.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) + description: 'Get [information](https://developer.pelion.com/docs/device-management/current/updating-firmware/campaign-metrics-in-portal.html) for a campaign based on **SUCCESS**, **FAIL**, or **SKIPPED** criteria for each device. @@ -26690,10 +32408,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/metrics + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123467f9012ab567890120000789012/metrics \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26702,9 +32420,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26714,17 +32431,21 @@ paths: $ref: '#/definitions/CampaignMetrics' 401: description: Unauthorized. + schema: + $ref: '#/definitions/ErrorResponse' 404: description: Unable to find campaign or the campaign hasn't started. + schema: + $ref: '#/definitions/ErrorResponse' summary: Get campaign metrics tags: - Device update - campaigns x-deprecation: - comment: Use the statistics endpoint instead. + comment: Use GET /v3/update-campaigns/{campaign_id}/statistics instead. end_of_life_at: '2020-04-10T13:41:00+00:00' issued_at: '2019-04-10T13:41:00+00:00' links: [] - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/start: post: description: 'Start a campaign. @@ -26735,10 +32456,10 @@ paths: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26747,9 +32468,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26757,16 +32477,24 @@ paths: description: The campaign is starting. '400': description: Unable to change the phase of the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Cannot find the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '409': description: Cannot start the campaign while in the current phase. + schema: + $ref: '#/definitions/ErrorResponse' summary: Start a campaign. tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/statistics: get: description: 'Get a list of statistics for a campaign, including the number @@ -26778,10 +32506,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26790,9 +32518,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26811,22 +32538,39 @@ paths: summary: Get statistics for a campaign tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}: get: - description: "Get the count of successfully updated, skipped, and failed devices.\ - \ \n
\n**Usage example:**\n```\ncurl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012\ - \ \\\n-H 'Authorization: '\n```\n" + description: 'Get the count of successfully updated, skipped, and failed devices. + +
+ + **Usage example:** + + ``` + + curl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_statistics_retrieve parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: The summary status. For example, fail. + enum: &id037 + - fail + - success + - info + - skipped in: path name: summary_status_id required: true @@ -26847,7 +32591,7 @@ paths: summary: Get a status summary tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types: get: description: 'Get a list of events grouped by summary. @@ -26858,10 +32602,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26870,12 +32614,12 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: The summary status. For example, fail. + enum: *id037 in: path name: summary_status_id required: true @@ -26896,11 +32640,11 @@ paths: summary: Get a list of events grouped by summary tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id}: get: - description: 'Get the count for a specific event type; for example, succeeded, - failed, or skipped. + description: 'Get the count for a specific event type, for example, succeeded, + failed or skipped.
@@ -26908,10 +32652,10 @@ paths: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26920,20 +32664,53 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - description: The summary status. For example, fail. + enum: *id037 in: path name: summary_status_id required: true type: string - - description: The event type parameter. For example, UPD4_FAIL_101. + - description: 'The event type parameter. Event types are grouped into the four + values of the summary_status, i.e. fail, success, info and skipped. + + success: SYS_112, UPD4_OK_M1, UPD1_OK_1, UPD4_OK_100, UPD2_OK_19, UPD2_OK_1, + UPD2_OK_18 + + fail: UPD4_FAIL_508, UPD4_FAIL_217, UPD4_FAIL_305, UPD4_FAIL_405, UPD4_FAIL_511, + UPD4_FAIL_220, UPD1_FAIL_6, UPD4_FAIL_302, UPD2_FAIL_11, UPD4_FAIL_219, + SYS_103, UPD4_FAIL_407, UPD4_FAIL_224, SYS_111, UPD4_FAIL_210, UPD4_FAIL_306, + UPD2_FAIL_14, UPD4_FAIL_221, UPD4_FAIL_315, UPD4_FAIL_403, UPD2_FAIL_12, + UPD4_FAIL_207, UPD4_FAIL_215, UPD4_FAIL_504, UPD2_FAIL_3, UPD4_FAIL_103, + UPD2_FAIL_16, UPD2_FAIL_6, UPD4_FAIL_101, UPD4_FAIL_202, UPD4_FAIL_313, + UPD4_FAIL_209, UPD4_FAIL_301, UPD2_FAIL_4, SYS_123, UPD4_FAIL_314, UPD4_FAIL_205, + UPD4_FAIL_212, UPD4_FAIL_311, UPD4_FAIL_304, UPD4_FAIL_223, UPD4_FAIL_226, + UPD1_FAIL_2, UPD4_FAIL_203, UPD4_FAIL_507, UPD4_FAIL_402, UPD4_FAIL_204, + UPD4_FAIL_510, UPD1_FAIL_7, UPD4_FAIL_218, UPD1_FAIL_8, UPD2_FAIL_5, UPD4_FAIL_201, + UPD4_FAIL_213, UPD4_FAIL_400, UPD2_FAIL_17, UPD4_FAIL_310, UPD4_FAIL_206, + UPD4_FAIL_102, UPD2_FAIL_7, UPD1_FAIL_9, UPD4_FAIL_22, UPD4_FAIL_502, UPD4_FAIL_211, + UPD1_FAIL_4, UPD1_FAIL_3, UPD4_FAIL_409, UPD4_FAIL_408, UPD4_FAIL_200, SYS_104, + UPD2_FAIL_10, UPD2_FAIL_15, UPD4_FAIL_216, UPD4_FAIL_214, UPD4_FAIL_308, + UPD4_FAIL_401, UPD1_FAIL_5, UPD2_FAIL_13, UPD4_FAIL_208, UPD2_FAIL_2, UPD4_FAIL_312, + UPD4_FAIL_509, UPD4_FAIL_303, UPD4_FAIL_512, UPD2_FAIL_9, UPD4_FAIL_316, + UPD4_FAIL_506, SYS_101, UPD4_FAIL_309, UPD4_FAIL_307, UPD4_FAIL_404, UPD4_FAIL_503, + UPD4_FAIL_225, UPD4_FAIL_300, UPD4_FAIL_500, UPD4_FAIL_505, UPD4_FAIL_406, + UPD4_FAIL_222, UPD4_FAIL_501, UPD2_FAIL_8, SYS_124 + + info: UPD1_STATE_0, UPD2_REPORT_HASH, UPD1_REPORT_HASH, UPD2_STATE_5, UPD2_STATE_0, + UPD2_STATE_4, UPD2_STATE_3, SYS_107, SYS_105, SYS_106, UPD1_REPORT_VERSION, + UPD1_STATE_2, SYS_116, SYS_108, SYS_100, UPD2_STATE_8, UPD2_STATE_7, SYS_120, + UPD2_STATE_1, SYS_113, UPD2_STATE_6, UPD2_REPORT_VERSION, SYS_115, UPD2_STATE_2, + SYS_114, UPD1_STATE_3, UPD1_STATE_1, SYS_125 + + skipped: SYS_121, SYS_118, SYS_122, SYS_110, SYS_117 + + ' in: path name: event_type_id - pattern: ^\w{1,16}$ required: true type: string responses: @@ -26952,11 +32729,11 @@ paths: summary: Get an event type for a campaign tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/update-campaigns/{campaign_id}/stop: post: description: 'Stop a campaign. Stopping is a process that requires the campaign - go through several [phases](../updating-firmware/running-update-campaigns.html#stopping). + go through several [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html).
@@ -26964,10 +32741,10 @@ paths: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -26976,9 +32753,8 @@ paths: parameters: - description: The campaign ID. in: path - maxLength: 32 - minLength: 32 name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -26986,19 +32762,29 @@ paths: description: The campaign is stopping. '400': description: Unable to change the phase of the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': description: Cannot find the campaign. + schema: + $ref: '#/definitions/ErrorResponse' '409': description: Cannot stop the campaign while in the current phase. + schema: + $ref: '#/definitions/ErrorResponse' summary: Stop a campaign. tags: - Device update - campaigns - x-origin: /home/circleci/project/update-service/public/swagger.yml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\update-service\public\swagger.yml /v3/user-invitations: get: - description: 'Retrieve details for all the active user invitations. + description: 'Retrieve an array of active user invitations sent by email. + + Note: This endpoint is restricted to administrators. **Example:** @@ -27007,7 +32793,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllInvitations @@ -27019,14 +32805,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -27051,18 +32837,20 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the details of all user invitations. + summary: Get user invitations. tags: - Account - user invitations x-filter: login_profiles: - eq - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27070,7 +32858,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27107,11 +32895,13 @@ paths: summary: Create a user invitation. tags: - Account - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/user-invitations/{invitation_id}: delete: description: 'Delete an active user invitation sent to a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27120,7 +32910,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: deleteInvitation @@ -27150,10 +32940,12 @@ paths: summary: Delete a user invitation. tags: - Account - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the details of an active user invitation. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27162,7 +32954,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getInvitation @@ -27194,10 +32986,12 @@ paths: summary: Details of a user invitation. tags: - Account - user invitations - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/users: get: - description: 'Retrieve the details of all users. + description: 'Retrieve an array of users. + + Note: This endpoint is restricted to administrators. **Example:** @@ -27206,7 +33000,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllUsers @@ -27218,14 +33012,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -27277,7 +33071,7 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the details of all users. + summary: Get users. tags: - Account - users x-filter: @@ -27289,12 +33083,14 @@ paths: - eq - in - nin - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json - description: 'Create or invite a new user to the account. Only email address - is used; other attributes are set in the second step. + description: 'Create or invite a new user to the account. The invited user has + to accept the invitation by clicking the link in the invitation email. + + Note: This endpoint is restricted to administrators. **Example:** @@ -27303,7 +33099,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27350,110 +33146,13 @@ paths: summary: Create a new user. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/users/me: - get: - description: Retrieve the details of the logged-in user. - operationId: getMyUser - parameters: - - description: Request to regenerate new emergency scratch codes. - in: query - name: scratch_codes - required: false - type: string - - description: Request to return account-specific user property values according - to the given property name. - in: query - name: properties - required: false - type: string - - description: 'Comma-separated additional data to return. Currently supported: - active_sessions.' - in: query - name: include - required: false - type: string - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInfoResp' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Details of the current user. - tags: - - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update user details. - - - **Example:** - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/me \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"full_name": "fullname"}'' - - ```' - operationId: updateMyUser - parameters: - - description: A user object with attributes. - in: body - name: body - required: true - schema: - $ref: '#/definitions/UserUpdateReq' - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInfoResp' - '400': - description: Error in input data, for example, an invalid email address. - schema: - $ref: '#/definitions/ErrorResponse' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: A user with the given ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - '409': - description: A user with the given username or email already exists. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Update user details. - tags: - - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/users/{user_id}: delete: description: 'Delete a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27461,7 +33160,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: deleteUser @@ -27495,10 +33194,12 @@ paths: summary: Delete a user. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: description: 'Retrieve the details of a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27506,7 +33207,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getUser @@ -27538,11 +33239,13 @@ paths: summary: Details of a user. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml put: consumes: - application/json - description: 'Update user details + description: 'Update user details. + + Note: This endpoint is restricted to administrators. **Example:** @@ -27551,7 +33254,7 @@ paths: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27601,7 +33304,7 @@ paths: summary: Update user details. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/users/{user_id}/groups: delete: consumes: @@ -27609,6 +33312,8 @@ paths: deprecated: true description: 'Remove user from groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27617,7 +33322,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27670,9 +33375,11 @@ paths: end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml get: - description: 'Retrieve groups of the user. + description: 'Retrieve an array of policy groups associated with a user. + + Note: This endpoint is restricted to administrators. **Example:** @@ -27682,7 +33389,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getGroupsOfUser @@ -27694,14 +33401,14 @@ paths: name: limit required: false type: integer - - description: The entity ID to fetch after the given one. + - description: The entity ID to retrieve after the given one. in: query name: after required: false type: string - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query name: order required: false @@ -27736,16 +33443,18 @@ paths: description: A user with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups of the user. + summary: Get policy groups for a user. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml post: consumes: - application/json deprecated: true description: 'Add user to groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27754,7 +33463,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27811,13 +33520,15 @@ paths: end_of_life_at: '2020-07-11T11:04:57+00:00' issued_at: '2019-07-11T11:04:57+00:00' links: [] - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/users/{user_id}/groups/add: post: consumes: - application/json description: 'Add user to groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27826,7 +33537,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/add \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27876,13 +33587,15 @@ paths: summary: Add user to a list of groups. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml /v3/users/{user_id}/groups/remove: post: consumes: - application/json description: 'Remove user from groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -27891,7 +33604,7 @@ paths: curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -27937,7 +33650,151 @@ paths: summary: Remove user from groups. tags: - Account - users - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3/users/{user_id}/remove: + post: + description: 'Remove user from the account. + + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/remove + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: removeUserFromAccount + parameters: + - description: The ID of the user to remove from the account. + in: path + name: user_id + required: true + type: string + responses: + '204': + description: Successful operation. + '400': + description: Error removing user from the account. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: A user with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove user from the account. + tags: + - Account - users + x-origin: C:\Source\mbed\mbed-cloud-api-contract\auth\public\iam-identity-swagger.yaml + /v3preview1/devices/{id}/services/{address}/connection: + get: + description: 'This WebSocket-based API for clients establishes connections to + services on connected gateways. + +
+ + Establish WebSocket connections to the edge-proxy service. After you establish + a Websocket connection, the Edge proxy sends data between cloud- and gateway-based + services. + +
+ + All communication is byte-based. + + ' + operationId: communicateWithGatewayBasedServices + parameters: + - default: Upgrade + description: The websocket connection header. Must be 'Upgrade'. + in: header + name: Connection + required: true + type: string + - default: websocket + description: The protocol upgrade header. Must be 'websocket'. + in: header + name: Upgrade + required: true + type: string + - description: Originating host of the request. + in: header + name: Origin + required: false + type: string + - default: 13 + description: WebSocket version of the protocol. Must be 13. + in: header + name: Sec-WebSocket-Version + required: true + type: integer + - description: 'The value of this header field must be a nonce consisting of + a randomly selected 16-byte value that has been base64-encoded (see this + section from RFC6455 - https://tools.ietf.org/html/rfc6455#section-11.3.1). + + The nonce must be selected randomly for each connection. An example is "dGhlIHNhbXBsZSBub25jZQ==".' + format: byte + in: header + name: Sec-WebSocket-Key + required: true + type: string + - description: The Device ID. + in: path + name: id + pattern: '[0-9a-fA-F]{32}' + required: true + type: string + - description: "The address of the TCP service listening on a specific port\ + \ on the gateway. If a TCP service is listening on localhost with port 5000\ + \ and is ready to accept incoming traffic, \nthe value of this parameter\ + \ should be `localhost:5000`." + in: path + name: address + required: true + type: string + responses: + '101': + description: Connection established + headers: + Upgrade: + description: This is 'websocket' in accordance with the WebSocket specification. + type: string + '400': + description: Bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Access denied. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Not found. + schema: + $ref: '#/definitions/ErrorResponse' + '500': + description: Internal server error. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Establish a tunnel connection to connected devices. + tags: + - Edge Proxy + x-origin: C:\Source\mbed\mbed-cloud-api-contract\gateway\public\edge-proxy.yaml produces: - application/json schemes: @@ -27950,4 +33807,3 @@ securityDefinitions: name: Authorization type: apiKey swagger: '2.0' - diff --git a/config/pelion/sdk_foundation_definition.json b/config/pelion/sdk_foundation_definition.json index 274b05be1..5b49f18d1 100644 --- a/config/pelion/sdk_foundation_definition.json +++ b/config/pelion/sdk_foundation_definition.json @@ -93,6 +93,8 @@ "campaign_statistics_summary_status_enum", "campaign_statistics_id_enum", "firmware_image_order_enum", + "firmware_manifest_schema_version_enum", + "firmware_manifest_delivered_payload_type_enum", "firmware_manifest_order_enum" ], "_key": "Device_Update" @@ -104,8 +106,7 @@ "device_events", "device_enrollment_bulk_create", "device_enrollment_bulk_delete", - "device_enrollment", - "device_enrollment_denial" + "device_enrollment" ], "enums": [ "device_lifecycle_status_enum", @@ -114,8 +115,7 @@ "device_state_enum", "device_enrollment_bulk_create_status_enum", "device_enrollment_bulk_delete_status_enum", - "device_enrollment_order_enum", - "device_enrollment_denial_order_enum" + "device_enrollment_order_enum" ], "_key": "Devices" }, @@ -321,6 +321,14 @@ "error_font_color", "info_color", "info_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color", "primary", "primary_font_color", "secondary", @@ -340,6 +348,9 @@ "field_name": "reference", "enum_name": "dark_theme_image_reference_enum", "values": [ + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "brand_logo_email", "brand_logo_landscape", "brand_logo_portrait", @@ -416,17 +427,6 @@ "group_id": "Devices", "_key": "device_enrollment_bulk_delete_status_enum" }, - { - "entity_name": "device_enrollment_denial", - "field_name": "order", - "enum_name": "device_enrollment_denial_order_enum", - "values": [ - "ASC", - "DESC" - ], - "group_id": "Devices", - "_key": "device_enrollment_denial_order_enum" - }, { "entity_name": "device_enrollment", "field_name": "order", @@ -485,6 +485,17 @@ "group_id": "Device_Update", "_key": "firmware_image_order_enum" }, + { + "entity_name": "firmware_manifest", + "field_name": "delivered_payload_type", + "enum_name": "firmware_manifest_delivered_payload_type_enum", + "values": [ + "delta", + "full" + ], + "group_id": "Device_Update", + "_key": "firmware_manifest_delivered_payload_type_enum" + }, { "entity_name": "firmware_manifest", "field_name": "order", @@ -496,6 +507,17 @@ "group_id": "Device_Update", "_key": "firmware_manifest_order_enum" }, + { + "entity_name": "firmware_manifest", + "field_name": "manifest_schema_version", + "enum_name": "firmware_manifest_schema_version_enum", + "values": [ + "1", + "3" + ], + "group_id": "Device_Update", + "_key": "firmware_manifest_schema_version_enum" + }, { "entity_name": "identity_provider", "field_name": "algorithm", @@ -561,6 +583,14 @@ "error_font_color", "info_color", "info_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color", "primary", "primary_font_color", "secondary", @@ -580,6 +610,9 @@ "field_name": "reference", "enum_name": "light_theme_image_reference_enum", "values": [ + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "brand_logo_email", "brand_logo_landscape", "brand_logo_portrait", @@ -701,6 +734,14 @@ "error_font_color", "info_color", "info_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color", "primary", "primary_font_color", "secondary", @@ -720,6 +761,9 @@ "field_name": "reference", "enum_name": "subtenant_dark_theme_image_reference_enum", "values": [ + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "brand_logo_email", "brand_logo_landscape", "brand_logo_portrait", @@ -813,6 +857,14 @@ "error_font_color", "info_color", "info_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color", "primary", "primary_font_color", "secondary", @@ -832,6 +884,9 @@ "field_name": "reference", "enum_name": "subtenant_light_theme_image_reference_enum", "values": [ + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "brand_logo_email", "brand_logo_landscape", "brand_logo_portrait", @@ -1045,6 +1100,7 @@ { "swagger_models": [ "AccountCreationReq", + "AccountCreationResp", "AccountInfo", "AccountInfoList", "AccountUpdateRootReq", @@ -1058,13 +1114,13 @@ "primary_key_field": "id", "methods": [ { - "description": "Retrieve API keys in an array, optionally filtered by the owner.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of API keys, optionally filtered by the owner.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -1116,7 +1172,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -1151,7 +1207,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -1315,7 +1371,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -1585,7 +1641,12 @@ "eq" ] }, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -1613,7 +1674,7 @@ "_key": "api_keys" }, { - "description": "Create a new account.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"display_name\": \"MyAccount1\", \"admin_name\": \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", \"city\": \"Cambridge\", \"contact\": \"J. Doe\", \"company\": \"Arm\"}'\n```", + "description": "Create a new account.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"display_name\": \"MyAccount1\", \"aliases\": [ \"my-account\" ], \"admin_name\": \"accountAdmin1\", \"email\": \"example_admin@myaccount.info\", \"country\": \"United Kingdom\", \"end_market\": \"Smart City\", \"address_line1\": \"110 Fulbourn Rd\", \"city\": \"Cambridge\", \"contact\": \"J. Doe\", \"company\": \"Arm\"}'\n```", "field_renames": [], "fields": [ { @@ -1709,7 +1770,7 @@ { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -1756,7 +1817,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "api_fieldname": "company", "entity_fieldname": "company", "parameter_fieldname": "company", @@ -1819,7 +1880,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "api_fieldname": "display_name", "entity_fieldname": "display_name", "parameter_fieldname": "display_name", @@ -1848,7 +1909,7 @@ "entity_fieldname": "end_market", "parameter_fieldname": "end_market", "in": "body", - "required": false, + "required": true, "_key": "end_market" }, { @@ -1898,14 +1959,6 @@ "description": "Successful operation.", "schema": { "type": "object", - "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" - ], "properties": [ { "type": "string", @@ -1963,6 +2016,12 @@ "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", "description": "The admin API key created for this account. Present only in the response for account creation.", "readOnly": true, + "x-deprecation": { + "issued_at": "2020-09-01T00:00:00+00:00", + "end_of_life_at": "2021-09-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "admin_key", "entity_fieldname": "admin_key", "_key": "admin_key" @@ -1989,7 +2048,7 @@ { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -2056,7 +2115,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "api_fieldname": "company", "entity_fieldname": "company", "_key": "company" @@ -2124,7 +2183,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "api_fieldname": "display_name", "entity_fieldname": "display_name", "_key": "display_name" @@ -2204,7 +2263,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -2212,6 +2274,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -2224,12 +2287,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -2246,50 +2311,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -2297,6 +2384,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -2309,13 +2397,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -2631,57 +2718,10 @@ "description": "Postal address line 2.", "_key": "address_line2" }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" - }, { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -2740,7 +2780,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "_key": "company" }, { @@ -2794,7 +2834,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "_key": "display_name" }, { @@ -2858,7 +2898,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -2866,6 +2909,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -2878,12 +2922,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -2900,50 +2946,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -2951,6 +3019,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -2961,2820 +3030,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "_key": "limits" - }, - { - "type": "string", - "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "_key": "mfa_status" - }, - { - "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", - "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" - }, - "_key": "notification_emails" - }, - { - "type": "string", - "description": "Entity name: always `account`.", - "enum": [ - "account" - ], - "_key": "object" - }, - { - "type": "object", - "properties": [ - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "info@arm.com", - "description": "The email address of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "example": "J. Doe", - "description": "The name of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - } - ], - "description": "Represents parent account contact details in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "parent_account" - }, - "x-nullable": true, - "_key": "parent_account" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "_key": "parent_id" - }, - { - "type": "object", - "required": [ - "minimum_length" - ], - "properties": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" - } - ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "_key": "password_policy" - }, - { - "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "_key": "password_recovery_expiration" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "_key": "phone_number" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "entity_fieldname": "action", - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "entity_fieldname": "allow", - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "entity_fieldname": "feature", - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" - }, - { - "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, - "enum": [ - "account", - "template", - "tier_template" - ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" - }, - { - "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" - } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" - } - }, - "_key": "policies" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" - }, - { - "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" - }, - { - "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "_key": "status" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" - } - ], - "description": "Represents an account in requests and responses." - }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "template_id", - "entity_fieldname": "template_id", - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "api_fieldname": "tier", - "entity_fieldname": "tier", - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "api_fieldname": "upgraded_at", - "entity_fieldname": "upgraded_at", - "_key": "upgraded_at" - } - ], - "description": "Represents an account in requests and responses." - }, - "_key": "201" - }, - { - "description": "Error in input data, for example, invalid username.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - } - ], - "path": "/v3/accounts", - "summary": "Create a new account.", - "return_type": "account", - "return_info": { - "self": true, - "custom": false, - "type": "account" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "id", - "created_at", - "updated_at", - "parent_id", - "tier", - "status", - "upgraded_at", - "limits", - "policies", - "template_id", - "reason", - "idle_timeout", - "password_policy", - "reference_note", - "custom_fields", - "mfa_status", - "notification_emails", - "sales_contact", - "expiration_warning_threshold", - "parent_account", - "expiration", - "admin_id", - "admin_key", - "limitations", - "password_recovery_expiration", - "business_model_history" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "createAccount", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "create" - }, - { - "description": "Retrieve dark theme branding colors for an account.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "The ID of the account.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - } - ], - "method": "get", - "mode": "dark_theme_branding_colors", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "_key": "object" - }, - { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Account not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-colors/dark", - "summary": "Get dark theme branding colors.", - "return_type": "paginated_response(subtenant_dark_theme_color)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_dark_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAccountDarkColors", - "notes": "This lists the dark theme banding colors of the subtenant account.", - "foreign_key": { - "entity": "subtenant_dark_theme_color" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "dark_theme_branding_colors" - }, - { - "description": "Retrieve the metadata of all dark theme branding images.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "The ID of the account.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - } - ], - "method": "get", - "mode": "dark_theme_branding_images", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" - ], - "_key": "object" - }, - { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "_key": "reference" - }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "_key": "static_uri" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Account not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-images/dark", - "summary": "Get metadata of all dark theme images.", - "return_type": "paginated_response(subtenant_dark_theme_image)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_dark_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAllAccountDarkImageData", - "notes": "This lists the dark theme banding images of the subtenant account.", - "foreign_key": { - "entity": "subtenant_dark_theme_image" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "dark_theme_branding_images" - }, - { - "description": "Retrieve light theme branding colors for an account.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "The ID of the account.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - } - ], - "method": "get", - "mode": "light_theme_branding_colors", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "_key": "object" - }, - { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Account not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-colors/light", - "summary": "Get light theme branding colors.", - "return_type": "paginated_response(subtenant_light_theme_color)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_light_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAccountLightColors", - "notes": "This lists the light theme banding colors of the subtenant account.", - "foreign_key": { - "entity": "subtenant_light_theme_color" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "light_theme_branding_colors" - }, - { - "description": "Retrieve the metadata of all light theme branding images.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "The ID of the account.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - } - ], - "method": "get", - "mode": "light_theme_branding_images", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" - ], - "_key": "object" - }, - { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "_key": "reference" - }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "_key": "static_uri" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Account not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-images/light", - "summary": "Get metadata of all light theme images.", - "return_type": "paginated_response(subtenant_light_theme_image)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_light_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAllAccountLightImageData", - "notes": "This lists the light theme banding images of the subtenant account.", - "foreign_key": { - "entity": "subtenant_light_theme_image" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "light_theme_branding_images" - }, - { - "description": "Returns an array of account objects, optionally filtered by status and tier level.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "name": "format", - "in": "query", - "description": "Format information for the query response. Supported: format=breakdown.", - "required": false, - "type": "string", - "entity_fieldname": "format", - "api_fieldname": "format", - "external_param": true, - "parameter_fieldname": "format", - "_key": "format" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 1000.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 1000, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "account_order_enum", - "_key": "order" - }, - { - "name": "properties", - "in": "query", - "description": "Property name returned from account-specific properties.", - "required": false, - "type": "string", - "entity_fieldname": "properties", - "api_fieldname": "properties", - "external_param": true, - "parameter_fieldname": "properties", - "_key": "properties" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" - ], - "properties": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "array", - "description": "Business model history for this account.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ] - }, - "_key": "business_model_history" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "_key": "city" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "_key": "company" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "_key": "contact" - }, - { - "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "_key": "contract_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "_key": "country" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" - }, - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "_key": "email" - }, - { - "type": "string", - "example": "IT", - "description": "Account end market.", - "_key": "end_market" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "x-nullable": true, - "format": "date-time", - "description": "Expiration time of the account, as UTC time RFC3339.", - "_key": "expiration" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "_key": "expiration_warning_threshold" - }, - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", - "_key": "id" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "_key": "idle_timeout" - }, - { - "type": "array", - "description": "List of account limitation objects.", - "items": { - "type": "object", - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Billing period of the account limitation.", - "_key": "billing_period" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "description": "Description of the account limitation.", - "readOnly": true, - "_key": "description" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "_key": "id" - }, - { - "type": "boolean", - "description": "Flag indicating whether this limitation is inherited.", - "readOnly": true, - "_key": "inherited" - }, - { - "type": "string", - "description": "Indicates where this limit is inherited from.", - "readOnly": true, - "_key": "inherited_from" - }, - { - "type": "string", - "description": "Indicates the type of the entity where the limitation is inherited from.", - "readOnly": true, - "_key": "inherited_type" - }, - { - "type": "integer", - "format": "int32", - "description": "The value of the limit.", - "_key": "limit" - }, - { - "type": "string", - "description": "Name of the account limitation.", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'limitation'", - "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" - ], - "_key": "object" - }, - { - "type": "integer", - "format": "int32", - "description": "Quota of the account limitation.", - "_key": "quota" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ], - "description": "This object represents an account limitation." - }, - "_key": "limitations" - }, - { - "type": "object", - "x-nullable": true, - "deprecated": true, - "x-deprecation": { - "issued_at": "2019-08-27T12:03:58+00:00", - "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." - }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -6058,57 +3319,10 @@ "description": "Postal address line 2.", "_key": "address_line2" }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" - }, { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -6167,7 +3381,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "_key": "company" }, { @@ -6221,7 +3435,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "_key": "display_name" }, { @@ -6285,7 +3499,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -6293,6 +3510,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -6305,12 +3523,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -6327,50 +3547,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -6378,6 +3620,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -6388,13 +3631,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -6668,6 +3910,29 @@ "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", "_key": "tier" }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" + }, { "type": "string", "format": "date-time", @@ -6690,33 +3955,1458 @@ { "type": "string", "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "_key": "upgraded_at" + } + ], + "description": "Represents an account in requests and responses." + }, + "api_fieldname": "sub_accounts", + "entity_fieldname": "sub_accounts", + "_key": "sub_accounts" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "template_id", + "entity_fieldname": "template_id", + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "api_fieldname": "tier", + "entity_fieldname": "tier", + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "api_fieldname": "tier_history", + "entity_fieldname": "tier_history", + "_key": "tier_history" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "api_fieldname": "upgraded_at", + "entity_fieldname": "upgraded_at", + "_key": "upgraded_at" + } + ], + "description": "Represents an account in requests and responses.", + "foreign_key": { + "group": "Accounts", + "entity": "account" + } + }, + "_key": "201" + }, + { + "description": "Error in input data, for example, invalid username.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Account with the specified alias exists already.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "409" + } + ], + "path": "/v3/accounts", + "summary": "Create a new account.", + "return_type": "account", + "return_info": { + "self": true, + "custom": false, + "type": "account" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "id", + "created_at", + "updated_at", + "parent_id", + "tier", + "status", + "upgraded_at", + "limits", + "policies", + "template_id", + "reason", + "idle_timeout", + "password_policy", + "reference_note", + "custom_fields", + "mfa_status", + "notification_emails", + "sales_contact", + "expiration_warning_threshold", + "parent_account", + "expiration", + "admin_id", + "admin_key", + "limitations", + "password_recovery_expiration", + "business_model_history", + "tier_history" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "createAccount", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "description": "Retrieve dark theme branding colors for an account.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + } + ], + "method": "get", + "mode": "dark_theme_branding_colors", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "description": "A list of entities.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "_key": "color" + }, + { + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "_key": "object" + }, + { + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Account not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/branding-colors/dark", + "summary": "Get dark theme branding colors.", + "return_type": "paginated_response(subtenant_dark_theme_color)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_dark_theme_color" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAccountDarkColors", + "notes": "This lists the dark theme banding colors of the subtenant account.", + "foreign_key": { + "entity": "subtenant_dark_theme_color" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "dark_theme_branding_colors" + }, + { + "description": "Retrieve the metadata of all dark theme branding images.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + } + ], + "method": "get", + "mode": "dark_theme_branding_images", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "description": "A list of entities.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Entity name: always 'branding_image'", + "readOnly": true, + "enum": [ + "branding_image" + ], + "_key": "object" + }, + { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], + "type": "string", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "_key": "reference" + }, + { + "type": "string", + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", + "readOnly": true, + "_key": "static_uri" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } + }, + "_key": "200" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Account not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/branding-images/dark", + "summary": "Get metadata of all dark theme images.", + "return_type": "paginated_response(subtenant_dark_theme_image)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_dark_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAllAccountDarkImageData", + "notes": "This lists the dark theme banding images of the subtenant account.", + "foreign_key": { + "entity": "subtenant_dark_theme_image" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "dark_theme_branding_images" + }, + { + "description": "Retrieve light theme branding colors for an account.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + } + ], + "method": "get", + "mode": "light_theme_branding_colors", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "description": "A list of entities.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "_key": "color" }, { "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "_key": "tier" + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "_key": "object" }, { + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "_key": "reference" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" + "description": "Last update time in UTC.", + "readOnly": true, + "_key": "updated_at" } ], - "description": "Represents an account in requests and responses." + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } }, "api_fieldname": "data", "entity_fieldname": "data", @@ -6734,7 +5424,7 @@ "type": "integer", "format": "int32", "example": 50, - "description": "The number of results to return (2-1000), or equal to `total_count`.", + "description": "The number of results to return, or equal to `total_count`.", "api_fieldname": "limit", "entity_fieldname": "limit", "_key": "limit" @@ -6772,8 +5462,8 @@ ], "pagination": true, "foreign_key": { - "group": "Accounts", - "entity": "account" + "group": "Branding", + "entity": "subtenant_light_theme_color" } }, "_key": "200" @@ -6923,35 +5613,90 @@ ] }, "_key": "403" + }, + { + "description": "Account not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" } ], - "path": "/v3/accounts", - "summary": "Get all accounts.", - "return_type": "paginated_response(account)", + "path": "/v3/accounts/{account_id}/branding-colors/light", + "summary": "Get light theme branding colors.", + "return_type": "paginated_response(subtenant_light_theme_color)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "account" - }, - "x_filter": { - "status": [ - "eq", - "in", - "nin" - ], - "tier": [ - "eq" - ], - "parent": [ - "eq" - ], - "end_market": [ - "eq" - ], - "country": [ - "like" - ] + "type": "subtenant_light_theme_color" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", @@ -6959,774 +5704,586 @@ "type", "filter", "sub_accounts", + "limit", + "after", + "order", "total_count", "has_more", - "data", - "status__eq", - "status__in", - "status__nin", - "tier__eq", - "parent__eq", - "end_market__eq", - "country__like" + "data" ], - "foreign_key_priority": "self", "group_id": "Accounts", "parameter_map": { "account_id": "id" }, - "operation_id": "getAllAccounts", - "pagination": true, + "operation_id": "getAccountLightColors", + "notes": "This lists the light theme banding colors of the subtenant account.", "foreign_key": { - "group": "Accounts", - "entity": "account" + "entity": "subtenant_light_theme_color" }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "light_theme_branding_colors" }, { - "description": "Retrieve detailed information about the account.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the metadata of all light theme branding images.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "name": "properties", - "in": "query", - "description": "Property name to return from account-specific properties.", - "required": false, + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, "type": "string", - "entity_fieldname": "properties", - "api_fieldname": "properties", - "external_param": true, - "parameter_fieldname": "properties", - "_key": "properties" + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" } ], "method": "get", - "mode": "me", + "mode": "light_theme_branding_images", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", "required": [ - "end_market", - "etag", - "id", + "data", + "has_more", + "limit", "object", - "status", - "tier" + "total_count" ], - "properties": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "api_fieldname": "address_line1", - "entity_fieldname": "address_line1", - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "entity_fieldname": "address_line2", - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_full_name", - "entity_fieldname": "admin_full_name", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "entity_fieldname": "admin_id", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "api_fieldname": "admin_key", - "entity_fieldname": "admin_key", - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_password", - "entity_fieldname": "admin_password", - "_key": "admin_password" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "api_fieldname": "aliases", - "entity_fieldname": "aliases", - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "api_fieldname": "business_model", - "entity_fieldname": "business_model", - "_key": "business_model" - }, - { - "type": "array", - "description": "Business model history for this account.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ] - }, - "api_fieldname": "business_model_history", - "entity_fieldname": "business_model_history", - "_key": "business_model_history" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "api_fieldname": "city", - "entity_fieldname": "city", - "_key": "city" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "api_fieldname": "company", - "entity_fieldname": "company", - "_key": "company" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "api_fieldname": "contact", - "entity_fieldname": "contact", - "_key": "contact" - }, - { - "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "api_fieldname": "contract_number", - "entity_fieldname": "contract_number", - "_key": "contract_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "api_fieldname": "country", - "entity_fieldname": "country", - "_key": "country" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "custom_fields", - "entity_fieldname": "custom_fields", - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "api_fieldname": "customer_number", - "entity_fieldname": "customer_number", - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "api_fieldname": "display_name", - "entity_fieldname": "display_name", - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "api_fieldname": "email", - "entity_fieldname": "email", - "_key": "email" - }, - { - "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "entity_fieldname": "end_market", - "_key": "end_market" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "x-nullable": true, - "format": "date-time", - "description": "Expiration time of the account, as UTC time RFC3339.", - "api_fieldname": "expiration", - "entity_fieldname": "expiration", - "_key": "expiration" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "api_fieldname": "expiration_warning_threshold", - "entity_fieldname": "expiration_warning_threshold", - "_key": "expiration_warning_threshold" - }, + "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "api_fieldname": "idle_timeout", - "entity_fieldname": "idle_timeout", - "_key": "idle_timeout" + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "List of account limitation objects.", + "description": "A list of entities.", "items": { "type": "object", "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Billing period of the account limitation.", - "_key": "billing_period" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "description": "Description of the account limitation.", - "readOnly": true, - "_key": "description" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, { "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "_key": "id" - }, - { - "type": "boolean", - "description": "Flag indicating whether this limitation is inherited.", + "description": "Entity name: always 'branding_image'", "readOnly": true, - "_key": "inherited" + "enum": [ + "branding_image" + ], + "_key": "object" }, { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], "type": "string", - "description": "Indicates where this limit is inherited from.", - "readOnly": true, - "_key": "inherited_from" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "_key": "reference" }, { "type": "string", - "description": "Indicates the type of the entity where the limitation is inherited from.", + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", "readOnly": true, - "_key": "inherited_type" - }, - { - "type": "integer", - "format": "int32", - "description": "The value of the limit.", - "_key": "limit" - }, - { - "type": "string", - "description": "Name of the account limitation.", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'limitation'", - "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" - ], - "_key": "object" - }, - { - "type": "integer", - "format": "int32", - "description": "Quota of the account limitation.", - "_key": "quota" + "_key": "static_uri" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", + "description": "Last update time in UTC.", + "readOnly": true, "_key": "updated_at" } ], - "description": "This object represents an account limitation." - }, - "api_fieldname": "limitations", - "entity_fieldname": "limitations", - "_key": "limitations" - }, - { - "type": "object", - "x-nullable": true, - "deprecated": true, - "x-deprecation": { - "issued_at": "2019-08-27T12:03:58+00:00", - "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." - }, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } }, - "api_fieldname": "limits", - "entity_fieldname": "limits", - "_key": "limits" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "api_fieldname": "mfa_status", - "entity_fieldname": "mfa_status", - "_key": "mfa_status" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", - "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" - }, - "api_fieldname": "notification_emails", - "entity_fieldname": "notification_emails", - "_key": "notification_emails" + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: always `account`.", + "description": "Entity name: always `list`.", "enum": [ - "account" + "list" ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "type": "object", - "properties": [ - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "info@arm.com", - "description": "The email address of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "example": "J. Doe", - "description": "The name of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - } + "type": "string", + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" ], - "description": "Represents parent account contact details in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "parent_account" + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } + }, + "_key": "200" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] }, - "x-nullable": true, - "api_fieldname": "parent_account", - "entity_fieldname": "parent_account", - "_key": "parent_account" + "_key": "fields" }, { "type": "string", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "parent_id", - "entity_fieldname": "parent_id", - "_key": "parent_id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "type": "object", - "required": [ - "minimum_length" - ], - "properties": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" - } + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "api_fieldname": "password_policy", - "entity_fieldname": "password_policy", - "_key": "password_policy" + "_key": "object" }, { - "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "api_fieldname": "password_recovery_expiration", - "entity_fieldname": "password_recovery_expiration", - "_key": "password_recovery_expiration" + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "_key": "phone_number" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "entity_fieldname": "action", - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "entity_fieldname": "allow", - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "entity_fieldname": "feature", - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, - "enum": [ - "account", - "template", - "tier_template" - ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Account not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" - } + ] }, - "api_fieldname": "policies", - "entity_fieldname": "policies", - "_key": "policies" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "api_fieldname": "postal_code", - "entity_fieldname": "postal_code", - "_key": "postal_code" + "_key": "fields" }, { "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "api_fieldname": "reason", - "entity_fieldname": "reason", - "_key": "reason" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "api_fieldname": "reference_note", - "entity_fieldname": "reference_note", - "_key": "reference_note" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "api_fieldname": "sales_contact", - "entity_fieldname": "sales_contact", - "_key": "sales_contact" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "api_fieldname": "state", - "entity_fieldname": "state", - "_key": "state" - }, + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/branding-images/light", + "summary": "Get metadata of all light theme images.", + "return_type": "paginated_response(subtenant_light_theme_image)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_light_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAllAccountLightImageData", + "notes": "This lists the light theme banding images of the subtenant account.", + "foreign_key": { + "entity": "subtenant_light_theme_image" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "light_theme_branding_images" + }, + { + "description": "Retrieve an array of tenant accounts, optionally filtered by status and tier level.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "name": "format", + "in": "query", + "description": "Format information for the query response. Supported: format=breakdown.", + "required": false, + "type": "string", + "entity_fieldname": "format", + "api_fieldname": "format", + "external_param": true, + "parameter_fieldname": "format", + "_key": "format" + }, + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history.", + "required": false, + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 1000.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 1000, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "account_order_enum", + "_key": "order" + }, + { + "name": "properties", + "in": "query", + "description": "Property name returned from account-specific properties.", + "required": false, + "type": "string", + "entity_fieldname": "properties", + "api_fieldname": "properties", + "external_param": true, + "parameter_fieldname": "properties", + "_key": "properties" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ { "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", + "description": "A list of entities.", "items": { "type": "object", "required": [ @@ -7754,57 +6311,10 @@ "description": "Postal address line 2.", "_key": "address_line2" }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" - }, { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -7863,7 +6373,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "_key": "company" }, { @@ -7917,7 +6427,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "_key": "display_name" }, { @@ -7981,7 +6491,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -7989,6 +6502,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -8001,12 +6515,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -8023,50 +6539,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -8074,6 +6612,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -8084,13 +6623,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -8246,584 +6784,803 @@ { "type": "boolean", "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" - }, - { - "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, - "enum": [ - "account", - "template", - "tier_template" - ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" - }, - { - "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" - } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" - } - }, - "_key": "policies" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" - }, - { - "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" - }, - { - "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "_key": "status" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" - } - ], - "description": "Represents an account in requests and responses." - }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "template_id", - "entity_fieldname": "template_id", - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "api_fieldname": "tier", - "entity_fieldname": "tier", - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "api_fieldname": "upgraded_at", - "entity_fieldname": "upgraded_at", - "_key": "upgraded_at" - } - ], - "description": "Represents an account in requests and responses." - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "_key": "policies" + }, { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "_key": "postal_code" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "_key": "reason" + }, { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "_key": "reference_note" }, { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - } - ], - "path": "/v3/accounts/me", - "summary": "Get account info.", - "return_type": "account", - "return_info": { - "self": true, - "custom": false, - "type": "account" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "id", - "created_at", - "updated_at", - "parent_id", - "display_name", - "company", - "country", - "address_line1", - "address_line2", - "city", - "state", - "postal_code", - "contact", - "email", - "phone_number", - "aliases", - "tier", - "status", - "upgraded_at", - "limits", - "policies", - "template_id", - "reason", - "end_market", - "idle_timeout", - "password_policy", - "reference_note", - "custom_fields", - "mfa_status", - "notification_emails", - "sales_contact", - "expiration_warning_threshold", - "contract_number", - "customer_number", - "parent_account", - "expiration", - "admin_id", - "admin_name", - "admin_email", - "admin_key", - "admin_password", - "admin_full_name", - "limitations", - "password_recovery_expiration", - "business_model", - "business_model_history" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getMyAccountInfo", - "notes": "This is provided by the SDK to avoid listing to retrieve the user's own Account.", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "me" - }, - { - "description": "Retrieve detailed information about an account.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "name": "properties", - "in": "query", - "description": "Property name to return from account-specific properties.", - "required": false, - "type": "string", - "entity_fieldname": "properties", - "api_fieldname": "properties", - "external_param": true, - "parameter_fieldname": "properties", - "_key": "properties" - } - ], - "method": "get", - "mode": "read", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" - ], - "properties": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "api_fieldname": "address_line1", - "entity_fieldname": "address_line1", - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "entity_fieldname": "address_line2", - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_full_name", - "entity_fieldname": "admin_full_name", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "entity_fieldname": "admin_id", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "api_fieldname": "admin_key", - "entity_fieldname": "admin_key", - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_password", - "entity_fieldname": "admin_password", - "_key": "admin_password" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "api_fieldname": "aliases", - "entity_fieldname": "aliases", - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "api_fieldname": "business_model", - "entity_fieldname": "business_model", - "_key": "business_model" - }, - { - "type": "array", - "description": "Business model history for this account.", - "items": { - "type": "object", - "properties": [ + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "_key": "sales_contact" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "_key": "state" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the account.", + "enum": [ + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" + ], + "_key": "status" + }, + { + "type": "array", + "x-nullable": true, + "description": "List of sub accounts. Not available for developer users.", + "items": { + "type": "object", + "required": [ + "end_market", + "etag", + "id", + "object", + "status", + "tier" + ], + "properties": [ + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "_key": "address_line2" + }, + { + "type": "array", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "array", + "description": "Business model history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + } + ] + }, + "_key": "business_model_history" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Cambridge", + "description": "The city part of the postal address.", + "_key": "city" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "_key": "company" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "_key": "contact" + }, + { + "type": "string", + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "_key": "contract_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "_key": "country" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "object", + "x-nullable": true, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" + }, + "_key": "custom_fields" + }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "_key": "end_market" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "_key": "expiration" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "_key": "expiration_warning_threshold" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "_key": "idle_timeout" + }, + { + "type": "array", + "description": "List of account limitation objects.", + "items": { + "type": "object", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "readOnly": true, + "_key": "created_at" + }, + { + "type": "string", + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "readOnly": true, + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" + }, + { + "type": "string", + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" + }, + { + "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" + }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, + { + "type": "integer", + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" + }, + { + "type": "string", + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'limitation'", + "enum": [ + "limitation" + ], + "readOnly": true, + "_key": "object" + }, + { + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "readOnly": true, + "_key": "updated_at" + } + ], + "description": "This object represents an account limitation." + }, + "_key": "limitations" + }, + { + "type": "object", + "x-nullable": true, + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "_key": "limits" + }, + { + "type": "string", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "_key": "mfa_status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", + "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" + }, + "_key": "notification_emails" + }, + { + "type": "string", + "description": "Entity name: always `account`.", + "enum": [ + "account" + ], + "_key": "object" + }, + { + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + } + ], + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" + }, + "x-nullable": true, + "_key": "parent_account" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "_key": "parent_id" + }, + { + "type": "object", + "required": [ + "minimum_length" + ], + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "_key": "password_policy" + }, + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "_key": "password_recovery_expiration" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "_key": "phone_number" + }, + { + "type": "array", + "x-nullable": true, + "description": "List of policies if requested.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" + }, + { + "type": "string", + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "_key": "policies" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "_key": "postal_code" + }, + { + "type": "string", + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "_key": "reason" + }, + { + "type": "string", + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "_key": "reference_note" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "_key": "sales_contact" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "_key": "state" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the account.", + "enum": [ + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" + ], + "_key": "status" + }, + { + "type": "array", + "x-nullable": true, + "description": "List of sub accounts. Not available for developer users.", + "items": [], + "_key": "sub_accounts" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "_key": "upgraded_at" + } + ], + "description": "Represents an account in requests and responses." + }, + "_key": "sub_accounts" + }, { "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" }, { "type": "string", @@ -8831,1804 +7588,1635 @@ "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", "_key": "updated_at" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "_key": "upgraded_at" } - ] + ], + "description": "Represents an account in requests and responses." }, - "api_fieldname": "business_model_history", - "entity_fieldname": "business_model_history", - "_key": "business_model_history" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "api_fieldname": "city", - "entity_fieldname": "city", - "_key": "city" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "api_fieldname": "company", - "entity_fieldname": "company", - "_key": "company" + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000), or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "api_fieldname": "contact", - "entity_fieldname": "contact", - "_key": "contact" + "description": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "api_fieldname": "contract_number", - "entity_fieldname": "contract_number", - "_key": "contract_number" + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "api_fieldname": "country", - "entity_fieldname": "country", - "_key": "country" - }, + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "account" + } + }, + "_key": "200" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] }, - "api_fieldname": "custom_fields", - "entity_fieldname": "custom_fields", - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "api_fieldname": "customer_number", - "entity_fieldname": "customer_number", - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "api_fieldname": "display_name", - "entity_fieldname": "display_name", - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "api_fieldname": "email", - "entity_fieldname": "email", - "_key": "email" + "_key": "fields" }, { "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "entity_fieldname": "end_market", - "_key": "end_market" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "x-nullable": true, - "format": "date-time", - "description": "Expiration time of the account, as UTC time RFC3339.", - "api_fieldname": "expiration", - "entity_fieldname": "expiration", - "_key": "expiration" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "api_fieldname": "expiration_warning_threshold", - "entity_fieldname": "expiration_warning_threshold", - "_key": "expiration_warning_threshold" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "api_fieldname": "idle_timeout", - "entity_fieldname": "idle_timeout", - "_key": "idle_timeout" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "description": "List of account limitation objects.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Billing period of the account limitation.", - "_key": "billing_period" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "description": "Description of the account limitation.", - "readOnly": true, - "_key": "description" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "_key": "id" - }, - { - "type": "boolean", - "description": "Flag indicating whether this limitation is inherited.", - "readOnly": true, - "_key": "inherited" - }, { "type": "string", - "description": "Indicates where this limit is inherited from.", - "readOnly": true, - "_key": "inherited_from" - }, - { - "type": "string", - "description": "Indicates the type of the entity where the limitation is inherited from.", - "readOnly": true, - "_key": "inherited_type" - }, - { - "type": "integer", - "format": "int32", - "description": "The value of the limit.", - "_key": "limit" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Name of the account limitation.", + "description": "Name of the field which caused the error.", "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'limitation'", - "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" - ], - "_key": "object" - }, - { - "type": "integer", - "format": "int32", - "description": "Quota of the account limitation.", - "_key": "quota" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" } - ], - "description": "This object represents an account limitation." + ] }, - "api_fieldname": "limitations", - "entity_fieldname": "limitations", - "_key": "limitations" + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "type": "object", + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + } + ], + "path": "/v3/accounts", + "summary": "Get all accounts.", + "return_type": "paginated_response(account)", + "return_info": { + "self": true, + "custom": false, + "type": "account" + }, + "x_filter": { + "status": [ + "eq", + "in", + "nin" + ], + "tier": [ + "eq" + ], + "parent": [ + "eq" + ], + "end_market": [ + "eq" + ], + "country": [ + "like" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "total_count", + "has_more", + "data", + "status__eq", + "status__in", + "status__nin", + "tier__eq", + "parent__eq", + "end_market__eq", + "country__like" + ], + "foreign_key_priority": "self", + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAllAccounts", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "account" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Retrieve information about the account.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts.", + "required": false, + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "name": "properties", + "in": "query", + "description": "Property name to return from account-specific properties.", + "required": false, + "type": "string", + "entity_fieldname": "properties", + "api_fieldname": "properties", + "external_param": true, + "parameter_fieldname": "properties", + "_key": "properties" + } + ], + "method": "get", + "mode": "me", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "end_market", + "etag", + "id", + "object", + "status", + "tier" + ], + "properties": [ + { + "type": "string", + "maxLength": 100, "x-nullable": true, - "deprecated": true, - "x-deprecation": { - "issued_at": "2019-08-27T12:03:58+00:00", - "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." - }, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "limits", - "entity_fieldname": "limits", - "_key": "limits" + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "api_fieldname": "address_line1", + "entity_fieldname": "address_line1", + "_key": "address_line1" }, { "type": "string", + "maxLength": 100, "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "api_fieldname": "mfa_status", - "entity_fieldname": "mfa_status", - "_key": "mfa_status" + "example": " ", + "description": "Postal address line 2.", + "api_fieldname": "address_line2", + "entity_fieldname": "address_line2", + "_key": "address_line2" }, { "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" + "type": "string", + "pattern": "[\\w\\-._]{8,100}" }, - "api_fieldname": "notification_emails", - "entity_fieldname": "notification_emails", - "_key": "notification_emails" + "api_fieldname": "aliases", + "entity_fieldname": "aliases", + "_key": "aliases" }, { "type": "string", - "description": "Entity name: always `account`.", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", "enum": [ - "account" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "object", - "properties": [ - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "info@arm.com", - "description": "The email address of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "example": "J. Doe", - "description": "The name of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - } - ], - "description": "Represents parent account contact details in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "parent_account" - }, - "x-nullable": true, - "api_fieldname": "parent_account", - "entity_fieldname": "parent_account", - "_key": "parent_account" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "parent_id", - "entity_fieldname": "parent_id", - "_key": "parent_id" - }, - { - "type": "object", - "required": [ - "minimum_length" - ], - "properties": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" - } + "active_device_business_model", + "api_calls_1_business_model" ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "api_fieldname": "password_policy", - "entity_fieldname": "password_policy", - "_key": "password_policy" - }, - { - "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "api_fieldname": "password_recovery_expiration", - "entity_fieldname": "password_recovery_expiration", - "_key": "password_recovery_expiration" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "_key": "phone_number" + "api_fieldname": "business_model", + "entity_fieldname": "business_model", + "_key": "business_model" }, { "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", + "description": "Business model history for this account.", "items": { "type": "object", "properties": [ { "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "entity_fieldname": "action", - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "entity_fieldname": "allow", - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "entity_fieldname": "feature", - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" - }, - { - "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", "enum": [ - "account", - "template", - "tier_template" + "active_device_business_model", + "api_calls_1_business_model" ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" + "_key": "business_model" }, { "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" - } + ] }, - "api_fieldname": "policies", - "entity_fieldname": "policies", - "_key": "policies" + "api_fieldname": "business_model_history", + "entity_fieldname": "business_model_history", + "_key": "business_model_history" }, { "type": "string", "maxLength": 100, "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "api_fieldname": "postal_code", - "entity_fieldname": "postal_code", - "_key": "postal_code" + "example": "Cambridge", + "description": "The city part of the postal address.", + "api_fieldname": "city", + "entity_fieldname": "city", + "_key": "city" }, { "type": "string", + "maxLength": 100, "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "api_fieldname": "reason", - "entity_fieldname": "reason", - "_key": "reason" + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "api_fieldname": "company", + "entity_fieldname": "company", + "_key": "company" }, { "type": "string", + "maxLength": 100, "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "api_fieldname": "reference_note", - "entity_fieldname": "reference_note", - "_key": "reference_note" + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "api_fieldname": "contact", + "entity_fieldname": "contact", + "_key": "contact" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", + "example": "1NX25_0001", "x-nullable": true, - "description": "Email address of the sales contact.", - "api_fieldname": "sales_contact", - "entity_fieldname": "sales_contact", - "_key": "sales_contact" + "description": "Contract number of the customer.", + "api_fieldname": "contract_number", + "entity_fieldname": "contract_number", + "_key": "contract_number" }, { "type": "string", "maxLength": 100, "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "api_fieldname": "state", - "entity_fieldname": "state", - "_key": "state" + "example": "United Kingdom", + "description": "The country part of the postal address.", + "api_fieldname": "country", + "entity_fieldname": "country", + "_key": "country" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "type": "array", + "type": "object", "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": { - "type": "object", - "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" - ], - "properties": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "array", - "description": "Business model history for this account.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ] - }, - "_key": "business_model_history" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "_key": "city" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "_key": "company" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "_key": "contact" - }, - { - "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "_key": "contract_number" - }, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "entity_fieldname": "custom_fields", + "_key": "custom_fields" + }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "api_fieldname": "customer_number", + "entity_fieldname": "customer_number", + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "api_fieldname": "display_name", + "entity_fieldname": "display_name", + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "api_fieldname": "email", + "entity_fieldname": "email", + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "api_fieldname": "end_market", + "entity_fieldname": "end_market", + "_key": "end_market" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "api_fieldname": "expiration", + "entity_fieldname": "expiration", + "_key": "expiration" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "api_fieldname": "expiration_warning_threshold", + "entity_fieldname": "expiration_warning_threshold", + "_key": "expiration_warning_threshold" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "api_fieldname": "idle_timeout", + "entity_fieldname": "idle_timeout", + "_key": "idle_timeout" + }, + { + "type": "array", + "description": "List of account limitation objects.", + "items": { + "type": "object", + "properties": [ { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "_key": "country" + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" }, { "type": "string", "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, - { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" - }, - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "_key": "email" - }, { "type": "string", - "example": "IT", - "description": "Account end market.", - "_key": "end_market" + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" }, { "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", - "x-nullable": true, - "format": "date-time", - "description": "Expiration time of the account, as UTC time RFC3339.", - "_key": "expiration" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "_key": "expiration_warning_threshold" - }, - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { - "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "_key": "idle_timeout" - }, - { - "type": "array", - "description": "List of account limitation objects.", - "items": { - "type": "object", - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Billing period of the account limitation.", - "_key": "billing_period" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "description": "Description of the account limitation.", - "readOnly": true, - "_key": "description" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "_key": "id" - }, - { - "type": "boolean", - "description": "Flag indicating whether this limitation is inherited.", - "readOnly": true, - "_key": "inherited" - }, - { - "type": "string", - "description": "Indicates where this limit is inherited from.", - "readOnly": true, - "_key": "inherited_from" - }, - { - "type": "string", - "description": "Indicates the type of the entity where the limitation is inherited from.", - "readOnly": true, - "_key": "inherited_type" - }, - { - "type": "integer", - "format": "int32", - "description": "The value of the limit.", - "_key": "limit" - }, - { - "type": "string", - "description": "Name of the account limitation.", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'limitation'", - "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" - ], - "_key": "object" - }, - { - "type": "integer", - "format": "int32", - "description": "Quota of the account limitation.", - "_key": "quota" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ], - "description": "This object represents an account limitation." - }, - "_key": "limitations" - }, - { - "type": "object", - "x-nullable": true, - "deprecated": true, - "x-deprecation": { - "issued_at": "2019-08-27T12:03:58+00:00", - "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." - }, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "_key": "limits" + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" }, { "type": "string", - "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "_key": "mfa_status" - }, - { - "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", - "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" - }, - "_key": "notification_emails" + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" }, { "type": "string", - "description": "Entity name: always `account`.", "enum": [ - "account" + "account", + "template", + "tier_template" ], - "_key": "object" + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" }, { "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", "properties": [ { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "info@arm.com", - "description": "The email address of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" }, { - "type": "string", - "maxLength": 100, - "example": "J. Doe", - "description": "The name of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" }, - { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - } - ], - "description": "Represents parent account contact details in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "parent_account" - }, - "x-nullable": true, - "_key": "parent_account" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "_key": "parent_id" - }, - { - "type": "object", - "required": [ - "minimum_length" - ], - "properties": [ { "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" } ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "_key": "password_policy" + "_key": "inherited_value" }, { "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "_key": "password_recovery_expiration" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "_key": "phone_number" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "entity_fieldname": "action", - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "entity_fieldname": "allow", - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "entity_fieldname": "feature", - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" - }, - { - "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, - "enum": [ - "account", - "template", - "tier_template" - ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" - }, - { - "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" - } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" - } - }, - "_key": "policies" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" - }, - { - "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" - }, - { - "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", + "_key": "name" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", + "description": "Entity name: always 'limitation'", "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" + "limitation" ], - "_key": "status" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" + "readOnly": true, + "_key": "object" }, { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "_key": "tier" + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" } ], - "description": "Represents an account in requests and responses." + "description": "This object represents an account limitation." }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_key": "limitations" }, { - "type": "string", + "type": "object", "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "template_id", - "entity_fieldname": "template_id", - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "api_fieldname": "tier", - "entity_fieldname": "tier", - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "limits", + "entity_fieldname": "limits", + "_key": "limits" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "api_fieldname": "upgraded_at", - "entity_fieldname": "upgraded_at", - "_key": "upgraded_at" - } - ], - "description": "Represents an account in requests and responses." - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "api_fieldname": "mfa_status", + "entity_fieldname": "mfa_status", + "_key": "mfa_status" }, { "type": "array", - "description": "Request fields which failed validation.", + "x-nullable": true, + "description": "A list of notification email addresses.", "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "api_fieldname": "notification_emails", + "entity_fieldname": "notification_emails", + "_key": "notification_emails" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `account`.", "enum": [ - "error" + "account" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + } + ], + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" }, - "_key": "fields" + "x-nullable": true, + "api_fieldname": "parent_account", + "entity_fieldname": "parent_account", + "_key": "parent_account" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "parent_id", + "entity_fieldname": "parent_id", + "_key": "parent_id" }, { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" + "type": "object", + "required": [ + "minimum_length" ], - "_key": "object" + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "api_fieldname": "password_policy", + "entity_fieldname": "password_policy", + "_key": "password_policy" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "api_fieldname": "password_recovery_expiration", + "entity_fieldname": "password_recovery_expiration", + "_key": "password_recovery_expiration" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Account with the given ID not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "_key": "phone_number" }, { "type": "array", - "description": "Request fields which failed validation.", + "x-nullable": true, + "description": "List of policies if requested.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}", - "summary": "Get account info.", - "return_type": "account", - "return_info": { - "self": true, - "custom": false, - "type": "account" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "created_at", - "updated_at", - "parent_id", - "display_name", - "company", - "country", - "address_line1", - "address_line2", - "city", - "state", - "postal_code", - "contact", - "email", - "phone_number", - "aliases", - "tier", - "status", - "upgraded_at", - "limits", - "policies", - "template_id", - "reason", - "end_market", - "idle_timeout", - "password_policy", - "reference_note", - "custom_fields", - "mfa_status", - "notification_emails", - "sales_contact", - "expiration_warning_threshold", - "contract_number", - "customer_number", - "parent_account", - "expiration", - "admin_id", - "admin_name", - "admin_email", - "admin_key", - "admin_password", - "admin_full_name", - "limitations", - "password_recovery_expiration", - "business_model", - "business_model_history" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAccountInfo", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - }, - { - "description": "Retrieve trusted certificates in an array.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "account_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "trusted_certificates", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" + }, + { + "type": "string", + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "api_fieldname": "policies", + "entity_fieldname": "policies", + "_key": "policies" + }, { "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "api_fieldname": "postal_code", + "entity_fieldname": "postal_code", + "_key": "postal_code" + }, + { + "type": "string", + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "api_fieldname": "reason", + "entity_fieldname": "reason", + "_key": "reason" + }, + { + "type": "string", + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "api_fieldname": "reference_note", + "entity_fieldname": "reference_note", + "_key": "reference_note" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "api_fieldname": "sales_contact", + "entity_fieldname": "sales_contact", + "_key": "sales_contact" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "api_fieldname": "state", + "entity_fieldname": "state", + "_key": "state" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the account.", + "enum": [ + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "type": "array", - "description": "A list of entities.", + "x-nullable": true, + "description": "List of sub accounts. Not available for developer users.", "items": { "type": "object", "required": [ - "account_id", - "certificate", - "certificate_fingerprint", + "end_market", "etag", "id", - "issuer", - "name", "object", - "service", - "subject", - "validity" + "status", + "tier" ], "properties": [ + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "_key": "address_line2" + }, + { + "type": "array", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "array", + "description": "Business model history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + } + ] + }, + "_key": "business_model_history" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Cambridge", + "description": "The city part of the postal address.", + "_key": "city" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "_key": "company" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "_key": "contact" + }, + { + "type": "string", + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "_key": "contract_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "_key": "country" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "object", + "x-nullable": true, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" + }, + "_key": "custom_fields" + }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "_key": "end_market" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "_key": "expiration" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "_key": "expiration_warning_threshold" + }, { "type": "string", "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", + "description": "Account ID.", "pattern": "[a-f0-9]{32}", - "_key": "account_id" + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "_key": "idle_timeout" + }, + { + "type": "array", + "description": "List of account limitation objects.", + "items": { + "type": "object", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "readOnly": true, + "_key": "created_at" + }, + { + "type": "string", + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "readOnly": true, + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" + }, + { + "type": "string", + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" + }, + { + "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" + }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, + { + "type": "integer", + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" + }, + { + "type": "string", + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'limitation'", + "enum": [ + "limitation" + ], + "readOnly": true, + "_key": "object" + }, + { + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "readOnly": true, + "_key": "updated_at" + } + ], + "description": "This object represents an account limitation." + }, + "_key": "limitations" + }, + { + "type": "object", + "x-nullable": true, + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "_key": "limits" + }, + { + "type": "string", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "_key": "mfa_status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", + "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" + }, + "_key": "notification_emails" + }, + { + "type": "string", + "description": "Entity name: always `account`.", + "enum": [ + "account" + ], + "_key": "object" + }, + { + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + } + ], + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" + }, + "x-nullable": true, + "_key": "parent_account" }, { "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "_key": "certificate" + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "_key": "parent_id" }, { - "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "_key": "certificate_fingerprint" + "type": "object", + "required": [ + "minimum_length" + ], + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "_key": "password_policy" }, { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "_key": "password_recovery_expiration" }, { "type": "string", - "maxLength": 500, + "maxLength": 100, "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", - "_key": "description" + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "_key": "phone_number" }, { - "type": "integer", - "format": "int32", - "example": 1, - "description": "Device execution mode where 1 means a developer certificate.", - "_key": "device_execution_mode" + "type": "array", + "x-nullable": true, + "description": "List of policies if requested.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" + }, + { + "type": "string", + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "_key": "policies" }, { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "_key": "enrollment_mode" + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "_key": "postal_code" }, { "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "_key": "reason" }, { "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "_key": "id" + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "_key": "reference_note" }, { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "_key": "issuer" + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "_key": "sales_contact" }, { "type": "string", "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "_key": "name" + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "_key": "state" }, { "type": "string", - "description": "Entity name: always 'trusted-cert'", + "example": "ACTIVE", + "description": "The status of the account.", "enum": [ - "trusted-cert" + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" ], - "_key": "object" + "_key": "status" }, { + "type": "array", "x-nullable": true, - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the owner.", - "pattern": "[a-f0-9]{32}", - "_key": "owner_id" + "description": "List of sub accounts. Not available for developer users.", + "items": [], + "_key": "sub_accounts" }, { "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "_key": "service" + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "_key": "template_id" }, { "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "_key": "status" + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" }, { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "_key": "subject" + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" }, { "type": "string", @@ -10637,175 +9225,88 @@ "description": "Last update UTC time RFC3339.", "_key": "updated_at" }, - { - "type": "boolean", - "example": true, - "description": "This read-only flag indicates whether the certificate is valid or not.", - "readOnly": true, - "_key": "valid" - }, { "type": "string", "format": "date-time", - "example": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "_key": "validity" + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "_key": "upgraded_at" } ], - "description": "Represents a trusted certificate in responses.", - "foreign_key": { - "group": "Security", - "entity": "trusted_certificate" - } + "description": "Represents an account in requests and responses." }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "api_fieldname": "sub_accounts", + "entity_fieldname": "sub_accounts", + "_key": "sub_accounts" }, { "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "template_id", + "entity_fieldname": "template_id", + "_key": "template_id" }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "trusted_certificate_order_enum", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "trusted_certificate" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "api_fieldname": "tier", + "entity_fieldname": "tier", + "_key": "tier" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "Tier history for this account.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" } ] }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "api_fieldname": "tier_history", + "entity_fieldname": "tier_history", + "_key": "tier_history" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "api_fieldname": "upgraded_at", + "entity_fieldname": "upgraded_at", + "_key": "upgraded_at" } - ] + ], + "description": "Represents an account in requests and responses." }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -10875,10 +9376,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "An account with the given ID does not exist.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -10948,50 +9449,18 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/accounts/{account_id}/trusted-certificates", - "summary": "Get all trusted certificates.", - "return_type": "paginated_response(subtenant_trusted_certificate)", + "path": "/v3/accounts/me", + "summary": "Get account information.", + "return_type": "account", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "subtenant_trusted_certificate" - }, - "x_filter": { - "name": [ - "eq" - ], - "service": [ - "eq" - ], - "expire": [ - "eq" - ], - "device_execution_mode": [ - "eq", - "neq" - ], - "owner": [ - "eq" - ], - "enrollment_mode": [ - "eq" - ], - "status": [ - "eq" - ], - "issuer": [ - "like" - ], - "subject": [ - "like" - ], - "valid": [ - "eq" - ] + "type": "account" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", @@ -10999,238 +9468,63 @@ "type", "filter", "sub_accounts", - "total_count", - "has_more", - "data", - "name__eq", - "service__eq", - "expire__eq", - "device_execution_mode__eq", - "device_execution_mode__neq", - "owner__eq", - "enrollment_mode__eq", - "status__eq", - "issuer__like", - "subject__like", - "valid__eq" + "id", + "created_at", + "updated_at", + "parent_id", + "display_name", + "company", + "country", + "address_line1", + "address_line2", + "city", + "state", + "postal_code", + "contact", + "email", + "phone_number", + "aliases", + "tier", + "status", + "upgraded_at", + "limits", + "policies", + "template_id", + "reason", + "end_market", + "idle_timeout", + "password_policy", + "reference_note", + "custom_fields", + "mfa_status", + "notification_emails", + "sales_contact", + "expiration_warning_threshold", + "contract_number", + "customer_number", + "parent_account", + "expiration", + "limitations", + "password_recovery_expiration", + "business_model", + "business_model_history", + "tier_history" ], "group_id": "Accounts", "parameter_map": { "account_id": "id" }, - "operation_id": "getAllAccountCertificates", - "notes": "This lists the trusted certificates of the subtenant account.", - "foreign_key": { - "entity": "subtenant_trusted_certificate" - }, - "pagination": true, + "operation_id": "getMyAccountInfo", + "notes": "This is provided by the SDK to avoid listing to retrieve the user's own Account.", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "trusted_certificates" + "_key": "me" }, { - "description": "Update an account.\n\n**Example:**\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"phone_number\": \"12345678\"}'\n```", + "description": "Retrieve detailed information about an account.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "api_fieldname": "address_line1", - "entity_fieldname": "address_line1", - "parameter_fieldname": "address_line1", - "in": "body", - "required": false, - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "entity_fieldname": "address_line2", - "parameter_fieldname": "address_line2", - "in": "body", - "required": false, - "_key": "address_line2" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "api_fieldname": "aliases", - "entity_fieldname": "aliases", - "parameter_fieldname": "aliases", - "in": "body", - "required": false, - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "api_fieldname": "business_model", - "entity_fieldname": "business_model", - "parameter_fieldname": "business_model", - "in": "body", - "required": false, - "enum_reference": "account_business_model_enum", - "_key": "business_model" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "api_fieldname": "city", - "entity_fieldname": "city", - "parameter_fieldname": "city", - "in": "body", - "required": false, - "_key": "city" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "api_fieldname": "company", - "entity_fieldname": "company", - "parameter_fieldname": "company", - "in": "body", - "required": false, - "_key": "company" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "api_fieldname": "contact", - "entity_fieldname": "contact", - "parameter_fieldname": "contact", - "in": "body", - "required": false, - "_key": "contact" - }, - { - "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "api_fieldname": "contract_number", - "entity_fieldname": "contract_number", - "parameter_fieldname": "contract_number", - "in": "body", - "required": false, - "_key": "contract_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "api_fieldname": "country", - "entity_fieldname": "country", - "parameter_fieldname": "country", - "in": "body", - "required": false, - "_key": "country" - }, - { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "custom_fields", - "entity_fieldname": "custom_fields", - "parameter_fieldname": "custom_fields", - "in": "body", - "required": false, - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "api_fieldname": "customer_number", - "entity_fieldname": "customer_number", - "parameter_fieldname": "customer_number", - "in": "body", - "required": false, - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "api_fieldname": "display_name", - "entity_fieldname": "display_name", - "parameter_fieldname": "display_name", - "in": "body", - "required": false, - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": false, - "_key": "email" - }, - { - "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "entity_fieldname": "end_market", - "parameter_fieldname": "end_market", - "in": "body", - "required": false, - "_key": "end_market" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "api_fieldname": "expiration_warning_threshold", - "entity_fieldname": "expiration_warning_threshold", - "parameter_fieldname": "expiration_warning_threshold", - "in": "body", - "required": false, - "_key": "expiration_warning_threshold" - }, { "type": "string", "example": "01619571e2e90242ac12000600000000", @@ -11244,145 +9538,32 @@ "_key": "id" }, { - "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "api_fieldname": "idle_timeout", - "entity_fieldname": "idle_timeout", - "parameter_fieldname": "idle_timeout", - "in": "body", - "required": false, - "_key": "idle_timeout" - }, - { - "type": "string", - "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "api_fieldname": "mfa_status", - "entity_fieldname": "mfa_status", - "parameter_fieldname": "mfa_status", - "in": "body", - "required": false, - "enum_reference": "account_mfa_status_enum", - "_key": "mfa_status" - }, - { - "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", - "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" - }, - "api_fieldname": "notification_emails", - "entity_fieldname": "notification_emails", - "parameter_fieldname": "notification_emails", - "in": "body", - "required": false, - "_key": "notification_emails" - }, - { - "type": "object", - "required": false, - "properties": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" - } - ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "api_fieldname": "password_policy", - "entity_fieldname": "password_policy", - "parameter_fieldname": "password_policy", - "in": "body", - "_key": "password_policy" - }, - { - "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "api_fieldname": "password_recovery_expiration", - "entity_fieldname": "password_recovery_expiration", - "parameter_fieldname": "password_recovery_expiration", - "in": "body", - "required": false, - "_key": "password_recovery_expiration" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, history.", "required": false, - "_key": "phone_number" - }, - { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "api_fieldname": "postal_code", - "entity_fieldname": "postal_code", - "parameter_fieldname": "postal_code", - "in": "body", - "required": false, - "_key": "postal_code" + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "api_fieldname": "sales_contact", - "entity_fieldname": "sales_contact", - "parameter_fieldname": "sales_contact", - "in": "body", + "name": "properties", + "in": "query", + "description": "Property name to return from account-specific properties.", "required": false, - "_key": "sales_contact" - }, - { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "api_fieldname": "state", - "entity_fieldname": "state", - "parameter_fieldname": "state", - "in": "body", - "required": false, - "_key": "state" + "entity_fieldname": "properties", + "api_fieldname": "properties", + "external_param": true, + "parameter_fieldname": "properties", + "_key": "properties" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "read", "responses": [ { "description": "Successful operation.", @@ -11417,69 +9598,10 @@ "entity_fieldname": "address_line2", "_key": "address_line2" }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_full_name", - "entity_fieldname": "admin_full_name", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "entity_fieldname": "admin_id", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "api_fieldname": "admin_key", - "entity_fieldname": "admin_key", - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_password", - "entity_fieldname": "admin_password", - "_key": "admin_password" - }, { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -11546,7 +9668,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "api_fieldname": "company", "entity_fieldname": "company", "_key": "company" @@ -11614,7 +9736,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "api_fieldname": "display_name", "entity_fieldname": "display_name", "_key": "display_name" @@ -11694,7 +9816,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -11702,6 +9827,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -11714,12 +9840,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -11736,50 +9864,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -11787,6 +9937,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -11799,13 +9950,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -12101,77 +10251,30 @@ "etag", "id", "object", - "status", - "tier" - ], - "properties": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "_key": "admin_key" - }, + "status", + "tier" + ], + "properties": [ { "type": "string", "maxLength": 100, "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_name" + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "_key": "address_line1" }, { "type": "string", + "maxLength": 100, "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "_key": "admin_password" + "example": " ", + "description": "Postal address line 2.", + "_key": "address_line2" }, { "type": "array", "maxItems": 10, - "description": "An array of aliases.", + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", "items": { "type": "string", "pattern": "[\\w\\-._]{8,100}" @@ -12230,7 +10333,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM Holdings Plc", - "description": "The name of the company.", + "description": "The name of the company used in billing.", "_key": "company" }, { @@ -12284,7 +10387,7 @@ "maxLength": 100, "x-nullable": true, "example": "ARM", - "description": "The display name for the account.", + "description": "The display name for the tenant account.", "_key": "display_name" }, { @@ -12348,7 +10451,10 @@ { "type": "integer", "format": "int32", + "minimum": 1, + "maximum": 120, "description": "Billing period of the account limitation.", + "example": 1, "_key": "billing_period" }, { @@ -12356,6 +10462,7 @@ "format": "date-time", "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "readOnly": true, "_key": "created_at" }, { @@ -12368,12 +10475,14 @@ "type": "string", "example": "1", "description": "API resource entity version.", + "readOnly": true, "_key": "etag" }, { "type": "string", "example": "01619571d01d0242ac12000600000000", "description": "Entity ID.", + "readOnly": true, "_key": "id" }, { @@ -12390,50 +10499,72 @@ }, { "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], "description": "Indicates the type of the entity where the limitation is inherited from.", "readOnly": true, "_key": "inherited_type" }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "The value of the limit.", + "example": 25, "_key": "limit" }, { "type": "string", "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" }, { "type": "string", "description": "Entity name: always 'limitation'", "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "limitation" ], + "readOnly": true, "_key": "object" }, { "type": "integer", - "format": "int32", + "format": "int64", "description": "Quota of the account limitation.", + "example": 0, "_key": "quota" }, { @@ -12441,6 +10572,7 @@ "format": "date-time", "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", + "readOnly": true, "_key": "updated_at" } ], @@ -12451,13 +10583,12 @@ { "type": "object", "x-nullable": true, - "deprecated": true, "x-deprecation": { "issued_at": "2019-08-27T12:03:58+00:00", "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." + "comment": "Replaced by the limitations parameter." }, - "description": "List of limits as key-value pairs if requested.", + "description": "DEPRECATED: Replaced by the limitations parameter.", "additionalProperties": { "type": "string" }, @@ -12731,6 +10862,29 @@ "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", "_key": "tier" }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "_key": "tier_history" + }, { "type": "string", "format": "date-time", @@ -12770,6 +10924,31 @@ "entity_fieldname": "tier", "_key": "tier" }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "api_fieldname": "tier_history", + "entity_fieldname": "tier_history", + "_key": "tier_history" + }, { "type": "string", "format": "date-time", @@ -12794,7 +10973,153 @@ "_key": "200" }, { - "description": "Error in input data format.", + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Account with the given ID not found.", "schema": { "type": "object", "required": [ @@ -12824,47 +11149,442 @@ "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}", + "summary": "Get account information.", + "return_type": "account", + "return_info": { + "self": true, + "custom": false, + "type": "account" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "created_at", + "updated_at", + "parent_id", + "display_name", + "company", + "country", + "address_line1", + "address_line2", + "city", + "state", + "postal_code", + "contact", + "email", + "phone_number", + "aliases", + "tier", + "status", + "upgraded_at", + "limits", + "policies", + "template_id", + "reason", + "end_market", + "idle_timeout", + "password_policy", + "reference_note", + "custom_fields", + "mfa_status", + "notification_emails", + "sales_contact", + "expiration_warning_threshold", + "contract_number", + "customer_number", + "parent_account", + "expiration", + "limitations", + "password_recovery_expiration", + "business_model", + "business_model_history", + "tier_history" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAccountInfo", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "description": "Retrieve an array of trusted certificates.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + }, + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "account_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "trusted_certificates", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "description": "A list of entities.", + "items": { + "type": "object", + "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", + "object", + "service", + "subject", + "validity" + ], + "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" + }, + { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "_key": "certificate" + }, + { + "type": "string", + "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", + "description": "A SHA-256 fingerprint of the certificate.", + "_key": "certificate_fingerprint" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "string", + "maxLength": 500, + "x-nullable": true, + "example": "Certificate created by me.", + "description": "Human readable description of this certificate.", + "_key": "description" + }, + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "Device execution mode where 1 means a developer certificate.", + "_key": "device_execution_mode" + }, + { + "type": "boolean", + "example": false, + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, + "_key": "enrollment_mode" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "string", + "example": "CN=issuer", + "description": "Issuer of the certificate.", + "_key": "issuer" }, { "type": "string", - "description": "Name of the field which caused the error.", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'trusted-cert'", + "enum": [ + "trusted-cert" + ], + "_key": "object" + }, + { + "x-nullable": true, + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the owner.", + "pattern": "[a-f0-9]{32}", + "_key": "owner_id" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "_key": "status" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "_key": "subject" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + }, + { + "type": "boolean", + "example": true, + "description": "This read-only flag indicates whether the certificate is valid or not.", + "readOnly": true, + "_key": "valid" + }, + { + "type": "string", + "format": "date-time", + "example": "2038-02-14T15:24:14Z", + "description": "Expiration time in UTC formatted as RFC3339.", + "_key": "validity" } - ] + ], + "description": "Represents a trusted certificate in responses.", + "foreign_key": { + "group": "Security", + "entity": "developer_certificate" + } }, - "_key": "fields" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000), or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `list`.", "enum": [ - "error" + "list" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Security", + "entity": "developer_certificate" + } }, - "_key": "400" + "_key": "200" }, { "description": "Authentication failure.", @@ -12940,7 +11660,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -13013,7 +11733,7 @@ "_key": "403" }, { - "description": "Account with the given ID not found.", + "description": "An account with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -13086,15 +11806,50 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}", - "summary": "Update attributes of an existing account.", - "return_type": "account", + "path": "/v3/accounts/{account_id}/trusted-certificates", + "summary": "Get trusted certificates.", + "return_type": "paginated_response(subtenant_trusted_certificate)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "account" + "type": "subtenant_trusted_certificate" + }, + "x_filter": { + "name": [ + "eq" + ], + "service": [ + "eq" + ], + "expire": [ + "eq" + ], + "device_execution_mode": [ + "eq", + "neq" + ], + "owner": [ + "eq" + ], + "enrollment_mode": [ + "eq" + ], + "status": [ + "eq" + ], + "issuer": [ + "like" + ], + "subject": [ + "like" + ], + "certificate_fingerprint": [ + "eq" + ], + "valid": [ + "eq" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", @@ -13102,258 +11857,466 @@ "type", "filter", "sub_accounts", - "created_at", - "updated_at", - "parent_id", - "tier", - "status", - "upgraded_at", - "limits", - "policies", - "template_id", - "reason", - "reference_note", - "parent_account", - "expiration", - "admin_id", - "admin_name", - "admin_email", - "admin_key", - "admin_password", - "admin_full_name", - "limitations", - "business_model_history" + "total_count", + "has_more", + "data", + "name__eq", + "service__eq", + "expire__eq", + "device_execution_mode__eq", + "device_execution_mode__neq", + "owner__eq", + "enrollment_mode__eq", + "status__eq", + "issuer__like", + "subject__like", + "certificate_fingerprint__eq", + "valid__eq" ], "group_id": "Accounts", "parameter_map": { "account_id": "id" }, - "operation_id": "updateAccount", - "additional_operations": [ + "operation_id": "getAllAccountCertificates", + "notes": "This lists the trusted certificates of the subtenant account.", + "foreign_key": { + "entity": "subtenant_trusted_certificate" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "trusted_certificates" + }, + { + "description": "Update an account.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"phone_number\": \"12345678\"}'\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "api_fieldname": "address_line1", + "entity_fieldname": "address_line1", + "parameter_fieldname": "address_line1", + "in": "body", + "required": false, + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "api_fieldname": "address_line2", + "entity_fieldname": "address_line2", + "parameter_fieldname": "address_line2", + "in": "body", + "required": false, + "_key": "address_line2" + }, + { + "type": "array", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "api_fieldname": "aliases", + "entity_fieldname": "aliases", + "parameter_fieldname": "aliases", + "in": "body", + "required": false, + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "api_fieldname": "business_model", + "entity_fieldname": "business_model", + "parameter_fieldname": "business_model", + "in": "body", + "required": false, + "enum_reference": "account_business_model_enum", + "_key": "business_model" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Cambridge", + "description": "The city part of the postal address.", + "api_fieldname": "city", + "entity_fieldname": "city", + "parameter_fieldname": "city", + "in": "body", + "required": false, + "_key": "city" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "api_fieldname": "company", + "entity_fieldname": "company", + "parameter_fieldname": "company", + "in": "body", + "required": false, + "_key": "company" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "api_fieldname": "contact", + "entity_fieldname": "contact", + "parameter_fieldname": "contact", + "in": "body", + "required": false, + "_key": "contact" + }, + { + "type": "string", + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "api_fieldname": "contract_number", + "entity_fieldname": "contract_number", + "parameter_fieldname": "contract_number", + "in": "body", + "required": false, + "_key": "contract_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "api_fieldname": "country", + "entity_fieldname": "country", + "parameter_fieldname": "country", + "in": "body", + "required": false, + "_key": "country" + }, + { + "type": "object", + "x-nullable": true, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "entity_fieldname": "custom_fields", + "parameter_fieldname": "custom_fields", + "in": "body", + "required": false, + "_key": "custom_fields" + }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "api_fieldname": "customer_number", + "entity_fieldname": "customer_number", + "parameter_fieldname": "customer_number", + "in": "body", + "required": false, + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "api_fieldname": "display_name", + "entity_fieldname": "display_name", + "parameter_fieldname": "display_name", + "in": "body", + "required": false, + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": false, + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "api_fieldname": "end_market", + "entity_fieldname": "end_market", + "parameter_fieldname": "end_market", + "in": "body", + "required": false, + "_key": "end_market" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "api_fieldname": "expiration_warning_threshold", + "entity_fieldname": "expiration_warning_threshold", + "parameter_fieldname": "expiration_warning_threshold", + "in": "body", + "required": false, + "_key": "expiration_warning_threshold" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "api_fieldname": "idle_timeout", + "entity_fieldname": "idle_timeout", + "parameter_fieldname": "idle_timeout", + "in": "body", + "required": false, + "_key": "idle_timeout" + }, + { + "type": "string", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "api_fieldname": "mfa_status", + "entity_fieldname": "mfa_status", + "parameter_fieldname": "mfa_status", + "in": "body", + "required": false, + "enum_reference": "account_mfa_status_enum", + "_key": "mfa_status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", + "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" + }, + "api_fieldname": "notification_emails", + "entity_fieldname": "notification_emails", + "parameter_fieldname": "notification_emails", + "in": "body", + "required": false, + "_key": "notification_emails" + }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "api_fieldname": "password_policy", + "entity_fieldname": "password_policy", + "parameter_fieldname": "password_policy", + "in": "body", + "_key": "password_policy" + }, { - "operation_id": "updateMyAccount", - "notes": "After retrieving the resource using the `me` method, it can modified using using this SDK method." - } - ], - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "update" - }, - { - "description": "Retrieve details of all active user invitations sent for new or existing users.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "api_fieldname": "password_recovery_expiration", + "entity_fieldname": "password_recovery_expiration", + "parameter_fieldname": "password_recovery_expiration", + "in": "body", + "required": false, + "_key": "password_recovery_expiration" + }, { "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "parameter_fieldname": "phone_number", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "_key": "phone_number" }, { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "api_fieldname": "postal_code", + "entity_fieldname": "postal_code", + "parameter_fieldname": "postal_code", + "in": "body", + "required": false, + "_key": "postal_code" }, { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "api_fieldname": "sales_contact", + "entity_fieldname": "sales_contact", + "parameter_fieldname": "sales_contact", + "in": "body", "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "_key": "sales_contact" }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "api_fieldname": "state", + "entity_fieldname": "state", + "parameter_fieldname": "state", + "in": "body", "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "account_order_enum", - "_key": "order" + "_key": "state" } ], - "method": "get", - "mode": "user_invitations", + "method": "put", + "mode": "update", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", "required": [ - "data", - "has_more", - "limit", + "end_market", + "etag", + "id", "object", - "total_count" + "status", + "tier" ], "properties": [ { "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "api_fieldname": "address_line1", + "entity_fieldname": "address_line1", + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "api_fieldname": "address_line2", + "entity_fieldname": "address_line2", + "_key": "address_line2" }, { "type": "array", - "description": "A list of entities.", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "api_fieldname": "aliases", + "entity_fieldname": "aliases", + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "api_fieldname": "business_model", + "entity_fieldname": "business_model", + "_key": "business_model" + }, + { + "type": "array", + "description": "Business model history for this account.", "items": { "type": "object", - "required": [ - "account_id", - "email", - "etag", - "id", - "object", - "user_id" - ], "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account the user is invited to.", - "pattern": "[a-f0-9]{32}", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "friend@arm.com", - "description": "Email address of the invited user.", - "_key": "email" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Invitation expiration as UTC time RFC3339.", - "_key": "expiration" - }, - { - "type": "array", - "description": "A list of IDs of the groups the user is invited to.", - "items": { - "type": "string" - }, - "_key": "groups" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the invitation.", - "pattern": "[a-f0-9]{32}", - "_key": "id" - }, - { - "type": "array", - "description": "A list of login profiles for the user. Specified as the identity providers the user is associated with.", - "x-nullable": true, - "items": { - "type": "object", - "required": [ - "id" - ], - "properties": [ - { - "type": "string", - "description": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "type": "string", - "description": "Identity provider type.", - "readOnly": true, - "enum": [ - "NATIVE", - "MBED", - "SAML2", - "OIDC" - ], - "api_fieldname": "type", - "entity_fieldname": "login_profile_type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "_key": "login_profiles" - }, - { - "type": "string", - "description": "Entity name: always 'user-invitation'", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", "enum": [ - "user-invitation" + "active_device_business_model", + "api_calls_1_business_model" ], - "_key": "object" + "_key": "business_model" }, { "type": "string", @@ -13361,569 +12324,718 @@ "example": "2018-02-14T15:24:14Z", "description": "Last update UTC time RFC3339.", "_key": "updated_at" - }, - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the invited user.", - "pattern": "[a-f0-9]{32}", - "_key": "user_id" } - ], - "description": "Represents an user invitation in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "user_invitation" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "api_fieldname": "business_model_history", + "entity_fieldname": "business_model_history", + "_key": "business_model_history" }, { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Cambridge", + "description": "The city part of the postal address.", + "api_fieldname": "city", + "entity_fieldname": "city", + "_key": "city" }, { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "api_fieldname": "company", + "entity_fieldname": "company", + "_key": "company" }, { "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "api_fieldname": "contact", + "entity_fieldname": "contact", + "_key": "contact" }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "user_invitation_order_enum", - "_key": "order" + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "api_fieldname": "contract_number", + "entity_fieldname": "contract_number", + "_key": "contract_number" }, { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "user_invitation" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "api_fieldname": "country", + "entity_fieldname": "country", + "_key": "country" + }, { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "type": "object", + "x-nullable": true, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" }, - "_key": "fields" + "api_fieldname": "custom_fields", + "entity_fieldname": "custom_fields", + "_key": "custom_fields" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "api_fieldname": "customer_number", + "entity_fieldname": "customer_number", + "_key": "customer_number" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "api_fieldname": "display_name", + "entity_fieldname": "display_name", + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "api_fieldname": "email", + "entity_fieldname": "email", + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "api_fieldname": "end_market", + "entity_fieldname": "end_market", + "_key": "end_market" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "api_fieldname": "expiration", + "entity_fieldname": "expiration", + "_key": "expiration" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "api_fieldname": "expiration_warning_threshold", + "entity_fieldname": "expiration_warning_threshold", + "_key": "expiration_warning_threshold" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, { "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "api_fieldname": "idle_timeout", + "entity_fieldname": "idle_timeout", + "_key": "idle_timeout" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "List of account limitation objects.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" + }, { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "readOnly": true, + "_key": "created_at" }, { "type": "string", - "description": "Name of the field which caused the error.", + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "readOnly": true, + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" + }, + { + "type": "string", + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" + }, + { + "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" + }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, + { + "type": "integer", + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" + }, + { + "type": "string", + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'limitation'", + "enum": [ + "limitation" + ], + "readOnly": true, + "_key": "object" + }, + { + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "readOnly": true, + "_key": "updated_at" } - ] + ], + "description": "This object represents an account limitation." }, - "_key": "fields" + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_key": "limitations" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "object", + "x-nullable": true, + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "limits", + "entity_fieldname": "limits", + "_key": "limits" }, { "type": "string", - "description": "Entity name, always `error`.", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", "enum": [ - "error" + "enforced", + "optional" ], - "_key": "object" + "api_fieldname": "mfa_status", + "entity_fieldname": "mfa_status", + "_key": "mfa_status" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", + "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" + }, + "api_fieldname": "notification_emails", + "entity_fieldname": "notification_emails", + "_key": "notification_emails" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "An account with the specified ID does not exist.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "description": "Entity name: always `account`.", + "enum": [ + "account" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + } + ], + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" }, - "_key": "fields" + "x-nullable": true, + "api_fieldname": "parent_account", + "entity_fieldname": "parent_account", + "_key": "parent_account" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "parent_id", + "entity_fieldname": "parent_id", + "_key": "parent_id" }, { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" + "type": "object", + "required": [ + "minimum_length" ], - "_key": "object" + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "api_fieldname": "password_policy", + "entity_fieldname": "password_policy", + "_key": "password_policy" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "api_fieldname": "password_recovery_expiration", + "entity_fieldname": "password_recovery_expiration", + "_key": "password_recovery_expiration" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/user-invitations", - "summary": "Get the details of all user invitations.", - "return_type": "paginated_response(subtenant_user_invitation)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_user_invitation" - }, - "x_filter": { - "login_profiles": [ - "eq" - ] - }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "total_count", - "has_more", - "data", - "login_profiles__eq" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAllAccountInvitations", - "notes": "This lists the user invitations of the subtenant account.", - "foreign_key": { - "entity": "subtenant_user_invitation" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "user_invitations" - }, - { - "description": "Retrieve details of all users.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "id" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "account_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "users", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "_key": "phone_number" + }, + { + "type": "array", + "x-nullable": true, + "description": "List of policies if requested.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" + }, + { + "type": "string", + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "api_fieldname": "policies", + "entity_fieldname": "policies", + "_key": "policies" + }, { "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "api_fieldname": "postal_code", + "entity_fieldname": "postal_code", + "_key": "postal_code" + }, + { + "type": "string", + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "api_fieldname": "reason", + "entity_fieldname": "reason", + "_key": "reason" + }, + { + "type": "string", + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "api_fieldname": "reference_note", + "entity_fieldname": "reference_note", + "_key": "reference_note" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "api_fieldname": "sales_contact", + "entity_fieldname": "sales_contact", + "_key": "sales_contact" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "api_fieldname": "state", + "entity_fieldname": "state", + "_key": "state" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the account.", + "enum": [ + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "type": "array", - "description": "A list of entities.", + "x-nullable": true, + "description": "List of sub accounts. Not available for developer users.", "items": { "type": "object", "required": [ - "account_id", - "email", + "end_market", "etag", "id", "object", - "status" + "status", + "tier" ], "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "_key": "account_id" + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "_key": "address_line2" }, { "type": "array", - "description": "List of active user sessions.", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "array", + "description": "Business model history for this account.", "items": { "type": "object", - "required": [ - "account_id", - "ip_address", - "login_time", - "object", - "reference_token", - "user_agent" - ], "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The UUID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "example": "127.0.0.1", - "description": "IP address of the client.", - "api_fieldname": "ip_address", - "entity_fieldname": "ip_address", - "_key": "ip_address" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T17:52:07Z", - "description": "The login time of the user.", - "api_fieldname": "login_time", - "entity_fieldname": "login_time", - "_key": "login_time" - }, - { - "type": "string", - "description": "Entity name: always 'user-session'", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", "enum": [ - "user-session" + "active_device_business_model", + "api_calls_1_business_model" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "example": "rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk", - "description": "The reference token.", - "api_fieldname": "reference_token", - "entity_fieldname": "reference_token", - "_key": "reference_token" + "_key": "business_model" }, { "type": "string", - "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", - "description": "User Agent header from the login request.", - "api_fieldname": "user_agent", - "entity_fieldname": "user_agent", - "_key": "user_agent" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" } - ], - "description": "Represents an active user session.", - "foreign_key": { - "group": "Accounts", - "entity": "active_session" - } + ] }, - "_key": "active_sessions" + "_key": "business_model_history" }, { "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", + "maxLength": 100, "x-nullable": true, - "_key": "address" + "example": "Cambridge", + "description": "The city part of the postal address.", + "_key": "city" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "_key": "company" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "_key": "contact" + }, + { + "type": "string", + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "_key": "contract_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "_key": "country" }, { "type": "string", @@ -13932,34 +13044,43 @@ "description": "Creation UTC time RFC3339.", "_key": "created_at" }, - { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "A timestamp of the user creation in the storage, in milliseconds.", - "_key": "creation_time" - }, { "type": "object", "x-nullable": true, - "description": "User's account-specific custom properties. The value is a string.", + "description": "Account's custom properties as key-value pairs.", "additionalProperties": { "type": "string" }, "_key": "custom_fields" }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "_key": "display_name" + }, { "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "user@arm.com", - "description": "The email address.", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", "_key": "email" }, { - "type": "boolean", - "example": true, - "description": "A flag indicating whether the user's email address has been verified or not.", - "_key": "email_verified" + "type": "string", + "example": "IT", + "description": "Account end market.", + "_key": "end_market" }, { "type": "string", @@ -13969,209 +13090,478 @@ }, { "type": "string", - "maxLength": 100, - "example": "User Doe", "x-nullable": true, - "description": "The full name of the user.", - "_key": "full_name" + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "_key": "expiration" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "_key": "expiration_warning_threshold" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "_key": "idle_timeout" }, { "type": "array", - "description": "A list of IDs of the groups this user belongs to.", + "description": "List of account limitation objects.", + "items": { + "type": "object", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "readOnly": true, + "_key": "created_at" + }, + { + "type": "string", + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "readOnly": true, + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" + }, + { + "type": "string", + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" + }, + { + "type": "string", + "enum": [ + "account", + "template", + "tier_template" + ], + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" + }, + { + "type": "object", + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" + }, + { + "type": "integer", + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" + } + ], + "_key": "inherited_value" + }, + { + "type": "integer", + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" + }, + { + "type": "string", + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'limitation'", + "enum": [ + "limitation" + ], + "readOnly": true, + "_key": "object" + }, + { + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "readOnly": true, + "_key": "updated_at" + } + ], + "description": "This object represents an account limitation." + }, + "_key": "limitations" + }, + { + "type": "object", + "x-nullable": true, + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "_key": "limits" + }, + { + "type": "string", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "_key": "mfa_status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string" }, - "_key": "groups" + "_key": "notification_emails" }, { "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the user.", - "pattern": "[a-f0-9]{32}", - "_key": "id" + "description": "Entity name: always `account`.", + "enum": [ + "account" + ], + "_key": "object" }, { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "_key": "is_gtc_accepted" + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + } + ], + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" + }, + "x-nullable": true, + "_key": "parent_account" }, { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "_key": "is_marketing_accepted" + "type": "string", + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "_key": "parent_id" }, { - "type": "boolean", - "example": true, - "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", - "_key": "is_totp_enabled" + "type": "object", + "required": [ + "minimum_length" + ], + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "password_policy" + }, + "description": "The password policy for this account.", + "x-nullable": true, + "_key": "password_policy" }, { "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest login of the user, in milliseconds.", - "_key": "last_login_time" + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "_key": "password_recovery_expiration" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "_key": "phone_number" }, { "type": "array", - "maxItems": 5, - "description": "Timestamps, succeedings, IP addresses and user agent information of the last five logins of the user, with timestamps in RFC3339 format.", + "x-nullable": true, + "description": "List of policies if requested.", "items": { "type": "object", - "required": [ - "date", - "ip_address", - "success", - "user_agent" - ], "properties": [ { "type": "string", - "format": "date-time", - "example": "2018-02-14T17:52:07Z", - "description": "UTC time RFC3339 for this login attempt.", - "api_fieldname": "date", - "entity_fieldname": "date", - "_key": "date" - }, - { - "type": "string", - "example": "127.0.0.1", - "description": "IP address of the client.", - "api_fieldname": "ip_address", - "entity_fieldname": "ip_address", - "_key": "ip_address" + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" }, { "type": "boolean", "example": true, - "description": "Flag indicating whether login attempt was successful or not.", - "api_fieldname": "success", - "entity_fieldname": "success", - "_key": "success" + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" }, { "type": "string", - "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", - "description": "User Agent header from the login request.", - "api_fieldname": "user_agent", - "entity_fieldname": "user_agent", - "_key": "user_agent" - } - ], - "description": "Represents an entry in login history.", - "foreign_key": { - "group": "Accounts", - "entity": "login_history" - } - }, - "_key": "login_history" - }, - { - "type": "array", - "description": "A list of login profiles for the user. Specified as the identity providers the user is associated with.", - "x-nullable": true, - "items": { - "type": "object", - "required": [ - "id" - ], - "properties": [ + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, { - "type": "string", - "description": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" }, { "type": "string", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" }, { "type": "string", - "description": "Identity provider type.", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", "readOnly": true, "enum": [ - "NATIVE", - "MBED", - "SAML2", - "OIDC" + "account", + "template", + "tier_template" ], - "api_fieldname": "type", - "entity_fieldname": "login_profile_type", - "_key": "type" + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" } ], - "description": "Represents a user login profile in Device Management.", + "description": "Represents a feature policy. Either the feature or the resource must be specified.", "foreign_key": { "group": "Accounts", - "entity": "login_profile" + "entity": "policy" } }, - "_key": "login_profiles" + "_key": "policies" }, { "type": "string", - "description": "Entity name: always `user`.", - "enum": [ - "user" - ], - "_key": "object" + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "_key": "postal_code" }, { "type": "string", - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password when creating a new user. It will be generated when not present in the request.", "x-nullable": true, - "_key": "password" + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "_key": "reason" }, { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest change of the user password, in milliseconds.", - "_key": "password_changed_time" + "type": "string", + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "_key": "reference_note" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "_key": "sales_contact" }, { "type": "string", "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", "x-nullable": true, - "_key": "phone_number" + "example": " ", + "description": "The state part of the postal address.", + "_key": "state" }, { "type": "string", "example": "ACTIVE", - "description": "The status of the user. ENROLLING state indicates that the user is in the middle of the enrollment process. INVITED means that the user has not accepted the invitation request. RESET means that the password must be changed immediately. INACTIVE users are locked out and not permitted to use the system.", + "description": "The status of the account.", "enum": [ "ENROLLING", - "INVITED", "ACTIVE", - "RESET", - "INACTIVE" + "RESTRICTED", + "SUSPENDED" ], "_key": "status" }, { "type": "array", "x-nullable": true, - "description": "A list of scratch codes for the two-factor authentication. Visible only when 2FA is requested to be enabled or the codes regenerated.", + "description": "List of sub accounts. Not available for developer users.", + "items": [], + "_key": "sub_accounts" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", "items": { - "type": "string" + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] }, - "_key": "totp_scratch_codes" + "_key": "tier_history" }, { "type": "string", @@ -14181,241 +13571,87 @@ "_key": "updated_at" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "_key": "username" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "_key": "upgraded_at" } ], - "description": "Represents a user in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "user" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "user_order_enum", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "user" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "description": "Represents an account in requests and responses." }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "api_fieldname": "sub_accounts", + "entity_fieldname": "sub_accounts", + "_key": "sub_accounts" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "template_id", + "entity_fieldname": "template_id", + "_key": "template_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "api_fieldname": "tier", + "entity_fieldname": "tier", + "_key": "tier" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "Tier history for this account.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" } ] }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "api_fieldname": "tier_history", + "entity_fieldname": "tier_history", + "_key": "tier_history" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "api_fieldname": "upgraded_at", + "entity_fieldname": "upgraded_at", + "_key": "upgraded_at" } - ] + ], + "description": "Represents an account in requests and responses." }, - "_key": "403" + "_key": "200" }, { - "description": "An account with the given ID does not exist.", + "description": "Error in input data format.", "schema": { "type": "object", "required": [ @@ -14445,1303 +13681,1544 @@ "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/users", - "summary": "Get the details of all users.", - "return_type": "paginated_response(subtenant_user)", - "return_info": { - "self": false, - "custom": false, - "type": "subtenant_user" - }, - "x_filter": { - "email": [ - "eq" - ], - "status": [ - "eq", - "in", - "nin" - ], - "login_profiles": [ - "eq" - ] - }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "sub_accounts", - "total_count", - "has_more", - "data", - "email__eq", - "status__eq", - "status__in", - "status__nin", - "login_profiles__eq" - ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAllAccountUsers", - "notes": "This lists the users of the subtenant account.", - "foreign_key": { - "entity": "subtenant_user" - }, - "pagination": true, - "request_content_type": "application/json", - "request_body": "json", - "_key": "users" - } - ], - "fields": [ - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "110 Fulbourn Rd", - "description": "Postal address line 1.", - "api_fieldname": "address_line1", - "readOnly": false, - "required": false, - "_key": "address_line1" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "readOnly": false, - "required": false, - "_key": "address_line2" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "admin@arm.com", - "description": "The email address of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_email", - "readOnly": false, - "required": false, - "_key": "admin_email" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Admin Doe", - "description": "The full name of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_full_name", - "readOnly": false, - "required": false, - "_key": "admin_full_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "readOnly": true, - "required": false, - "_key": "admin_id" - }, - { - "type": "string", - "x-nullable": true, - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", - "description": "The admin API key created for this account. Present only in the response for account creation.", - "readOnly": true, - "api_fieldname": "admin_key", - "required": false, - "_key": "admin_key" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "admin", - "description": "The username of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_name", - "readOnly": false, - "required": false, - "_key": "admin_name" - }, - { - "type": "string", - "x-nullable": true, - "example": "PZf9eEUH43DAPE9ULINFeuj", - "description": "The password of the admin user created for this account. Present only in the response for account creation.", - "api_fieldname": "admin_password", - "readOnly": false, - "required": false, - "_key": "admin_password" - }, - { - "type": "array", - "maxItems": 10, - "description": "An array of aliases.", - "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" - }, - "api_fieldname": "aliases", - "readOnly": false, - "required": false, - "_key": "aliases" - }, - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "api_fieldname": "business_model", - "readOnly": false, - "required": false, - "enum_reference": "account_business_model_enum", - "_key": "business_model" - }, - { - "type": "array", - "description": "Business model history for this account.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "default": "active_device_business_model", - "example": "api_calls_1_business_model", - "description": "Business model for this account. Manageable by the root admin only.", - "enum": [ - "active_device_business_model", - "api_calls_1_business_model" - ], - "_key": "business_model" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ] - }, - "api_fieldname": "business_model_history", - "readOnly": true, - "required": false, - "_key": "business_model_history" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "Cambridge", - "description": "The city part of the postal address.", - "api_fieldname": "city", - "readOnly": false, - "required": false, - "_key": "city" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM Holdings Plc", - "description": "The name of the company.", - "api_fieldname": "company", - "readOnly": false, - "required": false, - "_key": "company" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "J. Doe", - "description": "The name of the contact person for this account.", - "api_fieldname": "contact", - "readOnly": false, - "required": false, - "_key": "contact" - }, - { - "type": "string", - "example": "1NX25_0001", - "x-nullable": true, - "description": "Contract number of the customer.", - "api_fieldname": "contract_number", - "readOnly": false, - "required": false, - "_key": "contract_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "United Kingdom", - "description": "The country part of the postal address.", - "api_fieldname": "country", - "readOnly": false, - "required": false, - "_key": "country" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "custom_fields", - "readOnly": false, - "required": false, - "_key": "custom_fields" - }, - { - "type": "string", - "example": "1NC25_0001", - "x-nullable": true, - "description": "Customer number of the customer.", - "api_fieldname": "customer_number", - "readOnly": false, - "required": false, - "_key": "customer_number" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "ARM", - "description": "The display name for the account.", - "api_fieldname": "display_name", - "readOnly": false, - "required": false, - "_key": "display_name" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "x-nullable": true, - "example": "info@arm.com", - "description": "The company email address for this account.", - "api_fieldname": "email", - "readOnly": false, - "required": false, - "_key": "email" - }, - { - "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "readOnly": false, - "required": true, - "_key": "end_market" - }, - { - "type": "string", - "x-nullable": true, - "format": "date-time", - "description": "Expiration time of the account, as UTC time RFC3339.", - "api_fieldname": "expiration", - "readOnly": true, - "required": false, - "_key": "expiration" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 180, - "example": "180", - "x-nullable": true, - "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", - "api_fieldname": "expiration_warning_threshold", - "readOnly": false, - "required": false, - "_key": "expiration_warning_threshold" - }, - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "integer", - "minimum": 1, - "maximum": 120, - "x-nullable": true, - "example": "30", - "description": "The reference token expiration time, in minutes, for this account.", - "api_fieldname": "idle_timeout", - "readOnly": false, - "required": false, - "_key": "idle_timeout" - }, - { - "type": "array", - "description": "List of account limitation objects.", - "items": { - "type": "object", - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Billing period of the account limitation.", - "_key": "billing_period" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "description": "Description of the account limitation.", - "readOnly": true, - "_key": "description" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "_key": "id" - }, - { - "type": "boolean", - "description": "Flag indicating whether this limitation is inherited.", - "readOnly": true, - "_key": "inherited" - }, - { - "type": "string", - "description": "Indicates where this limit is inherited from.", - "readOnly": true, - "_key": "inherited_from" - }, - { - "type": "string", - "description": "Indicates the type of the entity where the limitation is inherited from.", - "readOnly": true, - "_key": "inherited_type" - }, - { - "type": "integer", - "format": "int32", - "description": "The value of the limit.", - "_key": "limit" - }, - { - "type": "string", - "description": "Name of the account limitation.", - "_key": "name" + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] }, - { - "type": "string", - "description": "Entity name: always 'limitation'", - "enum": [ - "user", - "api-key", - "group", - "account", - "account_template", - "trusted_cert", - "list", - "error", - "agreement", - "signed_agreement", - "policy", - "limitation", - "identity_provider", - "user_session", - "user_invitation", - "notification_entry", - "branding_color", - "branding_image" + "_key": "400" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" ], - "_key": "object" - }, - { - "type": "integer", - "format": "int32", - "description": "Quota of the account limitation.", - "_key": "quota" + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ], - "description": "This object represents an account limitation." - }, - "api_fieldname": "limitations", - "readOnly": true, - "required": false, - "_key": "limitations" - }, - { - "type": "object", - "x-nullable": true, - "deprecated": true, - "x-deprecation": { - "issued_at": "2019-08-27T12:03:58+00:00", - "end_of_life_at": "2020-08-27T12:03:58+00:00", - "comment": "Superseded by the limitations parameter." - }, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "limits", - "readOnly": true, - "required": false, - "_key": "limits" - }, - { - "type": "string", - "x-nullable": true, - "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", - "enum": [ - "enforced", - "optional" - ], - "api_fieldname": "mfa_status", - "readOnly": false, - "required": false, - "enum_reference": "account_mfa_status_enum", - "_key": "mfa_status" - }, - { - "type": "array", - "x-nullable": true, - "description": "A list of notification email addresses.", - "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" - }, - "api_fieldname": "notification_emails", - "readOnly": false, - "required": false, - "_key": "notification_emails" - }, - { - "type": "object", - "properties": [ - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "info@arm.com", - "description": "The email address of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_email", - "entity_fieldname": "admin_email", - "_key": "admin_email" + "_key": "401" }, { - "type": "string", - "maxLength": 100, - "example": "J. Doe", - "description": "The name of the admin user who is the contact person of the parent account.", - "api_fieldname": "admin_name", - "entity_fieldname": "admin_name", - "_key": "admin_name" + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" }, { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - } - ], - "description": "Represents parent account contact details in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "parent_account" - }, - "x-nullable": true, - "api_fieldname": "parent_account", - "readOnly": true, - "required": false, - "_key": "parent_account" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "parent_id", - "readOnly": true, - "required": false, - "_key": "parent_id" - }, - { - "type": "object", - "required": false, - "properties": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "entity_fieldname": "minimum_length", - "_key": "minimum_length" - } - ], - "foreign_key": { - "group": "Accounts", - "entity": "password_policy" - }, - "description": "The password policy for this account.", - "x-nullable": true, - "api_fieldname": "password_policy", - "readOnly": false, - "_key": "password_policy" - }, - { - "type": "integer", - "format": "int32", - "minimum": 1, - "maximum": 45, - "description": "Indicates for how many minutes a password recovery email is valid.", - "api_fieldname": "password_recovery_expiration", - "readOnly": false, - "required": false, - "_key": "password_recovery_expiration" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "api_fieldname": "phone_number", - "readOnly": false, - "required": false, - "_key": "phone_number" - }, - { - "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "entity_fieldname": "action", - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "entity_fieldname": "allow", - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "entity_fieldname": "feature", - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "readOnly": true, - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "type": "string", - "example": "016ada3ec2d46665bf66e32e00000000", - "description": "An ID indicating where this policy is inherited from.", - "pattern": "[a-f0-9]{32}", - "readOnly": true, - "api_fieldname": "inherited_from", - "entity_fieldname": "inherited_from", - "_key": "inherited_from" + "description": "Account with the given ID not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] }, - { - "type": "string", - "example": "account", - "description": "Indicates the type of entity this policy is inherited from.", - "readOnly": true, - "enum": [ - "account", - "template", - "tier_template" + "_key": "404" + }, + { + "description": "Account with the specified new alias exists already.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" ], - "api_fieldname": "inherited_type", - "entity_fieldname": "inherited_type", - "_key": "inherited_type" + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] }, - { - "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" - } - ], - "description": "Represents a feature policy. Either the feature or the resource must be specified.", - "foreign_key": { - "group": "Accounts", - "entity": "policy" + "_key": "409" } + ], + "path": "/v3/accounts/{account_id}", + "summary": "Update attributes of an existing account.", + "return_type": "account", + "return_info": { + "self": true, + "custom": false, + "type": "account" }, - "api_fieldname": "policies", - "readOnly": true, - "required": false, - "_key": "policies" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "api_fieldname": "postal_code", - "readOnly": false, - "required": false, - "_key": "postal_code" - }, - { - "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "api_fieldname": "reason", - "readOnly": true, - "required": false, - "_key": "reason" - }, - { - "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "api_fieldname": "reference_note", - "readOnly": true, - "required": false, - "_key": "reference_note" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "api_fieldname": "sales_contact", - "readOnly": false, - "required": false, - "_key": "sales_contact" - }, - { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "api_fieldname": "state", - "readOnly": false, - "required": false, - "_key": "state" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "created_at", + "updated_at", + "parent_id", + "tier", + "status", + "upgraded_at", + "limits", + "policies", + "template_id", + "reason", + "reference_note", + "parent_account", + "expiration", + "limitations", + "business_model_history", + "tier_history" ], - "api_fieldname": "status", - "readOnly": true, - "required": false, - "enum_reference": "account_status_enum", - "_key": "status" - }, - { - "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "template_id", - "readOnly": true, - "required": false, - "_key": "template_id" - }, - { - "type": "string", - "example": "1", - "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", - "api_fieldname": "tier", - "readOnly": true, - "required": false, - "_key": "tier" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "api_fieldname": "upgraded_at", - "readOnly": true, - "required": false, - "_key": "upgraded_at" - } - ], - "field_renames": [], - "tags": [ - "Account - profile", - "Tenant accounts - accounts", - "Tenant accounts - API keys", - "Tenant accounts - users", - "Tenant accounts - user invitations", - "Tenant device security - certificates", - "Tenant user interface configuration - colors", - "Tenant user interface configuration - images" - ], - "group_id": "Accounts", - "_key": "account" - }, - { - "swagger_models": [ - "ActiveSession" - ], - "primary_key_field": null, - "methods": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The UUID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "example": "127.0.0.1", - "description": "IP address of the client.", - "api_fieldname": "ip_address", - "readOnly": true, - "required": false, - "_key": "ip_address" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T17:52:07Z", - "description": "The login time of the user.", - "api_fieldname": "login_time", - "readOnly": true, - "required": false, - "_key": "login_time" - }, - { - "type": "string", - "example": "rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk", - "description": "The reference token.", - "api_fieldname": "reference_token", - "readOnly": true, - "required": false, - "_key": "reference_token" + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "updateAccount", + "additional_operations": [ + { + "operation_id": "updateMyAccount", + "notes": "After retrieving the resource using the `me` method, it can modified using using this SDK method." + } + ], + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" }, { - "type": "string", - "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", - "description": "User Agent header from the login request.", - "api_fieldname": "user_agent", - "readOnly": true, - "required": false, - "_key": "user_agent" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "active_session" - }, - { - "swagger_models": [ - "ApiKeyInfoReq", - "ApiKeyInfoResp", - "ApiKeyInfoRespList", - "ApiKeyUpdateReq", - "GroupSummaryList" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Create a new API key.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\n```", + "description": "Retrieve an array of active user invitations.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "account_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "user_invitations", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "description": "A list of entities.", + "items": { + "type": "object", + "required": [ + "account_id", + "email", + "etag", + "id", + "object", + "user_id" + ], + "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the user is invited to.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "friend@arm.com", + "description": "Email address of the invited user.", + "_key": "email" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Invitation expiration as UTC time RFC3339.", + "_key": "expiration" + }, + { + "type": "array", + "description": "A list of IDs of the groups the user is invited to.", + "items": { + "type": "string" + }, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the invitation.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "array", + "description": "A list of login profiles for the user. Specified as the identity providers the user is associated with.", + "x-nullable": true, + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": [ + { + "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "ID of the identity provider.", + "readOnly": false, + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Identity provider type.", + "example": "NATIVE", + "readOnly": true, + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "login_profile_type", + "_key": "type" + } + ], + "description": "Represents a user login profile in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "login_profile" + } + }, + "_key": "login_profiles" + }, + { + "type": "string", + "description": "Entity name: always 'user-invitation'", + "enum": [ + "user-invitation" + ], + "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the invited user.", + "pattern": "[a-f0-9]{32}", + "_key": "user_id" + } + ], + "description": "Represents an user invitation in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "user_invitation" + } + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "user_invitation_order_enum", + "_key": "order" + }, + { + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "user_invitation" + } }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "parameter_fieldname": "groups", - "in": "body", - "required": false, - "_key": "groups" - }, - { - "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_key": "name" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "entity_fieldname": "owner", - "parameter_fieldname": "owner", - "in": "body", - "required": false, - "_key": "owner" + "_key": "200" }, { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "api_key_status_enum", - "_key": "status" - } - ], - "method": "post", - "mode": "create", - "responses": [ - { - "description": "New entity created.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ - "etag", - "id", - "key", - "name", - "object" + "code", + "message", + "object", + "request_id", + "type" ], "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "entity_fieldname": "creation_time", - "_key": "creation_time" + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "description": "A list of group IDs this API key belongs to.", + "description": "Request fields which failed validation.", "items": { - "type": "string" + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "_key": "groups" + "_key": "fields" }, { "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "entity_fieldname": "key", - "_key": "key" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "api_fieldname": "last_login_time", - "entity_fieldname": "last_login_time", - "_key": "last_login_time" + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "An account with the specified ID does not exist.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "Entity name: always 'api-key'", - "enum": [ - "api-key" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "entity_fieldname": "owner", - "_key": "owner" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", + "description": "Entity name, always `error`.", "enum": [ - "ACTIVE", - "INACTIVE" + "error" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "_key": "object" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "description": "Represents an API key in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "subtenant_api_key" - } + ] }, - "_key": "201" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/user-invitations", + "summary": "Get user invitations.", + "return_type": "paginated_response(subtenant_user_invitation)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_user_invitation" + }, + "x_filter": { + "login_profiles": [ + "eq" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "total_count", + "has_more", + "data", + "login_profiles__eq" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAllAccountInvitations", + "notes": "This lists the user invitations of the subtenant account.", + "foreign_key": { + "entity": "subtenant_user_invitation" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "user_invitations" + }, + { + "description": "Retrieve an array of users.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "id" + }, + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" }, { - "description": "Error in input data, for example, missing display name.", + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "account_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "users", + "responses": [ + { + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", + "data", + "has_more", + "limit", "object", - "request_id", - "type" + "total_count" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of entities.", "items": { "type": "object", "required": [ - "name", - "message" + "account_id", + "email", + "etag", + "id", + "object", + "status" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" + }, + { + "type": "array", + "description": "List of active user sessions.", + "items": { + "type": "object", + "required": [ + "account_id", + "ip_address", + "login_time", + "object", + "reference_token", + "user_agent" + ], + "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The UUID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "example": "127.0.0.1", + "description": "IP address of the client.", + "api_fieldname": "ip_address", + "entity_fieldname": "ip_address", + "_key": "ip_address" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T17:52:07Z", + "description": "The login time of the user.", + "api_fieldname": "login_time", + "entity_fieldname": "login_time", + "_key": "login_time" + }, + { + "type": "string", + "description": "Entity name: always 'user-session'", + "enum": [ + "user-session" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "example": "rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk", + "description": "The reference token.", + "api_fieldname": "reference_token", + "entity_fieldname": "reference_token", + "_key": "reference_token" + }, + { + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", + "description": "User Agent header from the login request.", + "api_fieldname": "user_agent", + "entity_fieldname": "user_agent", + "_key": "user_agent" + } + ], + "description": "Represents an active user session.", + "foreign_key": { + "group": "Accounts", + "entity": "active_session" + } + }, + "_key": "active_sessions" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "_key": "address" + }, { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "A timestamp of the user creation in the storage, in milliseconds.", + "_key": "creation_time" + }, + { + "type": "object", + "x-nullable": true, + "description": "User's account-specific custom properties. The value is a string.", + "additionalProperties": { + "type": "string" + }, + "_key": "custom_fields" }, { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "example": "user@arm.com", + "description": "The email address.", + "_key": "email" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether the user's email address has been verified or not.", + "_key": "email_verified" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "string", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the user.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "_key": "is_gtc_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "_key": "is_marketing_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", + "_key": "is_totp_enabled" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest login of the user, in milliseconds.", + "_key": "last_login_time" + }, + { + "type": "array", + "maxItems": 5, + "description": "Timestamps, succeedings, IP addresses and user agent information of the last five logins of the user, with timestamps in RFC3339 format.", + "items": { + "type": "object", + "required": [ + "date", + "ip_address", + "success", + "user_agent" + ], + "properties": [ + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T17:52:07Z", + "description": "UTC time RFC3339 for this login attempt.", + "api_fieldname": "date", + "entity_fieldname": "date", + "_key": "date" + }, + { + "type": "string", + "example": "127.0.0.1", + "description": "IP address of the client.", + "api_fieldname": "ip_address", + "entity_fieldname": "ip_address", + "_key": "ip_address" + }, + { + "type": "boolean", + "example": true, + "description": "Flag indicating whether login attempt was successful or not.", + "api_fieldname": "success", + "entity_fieldname": "success", + "_key": "success" + }, + { + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", + "description": "User Agent header from the login request.", + "api_fieldname": "user_agent", + "entity_fieldname": "user_agent", + "_key": "user_agent" + } + ], + "description": "Represents an entry in login history.", + "foreign_key": { + "group": "Accounts", + "entity": "login_history" + } + }, + "_key": "login_history" + }, + { + "type": "array", + "description": "A list of login profiles for the user. Specified as the identity providers the user is associated with.", + "x-nullable": true, + "items": { + "type": "object", + "required": [ + "id" + ], + "properties": [ + { + "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "ID of the identity provider.", + "readOnly": false, + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Identity provider type.", + "example": "NATIVE", + "readOnly": true, + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "login_profile_type", + "_key": "type" + } + ], + "description": "Represents a user login profile in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "login_profile" + } + }, + "_key": "login_profiles" + }, + { + "type": "string", + "description": "Entity name: always `user`.", + "enum": [ + "user" + ], + "_key": "object" + }, + { + "type": "string", + "example": "PZf9eEUH43DAPE9ULINFeuj", + "description": "The password when creating a new user. It will be generated when not present in the request.", + "x-nullable": true, + "_key": "password" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest change of the user password, in milliseconds.", + "_key": "password_changed_time" + }, + { + "type": "string", + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the user. ENROLLING state indicates that the user is in the middle of the enrollment process. INVITED means that the user has not accepted the invitation request. RESET means that the password must be changed immediately. INACTIVE users are locked out and not permitted to use the system.", + "enum": [ + "ENROLLING", + "INVITED", + "ACTIVE", + "RESET", + "INACTIVE" + ], + "_key": "status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of scratch codes for the two-factor authentication. Visible only when 2FA is requested to be enabled or the codes regenerated.", + "items": { + "type": "string" + }, + "_key": "totp_scratch_codes" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + }, + { + "pattern": "[\\w\\-,._@+=]{4,30}", + "type": "string", + "example": "admin", + "description": "A username.", + "x-nullable": true, + "_key": "username" } - ] + ], + "description": "Represents a user in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "user" + } }, - "_key": "fields" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `list`.", "enum": [ - "error" + "list" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "user_order_enum", + "_key": "order" }, { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "user" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -15811,68 +15288,10 @@ } ] }, - "_key": "403" - } - ], - "path": "/v3/api-keys", - "summary": "Create a new API key.", - "return_type": "api_key", - "return_info": { - "self": true, - "custom": false, - "type": "api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "id", - "created_at", - "updated_at", - "key", - "creation_time", - "last_login_time", - "account_id" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "createApiKey", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "create" - }, - { - "description": "Delete the API key.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "name": "apikey_id", - "in": "path", - "description": "The ID of the API key to delete.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "apikey_id", - "external_param": false, - "parameter_fieldname": "apikey_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -15942,10 +15361,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An account with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -16015,569 +15434,1036 @@ } ] }, - "_key": "403" - }, - { - "description": "The API key with the specified ID does not exist.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/users", + "summary": "Get users.", + "return_type": "paginated_response(subtenant_user)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_user" + }, + "x_filter": { + "email": [ + "eq" + ], + "status": [ + "eq", + "in", + "nin" + ], + "login_profiles": [ + "eq" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "sub_accounts", + "total_count", + "has_more", + "data", + "email__eq", + "status__eq", + "status__in", + "status__nin", + "login_profiles__eq" + ], + "group_id": "Accounts", + "parameter_map": { + "account_id": "id" + }, + "operation_id": "getAllAccountUsers", + "notes": "This lists the users of the subtenant account.", + "foreign_key": { + "entity": "subtenant_user" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "users" + } + ], + "fields": [ + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "110 Fulbourn Rd", + "description": "Postal address line 1.", + "api_fieldname": "address_line1", + "readOnly": false, + "required": false, + "_key": "address_line1" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "Postal address line 2.", + "api_fieldname": "address_line2", + "readOnly": false, + "required": false, + "_key": "address_line2" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "admin@arm.com", + "description": "The email address of the admin user created for this account. Present only in the response for account creation.", + "api_fieldname": "admin_email", + "readOnly": false, + "required": false, + "_key": "admin_email" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Admin Doe", + "description": "The full name of the admin user created for this account. Present only in the response for account creation.", + "api_fieldname": "admin_full_name", + "readOnly": false, + "required": false, + "_key": "admin_full_name" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the admin user created for this account. Present only in the response for the account creation.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "admin_id", + "readOnly": true, + "required": false, + "_key": "admin_id" + }, + { + "type": "string", + "x-nullable": true, + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT", + "description": "The admin API key created for this account. Present only in the response for account creation.", + "readOnly": true, + "x-deprecation": { + "issued_at": "2020-09-01T00:00:00+00:00", + "end_of_life_at": "2021-09-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, + "api_fieldname": "admin_key", + "required": false, + "_key": "admin_key" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "admin", + "description": "The username of the admin user created for this account. Present only in the response for account creation.", + "api_fieldname": "admin_name", + "readOnly": false, + "required": false, + "_key": "admin_name" + }, + { + "type": "string", + "x-nullable": true, + "example": "PZf9eEUH43DAPE9ULINFeuj", + "description": "The password of the admin user created for this account. Present only in the response for account creation.", + "api_fieldname": "admin_password", + "readOnly": false, + "required": false, + "_key": "admin_password" + }, + { + "type": "array", + "maxItems": 10, + "description": "An array of aliases for the tenant account ID. The aliases must be globally unique.", + "items": { + "type": "string", + "pattern": "[\\w\\-._]{8,100}" + }, + "api_fieldname": "aliases", + "readOnly": false, + "required": false, + "_key": "aliases" + }, + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "api_fieldname": "business_model", + "readOnly": false, + "required": false, + "enum_reference": "account_business_model_enum", + "_key": "business_model" + }, + { + "type": "array", + "description": "Business model history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "default": "active_device_business_model", + "example": "api_calls_1_business_model", + "description": "Business model for this account. Manageable by the root admin only.", + "enum": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "_key": "business_model" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + } + ] + }, + "api_fieldname": "business_model_history", + "readOnly": true, + "required": false, + "_key": "business_model_history" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "Cambridge", + "description": "The city part of the postal address.", + "api_fieldname": "city", + "readOnly": false, + "required": false, + "_key": "city" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM Holdings Plc", + "description": "The name of the company used in billing.", + "api_fieldname": "company", + "readOnly": false, + "required": false, + "_key": "company" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "J. Doe", + "description": "The name of the contact person for this account.", + "api_fieldname": "contact", + "readOnly": false, + "required": false, + "_key": "contact" + }, + { + "type": "string", + "example": "1NX25_0001", + "x-nullable": true, + "description": "Contract number of the customer.", + "api_fieldname": "contract_number", + "readOnly": false, + "required": false, + "_key": "contract_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "United Kingdom", + "description": "The country part of the postal address.", + "api_fieldname": "country", + "readOnly": false, + "required": false, + "_key": "country" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "object", + "x-nullable": true, + "description": "Account's custom properties as key-value pairs.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "readOnly": false, + "required": false, + "_key": "custom_fields" + }, + { + "type": "string", + "example": "1NC25_0001", + "x-nullable": true, + "description": "Customer number of the customer.", + "api_fieldname": "customer_number", + "readOnly": false, + "required": false, + "_key": "customer_number" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "ARM", + "description": "The display name for the tenant account.", + "api_fieldname": "display_name", + "readOnly": false, + "required": false, + "_key": "display_name" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "x-nullable": true, + "example": "info@arm.com", + "description": "The company email address for this account.", + "api_fieldname": "email", + "readOnly": false, + "required": false, + "_key": "email" + }, + { + "type": "string", + "example": "IT", + "description": "Account end market.", + "api_fieldname": "end_market", + "readOnly": false, + "required": true, + "_key": "end_market" + }, + { + "type": "string", + "x-nullable": true, + "format": "date-time", + "description": "Expiration time of the account, as UTC time RFC3339.", + "api_fieldname": "expiration", + "readOnly": true, + "required": false, + "_key": "expiration" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 180, + "example": "180", + "x-nullable": true, + "description": "Indicates how many days (1-180) before account expiration a notification email is sent.", + "api_fieldname": "expiration_warning_threshold", + "readOnly": false, + "required": false, + "_key": "expiration_warning_threshold" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "Account ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 120, + "x-nullable": true, + "example": "30", + "description": "The reference token expiration time, in minutes, for this account.", + "api_fieldname": "idle_timeout", + "readOnly": false, + "required": false, + "_key": "idle_timeout" + }, + { + "type": "array", + "description": "List of account limitation objects.", + "items": { + "type": "object", + "properties": [ + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 120, + "description": "Billing period of the account limitation.", + "example": 1, + "_key": "billing_period" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "readOnly": true, + "_key": "created_at" + }, + { + "type": "string", + "description": "Description of the account limitation.", + "readOnly": true, + "_key": "description" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "readOnly": true, + "_key": "etag" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "readOnly": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this limitation is inherited.", + "readOnly": true, + "_key": "inherited" + }, + { + "type": "string", + "description": "Indicates where this limit is inherited from.", + "readOnly": true, + "_key": "inherited_from" + }, + { + "type": "string", + "enum": [ + "account", + "template", + "tier_template" ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] + "description": "Indicates the type of the entity where the limitation is inherited from.", + "readOnly": true, + "_key": "inherited_type" }, - "_key": "404" - } - ], - "path": "/v3/api-keys/{apikey_id}", - "summary": "Delete API key.", - "return_type": "api_key", - "return_info": { - "self": true, - "custom": false, - "type": "api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "deleteApiKey", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "Retrieve API keys in an array, optionally filtered by the owner.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "api_key_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "Successful operation.", - "schema": { + { "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], + "description": "Used as default value if parent entity has this limitation defined. If parent entity does not have such a limitation, the value is null.", "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "required": [ - "etag", - "id", - "key", - "name", - "object" - ], - "properties": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "_key": "creation_time" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" - }, - "_key": "groups" - }, - { - "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "_key": "id" - }, - { - "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "_key": "key" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "_key": "last_login_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'api-key'", - "enum": [ - "api-key" - ], - "_key": "object" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "_key": "owner" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "_key": "status" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - } - ], - "description": "Represents an API key in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "api_key" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, { "type": "integer", "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "minimum": 1, + "maximum": 120, + "description": "Default billing period of the account limitation as defined in the parent entity.", + "example": 1, + "_key": "billing_period" }, { - "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "type": "integer", + "format": "int64", + "description": "Default value of the limit as defined in the parent entity.", + "example": 25, + "_key": "limit" }, { "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "format": "int64", + "description": "Default quota as defined in the parent entity.", + "example": 0, + "_key": "quota" } ], - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "api_key" - } + "_key": "inherited_value" }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" + { + "type": "integer", + "format": "int64", + "description": "The value of the limit.", + "example": 25, + "_key": "limit" + }, + { + "type": "string", + "description": "Name of the account limitation.", + "example": "iam_limit_user_count", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'limitation'", + "enum": [ + "limitation" ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] + "readOnly": true, + "_key": "object" }, - "_key": "401" + { + "type": "integer", + "format": "int64", + "description": "Quota of the account limitation.", + "example": 0, + "_key": "quota" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "readOnly": true, + "_key": "updated_at" + } + ], + "description": "This object represents an account limitation." + }, + "api_fieldname": "limitations", + "readOnly": true, + "required": false, + "_key": "limitations" + }, + { + "type": "object", + "x-nullable": true, + "x-deprecation": { + "issued_at": "2019-08-27T12:03:58+00:00", + "end_of_life_at": "2020-08-27T12:03:58+00:00", + "comment": "Replaced by the limitations parameter." + }, + "description": "DEPRECATED: Replaced by the limitations parameter.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "limits", + "readOnly": true, + "required": false, + "_key": "limits" + }, + { + "type": "string", + "x-nullable": true, + "description": "The enforcement status of multi-factor authentication, either `enforced` or `optional`.", + "enum": [ + "enforced", + "optional" + ], + "api_fieldname": "mfa_status", + "readOnly": false, + "required": false, + "enum_reference": "account_mfa_status_enum", + "_key": "mfa_status" + }, + { + "type": "array", + "x-nullable": true, + "description": "A list of notification email addresses.", + "items": { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string" + }, + "api_fieldname": "notification_emails", + "readOnly": false, + "required": false, + "_key": "notification_emails" + }, + { + "type": "object", + "properties": [ + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "info@arm.com", + "description": "The email address of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_email", + "entity_fieldname": "admin_email", + "_key": "admin_email" }, { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" + "type": "string", + "maxLength": 100, + "example": "J. Doe", + "description": "The name of the admin user who is the contact person of the parent account.", + "api_fieldname": "admin_name", + "entity_fieldname": "admin_name", + "_key": "admin_name" + }, + { + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" } ], - "path": "/v3/api-keys", - "summary": "Get all API keys.", - "return_type": "paginated_response(api_key)", - "return_info": { - "self": true, - "custom": false, - "type": "api_key" - }, - "x_filter": { - "key": [ - "eq" - ], - "owner": [ - "eq" - ] + "description": "Represents parent account contact details in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "parent_account" }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "total_count", - "has_more", - "data", - "key__eq", - "owner__eq" + "x-nullable": true, + "api_fieldname": "parent_account", + "readOnly": true, + "required": false, + "_key": "parent_account" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account, if any.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "parent_id", + "readOnly": true, + "required": false, + "_key": "parent_id" + }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "entity_fieldname": "minimum_length", + "_key": "minimum_length" + } ], - "foreign_key_priority": "self", - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "getAllApiKeys", - "pagination": true, "foreign_key": { "group": "Accounts", - "entity": "api_key" + "entity": "password_policy" }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "list" + "description": "The password policy for this account.", + "x-nullable": true, + "api_fieldname": "password_policy", + "readOnly": false, + "_key": "password_policy" + }, + { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 45, + "description": "Indicates for how many minutes a password recovery email is valid.", + "api_fieldname": "password_recovery_expiration", + "readOnly": false, + "required": false, + "_key": "password_recovery_expiration" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "+44 (1223) 400 400", + "description": "The phone number of a company representative.", + "api_fieldname": "phone_number", + "readOnly": false, + "required": false, + "_key": "phone_number" + }, + { + "type": "array", + "x-nullable": true, + "description": "List of policies if requested.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "entity_fieldname": "action", + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "entity_fieldname": "allow", + "_key": "allow" + }, + { + "type": "string", + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "entity_fieldname": "feature", + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "entity_fieldname": "inherited", + "_key": "inherited" + }, + { + "type": "string", + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", + "entity_fieldname": "inherited_from", + "_key": "inherited_from" + }, + { + "type": "string", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", + "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", + "entity_fieldname": "inherited_type", + "_key": "inherited_type" + }, + { + "type": "string", + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "entity_fieldname": "resource", + "_key": "resource" + } + ], + "description": "Represents a feature policy. Either the feature or the resource must be specified.", + "foreign_key": { + "group": "Accounts", + "entity": "policy" + } + }, + "api_fieldname": "policies", + "readOnly": true, + "required": false, + "_key": "policies" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": "CB1 9NJ", + "description": "The postal code part of the postal address.", + "api_fieldname": "postal_code", + "readOnly": false, + "required": false, + "_key": "postal_code" + }, + { + "type": "string", + "x-nullable": true, + "example": "Subscription paid.", + "description": "A note with the reason for account status update.", + "api_fieldname": "reason", + "readOnly": true, + "required": false, + "_key": "reason" + }, + { + "type": "string", + "x-nullable": true, + "example": "ARM-INT-0001", + "description": "A reference note for updating the status of the account.", + "api_fieldname": "reference_note", + "readOnly": true, + "required": false, + "_key": "reference_note" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "sales@arm.com", + "x-nullable": true, + "description": "Email address of the sales contact.", + "api_fieldname": "sales_contact", + "readOnly": false, + "required": false, + "_key": "sales_contact" + }, + { + "type": "string", + "maxLength": 100, + "x-nullable": true, + "example": " ", + "description": "The state part of the postal address.", + "api_fieldname": "state", + "readOnly": false, + "required": false, + "_key": "state" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the account.", + "enum": [ + "ENROLLING", + "ACTIVE", + "RESTRICTED", + "SUSPENDED" + ], + "api_fieldname": "status", + "readOnly": true, + "required": false, + "enum_reference": "account_status_enum", + "_key": "status" + }, + { + "type": "string", + "x-nullable": true, + "example": "01619571e7160242ac12000600000000", + "description": "Account template ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "template_id", + "readOnly": true, + "required": false, + "_key": "template_id" + }, + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "api_fieldname": "tier", + "readOnly": true, + "required": false, + "_key": "tier" + }, + { + "type": "array", + "description": "Tier history for this account.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "1", + "description": "The tier level of the account; `0`: free tier, `1`: commercial account, `2`: partner tier. Other values are reserved for the future.", + "_key": "tier" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updatedAt" + } + ] + }, + "api_fieldname": "tier_history", + "readOnly": true, + "required": false, + "_key": "tier_history" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Time when upgraded to commercial account in UTC format RFC3339.", + "api_fieldname": "upgraded_at", + "readOnly": true, + "required": false, + "_key": "upgraded_at" + } + ], + "field_renames": [], + "tags": [ + "Account - profile", + "Tenant accounts - accounts", + "Tenant accounts - API keys", + "Tenant accounts - users", + "Tenant accounts - user invitations", + "Tenant security and identity - certificates", + "Tenant user interface configuration - colors", + "Tenant user interface configuration - images" + ], + "group_id": "Accounts", + "_key": "account" + }, + { + "swagger_models": [ + "ActiveSession" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The UUID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": true, + "required": false, + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "example": "127.0.0.1", + "description": "IP address of the client.", + "api_fieldname": "ip_address", + "readOnly": true, + "required": false, + "_key": "ip_address" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T17:52:07Z", + "description": "The login time of the user.", + "api_fieldname": "login_time", + "readOnly": true, + "required": false, + "_key": "login_time" + }, + { + "type": "string", + "example": "rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk", + "description": "The reference token.", + "api_fieldname": "reference_token", + "readOnly": true, + "required": false, + "_key": "reference_token" }, { - "description": "Retrieve API key details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\\n-H 'Authorization: Bearer '\n```", + "type": "string", + "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", + "description": "User Agent header from the login request.", + "api_fieldname": "user_agent", + "readOnly": true, + "required": false, + "_key": "user_agent" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "active_session" + }, + { + "swagger_models": [ + "ApiKeyInfoReq", + "ApiKeyInfoResp", + "ApiKeyInfoRespList", + "ApiKeyUpdateReq", + "GroupSummaryList" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Create a new API key.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{\"name\": \"MyKey1\"}' \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json'\n```", "field_renames": [], - "fields": [], - "method": "get", - "mode": "me", + "fields": [ + { + "type": "array", + "description": "A list of group IDs this API key belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, + { + "type": "string", + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "entity_fieldname": "owner", + "parameter_fieldname": "owner", + "in": "body", + "required": false, + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "api_key_status_enum", + "_key": "status" + } + ], + "method": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", + "description": "New entity created.", "schema": { "type": "object", "required": [ @@ -16715,83 +16601,10 @@ "entity": "subtenant_api_key" } }, - "_key": "200" - }, - { - "description": "Authentication failure.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "401" + "_key": "201" }, { - "description": "Forbidden.", + "description": "Error in input data, for example, missing API key name.", "schema": { "type": "object", "required": [ @@ -16861,309 +16674,7 @@ } ] }, - "_key": "403" - } - ], - "path": "/v3/api-keys/me", - "summary": "Get API key details.", - "return_type": "api_key", - "return_info": { - "self": true, - "custom": false, - "type": "api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "id", - "created_at", - "updated_at", - "key", - "name", - "groups", - "owner", - "status", - "creation_time", - "last_login_time", - "account_id" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "getMyApiKey", - "notes": "This is provided by the SDK to avoid listing to retrieve the user's own API Key.", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "me" - }, - { - "description": "Retrieve groups associated with the API key.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "name": "apikey_id", - "in": "path", - "description": "The ID of the API key.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "apikey_id", - "external_param": false, - "parameter_fieldname": "apikey_id", - "_key": "id" - }, - { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", - "required": false, - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "api_key_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "policy_groups", - "responses": [ - { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "data", - "has_more", - "limit", - "object", - "total_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "required": [ - "account_id", - "apikey_count", - "etag", - "id", - "name", - "object", - "user_count" - ], - "properties": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account this group belongs to.", - "pattern": "[a-f0-9]{32}", - "_key": "account_id" - }, - { - "type": "integer", - "format": "int32", - "example": 0, - "description": "The number of API keys in this group.", - "_key": "apikey_count" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571dec00242ac12000600000000", - "description": "The ID of the group.", - "pattern": "[a-f0-9]{32}", - "_key": "id" - }, - { - "type": "string", - "maxLength": 100, - "example": "Administrators", - "description": "The name of the group.", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always `group`.", - "enum": [ - "group" - ], - "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" - }, - { - "type": "integer", - "format": "int32", - "example": 1, - "description": "The number of users in this group.", - "_key": "user_count" - } - ], - "description": "This object contains basic information about groups.", - "foreign_key": { - "group": "Accounts", - "entity": "subtenant_policy_group" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return (2-1000). Default 50.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "subtenant_user_order_enum", - "_key": "order" - }, - { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "subtenant_policy_group" - } - }, - "_key": "200" + "_key": "400" }, { "description": "Authentication failure.", @@ -17309,274 +16820,70 @@ } ] }, - "_key": "403" - }, - { - "description": "An API key with the given ID does not exist.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/api-keys/{apikey_id}/groups", - "summary": "Get groups of the API key.", - "return_type": "paginated_response(policy_group)", + "path": "/v3/api-keys", + "summary": "Create a new API key.", + "return_type": "api_key", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "policy_group" + "type": "api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys", + "links": [] + }, "drop_fields": [ "object", "etag", "type", "filter", - "total_count", - "has_more", - "data" + "id", + "created_at", + "updated_at", + "key", + "creation_time", + "last_login_time", + "account_id" ], "group_id": "Accounts", "parameter_map": { "apikey_id": "id" }, - "operation_id": "getGroupsOfApikey", - "foreign_key": { - "entity": "policy_group" - }, - "pagination": true, + "operation_id": "createApiKey", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "policy_groups" + "_key": "create" }, { - "description": "Retrieve API key details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete the API key.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { + "name": "apikey_id", + "in": "path", + "description": "The ID of the API key to delete.", + "required": true, "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", "entity_fieldname": "id", + "api_fieldname": "apikey_id", + "external_param": false, "parameter_fieldname": "apikey_id", - "in": "path", - "required": true, "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "etag", - "id", - "key", - "name", - "object" - ], - "properties": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "entity_fieldname": "creation_time", - "_key": "creation_time" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "_key": "groups" - }, - { - "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "entity_fieldname": "key", - "_key": "key" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "api_fieldname": "last_login_time", - "entity_fieldname": "last_login_time", - "_key": "last_login_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'api-key'", - "enum": [ - "api-key" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "entity_fieldname": "owner", - "_key": "owner" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "description": "Represents an API key in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "subtenant_api_key" - } - }, - "_key": "200" + "description": "Deleted successfully.", + "_key": "204" }, { "description": "Authentication failure.", @@ -17652,7 +16959,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden. Only the owner of the API key or an administrator can delete an API key.", "schema": { "type": "object", "required": [ @@ -17725,7 +17032,7 @@ "_key": "403" }, { - "description": "API key with the specified ID does not exist.", + "description": "An API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -17799,7 +17106,7 @@ } ], "path": "/v3/api-keys/{apikey_id}", - "summary": "Get API key details.", + "summary": "Delete API key.", "return_type": "api_key", "return_info": { "self": true, @@ -17807,203 +17114,256 @@ "type": "api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, "drop_fields": [ "object", "etag", "type", - "filter", - "created_at", - "updated_at", - "key", - "name", - "groups", - "owner", - "status", - "creation_time", - "last_login_time", - "account_id" + "filter" ], "group_id": "Accounts", "parameter_map": { "apikey_id": "id" }, - "operation_id": "getApiKey", + "operation_id": "deleteApiKey", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete" }, { - "description": "Update API key details.\n\n**Example:**\n`curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestApiKey25\"}'\n```", + "description": "Retrieve an array of API keys, optionally filtered by the owner.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ - { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "parameter_fieldname": "groups", - "in": "body", - "required": false, - "_key": "groups" - }, { "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "apikey_id", - "in": "path", - "required": true, - "_key": "id" + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_key": "name" + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" }, { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "entity_fieldname": "owner", - "parameter_fieldname": "owner", - "in": "body", + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", "required": false, - "_key": "owner" + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ - "ACTIVE", - "INACTIVE" + "ASC", + "DESC" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", "required": false, - "enum_reference": "api_key_status_enum", - "_key": "status" + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "api_key_order_enum", + "_key": "order" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "list", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", "required": [ - "etag", - "id", - "key", - "name", - "object" + "data", + "has_more", + "limit", + "object", + "total_count" ], "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "entity_fieldname": "creation_time", - "_key": "creation_time" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "A list of group IDs this API key belongs to.", + "description": "A list of entities.", "items": { - "type": "string" + "type": "object", + "required": [ + "etag", + "id", + "key", + "name", + "object" + ], + "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "The timestamp of the API key creation in the storage, in milliseconds.", + "_key": "creation_time" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "_key": "etag" + }, + { + "type": "array", + "description": "A list of group IDs this API key belongs to.", + "items": { + "type": "string" + }, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "_key": "id" + }, + { + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "_key": "key" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "The timestamp of the latest API key usage, in milliseconds.", + "_key": "last_login_time" + }, + { + "type": "string", + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'api-key'", + "enum": [ + "api-key" + ], + "_key": "object" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "_key": "status" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" + } + ], + "description": "Represents an API key in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "api_key" + } }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "_key": "groups" - }, - { - "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "entity_fieldname": "key", - "_key": "key" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "api_fieldname": "last_login_time", - "entity_fieldname": "last_login_time", - "_key": "last_login_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: always 'api-key'", + "description": "Entity name: always `list`.", "enum": [ - "api-key" + "list" ], "api_fieldname": "object", "entity_fieldname": "object", @@ -18011,45 +17371,35 @@ }, { "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "entity_fieldname": "owner", - "_key": "owner" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", "enum": [ - "ACTIVE", - "INACTIVE" + "ASC", + "DESC" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], - "description": "Represents an API key in Device Management.", + "pagination": true, "foreign_key": { "group": "Accounts", - "entity": "subtenant_api_key" + "entity": "api_key" } }, "_key": "200" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -18119,10 +17469,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -18192,746 +17542,596 @@ } ] }, - "_key": "401" - }, + "_key": "403" + } + ], + "path": "/v3/api-keys", + "summary": "Get all API keys.", + "return_type": "paginated_response(api_key)", + "return_info": { + "self": true, + "custom": false, + "type": "api_key" + }, + "x_filter": { + "key": [ + "eq" + ], + "owner": [ + "eq" + ] + }, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys", + "links": [] + }, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data", + "key__eq", + "owner__eq" + ], + "foreign_key_priority": "self", + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "getAllApiKeys", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "api_key" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Retrieve details of current API key.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [], + "method": "get", + "mode": "me", + "responses": [ { - "description": "Forbidden.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", - "object", - "request_id", - "type" + "etag", + "id", + "key", + "name", + "object" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "The timestamp of the API key creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "entity_fieldname": "creation_time", + "_key": "creation_time" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "type": "array", + "description": "A list of group IDs this API key belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "_key": "groups" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "The API key with the specified ID does not exist.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "api_fieldname": "key", + "entity_fieldname": "key", + "_key": "key" }, { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "The timestamp of the latest API key usage, in milliseconds.", + "api_fieldname": "last_login_time", + "entity_fieldname": "last_login_time", + "_key": "last_login_time" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'api-key'", "enum": [ - "error" + "api-key" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "entity_fieldname": "owner", + "_key": "owner" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] - }, - "_key": "404" - } - ], - "path": "/v3/api-keys/{apikey_id}", - "summary": "Update API key details.", - "return_type": "api_key", - "return_info": { - "self": true, - "custom": false, - "type": "api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "created_at", - "updated_at", - "key", - "creation_time", - "last_login_time", - "account_id" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "updateApiKey", - "additional_operations": [ - { - "operation_id": "updateMyApiKey", - "notes": "After retrieving the resource using the `me` method, it can modified using using this SDK method." - } - ], - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "update" - } - ], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "readOnly": true, - "required": false, - "_key": "creation_time" - }, - { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "readOnly": false, - "required": false, - "_key": "groups" - }, - { - "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "readOnly": true, - "required": false, - "_key": "key" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "api_fieldname": "last_login_time", - "readOnly": true, - "required": false, - "_key": "last_login_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "readOnly": false, - "required": true, - "_key": "name" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The owner of this API key, who is the creator by default.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner", - "readOnly": false, - "required": false, - "_key": "owner" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "readOnly": false, - "required": false, - "enum_reference": "api_key_status_enum", - "_key": "status" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "Account - API keys" - ], - "group_id": "Accounts", - "_key": "api_key" - }, - { - "swagger_models": [ - "CampaignDeviceMetadata" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Get update campaign metadata for a specific device.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", - "field_renames": [ - { - "api_fieldname": "campaign", - "_key": "campaign_id" - } - ], - "fields": [ - { - "type": "string", - "description": "The device's campaign ID.", - "example": "015bf72fccda00000000000100100280", - "api_fieldname": "campaign", - "entity_fieldname": "campaign_id", - "parameter_fieldname": "campaign_id", - "in": "path", - "required": true, - "_key": "campaign_id" - }, - { - "type": "string", - "description": "The metadata record ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "campaign_device_metadata_id", - "in": "path", - "required": true, - "_key": "id" - } - ], - "method": "get", - "mode": "read", - "responses": [ + ], + "description": "Represents an API key in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_api_key" + } + }, + "_key": "200" + }, { - "description": "Request successful.", + "description": "Authentication failure.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "description": "The device's campaign ID.", - "example": "015bf72fccda00000000000100100280", - "api_fieldname": "campaign", - "entity_fieldname": "campaign_id", - "_key": "campaign" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "format": "date-time", - "description": "The time the entity was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { - "description": "The state of the update campaign on the device.", - "enum": [ - "pending", - "updated_connector_channel", - "failed_connector_channel_update", - "deployed", - "manifestremoved", - "deregistered" - ], "type": "string", - "api_fieldname": "deployment_state", - "entity_fieldname": "deployment_state", - "_key": "deployment_state" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "maxLength": 2000, - "description": "Description.", - "example": "a description", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "The device ID.", - "example": "015c2fec9bba0000000000010010036f", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "API resource entity version.", - "example": "2017-05-22T12:37:58.753425Z", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "description": "The metadata record ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "How the firmware is delivered (connector or direct).", - "example": "connector", - "api_fieldname": "mechanism", - "entity_fieldname": "mechanism", - "_key": "mechanism" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "description": "The Device Management Connect URL.", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url", - "_key": "mechanism_url" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "maxLength": 128, - "description": "The record name.", - "default": "default_object_name", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "The entity name: always 'update-campaign-device-metadata'.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "format": "date-time", - "description": "The time the entity was updated.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_device_metadata" - } + ] }, - "_key": "200" - }, - { - "description": "Unauthorized.", - "_key": "401" - }, - { - "description": "Not Found.", - "_key": "404" + "_key": "403" } ], - "path": "/v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}", - "summary": "Get a campaign device metadata", - "return_type": "campaign_device_metadata", + "path": "/v3/api-keys/me", + "summary": "Get current API key.", + "return_type": "api_key", "return_info": { "self": true, "custom": false, - "type": "campaign_device_metadata" + "type": "api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated.", + "links": [] + }, "drop_fields": [ "object", "etag", "type", "filter", + "id", "created_at", "updated_at", - "deployment_state", - "description", - "device_id", - "mechanism", - "mechanism_url", - "name" + "key", + "name", + "groups", + "owner", + "status", + "creation_time", + "last_login_time", + "account_id" ], - "group_id": "Device_Update", + "group_id": "Accounts", "parameter_map": { - "campaign_device_metadata_id": "id" + "apikey_id": "id" }, - "operation_id": "Update_Campaign_Metadata_retrieve", + "operation_id": "getMyApiKey", + "notes": "This is provided by the SDK to avoid listing to retrieve the user's own API Key.", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "description": "The device's campaign ID.", - "example": "015bf72fccda00000000000100100280", - "api_fieldname": "campaign", - "readOnly": false, - "required": true, - "_key": "campaign_id" - }, - { - "type": "string", - "format": "date-time", - "description": "The time the entity was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "description": "The state of the update campaign on the device.", - "enum": [ - "pending", - "updated_connector_channel", - "failed_connector_channel_update", - "deployed", - "manifestremoved", - "deregistered" - ], - "type": "string", - "api_fieldname": "deployment_state", - "readOnly": true, - "required": false, - "enum_reference": "campaign_device_metadata_deployment_state_enum", - "_key": "deployment_state" - }, - { - "type": "string", - "maxLength": 2000, - "description": "Description.", - "example": "a description", - "api_fieldname": "description", - "readOnly": true, - "required": false, - "_key": "description" - }, - { - "type": "string", - "description": "The device ID.", - "example": "015c2fec9bba0000000000010010036f", - "api_fieldname": "device_id", - "readOnly": true, - "required": false, - "_key": "device_id" - }, - { - "type": "string", - "description": "The metadata record ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "description": "How the firmware is delivered (connector or direct).", - "example": "connector", - "api_fieldname": "mechanism", - "readOnly": true, - "required": false, - "_key": "mechanism" - }, - { - "type": "string", - "description": "The Device Management Connect URL.", - "api_fieldname": "mechanism_url", - "readOnly": true, - "required": false, - "_key": "mechanism_url" - }, - { - "type": "string", - "maxLength": 128, - "description": "The record name.", - "default": "default_object_name", - "api_fieldname": "name", - "readOnly": true, - "required": false, - "_key": "name" + "_key": "me" }, { - "type": "string", - "format": "date-time", - "description": "The time the entity was updated.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [ - { - "api_fieldname": "campaign", - "_key": "campaign_id" - } - ], - "tags": [ - "Device update - campaigns" - ], - "group_id": "Device_Update", - "_key": "campaign_device_metadata" - }, - { - "swagger_models": [ - "EventTypeList", - "EventTypeSummary", - "EventTypeSummaryList" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Get a list of events grouped by summary.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types \\\n-H 'Authorization: '\n```\n", + "description": "Retrieve an array of policy groups associated with an API key.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { - "description": "The campaign ID.", - "in": "path", - "name": "campaign_id", - "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, - "entity_fieldname": "campaign_id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "campaign_id" + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { - "description": "The summary status. For example, fail.", + "name": "apikey_id", "in": "path", - "name": "summary_status_id", + "description": "The ID of the API key.", "required": true, "type": "string", "entity_fieldname": "id", - "api_fieldname": "summary_status_id", + "api_fieldname": "apikey_id", "external_param": false, - "parameter_fieldname": "summary_status_id", + "parameter_fieldname": "apikey_id", "_key": "id" + }, + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "api_key_order_enum", + "_key": "order" } ], "method": "get", - "mode": "events", + "mode": "policy_groups", "responses": [ { - "description": "OK.", + "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], "properties": [ { "type": "string", - "description": "The entity ID to fetch after the given one.", - "example": "null", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", "_key": "after" }, { "type": "array", + "description": "A list of entities.", "items": { "type": "object", + "required": [ + "account_id", + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" + ], "properties": [ { "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "_key": "campaign_id" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" }, { "type": "integer", - "example": 10, - "_key": "count" + "format": "int32", + "example": 0, + "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, + "_key": "apikey_count" + }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" }, { "type": "string", "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", "_key": "created_at" }, { "type": "string", - "example": "Update error, nonspecific network error", - "_key": "description" + "example": "1", + "description": "API resource entity version.", + "_key": "etag" }, { "type": "string", - "example": "UPD4_FAIL_101", - "_key": "event_type" + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "_key": "id" }, { "type": "string", - "example": "upd_fail_101", - "_key": "id" + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "_key": "name" }, { "type": "string", - "description": "Entity name: always 'event-type'.", + "description": "Entity name: always `group`.", + "enum": [ + "group" + ], "_key": "object" }, { "type": "string", - "example": "FAIL", - "_key": "summary_status" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" }, { - "type": "string", - "example": "fail", - "_key": "summary_status_id" + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "_key": "user_count" } ], + "description": "This object contains basic information about groups.", "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" + "group": "Accounts", + "entity": "subtenant_policy_group" } }, "api_fieldname": "data", @@ -18940,44 +18140,60 @@ }, { "type": "boolean", - "description": "A flag indicating whether there are more results.", - "example": "false", + "example": false, + "description": "Flag indicating whether there are more results.", "api_fieldname": "has_more", "entity_fieldname": "has_more", "_key": "has_more" }, { "type": "integer", - "description": "The number of results to return, (range: 2-1000), or equals to total_count.", - "example": "50", + "format": "int32", + "example": 50, + "description": "The number of results to return (2-1000). Default 50.", "api_fieldname": "limit", "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", "_key": "limit" }, { "type": "string", - "description": "The entity name: always 'list'.", - "example": "list", + "description": "Entity name: always `list`.", + "enum": [ + "list" + ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" ], - "description": "The order of the records to return. Acceptable values: ASC, DESC. Default: ASC.", - "example": "ASC", "api_fieldname": "order", "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "subtenant_user_order_enum", "_key": "order" }, { "type": "integer", - "description": "The total number or records, if requested. It may be returned also for small lists.", - "example": "1", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", "api_fieldname": "total_count", "entity_fieldname": "total_count", "_key": "total_count" @@ -18985,14 +18201,14 @@ ], "pagination": true, "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" + "group": "Accounts", + "entity": "subtenant_policy_group" } }, "_key": "200" }, { - "description": "Not Authenticated.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -19065,265 +18281,7 @@ "_key": "401" }, { - "description": "Not Found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - } - ], - "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types", - "summary": "Get a list of events grouped by summary", - "return_type": "paginated_response(campaign_statistics_events)", - "return_info": { - "self": false, - "custom": false, - "type": "campaign_statistics_events" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "order", - "limit", - "after", - "has_more", - "total_count", - "data" - ], - "group_id": "Device_Update", - "parameter_map": { - "summary_status_id": "id" - }, - "operation_id": "Update_Campaign_event_types_list", - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "events" - }, - { - "description": "Get a list of statistics for a campaign, including the number of devices reporting specific event codes.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics \\\n-H 'Authorization: '\n```\n", - "field_renames": [], - "fields": [ - { - "description": "The campaign ID.", - "in": "path", - "name": "campaign_id", - "required": true, - "type": "string", - "minLength": 32, - "maxLength": 32, - "entity_fieldname": "campaign_id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "campaign_id" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "The entity ID to fetch after the given one.", - "example": "null", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "_key": "campaign_id" - }, - { - "type": "integer", - "example": 10, - "_key": "count" - }, - { - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "_key": "created_at" - }, - { - "type": "string", - "enum": [ - "fail", - "success", - "info", - "skipped" - ], - "example": "fail", - "description": "ID of the event type description.", - "_key": "id" - }, - { - "type": "string", - "description": "Entity name: always 'summary_status'.", - "_key": "object" - }, - { - "type": "string", - "enum": [ - "FAIL", - "SUCCESS", - "INFO", - "SKIPPED" - ], - "example": "FAIL", - "description": "The event type description.", - "_key": "summary_status" - } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "description": "A flag indicating whether there are more results.", - "example": "false", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "description": "The number of results to return, (range: 2-1000), or equals to total_count.", - "example": "50", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "The entity name: always 'list'.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "The order of the records to return. Acceptable values: ASC, DESC. Default: ASC.", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "type": "integer", - "description": "The total number or records, if requested. It may be returned also for small lists.", - "example": "1", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics" - } - }, - "_key": "200" - }, - { - "description": "Not Authenticated.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -19393,10 +18351,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "An API key with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -19469,74 +18427,57 @@ "_key": "404" } ], - "path": "/v3/update-campaigns/{campaign_id}/statistics", - "summary": "Get statistics for a campaign", - "return_type": "paginated_response(campaign_statistics)", + "path": "/v3/api-keys/{apikey_id}/groups", + "summary": "Get policy groups of an API key.", + "return_type": "paginated_response(policy_group)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "campaign_statistics" + "type": "policy_group" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups", + "links": [] + }, "drop_fields": [ "object", "etag", "type", "filter", - "order", - "limit", - "after", - "has_more", "total_count", + "has_more", "data" ], - "foreign_key_priority": "self", - "group_id": "Device_Update", + "group_id": "Accounts", "parameter_map": { - "summary_status_id": "id" + "apikey_id": "id" }, - "operation_id": "Update_Campaign_statistics_list", - "pagination": true, + "operation_id": "getGroupsOfApikey", "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics" + "entity": "policy_group" }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "policy_groups" }, { - "description": "Get the count of successfully updated, skipped, and failed devices. \n
\n**Usage example:**\n```\ncurl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Retrieve details of an API key.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "parameter_fieldname": "campaign_id", - "in": "path", - "required": true, - "_key": "campaign_id" - }, - { - "type": "string", - "enum": [ - "fail", - "success", - "info", - "skipped" - ], - "example": "fail", - "description": "ID of the event type description.", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "summary_status_id", + "parameter_fieldname": "apikey_id", "in": "path", "required": true, - "enum_reference": "campaign_statistics_id_enum", "_key": "id" } ], @@ -19544,151 +18485,148 @@ "mode": "read", "responses": [ { - "description": "OK.", + "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "etag", + "id", + "key", + "name", + "object" + ], "properties": [ { "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "_key": "campaign_id" - }, - { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "entity_fieldname": "count", - "_key": "count" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, { - "type": "string", - "enum": [ - "fail", - "success", - "info", - "skipped" - ], - "example": "fail", - "description": "ID of the event type description.", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "description": "Entity name: always 'summary_status'.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "The timestamp of the API key creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "entity_fieldname": "creation_time", + "_key": "creation_time" }, { "type": "string", - "enum": [ - "FAIL", - "SUCCESS", - "INFO", - "SKIPPED" - ], - "example": "FAIL", - "description": "The event type description.", - "api_fieldname": "summary_status", - "entity_fieldname": "summary_status", - "_key": "summary_status" - } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics" - } - }, - "_key": "200" - }, - { - "description": "Not Authenticated.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of group IDs this API key belongs to.", "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "type": "string" }, - "_key": "fields" + "api_fieldname": "groups", + "entity_fieldname": "groups", + "_key": "groups" + }, + { + "type": "string", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "api_fieldname": "key", + "entity_fieldname": "key", + "_key": "key" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "The timestamp of the latest API key usage, in milliseconds.", + "api_fieldname": "last_login_time", + "entity_fieldname": "last_login_time", + "_key": "last_login_time" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'api-key'", "enum": [ - "error" + "api-key" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "entity_fieldname": "owner", + "_key": "owner" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "description": "Represents an API key in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_api_key" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Not Found.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -19758,231 +18696,10 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}", - "summary": "Get a status summary", - "return_type": "campaign_statistics", - "return_info": { - "self": true, - "custom": false, - "type": "campaign_statistics" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "summary_status", - "count", - "created_at" - ], - "group_id": "Device_Update", - "parameter_map": { - "summary_status_id": "id" - }, - "operation_id": "Update_Campaign_statistics_retrieve", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "readOnly": false, - "required": true, - "_key": "campaign_id" - }, - { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "readOnly": true, - "required": false, - "_key": "count" - }, - { - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "enum": [ - "fail", - "success", - "info", - "skipped" - ], - "example": "fail", - "description": "ID of the event type description.", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "enum_reference": "campaign_statistics_id_enum", - "_key": "id" - }, - { - "type": "string", - "enum": [ - "FAIL", - "SUCCESS", - "INFO", - "SKIPPED" - ], - "example": "FAIL", - "description": "The event type description.", - "api_fieldname": "summary_status", - "readOnly": true, - "required": false, - "enum_reference": "campaign_statistics_summary_status_enum", - "_key": "summary_status" - } - ], - "field_renames": [], - "tags": [ - "Device update - campaigns" - ], - "group_id": "Device_Update", - "_key": "campaign_statistics" - }, - { - "swagger_models": [ - "EventType" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Get the count for a specific event type; for example, succeeded, failed, or skipped.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "parameter_fieldname": "campaign_id", - "in": "path", - "required": true, - "_key": "campaign_id" - }, - { - "type": "string", - "example": "upd_fail_101", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "event_type_id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "type": "string", - "example": "fail", - "api_fieldname": "summary_status_id", - "entity_fieldname": "summary_status_id", - "parameter_fieldname": "summary_status_id", - "in": "path", - "required": true, - "_key": "summary_status_id" - } - ], - "method": "get", - "mode": "read", - "responses": [ - { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "_key": "campaign_id" - }, - { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "entity_fieldname": "count", - "_key": "count" - }, - { - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "example": "Update error, nonspecific network error", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, - { - "type": "string", - "example": "UPD4_FAIL_101", - "api_fieldname": "event_type", - "entity_fieldname": "event_type", - "_key": "event_type" - }, - { - "type": "string", - "example": "upd_fail_101", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "description": "Entity name: always 'event-type'.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "example": "FAIL", - "api_fieldname": "summary_status", - "entity_fieldname": "summary_status", - "_key": "summary_status" - }, - { - "type": "string", - "example": "fail", - "api_fieldname": "summary_status_id", - "entity_fieldname": "summary_status_id", - "_key": "summary_status_id" - } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" - } - }, - "_key": "200" + "_key": "401" }, { - "description": "Not Authenticated.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -20052,10 +18769,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "An API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -20128,384 +18845,267 @@ "_key": "404" } ], - "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id}", - "summary": "Get an event type for a campaign", - "return_type": "campaign_statistics_events", + "path": "/v3/api-keys/{apikey_id}", + "summary": "Get API key.", + "return_type": "api_key", "return_info": { "self": true, "custom": false, - "type": "campaign_statistics_events" + "type": "api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, "drop_fields": [ "object", "etag", "type", "filter", "created_at", - "event_type", - "description", - "summary_status", - "count" + "updated_at", + "key", + "name", + "groups", + "owner", + "status", + "creation_time", + "last_login_time", + "account_id" ], - "group_id": "Device_Update", + "group_id": "Accounts", "parameter_map": { - "event_type_id": "id" + "apikey_id": "id" }, - "operation_id": "Update_Campaign_event_types_retrieve", + "operation_id": "getApiKey", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "readOnly": false, - "required": true, - "_key": "campaign_id" - }, - { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "readOnly": true, - "required": false, - "_key": "count" - }, - { - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "example": "Update error, nonspecific network error", - "api_fieldname": "description", - "readOnly": true, - "required": false, - "_key": "description" - }, - { - "type": "string", - "example": "UPD4_FAIL_101", - "api_fieldname": "event_type", - "readOnly": true, - "required": false, - "_key": "event_type" - }, - { - "type": "string", - "example": "upd_fail_101", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "example": "FAIL", - "api_fieldname": "summary_status", - "readOnly": true, - "required": false, - "_key": "summary_status" }, { - "type": "string", - "example": "fail", - "api_fieldname": "summary_status_id", - "readOnly": false, - "required": true, - "_key": "summary_status_id" - } - ], - "field_renames": [], - "tags": [ - "Device update - campaigns" - ], - "group_id": "Device_Update", - "_key": "campaign_statistics_events" - }, - { - "swagger_models": [ - "CertificateEnrollment", - "CertificateEnrollmentListResponse" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Get certificate enrollments list, optionally filtered.\n\n**Examples:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\\n-H 'Authorization: Bearer '\n```\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \\\n-H 'Authorization: Bearer '\n```", + "description": "Update API key details.\n\n**Example:**\n`curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestApiKey25\"}'\n```", "field_renames": [], "fields": [ { - "type": "string", - "description": "The ID of the item after which to retrieve the next page.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "pattern": "[0-9a-fA-F]{32}", + "type": "array", + "description": "A list of group IDs this API key belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "_key": "groups" }, { - "name": "include", - "in": "query", - "description": "a comma-separated list of data fields to return.", - "required": false, "type": "string", - "enum": [ - "total_count" - ], - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "enum_reference": "certificate_enrollment_include_enum", - "_key": "include" + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "apikey_id", + "in": "path", + "required": true, + "_key": "id" }, { - "type": "integer", - "format": "int32", - "description": "The number of results to return (2-1000).", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", + "type": "string", + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "_key": "name" }, { "type": "string", - "description": "The order of results.", + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "entity_fieldname": "owner", + "parameter_fieldname": "owner", + "in": "body", + "required": false, + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", "enum": [ - "ASC", - "DESC" + "ACTIVE", + "INACTIVE" ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "certificate_enrollment_order_enum", - "_key": "order" + "enum_reference": "api_key_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "list", + "method": "put", + "mode": "update", "responses": [ { - "description": "OK.", + "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "etag", + "id", + "key", + "name", + "object" + ], "properties": [ { "type": "string", - "description": "The entity ID to fetch after the given one.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "The timestamp of the API key creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "entity_fieldname": "creation_time", + "_key": "creation_time" + }, + { + "type": "string", + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "array", + "description": "A list of group IDs this API key belongs to.", "items": { - "type": "object", - "properties": [ - { - "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate-name", - "entity_fieldname": "certificate_name", - "in": "path", - "name": "certificate-name", - "required": true, - "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", - "external_param": true, - "parameter_fieldname": "certificate-name", - "_key": "certificate_name" - }, - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "description": "The device ID.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" - }, - { - "type": "string", - "enum": [ - "success", - "failure" - ], - "description": "The result of certificate enrollment request.", - "example": "success", - "api_fieldname": "enroll_result", - "entity_fieldname": "enroll_result", - "_key": "enroll_result" - }, - { - "type": "string", - "description": "Additional information in case of failure.", - "example": "The device is currently processing too many certificate renewals.", - "api_fieldname": "enroll_result_detail", - "entity_fieldname": "enroll_result_detail", - "_key": "enroll_result_detail" - }, - { - "type": "string", - "description": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", - "entity_fieldname": "enroll_status", - "_key": "enroll_status" - }, - { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device-id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "type": "string", - "enum": [ - "certificate-enrollment" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "description": "Update UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "required": [ - "created_at", - "etag", - "id", - "device_id", - "certificate_name" - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_enrollment" - } + "type": "string" }, - "description": "List of certificate enrollments.", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "api_fieldname": "groups", + "entity_fieldname": "groups", + "_key": "groups" }, { - "type": "boolean", - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "type": "string", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "api_fieldname": "key", + "entity_fieldname": "key", + "_key": "key" }, { "type": "integer", - "format": "int32", - "description": "The number of results to return.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "format": "int64", + "example": 1518630727688, + "description": "The timestamp of the latest API key usage, in milliseconds.", + "api_fieldname": "last_login_time", + "entity_fieldname": "last_login_time", + "_key": "last_login_time" + }, + { + "type": "string", + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", + "description": "Entity name: always 'api-key'", "enum": [ - "list" + "api-key" ], - "description": "Describes the type of objects in the list.", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "entity_fieldname": "owner", + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", "enum": [ - "ASC", - "DESC" + "ACTIVE", + "INACTIVE" ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { - "type": "integer", - "format": "int32", - "description": "The total number of records.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } ], - "pagination": true, + "description": "Represents an API key in Device Management.", "foreign_key": { - "group": "Security", - "entity": "certificate_enrollment" + "group": "Accounts", + "entity": "subtenant_api_key" } }, "_key": "200" }, { - "description": "Validation error.", + "description": "Error in input data, for example, invalid API key name.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20515,24 +19115,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -20540,22 +19145,28 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] @@ -20563,12 +19174,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20578,24 +19188,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -20603,22 +19218,28 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] @@ -20626,12 +19247,11 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden. Only the owner of the API key or an administrator can update an API key.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20641,24 +19261,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -20666,107 +19291,309 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, "_key": "403" + }, + { + "description": "An API key with the specified ID does not exist.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" } ], - "path": "/v3/certificate-enrollments", - "summary": "Get certificate enrollments list.", - "return_type": "paginated_response(certificate_enrollment)", + "path": "/v3/api-keys/{apikey_id}", + "summary": "Update API key details.", + "return_type": "api_key", "return_info": { "self": true, "custom": false, - "type": "certificate_enrollment" + "type": "api_key" }, - "x_filter": { - "device_id": [ - "eq" - ], - "certificate_name": [ - "eq" - ], - "enroll_status": [ - "neq", - "eq" - ], - "enroll_result": [ - "neq", - "eq" - ], - "created_at": [ - "lte", - "gte" - ], - "updated_at": [ - "lte", - "gte" - ] + "x_filter": {}, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "updated_at", + "key", + "creation_time", + "last_login_time", + "account_id" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "updateApiKey", + "additional_operations": [ + { + "operation_id": "updateMyApiKey", + "notes": "After retrieving the resource using the `me` method, it can modified using using this SDK method." + } + ], + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": true, + "required": false, + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "The timestamp of the API key creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "readOnly": true, + "required": false, + "_key": "creation_time" + }, + { + "type": "array", + "description": "A list of group IDs this API key belongs to.", + "items": { + "type": "string" }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "total_count", - "has_more", - "data", - "device_id__eq", - "certificate_name__eq", - "enroll_status__neq", - "enroll_status__eq", - "enroll_result__neq", - "enroll_result__eq", - "created_at__lte", - "created_at__gte", - "updated_at__lte", - "updated_at__gte" + "api_fieldname": "groups", + "readOnly": false, + "required": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "api_fieldname": "key", + "readOnly": true, + "required": false, + "_key": "key" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "The timestamp of the latest API key usage, in milliseconds.", + "api_fieldname": "last_login_time", + "readOnly": true, + "required": false, + "_key": "last_login_time" + }, + { + "type": "string", + "maxLength": 100, + "example": "API key gorgon", + "description": "The display name for the API key.", + "api_fieldname": "name", + "readOnly": false, + "required": true, + "_key": "name" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The owner of this API key, who is the creator by default.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner", + "readOnly": false, + "required": false, + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" ], - "foreign_key_priority": "self", - "group_id": "Security", - "parameter_map": { - "certificate-enrollment-id": "id" - }, - "operation_id": "getCertificateEnrollments", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_enrollment" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "list" + "api_fieldname": "status", + "readOnly": false, + "required": false, + "enum_reference": "api_key_status_enum", + "_key": "status" }, { - "description": "Get a certificate enrollment by ID.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "Account - API keys" + ], + "group_id": "Accounts", + "_key": "api_key" + }, + { + "swagger_models": [ + "CampaignDeviceMetadata" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Get update campaign metadata for a specific device.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [ + { + "api_fieldname": "campaign", + "_key": "campaign_id" + } + ], "fields": [ { "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", + "description": "The device's campaign ID.", + "example": "015bf72fccda00000000000100100280", + "api_fieldname": "campaign", + "entity_fieldname": "campaign_id", + "parameter_fieldname": "campaign_id", + "in": "path", + "required": true, + "_key": "campaign_id" + }, + { + "type": "string", + "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", + "example": "015c3029f6f7000000000001001000c3", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "certificate-enrollment-id", + "parameter_fieldname": "campaign_device_metadata_id", "in": "path", "required": true, "_key": "id" @@ -20776,97 +19603,104 @@ "mode": "read", "responses": [ { - "description": "OK.", + "description": "Request successful.", "schema": { "type": "object", "properties": [ { "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate_name", - "entity_fieldname": "certificate_name", - "in": "path", - "name": "certificate-name", - "required": true, - "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", - "external_param": true, - "parameter_fieldname": "certificate-name", - "_key": "certificate_name" + "description": "The device's campaign ID.", + "example": "015bf72fccda00000000000100100280", + "api_fieldname": "campaign", + "entity_fieldname": "campaign_id", + "_key": "campaign" }, { "type": "string", "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", + "description": "The time the entity was created.", + "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, { - "type": "string", - "description": "The device ID.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" - }, - { - "type": "string", + "description": "The state of the update campaign on the device.", "enum": [ - "success", - "failure" + "pending", + "updated_connector_channel", + "failed_connector_channel_update", + "deployed", + "manifestremoved", + "deregistered" ], - "description": "The result of certificate enrollment request.", - "example": "success", - "api_fieldname": "enroll_result", - "entity_fieldname": "enroll_result", - "_key": "enroll_result" + "type": "string", + "api_fieldname": "deployment_state", + "entity_fieldname": "deployment_state", + "_key": "deployment_state" }, { "type": "string", - "description": "Additional information in case of failure.", - "example": "The device is currently processing too many certificate renewals.", - "api_fieldname": "enroll_result_detail", - "entity_fieldname": "enroll_result_detail", - "_key": "enroll_result_detail" + "maxLength": 2000, + "description": "Description.", + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, { "type": "string", - "description": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", - "entity_fieldname": "enroll_status", - "_key": "enroll_status" + "description": "The device ID.", + "example": "015c2fec9bba0000000000010010036f", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" }, { "type": "string", - "description": "Entity instance signature.", - "example": "1", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", "api_fieldname": "etag", "entity_fieldname": "etag", "_key": "etag" }, { "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", + "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", + "example": "015c3029f6f7000000000001001000c3", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "device-id", - "in": "path", - "required": true, "_key": "id" }, { "type": "string", - "enum": [ - "certificate-enrollment" - ], + "description": "How the firmware is delivered (connector or direct).", + "example": "connector", + "api_fieldname": "mechanism", + "entity_fieldname": "mechanism", + "_key": "mechanism" + }, + { + "type": "string", + "description": "The Device Management Connect URL.", + "api_fieldname": "mechanism_url", + "entity_fieldname": "mechanism_url", + "_key": "mechanism_url" + }, + { + "type": "string", + "maxLength": 128, + "description": "The record name.", + "default": "default_object_name", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "The entity name: always 'update-campaign-device-metadata'.", + "example": "update-campaign-device-metadata", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -20874,160 +19708,369 @@ { "type": "string", "format": "date-time", - "description": "Update UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", + "description": "The time the entity was updated.", + "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" } ], - "required": [ - "created_at", - "etag", - "id", - "device_id", - "certificate_name" - ], "foreign_key": { - "group": "Devices", - "entity": "device" + "group": "Device_Update", + "entity": "campaign_device_metadata" } }, "_key": "200" }, { - "description": "Validation error.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "400" + "description": "Unauthorized.", + "_key": "401" + }, + { + "description": "Not Found.", + "_key": "404" + } + ], + "path": "/v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}", + "summary": "Get a campaign device metadata", + "return_type": "campaign_device_metadata", + "return_info": { + "self": true, + "custom": false, + "type": "campaign_device_metadata" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "updated_at", + "deployment_state", + "description", + "device_id", + "mechanism", + "mechanism_url", + "name" + ], + "group_id": "Device_Update", + "parameter_map": { + "campaign_device_metadata_id": "id" + }, + "operation_id": "Update_Campaign_Metadata_retrieve", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "description": "The device's campaign ID.", + "example": "015bf72fccda00000000000100100280", + "api_fieldname": "campaign", + "readOnly": false, + "required": true, + "_key": "campaign_id" + }, + { + "type": "string", + "format": "date-time", + "description": "The time the entity was created.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "description": "The state of the update campaign on the device.", + "enum": [ + "pending", + "updated_connector_channel", + "failed_connector_channel_update", + "deployed", + "manifestremoved", + "deregistered" + ], + "type": "string", + "api_fieldname": "deployment_state", + "readOnly": true, + "required": false, + "enum_reference": "campaign_device_metadata_deployment_state_enum", + "_key": "deployment_state" + }, + { + "type": "string", + "maxLength": 2000, + "description": "Description.", + "example": "a description", + "api_fieldname": "description", + "readOnly": true, + "required": false, + "_key": "description" + }, + { + "type": "string", + "description": "The device ID.", + "example": "015c2fec9bba0000000000010010036f", + "api_fieldname": "device_id", + "readOnly": true, + "required": false, + "_key": "device_id" + }, + { + "type": "string", + "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "description": "How the firmware is delivered (connector or direct).", + "example": "connector", + "api_fieldname": "mechanism", + "readOnly": true, + "required": false, + "_key": "mechanism" + }, + { + "type": "string", + "description": "The Device Management Connect URL.", + "api_fieldname": "mechanism_url", + "readOnly": true, + "required": false, + "_key": "mechanism_url" + }, + { + "type": "string", + "maxLength": 128, + "description": "The record name.", + "default": "default_object_name", + "api_fieldname": "name", + "readOnly": true, + "required": false, + "_key": "name" + }, + { + "type": "string", + "format": "date-time", + "description": "The time the entity was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [ + { + "api_fieldname": "campaign", + "_key": "campaign_id" + } + ], + "tags": [ + "Device update - campaigns" + ], + "group_id": "Device_Update", + "_key": "campaign_device_metadata" + }, + { + "swagger_models": [ + "EventTypeList", + "EventTypeSummary", + "EventTypeSummaryList" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Get a list of events grouped by summary.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [], + "fields": [ + { + "description": "The campaign ID.", + "in": "path", + "name": "campaign_id", + "required": true, + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "campaign_id", + "api_fieldname": "campaign_id", + "external_param": false, + "parameter_fieldname": "campaign_id", + "_key": "campaign_id" }, { - "description": "Unauthorized.", + "description": "The summary status. For example, fail.", + "in": "path", + "name": "summary_status_id", + "required": true, + "type": "string", + "enum": [ + "fail", + "success", + "info", + "skipped" + ], + "entity_fieldname": "id", + "api_fieldname": "summary_status_id", + "external_param": false, + "parameter_fieldname": "summary_status_id", + "enum_reference": "campaign_statistics_id_enum", + "_key": "id" + } + ], + "method": "get", + "mode": "events", + "responses": [ + { + "description": "OK.", "schema": { "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" + "type": "string", + "description": "The entity ID to fetch after the given one.", + "example": "null", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "A list of request fields that failed validation.", "items": { "type": "object", "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "example": "016e652be671000000000001001001e5", + "description": "ID of the associated campaign.", + "_key": "campaign_id" + }, + { + "type": "integer", + "example": 10, + "_key": "count" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "_key": "created_at" + }, + { + "type": "string", + "example": "Update error, nonspecific network error", + "_key": "description" + }, + { + "type": "string", + "example": "UPD4_FAIL_101", + "_key": "event_type" + }, + { + "type": "string", + "example": "upd_fail_101", + "_key": "id" + }, + { + "type": "string", + "description": "Entity name: always 'event-type'.", + "example": "event-type", + "_key": "object" + }, + { + "type": "string", + "example": "FAIL", + "_key": "summary_status" + }, + { + "type": "string", + "example": "fail", + "_key": "summary_status_id" } - ] + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics_events" + } }, - "_key": "fields" + "enum": [ + "fail", + "skipped", + "info", + "success" + ], + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "Error message.", - "_key": "message" + "type": "boolean", + "description": "A flag indicating whether there are more results.", + "example": "false", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "description": "The number of results to return, (range: 2-1000), or equals to total_count.", + "example": "50", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "The entity name: always 'list'.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "enum": [ + "ASC", + "DESC" + ], + "description": "The order of the records to return. Acceptable values: ASC, DESC. Default: ASC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type.", - "_key": "type" + "type": "integer", + "description": "The total number or records, if requested. It may be returned also for small lists.", + "example": "1", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics_events" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Not Authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21037,24 +20080,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21062,35 +20110,40 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Not found.", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21100,24 +20153,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21125,22 +20183,28 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] @@ -21148,13 +20212,13 @@ "_key": "404" } ], - "path": "/v3/certificate-enrollments/{certificate-enrollment-id}", - "summary": "Get a certificate enrollment by ID.", - "return_type": "certificate_enrollment", + "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types", + "summary": "Get a list of events grouped by summary", + "return_type": "paginated_response(campaign_statistics_events)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "certificate_enrollment" + "type": "campaign_statistics_events" }, "x_filter": {}, "x_deprecation": null, @@ -21163,314 +20227,182 @@ "etag", "type", "filter", - "created_at", - "device_id", - "certificate_name", - "enroll_status", - "enroll_result", - "enroll_result_detail", - "updated_at" + "order", + "limit", + "after", + "has_more", + "total_count", + "data" ], - "group_id": "Security", + "group_id": "Device_Update", "parameter_map": { - "certificate-enrollment-id": "id" + "summary_status_id": "id" + }, + "operation_id": "Update_Campaign_event_types_list", + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics_events" }, - "operation_id": "getCertificateEnrollment", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate_name", - "in": "path", - "name": "certificate-name", - "required": false, - "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", - "external_param": true, - "parameter_fieldname": "certificate-name", - "readOnly": true, - "_key": "certificate_name" - }, - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "The device ID.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "device_id", - "readOnly": true, - "required": false, - "_key": "device_id" - }, - { - "type": "string", - "enum": [ - "success", - "failure" - ], - "description": "The result of certificate enrollment request.", - "example": "success", - "api_fieldname": "enroll_result", - "readOnly": true, - "required": false, - "enum_reference": "certificate_enrollment_enroll_result_enum", - "_key": "enroll_result" - }, - { - "type": "string", - "description": "Additional information in case of failure.", - "example": "The device is currently processing too many certificate renewals.", - "api_fieldname": "enroll_result_detail", - "readOnly": true, - "required": false, - "_key": "enroll_result_detail" - }, - { - "type": "string", - "description": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", - "readOnly": true, - "required": false, - "enum_reference": "certificate_enrollment_enroll_status_enum", - "_key": "enroll_status" - }, - { - "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", - "api_fieldname": "id", - "parameter_fieldname": "device-id", - "in": "path", - "required": true, - "readOnly": false, - "_key": "id" + "_key": "events" }, { - "type": "string", - "format": "date-time", - "description": "Update UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "Device security - device certificate renewals" - ], - "group_id": "Security", - "_key": "certificate_enrollment" - }, - { - "swagger_models": [ - "CertificateIssuerInfo", - "CertificateIssuerInfoListResponse", - "CertificateIssuerRequest", - "CertificateIssuerUpdateRequest", - "CertificateIssuerVerifyResponse" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Create a certificate issuer.\nThe maximum number of issuers is limited to 20 per account.\nMultiple certificate issuers of the same issuer type can be created, provided they have a different name. This allows verification of the certificate issuer configuration before activating it.\n
\n**Example usage:**\n\n```\ncurl -X POST \\\n-H 'authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers \\\n-d '{\n \"issuer_type\": \"GLOBAL_SIGN\",\n \"name\": \"GS Issuer\",\n \"description\": \"Sample GlobalSign certificate issuer\",\n \"issuer_attributes\": null,\n \"issuer_credentials\": {\n \"api_key\": \"e510e289e6cd8947\",\n \"api_secret\": \"a477a8393d17a55ecb2ba6a61f58feb84770b621\",\n \"client_certificate\": \"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END CERTIFICATE-----\",\n \"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: 4,ENCRYPTED\\nDEK-Info: DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END RSA PRIVATE KEY-----\",\n \"passphrase\": \"helloworld\"\n }\n}'\n```\n", + "description": "Get a list of statistics for a campaign, including the number of devices reporting specific event codes.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { - "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "api_fieldname": "issuer_attributes", - "entity_fieldname": "issuer_attributes", - "parameter_fieldname": "issuer_attributes", - "in": "body", - "required": false, - "_key": "issuer_attributes" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The credentials required for connecting to the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.\n", - "example": [], - "name": "issuer_credentials", - "in": "body", - "schema_param": true, - "entity_fieldname": "issuer_credentials", - "api_fieldname": "issuer_credentials", - "external_param": true, - "parameter_fieldname": "issuer_credentials", - "required": true, - "_key": "issuer_credentials" - }, - { - "type": "string", - "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" - ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "api_fieldname": "issuer_type", - "entity_fieldname": "issuer_type", - "parameter_fieldname": "issuer_type", - "in": "body", + "description": "The campaign ID.", + "in": "path", + "name": "campaign_id", "required": true, - "enum_reference": "certificate_issuer_type_enum", - "_key": "issuer_type" - }, - { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "campaign_id", + "api_fieldname": "campaign_id", + "external_param": false, + "parameter_fieldname": "campaign_id", + "_key": "campaign_id" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "list", "responses": [ { - "description": "Created.", + "description": "OK.", "schema": { "type": "object", "properties": [ { "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "The entity ID to fetch after the given one.", + "example": "null", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "016e652be6710000000000010010013d", + "description": "ID of the associated campaign.", + "_key": "campaign_id" + }, + { + "type": "integer", + "example": 10, + "_key": "count" + }, + { + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "_key": "created_at" + }, + { + "type": "string", + "enum": [ + "fail", + "success", + "info", + "skipped" + ], + "example": "fail", + "description": "ID of the event type description.", + "_key": "id" + }, + { + "type": "string", + "description": "Entity name: always 'summary_status'.", + "example": "summary_status", + "_key": "object" + }, + { + "type": "string", + "enum": [ + "FAIL", + "SUCCESS", + "INFO", + "SKIPPED" + ], + "example": "FAIL", + "description": "The event type description.", + "_key": "summary_status" + } + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics" + } + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "type": "boolean", + "description": "A flag indicating whether there are more results.", + "example": "false", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "type": "integer", + "description": "The number of results to return, (range: 2-1000), or equals to total_count.", + "example": "50", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "api_fieldname": "issuer_attributes", - "entity_fieldname": "issuer_attributes", - "_key": "issuer_attributes" + "description": "The entity name: always 'list'.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" + "ASC", + "DESC" ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "api_fieldname": "issuer_type", - "entity_fieldname": "issuer_type", - "_key": "issuer_type" - }, - { - "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "The order of the records to return. Acceptable values: ASC, DESC. Default: ASC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "enum": [ - "certificate-issuer" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "type": "integer", + "description": "The total number or records, if requested. It may be returned also for small lists.", + "example": "1", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], - "required": [ - "issuer_type" - ], + "pagination": true, "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" + "group": "Device_Update", + "entity": "campaign_statistics" } }, - "_key": "201" + "_key": "200" }, { - "description": "Validation error: The data used to create the certificate issuer failed validation.\n", + "description": "Not Authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21480,24 +20412,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21505,35 +20442,40 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "400" + "_key": "401" }, { - "description": "You are not authorized to view the resource.", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21543,24 +20485,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21568,98 +20515,187 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "401" + "_key": "404" + } + ], + "path": "/v3/update-campaigns/{campaign_id}/statistics", + "summary": "Get statistics for a campaign", + "return_type": "paginated_response(campaign_statistics)", + "return_info": { + "self": true, + "custom": false, + "type": "campaign_statistics" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "order", + "limit", + "after", + "has_more", + "total_count", + "data" + ], + "foreign_key_priority": "self", + "group_id": "Device_Update", + "parameter_map": { + "summary_status_id": "id" + }, + "operation_id": "Update_Campaign_statistics_list", + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Get the count of successfully updated, skipped, and failed devices.\n
\n**Usage example:**\n```\ncurl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "016e652be6710000000000010010013d", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "entity_fieldname": "campaign_id", + "parameter_fieldname": "campaign_id", + "in": "path", + "required": true, + "_key": "campaign_id" }, { - "description": "Forbidden.", + "type": "string", + "enum": [ + "fail", + "success", + "info", + "skipped" + ], + "example": "fail", + "description": "ID of the event type description.", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "summary_status_id", + "in": "path", + "required": true, + "enum_reference": "campaign_statistics_id_enum", + "_key": "id" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "OK.", "schema": { "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" + "type": "string", + "example": "016e652be6710000000000010010013d", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "entity_fieldname": "campaign_id", + "_key": "campaign_id" }, { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" + "type": "integer", + "example": 10, + "api_fieldname": "count", + "entity_fieldname": "count", + "_key": "count" }, { "type": "string", - "description": "Error message.", - "_key": "message" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "enum": [ + "fail", + "success", + "info", + "skipped" + ], + "example": "fail", + "description": "ID of the event type description.", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "description": "Entity name: always 'summary_status'.", + "example": "summary_status", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", - "description": "Error type.", - "_key": "type" + "enum": [ + "FAIL", + "SUCCESS", + "INFO", + "SKIPPED" + ], + "example": "FAIL", + "description": "The event type description.", + "api_fieldname": "summary_status", + "entity_fieldname": "summary_status", + "_key": "summary_status" } - ] + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics" + } }, - "_key": "403" + "_key": "200" }, { - "description": "Conflict. A certificate issuer with this name already exists.\n", + "description": "Not Authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21669,24 +20705,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21694,35 +20735,40 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "409" + "_key": "401" }, { - "description": "The request failed due to customer configured external service.\n", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21732,24 +20778,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21757,36 +20808,42 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "424" + "_key": "404" } ], - "path": "/v3/certificate-issuers", - "summary": "Create certificate issuer.", - "return_type": "certificate_issuer", + "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}", + "summary": "Get a status summary", + "return_type": "campaign_statistics", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "campaign_statistics" }, "x_filter": {}, "x_deprecation": null, @@ -21795,176 +20852,218 @@ "etag", "type", "filter", - "created_at", - "id" + "summary_status", + "count", + "created_at" ], - "group_id": "Security", + "group_id": "Device_Update", "parameter_map": { - "certificate-issuer-id": "id" + "summary_status_id": "id" }, - "operation_id": "createCertificateIssuer", + "operation_id": "Update_Campaign_statistics_retrieve", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "example": "016e652be6710000000000010010013d", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "readOnly": false, + "required": true, + "_key": "campaign_id" + }, + { + "type": "integer", + "example": 10, + "api_fieldname": "count", + "readOnly": true, + "required": false, + "_key": "count" + }, + { + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "enum": [ + "fail", + "success", + "info", + "skipped" + ], + "example": "fail", + "description": "ID of the event type description.", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "enum_reference": "campaign_statistics_id_enum", + "_key": "id" }, { - "description": "Delete a certificate issuer by ID.\n
\n**Example usage:**\n\n```\ncurl -X DELETE \\\n-H 'authorization: ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000\n```\n", + "type": "string", + "enum": [ + "FAIL", + "SUCCESS", + "INFO", + "SKIPPED" + ], + "example": "FAIL", + "description": "The event type description.", + "api_fieldname": "summary_status", + "readOnly": true, + "required": false, + "enum_reference": "campaign_statistics_summary_status_enum", + "_key": "summary_status" + } + ], + "field_renames": [], + "tags": [ + "Device update - campaigns" + ], + "group_id": "Device_Update", + "_key": "campaign_statistics" + }, + { + "swagger_models": [ + "EventType" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Get the count for a specific event type, for example, succeeded, failed or skipped.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { - "name": "certificate-issuer-id", + "type": "string", + "example": "016e652be671000000000001001001e5", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "entity_fieldname": "campaign_id", + "parameter_fieldname": "campaign_id", "in": "path", - "description": "Certificate issuer ID.
The ID of the certificate issuer.\nAn active certificate issuer may not be deleted.\n", "required": true, + "_key": "campaign_id" + }, + { "type": "string", + "example": "upd_fail_101", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "certificate-issuer-id", - "external_param": false, - "parameter_fieldname": "certificate-issuer-id", + "parameter_fieldname": "event_type_id", + "in": "path", + "required": true, "_key": "id" + }, + { + "type": "string", + "example": "fail", + "api_fieldname": "summary_status_id", + "entity_fieldname": "summary_status_id", + "parameter_fieldname": "summary_status_id", + "in": "path", + "required": true, + "_key": "summary_status_id" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { - "description": "Certificate issuer deleted.", - "_key": "204" - }, - { - "description": "Validation error: An active certificate issuer cannot be deleted.\n", + "description": "OK.", "schema": { "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, { "type": "string", - "description": "Error message.", - "_key": "message" + "example": "016e652be671000000000001001001e5", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "entity_fieldname": "campaign_id", + "_key": "campaign_id" }, { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "type": "integer", + "example": 10, + "api_fieldname": "count", + "entity_fieldname": "count", + "_key": "count" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "description": "Unauthorized.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" + "example": "Update error, nonspecific network error", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" + "type": "string", + "example": "UPD4_FAIL_101", + "api_fieldname": "event_type", + "entity_fieldname": "event_type", + "_key": "event_type" }, { "type": "string", - "description": "Error message.", - "_key": "message" + "example": "upd_fail_101", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name: always 'event-type'.", + "example": "event-type", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "example": "FAIL", + "api_fieldname": "summary_status", + "entity_fieldname": "summary_status", + "_key": "summary_status" }, { "type": "string", - "description": "Error type.", - "_key": "type" + "example": "fail", + "api_fieldname": "summary_status_id", + "entity_fieldname": "summary_status_id", + "_key": "summary_status_id" } - ] + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_statistics_events" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Not Authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21974,24 +21073,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -21999,35 +21103,40 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Not found.", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22037,24 +21146,29 @@ { "type": "integer", "format": "int32", - "description": "Error code. Correlates with response status code.", + "description": "HTTP response code", + "example": 400, "_key": "code" }, { "type": "array", - "description": "A list of request fields that failed validation.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -22062,22 +21176,28 @@ }, { "type": "string", - "description": "Error message.", + "description": "A human readable informative explanation", + "example": "Validation error", "_key": "message" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", "_key": "request_id" }, { "type": "string", - "description": "Error type.", + "description": "Error type used to categorise the error.", + "example": "validation_error", "_key": "type" } ] @@ -22085,13 +21205,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}", - "summary": "Delete certificate issuer.", - "return_type": "certificate_issuer", + "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id}", + "summary": "Get an event type for a campaign", + "return_type": "campaign_statistics_events", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "campaign_statistics_events" }, "x_filter": {}, "x_deprecation": null, @@ -22099,73 +21219,168 @@ "object", "etag", "type", - "filter" + "filter", + "created_at", + "event_type", + "description", + "summary_status", + "count" ], - "group_id": "Security", + "group_id": "Device_Update", "parameter_map": { - "certificate-issuer-id": "id" + "event_type_id": "id" }, - "operation_id": "deleteCertificateIssuer", + "operation_id": "Update_Campaign_event_types_retrieve", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "example": "016e652be671000000000001001001e5", + "description": "ID of the associated campaign.", + "api_fieldname": "campaign_id", + "readOnly": false, + "required": true, + "_key": "campaign_id" + }, + { + "type": "integer", + "example": 10, + "api_fieldname": "count", + "readOnly": true, + "required": false, + "_key": "count" + }, + { + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "example": "Update error, nonspecific network error", + "api_fieldname": "description", + "readOnly": true, + "required": false, + "_key": "description" + }, + { + "type": "string", + "example": "UPD4_FAIL_101", + "api_fieldname": "event_type", + "readOnly": true, + "required": false, + "_key": "event_type" + }, + { + "type": "string", + "example": "upd_fail_101", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "example": "FAIL", + "api_fieldname": "summary_status", + "readOnly": true, + "required": false, + "_key": "summary_status" }, { - "description": "Note: This endpoint does not implement pagination and therefore, list control parameters such as `limit` or `after` will be ignored by the system.\n", + "type": "string", + "example": "fail", + "api_fieldname": "summary_status_id", + "readOnly": false, + "required": true, + "_key": "summary_status_id" + } + ], + "field_renames": [], + "tags": [ + "Device update - campaigns" + ], + "group_id": "Device_Update", + "_key": "campaign_statistics_events" + }, + { + "swagger_models": [ + "CertificateEnrollment", + "CertificateEnrollmentListResponse" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Get certificate enrollments list, optionally filtered.\n\n**Examples:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \\\n-H 'Authorization: Bearer '\n```\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", - "description": "The ID of The item after which to retrieve the next page.", - "example": "01631667477600000000000100100374", + "description": "The ID of the item after which to retrieve the next page.", + "example": "01625daa23230a580a0100bd00000000", "api_fieldname": "after", "entity_fieldname": "after", - "in": "query", "name": "after", + "in": "query", + "pattern": "[0-9a-fA-F]{32}", + "required": false, "external_param": true, "parameter_fieldname": "after", - "required": false, "_key": "after" }, { - "description": "Comma-separated list of data fields to return. Currently supported: `total_count`", - "in": "query", "name": "include", + "in": "query", + "description": "a comma-separated list of data fields to return.", + "required": false, "type": "string", + "enum": [ + "total_count" + ], "entity_fieldname": "include", "api_fieldname": "include", "external_param": true, "parameter_fieldname": "include", - "required": false, + "enum_reference": "certificate_enrollment_include_enum", "_key": "include" }, { "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, + "format": "int32", + "description": "The number of results to return (2-1000).", "api_fieldname": "limit", "entity_fieldname": "limit", - "in": "query", "name": "limit", + "in": "query", + "required": false, "external_param": true, "parameter_fieldname": "limit", - "required": false, "_key": "limit" }, { "type": "string", - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "example": "DESC", + "description": "The order of results.", + "enum": [ + "ASC", + "DESC" + ], "api_fieldname": "order", "entity_fieldname": "order", - "in": "query", "name": "order", + "in": "query", + "required": false, "external_param": true, "parameter_fieldname": "order", - "required": false, + "enum_reference": "certificate_enrollment_order_enum", "_key": "order" } ], @@ -22179,15 +21394,10 @@ "properties": [ { "type": "string", - "description": "The ID of The item after which to retrieve the next page.", - "example": "01631667477600000000000100100374", + "description": "The entity ID to fetch after the given one.", + "example": "01625daa23230a580a0100bd00000000", "api_fieldname": "after", "entity_fieldname": "after", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, "_key": "after" }, { @@ -22195,128 +21405,164 @@ "items": { "type": "object", "properties": [ + { + "type": "string", + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate-name", + "entity_fieldname": "certificate_name", + "in": "path", + "name": "certificate-name", + "required": true, + "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "external_param": true, + "parameter_fieldname": "certificate-name", + "_key": "certificate_name" + }, { "type": "string", "format": "date-time", "description": "Creation UTC time RFC3339.", "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", "_key": "created_at" }, { "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, - "_key": "description" + "description": "The device ID.", + "example": "01625daa23230a580a0100bd00000000", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" }, { "type": "string", - "description": "Entity instance signature.", - "example": "1", - "_key": "etag" + "enum": [ + "success", + "failure" + ], + "description": "The result of certificate enrollment request.", + "example": "success", + "api_fieldname": "enroll_result", + "entity_fieldname": "enroll_result", + "_key": "enroll_result" }, { "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "_key": "id" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "_key": "issuer_attributes" + "description": "Additional information in case of failure.", + "example": "The device is currently processing too many certificate renewals.", + "api_fieldname": "enroll_result_detail", + "entity_fieldname": "enroll_result_detail", + "_key": "enroll_result_detail" }, { "type": "string", + "description": "The status of certificate enrollment request.", "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" + "new", + "completed" ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "_key": "issuer_type" + "api_fieldname": "enroll_status", + "entity_fieldname": "enroll_status", + "_key": "enroll_status" }, { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "_key": "name" + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "device-id", + "in": "path", + "required": true, + "_key": "id" }, { "type": "string", "enum": [ - "certificate-issuer" + "certificate-enrollment" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "Update UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } ], "required": [ - "issuer_type" + "created_at", + "etag", + "id", + "device_id", + "certificate_name" ], "foreign_key": { "group": "Security", - "entity": "certificate_issuer" + "entity": "certificate_enrollment" } }, - "description": "List of certificate issuers.", + "description": "List of certificate enrollments.", "api_fieldname": "data", "entity_fieldname": "data", "_key": "data" }, { "type": "boolean", - "description": "Are there more results available.", - "example": false, + "description": "Flag indicating whether there are more results.", "api_fieldname": "has_more", "entity_fieldname": "has_more", "_key": "has_more" }, { "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, + "format": "int32", + "description": "The number of results to return.", "api_fieldname": "limit", "entity_fieldname": "limit", - "in": "query", - "name": "limit", - "external_param": true, - "parameter_fieldname": "limit", - "required": false, "_key": "limit" }, { "type": "string", - "description": "The type of this API object is a `list`.", - "example": "list", + "enum": [ + "list" + ], + "description": "Describes the type of objects in the list.", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "example": "DESC", + "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "enum": [ + "ASC", + "DESC" + ], "api_fieldname": "order", "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, "_key": "order" }, { - "format": "integer", "type": "integer", - "example": 1, + "format": "int32", + "description": "The total number of records.", "api_fieldname": "total_count", "entity_fieldname": "total_count", "_key": "total_count" @@ -22325,11 +21571,74 @@ "pagination": true, "foreign_key": { "group": "Security", - "entity": "certificate_issuer" + "entity": "certificate_enrollment" } }, "_key": "200" }, + { + "description": "Validation error.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" + }, + { + "type": "array", + "description": "A list of request fields that failed validation.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name: `error`.", + "_key": "object" + }, + { + "type": "string", + "description": "Request ID from JWT.", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "400" + }, { "description": "Unauthorized.", "schema": { @@ -22457,51 +21766,84 @@ "_key": "403" } ], - "path": "/v3/certificate-issuers", - "summary": "Get certificate issuers list.", - "return_type": "paginated_response(certificate_issuer)", + "path": "/v3/certificate-enrollments", + "summary": "Get certificate enrollments list.", + "return_type": "paginated_response(certificate_enrollment)", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "certificate_enrollment" + }, + "x_filter": { + "device_id": [ + "eq" + ], + "certificate_name": [ + "eq" + ], + "enroll_status": [ + "neq", + "eq" + ], + "enroll_result": [ + "neq", + "eq" + ], + "created_at": [ + "lte", + "gte" + ], + "updated_at": [ + "lte", + "gte" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", "filter", - "has_more", "total_count", - "data" + "has_more", + "data", + "device_id__eq", + "certificate_name__eq", + "enroll_status__neq", + "enroll_status__eq", + "enroll_result__neq", + "enroll_result__eq", + "created_at__lte", + "created_at__gte", + "updated_at__lte", + "updated_at__gte" ], "foreign_key_priority": "self", "group_id": "Security", "parameter_map": { - "certificate-issuer-id": "id" + "certificate-enrollment-id": "id" }, - "operation_id": "getCertificateIssuers", + "operation_id": "getCertificateEnrollments", "pagination": true, "foreign_key": { "group": "Security", - "entity": "certificate_issuer" + "entity": "certificate_enrollment" }, "request_content_type": "application/json", "request_body": "json", "_key": "list" }, { - "description": "(No description provided)", + "description": "Get a certificate enrollment by ID.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-id", + "parameter_fieldname": "certificate-enrollment-id", "in": "path", "required": true, "_key": "id" @@ -22515,6 +21857,21 @@ "schema": { "type": "object", "properties": [ + { + "type": "string", + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate_name", + "entity_fieldname": "certificate_name", + "in": "path", + "name": "certificate-name", + "required": true, + "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "external_param": true, + "parameter_fieldname": "certificate-name", + "_key": "certificate_name" + }, { "type": "string", "format": "date-time", @@ -22526,84 +21883,97 @@ }, { "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "The device ID.", + "example": "01625daa23230a580a0100bd00000000", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" }, { "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "enum": [ + "success", + "failure" + ], + "description": "The result of certificate enrollment request.", + "example": "success", + "api_fieldname": "enroll_result", + "entity_fieldname": "enroll_result", + "_key": "enroll_result" }, { "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "api_fieldname": "issuer_attributes", - "entity_fieldname": "issuer_attributes", - "_key": "issuer_attributes" + "description": "Additional information in case of failure.", + "example": "The device is currently processing too many certificate renewals.", + "api_fieldname": "enroll_result_detail", + "entity_fieldname": "enroll_result_detail", + "_key": "enroll_result_detail" }, { "type": "string", + "description": "The status of certificate enrollment request.", "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" + "new", + "completed" ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "api_fieldname": "issuer_type", - "entity_fieldname": "issuer_type", - "_key": "issuer_type" + "api_fieldname": "enroll_status", + "entity_fieldname": "enroll_status", + "_key": "enroll_status" }, { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "device-id", + "in": "path", + "required": true, + "_key": "id" }, { "type": "string", "enum": [ - "certificate-issuer" + "certificate-enrollment" ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "Update UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } ], "required": [ - "issuer_type" + "created_at", + "etag", + "id", + "device_id", + "certificate_name" ], "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" + "group": "Devices", + "entity": "device" } }, "_key": "200" }, { - "description": "Validation error: The data used to get the certificate issuer failed validation.\n", + "description": "Validation error.", "schema": { "type": "object", "required": [ @@ -22855,13 +22225,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}", - "summary": "Get certificate issuer by ID.", - "return_type": "certificate_issuer", + "path": "/v3/certificate-enrollments/{certificate-enrollment-id}", + "summary": "Get a certificate enrollment by ID.", + "return_type": "certificate_enrollment", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "certificate_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -22871,23 +22241,136 @@ "type", "filter", "created_at", - "issuer_type", - "name", - "description", - "issuer_attributes" + "device_id", + "certificate_name", + "enroll_status", + "enroll_result", + "enroll_result_detail", + "updated_at" ], "group_id": "Security", "parameter_map": { - "certificate-issuer-id": "id" + "certificate-enrollment-id": "id" }, - "operation_id": "getCertificateIssuer", + "operation_id": "getCertificateEnrollment", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate_name", + "in": "path", + "name": "certificate-name", + "required": false, + "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "external_param": true, + "parameter_fieldname": "certificate-name", + "readOnly": true, + "_key": "certificate_name" + }, + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "description": "The device ID.", + "example": "01625daa23230a580a0100bd00000000", + "api_fieldname": "device_id", + "readOnly": true, + "required": false, + "_key": "device_id" + }, + { + "type": "string", + "enum": [ + "success", + "failure" + ], + "description": "The result of certificate enrollment request.", + "example": "success", + "api_fieldname": "enroll_result", + "readOnly": true, + "required": false, + "enum_reference": "certificate_enrollment_enroll_result_enum", + "_key": "enroll_result" + }, + { + "type": "string", + "description": "Additional information in case of failure.", + "example": "The device is currently processing too many certificate renewals.", + "api_fieldname": "enroll_result_detail", + "readOnly": true, + "required": false, + "_key": "enroll_result_detail" + }, + { + "type": "string", + "description": "The status of certificate enrollment request.", + "enum": [ + "new", + "completed" + ], + "api_fieldname": "enroll_status", + "readOnly": true, + "required": false, + "enum_reference": "certificate_enrollment_enroll_status_enum", + "_key": "enroll_status" }, { - "description": "Update a certificate issuer.\n
\n**Example usage:**\n\n```\ncurl -X PUT \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\\n-d '{\n \"description\": \"Sample GlobalSign certificate issuer - updated.\",\n \"name\": \"GlobalSign Issuer\"\n}'\n```\n", + "type": "string", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "parameter_fieldname": "device-id", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "type": "string", + "format": "date-time", + "description": "Update UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "Device security - device certificate renewals" + ], + "group_id": "Security", + "_key": "certificate_enrollment" + }, + { + "swagger_models": [ + "CertificateIssuerInfo", + "CertificateIssuerInfoListResponse", + "CertificateIssuerRequest", + "CertificateIssuerUpdateRequest", + "CertificateIssuerVerifyResponse" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Create a certificate issuer.\n
\nThe maximum number of issuers is limited to 20 per account.\n
\nYou can create multiple certificate issuers of the same type, provided they have different names. This allows verification of the certificate issuer configuration before activation.\n
\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n-d '{\n \"issuer_type\": \"GLOBAL_SIGN\",\n \"name\": \"GS Issuer\",\n \"description\": \"Sample GlobalSign certificate issuer\",\n \"issuer_attributes\": null,\n \"issuer_credentials\": {\n \"api_key\": \"e510e289e6cd8947\",\n \"api_secret\": \"a477a8393d17a55ecb2ba6a61f58feb84770b621\",\n \"client_certificate\": \"-----BEGIN CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKLnfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFLsfYZxFcQTjPJKYMjHI2In316fmMB8GA1UdIwQYMBaAFLsfYZxFcQTjPJKYMjHI2In316fmMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFl08GFsIkkUs6M7QgCWmsnwP6PtD8V87wM1GAqQQlOOeztaeRR2TEOeYiKRZQugYszJ/FVfVp4ggqzepJMn6UZ42j5nmSJs+6t79i23QAzX1zNQ354lr/t7kt3fMdhuL3AP0oZGzdy+EnXXiWeAD22UwzvVmLt38ypJIl+pmTsx9jJy4PN7yoRgtP9k+50m3X6oDxVruehC/JPSeTvEhqyLW3fLcG6IoJMX3vIwfO9uXbFJumTowQeViNJJ9duWvD2KBXn/muOOBe97TPuvAms1gOtMmmPT9/jpo9b4+NsfFiAN6bMici81aIKZzLC+lLGOUmR2fFJyM5OsVLxKsko=-----END CERTIFICATE-----\",\n \"private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nProc-Type: 4,ENCRYPTED\\nDEK-Info: DES-EDE3-CBC,CCAC26A4133947CB\\n\\np3KJ4FI3wcz3I0MtiLkrznkjWFvprVmoNywySUGb5IqZViJZqCMEsyU9a9iDsSfP\\nZ07cg9GviV21WYIPSxZOQrpy1g1VWILzFnH+J6z8dSH4mxXh0PwdOzYgAeqkrIVM\\nJ7KRm6t222dZFjjXK3eEcLmBLGo29XwVJxKHx+l4++gU1LZmeHZR5M8fJ4jejUly\\n7sqzPlmRF0N3I4lwKVj+PfQTVz43QoCnpxOjuSEL4liBrc2agY2xH1O0PFyHimz9\\n3XM9HR/iuPHW0N2D+NPjXlWKacerupH9d4i9IYIagzB+HTgej8limdo03GmmxcZ6\\nYNa58n5yQSaqu0TPRU9DsrKeGjadHTlZQGdzfq1SWsROCnHLrXFKE2ozIG3+hxA5\\nujBF/QWpX5+inXUwDJhBxp8isHbPEnBEUUd6ZRzCTjvN0jaUti5B9yFhO2G6mbE8\\nCvhyzQK8oJqsjZXnlcpPf95LP+9XbcCDjLSIaWJstzXO9tPiv6+x1MVWmivtRHcC\\nSTzpx8jAGCiG6ejLqWB87ZXiZm7ujlCBheHSf5RHwNHhUvoP2JEYalDDRxjcDMSx\\n4uV42Np4yJlIQEDlGHcBlXoL7vEukFpuWgkYdpcZy/Ou9qz8mXrpLcu8C8MhLmSC\\nixGoR5iRhV7cxoHLyuCzj87eYEA73Xu238DQorSEEuiVFnLzQ2+PJMs4qoI14q/L\\notlBDz+Ko6DrU/EZROYmiqMkLKXR2sx9zNAJwPYRs6nSH08tZ3dwqzZbgtP3Wazi\\nhLWHt5/En7wQRA5a+/dDEHXSoLvvSQ9jvhclhWf+eCYuq2eH+g54oyJGRSY+8GV7\\nujhLxkzl/3OZdhZPWoz4U13KpbSTcNWu5Y7oGDoabw19UbvqmLf1PJkpDH/tQgzB\\nxYtsLBRUcofpYoeIiIxfAA4do5WilJc8xqrGhkE4WcHfY24HXAiOvsjbxV+BRprX\\n1jtgJpV/9nJESMap+8PxipGUFRGjB83/uwJaa6mLftEKflX8i4MZ+HnqraXERsqA\\nWRUcDHIWmFfpzIB3iNuxawVvPH8NdCSPmQ9qTb8Cozl0AuOK2E9S+ke8oiYQScWR\\nLdu+zhej7GjuQ9R+Ub+wPWqvOA5qLXejqnCexVScDUuN+z9JWM3N2FG1MwxhAzhP\\ndEfoQHoBn6uyOmrVGP6fosV3chqhPoec42KeOAm1xDvx692isaIy1jPgIyPxeqhm\\n2Tw4E+02R7dlP8Ljf7JzfLm4oKpWHWlcHeqg24x6lY/wXU1RBcWaTa0AQUwoGm2m\\nIQCPfIqOEv/QC2HpO7SVCYkl65KwR0oTd1AzYxdxEq3xHQbh69EL0FGZPVxVCPI+\\nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\n-----END RSA PRIVATE KEY-----\",\n \"passphrase\": \"helloworld\"\n }\n}'\n```", "field_renames": [], "fields": [ { @@ -22903,23 +22386,12 @@ "required": false, "_key": "description" }, - { - "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-id", - "in": "path", - "required": true, - "_key": "id" - }, { "type": "object", "additionalProperties": { "type": "string" }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", "example": [], "api_fieldname": "issuer_attributes", "entity_fieldname": "issuer_attributes", @@ -22933,7 +22405,7 @@ "additionalProperties": { "type": "string" }, - "description": "The credentials required for connecting to the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.\n", + "description": "The credentials required to connect to the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.", "example": [], "name": "issuer_credentials", "in": "body", @@ -22942,9 +22414,25 @@ "api_fieldname": "issuer_credentials", "external_param": true, "parameter_fieldname": "issuer_credentials", - "required": false, + "required": true, "_key": "issuer_credentials" }, + { + "type": "string", + "enum": [ + "GLOBAL_SIGN", + "CFSSL_AUTH" + ], + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "api_fieldname": "issuer_type", + "entity_fieldname": "issuer_type", + "parameter_fieldname": "issuer_type", + "in": "body", + "required": true, + "enum_reference": "certificate_issuer_type_enum", + "_key": "issuer_type" + }, { "type": "string", "maxLength": 50, @@ -22958,11 +22446,11 @@ "_key": "name" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "create", "responses": [ { - "description": "OK.", + "description": "Created.", "schema": { "type": "object", "properties": [ @@ -22995,129 +22483,66 @@ }, { "type": "string", - "description": "The ID of the certificate issuer.", + "description": "Certificate issuer ID.", "example": "01234567890ABCDEF01234567890ABCDEF", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" }, { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "api_fieldname": "issuer_attributes", - "entity_fieldname": "issuer_attributes", - "_key": "issuer_attributes" - }, - { - "type": "string", - "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" - ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "api_fieldname": "issuer_type", - "entity_fieldname": "issuer_type", - "_key": "issuer_type" - }, - { - "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "type": "string", - "enum": [ - "certificate-issuer" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - } - ], - "required": [ - "issuer_type" - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" - } - }, - "_key": "200" - }, - { - "description": "Validation error: The data used to update the certificate issuer failed validation.\n", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "api_fieldname": "issuer_attributes", + "entity_fieldname": "issuer_attributes", + "_key": "issuer_attributes" }, { "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "enum": [ + "GLOBAL_SIGN", + "CFSSL_AUTH" + ], + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "api_fieldname": "issuer_type", + "entity_fieldname": "issuer_type", + "_key": "issuer_type" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Error type.", - "_key": "type" + "enum": [ + "certificate-issuer" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" } - ] + ], + "required": [ + "issuer_type" + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" + } }, - "_key": "400" + "_key": "201" }, { - "description": "Unauthorized.", + "description": "Validation error: The data used to create the certificate issuer failed validation.", "schema": { "type": "object", "required": [ @@ -23177,10 +22602,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "You are not authorized to view the resource.", "schema": { "type": "object", "required": [ @@ -23240,10 +22665,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -23303,10 +22728,10 @@ } ] }, - "_key": "404" + "_key": "403" }, { - "description": "Conflict. A certificate issuer with this name already exists.\n", + "description": "Conflict. A certificate issuer with this name already exists.", "schema": { "type": "object", "required": [ @@ -23369,7 +22794,7 @@ "_key": "409" }, { - "description": "The request failed due to customer configured external service.\n", + "description": "The request failed due to customer configured external service.", "schema": { "type": "object", "required": [ @@ -23432,8 +22857,8 @@ "_key": "424" } ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}", - "summary": "Update certificate issuer.", + "path": "/v3/certificate-issuers", + "summary": "Create certificate issuer.", "return_type": "certificate_issuer", "return_info": { "self": true, @@ -23448,26 +22873,26 @@ "type", "filter", "created_at", - "issuer_type" + "id" ], "group_id": "Security", "parameter_map": { "certificate-issuer-id": "id" }, - "operation_id": "updateCertificateIssuer", + "operation_id": "createCertificateIssuer", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "update" + "_key": "create" }, { - "description": "A utility API that can be used to validate the user configuration before activating a certificate issuer.\nVerifies that the certificate issuer is accessible and can be used to generate certificates by Device Management.\n
\n**Note:**\nThe API requests the 3rd party CA to sign a test certificate.\nFor some 3rd party CAs, this operation may make use of the account quota.\n
\n**Example usage:**\n\n```\ncurl -X POST \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify\n```\n", + "description": "Delete a certificate issuer by ID.\n
\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 \\\n-H 'Authorization: Bearer ' \\\n```", "field_renames": [], "fields": [ { "name": "certificate-issuer-id", "in": "path", - "description": "Certificate issuer ID.
The ID of the certificate issuer.\n", + "description": "Certificate issuer ID.\nAn active certificate issuer cannot be deleted.", "required": true, "type": "string", "entity_fieldname": "id", @@ -23477,40 +22902,15 @@ "_key": "id" } ], - "method": "post", - "mode": "verify", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Provides details in case of failure.\n", - "example": "message describing the verification failure", - "api_fieldname": "message", - "entity_fieldname": "message", - "_key": "message" - }, - { - "type": "boolean", - "description": "Indicates whether the certificate issuer was verified successfully.\n", - "example": false, - "api_fieldname": "successful", - "entity_fieldname": "successful", - "_key": "successful" - } - ], - "foreign_key": { - "group": "Security", - "entity": "verification_response" - } - }, - "_key": "200" + "description": "Certificate issuer deleted.", + "_key": "204" }, { - "description": "Validation error", + "description": "Validation error: An active certificate issuer cannot be deleted.", "schema": { "type": "object", "required": [ @@ -23624,438 +23024,19 @@ { "type": "string", "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Not found.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "404" - }, - { - "description": "The request failed due to customer configured external service.\n", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" - }, - { - "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "424" - } - ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}/verify", - "summary": "Verify certificate issuer.", - "return_type": "verification_response", - "return_info": { - "self": false, - "custom": false, - "type": "verification_response" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "successful", - "message" - ], - "group_id": "Security", - "parameter_map": { - "certificate-issuer-id": "id" - }, - "unaggregated": true, - "operation_id": "verifyCertificateIssuer", - "foreign_key": { - "entity": "verification_response", - "group": "Security" - }, - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "verify" - } - ], - "fields": [ - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value shall be empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.\n", - "example": [], - "api_fieldname": "issuer_attributes", - "readOnly": false, - "required": false, - "_key": "issuer_attributes" - }, - { - "type": "string", - "enum": [ - "GLOBAL_SIGN", - "CFSSL_AUTH" - ], - "description": "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. The users must provide their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n The users must provide their own CFSSL host_url and credentials.\n", - "example": "GLOBAL_SIGN", - "api_fieldname": "issuer_type", - "readOnly": false, - "required": true, - "enum_reference": "certificate_issuer_type_enum", - "_key": "issuer_type" - }, - { - "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "readOnly": false, - "required": true, - "_key": "name" - } - ], - "field_renames": [], - "tags": [ - "Certificate Issuers" - ], - "group_id": "Security", - "_key": "certificate_issuer" - }, - { - "swagger_models": [ - "CertificateIssuerConfigListResponse", - "CertificateIssuerConfigRequest", - "CertificateIssuerConfigResponse", - "CreateCertificateIssuerConfig" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Configure the certificate issuer to be used when creating the device custom certificates.\n
\n**Example usage:**\n\n```\ncurl -X POST \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\\n-d '{\n \"reference\": \"customer.dlms\",\n \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\"\n}'\n```\n", - "field_renames": [], - "fields": [ - { - "x-nullable": true, - "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "certificate_issuer_id", - "entity_fieldname": "certificate_issuer_id", - "parameter_fieldname": "certificate_issuer_id", - "in": "body", - "required": false, - "_key": "certificate_issuer_id" - }, - { - "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "parameter_fieldname": "reference", - "in": "body", - "required": true, - "_key": "reference" - } - ], - "method": "post", - "mode": "create", - "responses": [ - { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "x-nullable": true, - "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "certificate_issuer_id", - "entity_fieldname": "certificate_issuer_id", - "_key": "certificate_issuer_id" - }, - { - "type": "string", - "format": "date-time", - "description": "Created UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "api_fieldname": "is_custom", - "entity_fieldname": "is_custom", - "_key": "is_custom" - }, - { - "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type.", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" - } + ] }, - "_key": "201" + "_key": "401" }, { - "description": "Validation error.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -24115,10 +23096,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Unauthorized.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -24178,10 +23159,256 @@ } ] }, - "_key": "401" + "_key": "404" + } + ], + "path": "/v3/certificate-issuers/{certificate-issuer-id}", + "summary": "Delete certificate issuer.", + "return_type": "certificate_issuer", + "return_info": { + "self": true, + "custom": false, + "type": "certificate_issuer" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-id": "id" + }, + "operation_id": "deleteCertificateIssuer", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "description": "**Note:** This endpoint does not use pagination, and therefore ignores list control parameters such as `limit` or `after`.", + "field_renames": [], + "fields": [ + { + "type": "string", + "description": "The ID of the item after which to retrieve the next page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" }, { - "description": "Forbidden.", + "description": "Comma-separated list of data fields to return. Currently supported: `total_count`.", + "in": "query", + "name": "include", + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "required": false, + "_key": "include" + }, + { + "type": "integer", + "description": "The number of results to return (2-1000). Values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "in": "query", + "name": "limit", + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "_key": "order" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The ID of the item after which to retrieve the next page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "_key": "created_at" + }, + { + "type": "string", + "maxLength": 100, + "description": "General description for the certificate issuer.", + "example": "GlobalSign sample issuer", + "x-nullable": true, + "_key": "description" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "_key": "id" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "_key": "issuer_attributes" + }, + { + "type": "string", + "enum": [ + "GLOBAL_SIGN", + "CFSSL_AUTH" + ], + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "_key": "issuer_type" + }, + { + "type": "string", + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "_key": "name" + }, + { + "type": "string", + "enum": [ + "certificate-issuer" + ], + "_key": "object" + } + ], + "required": [ + "issuer_type" + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" + } + }, + "description": "List of certificate issuers.", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "description": "More results are available.", + "example": false, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "description": "The number of results to return (2-1000). Values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "in": "query", + "name": "limit", + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "description": "The type of this API object is `list`.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "_key": "order" + }, + { + "format": "integer", + "type": "integer", + "example": 1, + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" + } + }, + "_key": "200" + }, + { + "description": "Unauthorized.", "schema": { "type": "object", "required": [ @@ -24241,10 +23468,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "A certificate issuer configuration with this reference already exists.\n", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -24304,16 +23531,16 @@ } ] }, - "_key": "409" + "_key": "403" } ], - "path": "/v3/certificate-issuer-configurations", - "summary": "Create certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/certificate-issuers", + "summary": "Get certificate issuers list.", + "return_type": "paginated_response(certificate_issuer)", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" + "type": "certificate_issuer" }, "x_filter": {}, "x_deprecation": null, @@ -24322,47 +23549,138 @@ "etag", "type", "filter", - "is_custom", - "id", - "created_at", - "updated_at" + "has_more", + "total_count", + "data" ], + "foreign_key_priority": "self", "group_id": "Security", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "certificate-issuer-id": "id" + }, + "operation_id": "getCertificateIssuers", + "pagination": true, + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" }, - "operation_id": "createCertificateIssuerConfig", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "list" }, { - "description": "Delete the configured certificate issuer configuration.\nYou can only delete the configurations of custom certificates.\n", + "description": "(No description provided)", "field_renames": [], "fields": [ { - "name": "certificate-issuer-configuration-id", - "in": "path", - "description": "The ID of the certificate issuer configuration.\n", - "required": true, "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "certificate-issuer-configuration-id", - "external_param": false, - "parameter_fieldname": "certificate-issuer-configuration-id", + "parameter_fieldname": "certificate-issuer-id", + "in": "path", + "required": true, "_key": "id" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { - "description": "No content.", - "_key": "204" + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "maxLength": 100, + "description": "General description for the certificate issuer.", + "example": "GlobalSign sample issuer", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "api_fieldname": "issuer_attributes", + "entity_fieldname": "issuer_attributes", + "_key": "issuer_attributes" + }, + { + "type": "string", + "enum": [ + "GLOBAL_SIGN", + "CFSSL_AUTH" + ], + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "api_fieldname": "issuer_type", + "entity_fieldname": "issuer_type", + "_key": "issuer_type" + }, + { + "type": "string", + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "enum": [ + "certificate-issuer" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + } + ], + "required": [ + "issuer_type" + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" + } + }, + "_key": "200" }, { - "description": "Validation error.", + "description": "Validation error: The data used to get the certificate issuer failed validation.", "schema": { "type": "object", "required": [ @@ -24614,13 +23932,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Delete certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/certificate-issuers/{certificate-issuer-id}", + "summary": "Get certificate issuer by ID.", + "return_type": "certificate_issuer", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" + "type": "certificate_issuer" }, "x_filter": {}, "x_deprecation": null, @@ -24629,48 +23947,121 @@ "etag", "type", "filter", - "is_custom" + "created_at", + "issuer_type", + "name", + "description", + "issuer_attributes" ], "group_id": "Security", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "certificate-issuer-id": "id" }, - "operation_id": "deleteCertificateIssuerConfigByID", + "operation_id": "getCertificateIssuer", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" }, { - "description": "Provides the configured certificate issuer to be used when creating device\ncertificates for LwM2M communication.
\n", + "description": "Update a certificate issuer.\n
\n**Example:**\n\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n-d '{\n \"description\": \"Sample GlobalSign certificate issuer - updated.\",\n \"name\": \"GlobalSign Issuer\"\n}'\n```", "field_renames": [], - "fields": [], - "method": "get", - "mode": "get_default", + "fields": [ + { + "type": "string", + "maxLength": 100, + "description": "General description for the certificate issuer.", + "example": "GlobalSign sample issuer", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "certificate-issuer-id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "api_fieldname": "issuer_attributes", + "entity_fieldname": "issuer_attributes", + "parameter_fieldname": "issuer_attributes", + "in": "body", + "required": false, + "_key": "issuer_attributes" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The credentials required to connect to the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.", + "example": [], + "name": "issuer_credentials", + "in": "body", + "schema_param": true, + "entity_fieldname": "issuer_credentials", + "api_fieldname": "issuer_credentials", + "external_param": true, + "parameter_fieldname": "issuer_credentials", + "required": false, + "_key": "issuer_credentials" + }, + { + "type": "string", + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + } + ], + "method": "put", + "mode": "update", "responses": [ { "description": "OK.", "schema": { "type": "object", "properties": [ - { - "x-nullable": true, - "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "certificate_issuer_id", - "entity_fieldname": "certificate_issuer_id", - "_key": "certificate_issuer_id" - }, { "type": "string", "format": "date-time", - "description": "Created UTC time RFC3339.", + "description": "Creation UTC time RFC3339.", "example": "2017-01-01T00:00:00Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, + { + "type": "string", + "maxLength": 100, + "description": "General description for the certificate issuer.", + "example": "GlobalSign sample issuer", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, { "type": "string", "description": "Entity instance signature.", @@ -24681,55 +24072,66 @@ }, { "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" }, { - "type": "boolean", - "example": true, - "api_fieldname": "is_custom", - "entity_fieldname": "is_custom", - "_key": "is_custom" + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "api_fieldname": "issuer_attributes", + "entity_fieldname": "issuer_attributes", + "_key": "issuer_attributes" }, { "type": "string", "enum": [ - "certificate-issuer-configuration" + "GLOBAL_SIGN", + "CFSSL_AUTH" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "api_fieldname": "issuer_type", + "entity_fieldname": "issuer_type", + "_key": "issuer_type" }, { "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "enum": [ + "certificate-issuer" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" } ], + "required": [ + "issuer_type" + ], "foreign_key": { "group": "Security", - "entity": "certificate_issuer_config" + "entity": "certificate_issuer" } }, "_key": "200" }, { - "description": "Validation error.", + "description": "Validation error: The data used to update the certificate issuer failed validation.", "schema": { "type": "object", "required": [ @@ -24916,234 +24318,9 @@ ] }, "_key": "403" - } - ], - "path": "/v3/certificate-issuer-configurations/lwm2m", - "summary": "Get certificate issuer configuration.", - "return_type": "certificate_issuer_config", - "return_info": { - "self": true, - "custom": false, - "type": "certificate_issuer_config" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "is_custom", - "id", - "certificate_issuer_id", - "reference", - "created_at", - "updated_at" - ], - "group_id": "Security", - "parameter_map": { - "certificate-issuer-configuration-id": "id" - }, - "operation_id": "getCertificateIssuerConfig", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "get_default" - }, - { - "description": "Get certificate issuer configurations, optionally filtered by reference.\n
\n**Example usage:**\n\n```\ncurl \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\\n```\n```\ncurl \\\n-H 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \\\n```\nNote: This endpoint does not implement pagination and therefore, list control parameters such as `limit` or `after` will be ignored by the system.\n", - "field_renames": [], - "fields": [ - { - "type": "string", - "description": "The ID of The item after which to retrieve the next page.", - "example": "01631667477600000000000100100374", - "api_fieldname": "after", - "entity_fieldname": "after", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "description": "Comma-separated list of data fields to return. Currently supported: `total_count`", - "in": "query", - "name": "include", - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "required": false, - "_key": "include" - }, - { - "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "in": "query", - "name": "limit", - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" - }, - { - "type": "string", - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "_key": "order" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "An offset token for current page.", - "example": "01631667477600000000000100100374", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": [ - { - "x-nullable": true, - "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "_key": "certificate_issuer_id" - }, - { - "type": "string", - "format": "date-time", - "description": "Created UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "_key": "created_at" - }, - { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "_key": "etag" - }, - { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "_key": "is_custom" - }, - { - "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], - "_key": "object" - }, - { - "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" - } - }, - "description": "List of certificate issuers.", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "description": "Are there more results available.", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" - }, - { - "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "The type of this API object is a `list`.", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "description": "The creation time based order of the entries.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" - }, - { - "format": "integer", - "type": "integer", - "example": 1, - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" - } - }, - "_key": "200" }, { - "description": "Validation error.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -25203,10 +24380,10 @@ } ] }, - "_key": "400" + "_key": "404" }, { - "description": "Unauthorized.", + "description": "Conflict. A certificate issuer with this name already exists.", "schema": { "type": "object", "required": [ @@ -25266,10 +24443,10 @@ } ] }, - "_key": "401" + "_key": "409" }, { - "description": "Forbidden.", + "description": "The request failed due to customer-configured external service.", "schema": { "type": "object", "required": [ @@ -25329,67 +24506,56 @@ } ] }, - "_key": "403" + "_key": "424" } ], - "path": "/v3/certificate-issuer-configurations", - "summary": "Get certificate issuer configurations.", - "return_type": "paginated_response(certificate_issuer_config)", + "path": "/v3/certificate-issuers/{certificate-issuer-id}", + "summary": "Update certificate issuer.", + "return_type": "certificate_issuer", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" - }, - "x_filter": { - "reference": [ - "eq" - ] + "type": "certificate_issuer" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", "filter", - "is_custom", - "has_more", - "total_count", - "data", - "reference__eq" + "created_at", + "issuer_type" ], - "foreign_key_priority": "self", "group_id": "Security", "parameter_map": { - "certificate-issuer-configuration-id": "id" - }, - "operation_id": "getCertificateIssuerConfigs", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" + "certificate-issuer-id": "id" }, + "operation_id": "updateCertificateIssuer", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "update" }, { - "description": "Provides the configured certificate issuer.\n", + "description": "Validates the certificate issuer by sending a signing request for a test certificate. This should be done before the configuration is made active.\n
\n**Note:**\nThe API requests the 3rd party CA to sign a test certificate.\nFor some 3rd party CAs, this operation may use the account quota.\n
\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n```", "field_renames": [], "fields": [ { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-configuration-id", + "name": "certificate-issuer-id", "in": "path", + "description": "Certificate issuer ID.", "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "certificate-issuer-id", + "external_param": false, + "parameter_fieldname": "certificate-issuer-id", "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "verify", "responses": [ { "description": "OK.", @@ -25397,82 +24563,94 @@ "type": "object", "properties": [ { - "x-nullable": true, "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "certificate_issuer_id", - "entity_fieldname": "certificate_issuer_id", - "_key": "certificate_issuer_id" + "description": "Provides details in case of failure.", + "example": "Message describing the verification failure", + "api_fieldname": "message", + "entity_fieldname": "message", + "_key": "message" }, { - "type": "string", - "format": "date-time", - "description": "Created UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, + "type": "boolean", + "description": "Indicates whether the certificate issuer was verified successfully.", + "example": false, + "api_fieldname": "successful", + "entity_fieldname": "successful", + "_key": "successful" + } + ], + "foreign_key": { + "group": "Security", + "entity": "verification_response" + } + }, + "_key": "200" + }, + { + "description": "Validation error", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "array", + "description": "A list of request fields that failed validation.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] + }, + "_key": "fields" }, { - "type": "boolean", - "example": true, - "api_fieldname": "is_custom", - "entity_fieldname": "is_custom", - "_key": "is_custom" + "type": "string", + "description": "Error message.", + "_key": "message" }, { "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "description": "Request ID from JWT.", + "_key": "request_id" }, { "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "description": "Error type.", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Validation error.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ @@ -25532,10 +24710,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -25595,10 +24773,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -25658,10 +24836,10 @@ } ] }, - "_key": "403" + "_key": "404" }, { - "description": "Not found.", + "description": "The request failed due to customer configured external service.", "schema": { "type": "object", "required": [ @@ -25721,48 +24899,135 @@ } ] }, - "_key": "404" + "_key": "424" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Get certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/certificate-issuers/{certificate-issuer-id}/verify", + "summary": "Verify certificate issuer.", + "return_type": "verification_response", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "certificate_issuer_config" + "type": "verification_response" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "successful", + "message" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-id": "id" + }, + "unaggregated": true, + "operation_id": "verifyCertificateIssuer", + "foreign_key": { + "entity": "verification_response", + "group": "Security" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "verify" + } + ], + "fields": [ + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "maxLength": 100, + "description": "General description for the certificate issuer.", + "example": "GlobalSign sample issuer", + "x-nullable": true, + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "object", + "additionalProperties": { + "type": "string" }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "is_custom", - "certificate_issuer_id", - "reference", - "created_at", - "updated_at" + "description": "General attributes for connecting the certificate issuer.\nWhen the issuer_type is GLOBAL_SIGN, the value is empty.\nWhen the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.", + "example": [], + "api_fieldname": "issuer_attributes", + "readOnly": false, + "required": false, + "_key": "issuer_attributes" + }, + { + "type": "string", + "enum": [ + "GLOBAL_SIGN", + "CFSSL_AUTH" ], - "group_id": "Security", - "parameter_map": { - "certificate-issuer-configuration-id": "id" - }, - "operation_id": "getCertificateIssuerConfigByID", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" + "description": "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued by GlobalSign service. You must provide your own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n You must provide your own CFSSL host_url and credentials.", + "example": "GLOBAL_SIGN", + "api_fieldname": "issuer_type", + "readOnly": false, + "required": true, + "enum_reference": "certificate_issuer_type_enum", + "_key": "issuer_type" }, { - "description": "Update the configured certificate issuer configuration.\n", + "type": "string", + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "api_fieldname": "name", + "readOnly": false, + "required": true, + "_key": "name" + } + ], + "field_renames": [], + "tags": [ + "Security and identity - certificate issuers" + ], + "group_id": "Security", + "_key": "certificate_issuer" + }, + { + "swagger_models": [ + "CertificateIssuerConfigListResponse", + "CertificateIssuerConfigRequest", + "CertificateIssuerConfigResponse", + "CreateCertificateIssuerConfig" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Configure the certificate issuer to use when creating device custom certificates.\n
\n**Example:**\n\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n-d '{\n \"reference\": \"customer.dlms\",\n \"certificate_issuer_id\": \"01621a36719d507b9d48a91b00000000\"\n}'\n```", "field_renames": [], "fields": [ { "x-nullable": true, "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", "example": "01648415a2a30242ac18000500000000", "api_fieldname": "certificate_issuer_id", "entity_fieldname": "certificate_issuer_id", @@ -25773,18 +25038,18 @@ }, { "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-configuration-id", - "in": "path", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "parameter_fieldname": "reference", + "in": "body", "required": true, - "_key": "id" + "_key": "reference" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "create", "responses": [ { "description": "OK.", @@ -25794,7 +25059,7 @@ { "x-nullable": true, "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", "example": "01648415a2a30242ac18000500000000", "api_fieldname": "certificate_issuer_id", "entity_fieldname": "certificate_issuer_id", @@ -25819,7 +25084,7 @@ }, { "type": "string", - "description": "The ID of the certificate issuer configuration.\n", + "description": "Certificate issuer ID. configuration.", "example": "01648415a2a30242ac18000500000000", "api_fieldname": "id", "entity_fieldname": "id", @@ -25864,7 +25129,7 @@ "entity": "certificate_issuer_config" } }, - "_key": "200" + "_key": "201" }, { "description": "Validation error.", @@ -26056,7 +25321,7 @@ "_key": "403" }, { - "description": "Not found.", + "description": "A certificate issuer configuration with this reference already exists.", "schema": { "type": "object", "required": [ @@ -26116,11 +25381,11 @@ } ] }, - "_key": "404" + "_key": "409" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Update certificate issuer configuration.", + "path": "/v3/certificate-issuer-configurations", + "summary": "Create certificate issuer configuration.", "return_type": "certificate_issuer_config", "return_info": { "self": true, @@ -26135,7 +25400,7 @@ "type", "filter", "is_custom", - "reference", + "id", "created_at", "updated_at" ], @@ -26143,132 +25408,43 @@ "parameter_map": { "certificate-issuer-configuration-id": "id" }, - "operation_id": "updateCertificateIssuerConfigByID", - "additional_operations": [ - { - "operation_id": "updateCertificateIssuerConfig", - "notes": "After retrieving the resource using the `lwm2m` method, it can modified using using this SDK method." - } - ], + "operation_id": "createCertificateIssuerConfig", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "update" - } - ], - "fields": [ - { - "x-nullable": true, - "type": "string", - "description": "The ID of the certificate issuer.\nNull if Device Management internal HSM is used.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "certificate_issuer_id", - "readOnly": false, - "required": true, - "_key": "certificate_issuer_id" - }, - { - "type": "string", - "format": "date-time", - "description": "Created UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "readOnly": false, - "required": true, - "_key": "reference" + "_key": "create" }, { - "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "Certificate Issuers Activation" - ], - "group_id": "Security", - "_key": "certificate_issuer_config" - }, - { - "swagger_models": [ - "BrandingColor", - "BrandingColorList" - ], - "primary_key_field": "reference", - "methods": [ - { - "description": "Resets the branding color to its dark theme default.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete certificate issuer configuration.\nYou can only delete custom certificate configurations.", "field_renames": [], "fields": [ { - "is_primary_key": true, - "_override": true, - "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "name": "reference", + "name": "certificate-issuer-configuration-id", "in": "path", - "description": "The name of the branding color.", + "description": "Certificate issuer ID configuration.", "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "certificate-issuer-configuration-id", + "external_param": false, + "parameter_fieldname": "certificate-issuer-configuration-id", + "_key": "id" } ], "method": "delete", "mode": "delete", "responses": [ { - "description": "Deleted successfully.", + "description": "No content.", "_key": "204" }, { - "description": "Authentication failure.", + "description": "Validation error.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26278,29 +25454,87 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", "_key": "message" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name: `error`.", + "_key": "object" + }, + { + "type": "string", + "description": "Request ID from JWT.", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Unauthorized.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" + }, + { + "type": "array", + "description": "A list of request fields that failed validation.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -26308,28 +25542,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -26342,6 +25570,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26351,29 +25580,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -26381,28 +25605,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -26410,11 +25628,12 @@ "_key": "403" }, { - "description": "Color not found.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26424,29 +25643,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -26454,28 +25668,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -26483,13 +25691,13 @@ "_key": "404" } ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Reset branding color to default.", - "return_type": "void", + "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", + "summary": "Delete certificate issuer configuration.", + "return_type": "certificate_issuer_config", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "certificate_issuer_config" }, "x_filter": {}, "x_deprecation": null, @@ -26497,182 +25705,176 @@ "object", "etag", "type", - "filter" + "filter", + "is_custom" ], - "group_id": "Branding", - "operation_id": "resetDarkColor", - "spec": { - "return_type": "void" + "group_id": "Security", + "parameter_map": { + "certificate-issuer-configuration-id": "id" }, + "operation_id": "deleteCertificateIssuerConfigByID", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "delete" }, { - "description": "Retrieve the dark theme branding colors.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\\n-H 'Authorization: Bearer '\n```", + "description": "Provides the configured certificate issuer used when creating device\ncertificates for LwM2M.", "field_renames": [], - "fields": [ - { - "is_primary_key": true, - "_override": true, - "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" - } - ], + "fields": [], "method": "get", - "mode": "list", + "mode": "get_default", "responses": [ { - "description": "Successful operation.", + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "x-nullable": true, + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "certificate_issuer_id", + "entity_fieldname": "certificate_issuer_id", + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "api_fieldname": "is_custom", + "entity_fieldname": "is_custom", + "_key": "is_custom" + }, + { + "type": "string", + "enum": [ + "certificate-issuer-configuration" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "description": "Updated UTC time RFC3339.", + "example": "2017-02-01T00:00:00Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer_config" + } + }, + "_key": "200" + }, + { + "description": "Validation error.", "schema": { "type": "object", "required": [ - "data", - "has_more", - "limit", + "code", + "fields", + "message", "object", - "total_count" + "request_id", + "type" ], "properties": [ { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { "type": "array", - "description": "A list of entities.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", "properties": [ { "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "_key": "object" - }, - { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "_key": "reference" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" + "description": "Error message related to the field.", + "_key": "message" } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_key": "fields" }, { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "Error message.", + "_key": "message" }, { "type": "string", - "description": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "Request ID from JWT.", + "_key": "request_id" }, { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "description": "Error type.", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Authentication failure.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26682,29 +25884,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -26712,28 +25909,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -26746,6 +25937,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26755,29 +25947,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -26785,28 +25972,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -26814,13 +25995,13 @@ "_key": "403" } ], - "path": "/v3/branding-colors/dark", - "summary": "Get dark theme branding colors.", - "return_type": "paginated_response(dark_theme_color)", + "path": "/v3/certificate-issuer-configurations/lwm2m", + "summary": "Get certificate issuer configuration.", + "return_type": "certificate_issuer_config", "return_info": { "self": true, "custom": false, - "type": "dark_theme_color" + "type": "certificate_issuer_config" }, "x_filter": {}, "x_deprecation": null, @@ -26829,140 +26010,222 @@ "etag", "type", "filter", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" + "is_custom", + "id", + "certificate_issuer_id", + "reference", + "created_at", + "updated_at" ], - "foreign_key_priority": "self", - "group_id": "Branding", - "operation_id": "getDarkColors", - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" + "group_id": "Security", + "parameter_map": { + "certificate-issuer-configuration-id": "id" }, + "operation_id": "getCertificateIssuerConfig", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "get_default" }, { - "description": "Retrieve the requested dark theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Get certificate issuer configurations, optionally filtered by reference.\n
\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n```\n
\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n```\n**Note:** This endpoint does not implement pagination, and therefore ignores list control parameters such as `limit` or `after`.", "field_renames": [], "fields": [ { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "description": "The ID of the item after which to retrieve the next page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" + }, + { + "description": "Comma-separated list of data fields to return. Currently supported: `total_count`.", + "in": "query", + "name": "include", + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "required": false, + "_key": "include" + }, + { + "type": "integer", + "description": "The number of results to return (2-1000). Values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "in": "query", + "name": "limit", + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "_key": "order" } ], "method": "get", - "mode": "read", + "mode": "list", "responses": [ { - "description": "Successful operation.", + "description": "OK.", "schema": { "type": "object", "properties": [ { "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "api_fieldname": "color", - "entity_fieldname": "color", - "_key": "color" + "description": "An offset token for current page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": [ + { + "x-nullable": true, + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "_key": "created_at" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "_key": "is_custom" + }, + { + "type": "string", + "enum": [ + "certificate-issuer-configuration" + ], + "_key": "object" + }, + { + "type": "string", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "description": "Updated UTC time RFC3339.", + "example": "2017-02-01T00:00:00Z", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer_config" + } + }, + "description": "List of certificate issuers.", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "description": "More results are available.", + "example": false, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "description": "The number of results to return (2-1000). Values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], + "description": "The type of this API object is `list`.", + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "description": "Record order based on creation time.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "format": "integer", + "type": "integer", + "example": 1, + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], + "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" + "group": "Security", + "entity": "certificate_issuer_config" } }, "_key": "200" }, { - "description": "Authentication failure.", + "description": "Validation error.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -26972,29 +26235,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27002,40 +26260,35 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27045,29 +26298,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27075,40 +26323,35 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Color not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27118,29 +26361,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27148,172 +26386,147 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Get dark theme branding color.", - "return_type": "dark_theme_color", + "path": "/v3/certificate-issuer-configurations", + "summary": "Get certificate issuer configurations.", + "return_type": "paginated_response(certificate_issuer_config)", "return_info": { "self": true, "custom": false, - "type": "dark_theme_color" + "type": "certificate_issuer_config" + }, + "x_filter": { + "reference": [ + "eq" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", "filter", - "color", - "updated_at" + "is_custom", + "has_more", + "total_count", + "data", + "reference__eq" ], - "group_id": "Branding", - "operation_id": "getDarkColor", - "pagination": false, + "foreign_key_priority": "self", + "group_id": "Security", + "parameter_map": { + "certificate-issuer-configuration-id": "id" + }, + "operation_id": "getCertificateIssuerConfigs", + "pagination": true, + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer_config" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "list" }, { - "description": "Update a dark theme branding color.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"#f3f93e\" }'\n```", + "description": "Provides the configured certificate issuer.", "field_renames": [], "fields": [ { "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "api_fieldname": "color", - "entity_fieldname": "color", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "_key": "color" - }, - { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "certificate-issuer-configuration-id", "in": "path", "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, - "_key": "updated_at" + "_key": "id" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "read", "responses": [ { - "description": "Color has been set successfully.", + "description": "OK.", "schema": { "type": "object", "properties": [ { - "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", "x-nullable": true, - "api_fieldname": "color", - "entity_fieldname": "color", - "_key": "color" + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "certificate_issuer_id", + "entity_fieldname": "certificate_issuer_id", + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "api_fieldname": "is_custom", + "entity_fieldname": "is_custom", + "_key": "is_custom" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, "enum": [ - "branding_color" + "certificate-issuer-configuration" ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", "api_fieldname": "reference", "entity_fieldname": "reference", "_key": "reference" @@ -27321,27 +26534,27 @@ { "type": "string", "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Updated UTC time RFC3339.", + "example": "2017-02-01T00:00:00Z", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" + "group": "Security", + "entity": "certificate_issuer_config" } }, "_key": "200" }, { - "description": "Error in input data format.", + "description": "Validation error.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27351,29 +26564,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27381,28 +26589,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -27410,11 +26612,12 @@ "_key": "400" }, { - "description": "Authentication failure.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27424,29 +26627,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27454,28 +26652,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -27488,6 +26680,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27497,29 +26690,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27527,28 +26715,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -27556,11 +26738,218 @@ "_key": "403" }, { - "description": "Color not found.", + "description": "Not found.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" + }, + { + "type": "array", + "description": "A list of request fields that failed validation.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name: `error`.", + "_key": "object" + }, + { + "type": "string", + "description": "Request ID from JWT.", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", + "summary": "Get certificate issuer configuration.", + "return_type": "certificate_issuer_config", + "return_info": { + "self": true, + "custom": false, + "type": "certificate_issuer_config" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "is_custom", + "certificate_issuer_id", + "reference", + "created_at", + "updated_at" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-configuration-id": "id" + }, + "operation_id": "getCertificateIssuerConfigByID", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "description": "Update certificate issuer configuration.", + "field_renames": [], + "fields": [ + { + "x-nullable": true, + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "certificate_issuer_id", + "entity_fieldname": "certificate_issuer_id", + "parameter_fieldname": "certificate_issuer_id", + "in": "body", + "required": false, + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "certificate-issuer-configuration-id", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "put", + "mode": "update", + "responses": [ + { + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "x-nullable": true, + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "certificate_issuer_id", + "entity_fieldname": "certificate_issuer_id", + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "api_fieldname": "is_custom", + "entity_fieldname": "is_custom", + "_key": "is_custom" + }, + { + "type": "string", + "enum": [ + "certificate-issuer-configuration" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "description": "Updated UTC time RFC3339.", + "example": "2017-02-01T00:00:00Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer_config" + } + }, + "_key": "200" + }, + { + "description": "Validation error.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27570,29 +26959,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27600,200 +26984,35 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "404" - } - ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Updates a dark theme branding color.", - "return_type": "dark_theme_color", - "return_info": { - "self": true, - "custom": false, - "type": "dark_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter" - ], - "group_id": "Branding", - "operation_id": "setDarkColor", - "additional_operations": [ - { - "operation_id": "bulkSetDarkColors", - "notes": "Bulk operation is not appriate for SDK's entity model, this functionality is covered by the update method." - } - ], - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "update" - } - ], - "fields": [ - { - "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "api_fieldname": "color", - "readOnly": false, - "required": false, - "_key": "color" - }, - { - "enum": [ - "error_color", - "primary", - "secondary", - "success_color", - "warning_color", - "canvas_background", - "canvas_background_font_color", - "workspace_background", - "workspace_background_font_color", - "info_color", - "info_font_color", - "primary_font_color", - "secondary_font_color", - "error_font_color", - "success_font_color", - "warning_font_color" - ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "readOnly": false, - "required": false, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "api_fieldname": "updated_at", - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "User interface configuration - colors" - ], - "group_id": "Branding", - "_key": "dark_theme_color" - }, - { - "swagger_models": [ - "BrandingImage", - "BrandingImageList" - ], - "primary_key_field": "reference", - "methods": [ - { - "description": "Revert an account branding image to dark theme default.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "is_primary_key": true, - "_override": true, - "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "name": "reference", - "in": "path", - "description": "Name of the branding images (icon or picture).", - "required": true, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" - } - ], - "method": "post", - "mode": "delete", - "responses": [ - { - "description": "Image reverted successfully.", - "_key": "204" + "_key": "400" }, { - "description": "Authentication failure.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27803,29 +27022,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27833,28 +27047,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -27867,6 +27075,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27876,29 +27085,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27906,28 +27110,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -27935,11 +27133,12 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -27949,29 +27148,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -27979,28 +27173,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -28008,13 +27196,13 @@ "_key": "404" } ], - "path": "/v3/branding-images/dark/{reference}/clear", - "summary": "Revert an image to dark theme default.", - "return_type": "dark_theme_image", + "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", + "summary": "Update certificate issuer configuration.", + "return_type": "certificate_issuer_config", "return_info": { "self": true, "custom": false, - "type": "dark_theme_image" + "type": "certificate_issuer_config" }, "x_filter": {}, "x_deprecation": null, @@ -28022,17 +27210,95 @@ "object", "etag", "type", - "filter" + "filter", + "is_custom", + "reference", + "created_at", + "updated_at" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-configuration-id": "id" + }, + "operation_id": "updateCertificateIssuerConfigByID", + "additional_operations": [ + { + "operation_id": "updateCertificateIssuerConfig", + "notes": "After retrieving the resource using the `lwm2m` method, it can modified using using this SDK method." + } ], - "group_id": "Branding", - "operation_id": "clearDarkImage", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "update" + } + ], + "fields": [ + { + "x-nullable": true, + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "certificate_issuer_id", + "readOnly": false, + "required": true, + "_key": "certificate_issuer_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "api_fieldname": "reference", + "readOnly": false, + "required": true, + "_key": "reference" }, { - "description": "Retrieve metadata for all dark theme branding images.\n\n**Example:**\n`curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\\n-H 'Authorization: Bearer '\n```", + "type": "string", + "format": "date-time", + "description": "Updated UTC time RFC3339.", + "example": "2017-02-01T00:00:00Z", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "Security and identity - certificate issuer configurations" + ], + "group_id": "Security", + "_key": "certificate_issuer_config" + }, + { + "swagger_models": [ + "BrandingColor", + "BrandingColorList" + ], + "primary_key_field": "reference", + "methods": [ + { + "description": "Resets the branding color to its dark theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -28041,178 +27307,122 @@ "type": "string", "api_fieldname": "reference", "entity_fieldname": "reference", + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "name": "reference", + "in": "path", + "description": "The name of the branding color.", + "required": true, + "enum_reference": "dark_theme_color_reference_enum", "_key": "reference" } ], - "method": "get", - "mode": "list", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Successful operation.", + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", "required": [ - "data", - "has_more", - "limit", + "code", + "message", "object", - "total_count" + "request_id", + "type" ], "properties": [ { - "type": "string", - "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "description": "A list of entities.", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" - ], - "_key": "object" - }, - { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "_key": "reference" - }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "_key": "static_uri" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_key": "fields" }, { - "type": "integer", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Entity name: always `list`.", + "description": "Entity name, always `error`.", "enum": [ - "list" + "error" ], - "api_fieldname": "object", - "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "type": "integer", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -28282,10 +27492,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "Color not found.", "schema": { "type": "object", "required": [ @@ -28355,16 +27565,16 @@ } ] }, - "_key": "403" + "_key": "404" } ], - "path": "/v3/branding-images/dark", - "summary": "Get metadata of all dark theme images.", - "return_type": "paginated_response(dark_theme_image)", + "path": "/v3/branding-colors/dark/{reference}", + "summary": "Reset branding color to default.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "dark_theme_image" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -28372,253 +27582,186 @@ "object", "etag", "type", - "filter", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" + "filter" ], - "foreign_key_priority": "self", "group_id": "Branding", - "operation_id": "getAllDarkImageData", - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" + "operation_id": "resetDarkColor", + "spec": { + "return_type": "void" }, + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "delete" }, { - "description": "Retrieve metadata for one account dark theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the dark theme branding colors.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", "is_primary_key": true, "_override": true, + "type": "string", "api_fieldname": "reference", "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "dark_theme_image_reference_enum", "_key": "reference" } ], "method": "get", - "mode": "read", + "mode": "list", "responses": [ { "description": "Successful operation.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" - }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "api_fieldname": "static_uri", - "entity_fieldname": "static_uri", - "_key": "static_uri" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_image" - } - }, - "_key": "200" - }, - { - "description": "Authentication failure.", "schema": { "type": "object", "required": [ - "code", - "message", + "data", + "has_more", + "limit", "object", - "request_id", - "type" + "total_count" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of entities.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "_key": "color" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "_key": "object" + }, + { + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } }, - "_key": "fields" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `list`.", "enum": [ - "error" + "list" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_color" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -28688,10 +27831,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Unknown image reference.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -28761,16 +27904,16 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/branding-images/dark/{reference}", - "summary": "Get metadata of a dark theme image.", - "return_type": "dark_theme_image", + "path": "/v3/branding-colors/dark", + "summary": "Get dark theme branding colors.", + "return_type": "paginated_response(dark_theme_color)", "return_info": { "self": true, "custom": false, - "type": "dark_theme_image" + "type": "dark_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -28779,111 +27922,92 @@ "etag", "type", "filter", - "static_uri", - "updated_at" + "limit", + "after", + "order", + "total_count", + "has_more", + "data" ], + "foreign_key_priority": "self", "group_id": "Branding", - "operation_id": "getDarkImageData", - "pagination": false, + "operation_id": "getDarkColors", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_color" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "list" }, { - "description": "Upload a new account branding image as form data in the dark theme in PNG or JPEG format.", + "description": "Retrieve the requested dark theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ - { - "in": "stream", - "name": "image", - "description": "The image in PNG or JPEG format as multipart form data.", - "required": true, - "type": "file", - "entity_fieldname": "image", - "api_fieldname": "image", - "external_param": true, - "parameter_fieldname": "image", - "_key": "image" - }, { "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", - "description": "Name of the image.", + "description": "Color name.", "is_primary_key": true, "_override": true, "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" - } - ], - "method": "post", - "mode": "update", - "responses": [ - { - "description": "Image uploaded successfully.", - "headers": [ - { - "type": "string", - "description": "Location of the image metadata.", - "_key": "Content-Location" - }, - { - "type": "string", - "description": "Location of the image binary.", - "_key": "Location" - } - ], + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "dark_theme_color_reference_enum", + "_key": "reference" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Successful operation.", "schema": { "type": "object", "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "api_fieldname": "color", + "entity_fieldname": "color", + "_key": "color" + }, + { + "type": "string", + "description": "Entity name: always 'branding_color'", "readOnly": true, "enum": [ - "branding_image" + "branding_color" ], "api_fieldname": "object", "entity_fieldname": "object", @@ -28891,62 +28015,39 @@ }, { "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", - "description": "Name of the image.", + "description": "Color name.", "is_primary_key": true, "_override": true, "api_fieldname": "reference", "entity_fieldname": "reference", "_key": "reference" }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "api_fieldname": "static_uri", - "entity_fieldname": "static_uri", - "_key": "static_uri" - }, { "type": "string", "format": "date-time", @@ -28960,13 +28061,13 @@ ], "foreign_key": { "group": "Branding", - "entity": "subtenant_light_theme_image" + "entity": "subtenant_light_theme_color" } }, - "_key": "201" + "_key": "200" }, { - "description": "Error in input data format, for example, image is too large.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -29036,10 +28137,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -29109,10 +28210,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "Color not found.", "schema": { "type": "object", "required": [ @@ -29182,10 +28283,186 @@ } ] }, - "_key": "403" + "_key": "404" + } + ], + "path": "/v3/branding-colors/dark/{reference}", + "summary": "Get dark theme branding color.", + "return_type": "dark_theme_color", + "return_info": { + "self": true, + "custom": false, + "type": "dark_theme_color" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "color", + "updated_at" + ], + "group_id": "Branding", + "operation_id": "getDarkColor", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "description": "Update a dark theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"#f3f93e\" }'\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "api_fieldname": "color", + "entity_fieldname": "color", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "_key": "color" }, { - "description": "Unknown image reference.", + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "dark_theme_color_reference_enum", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "parameter_fieldname": "updated_at", + "in": "body", + "required": false, + "_key": "updated_at" + } + ], + "method": "put", + "mode": "update", + "responses": [ + { + "description": "Color has been set successfully.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "api_fieldname": "color", + "entity_fieldname": "color", + "_key": "color" + }, + { + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" + }, + { + "description": "Error in input data format.", "schema": { "type": "object", "required": [ @@ -29255,267 +28532,156 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/branding-images/dark/{reference}/upload-multipart", - "summary": "Upload a dark theme image.", - "return_type": "dark_theme_image", - "return_info": { - "self": true, - "custom": false, - "type": "dark_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "static_uri", - "updated_at" - ], - "group_id": "Branding", - "operation_id": "uploadDarkImageMultipart", - "additional_operations": [ - { - "operation_id": "uploadDarkImage", - "notes": "The multipart endpoint is used by the SDKs as it offers the same functionality as the standard upload endpoint." - } - ], - "pagination": false, - "request_content_type": "multipart/form-data", - "request_body": "file", - "_key": "update" - } - ], - "fields": [ - { - "enum": [ - "brand_logo_portrait", - "brand_logo_square", - "brand_logo_landscape", - "brand_logo_email", - "desktop_background_landscape", - "desktop_background_square", - "desktop_background_portrait", - "carousel_image_portrait_0", - "carousel_image_portrait_1", - "carousel_image_portrait_2", - "carousel_image_portrait_3", - "carousel_image_portrait_4", - "carousel_image_portrait_5", - "carousel_image_portrait_6", - "carousel_image_portrait_7", - "carousel_image_portrait_8", - "carousel_image_portrait_9", - "carousel_image_square_0", - "carousel_image_square_1", - "carousel_image_square_2", - "carousel_image_square_3", - "carousel_image_square_4", - "carousel_image_square_5", - "carousel_image_square_6", - "carousel_image_square_7", - "carousel_image_square_8", - "carousel_image_square_9", - "carousel_image_landscape_0", - "carousel_image_landscape_1", - "carousel_image_landscape_2", - "carousel_image_landscape_3", - "carousel_image_landscape_4", - "carousel_image_landscape_5", - "carousel_image_landscape_6", - "carousel_image_landscape_7", - "carousel_image_landscape_8", - "carousel_image_landscape_9" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "readOnly": false, - "required": false, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" - }, - { - "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "api_fieldname": "static_uri", - "required": false, - "_key": "static_uri" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "api_fieldname": "updated_at", - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "User interface configuration - images" - ], - "group_id": "Branding", - "_key": "dark_theme_image" - }, - { - "swagger_models": [ - "DeveloperCertificateRequestData", - "DeveloperCertificateResponseData", - "TrustedCertificateResp" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Create a developer certificate (a certificate that can be flashed to multiple devices to connect to the bootstrap server).\n\n**Note:** The number of developer certificates allowed per account is limited. Please see [Using your own certificate authority](../provisioning-process/using-CA.html).\n\n**Example:**\n```\ncurl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\" \\\n-d { \"name\": \"\", \"description\": \"\" }\n```", - "field_renames": [ - { - "api_fieldname": "developer_certificate", - "_key": "certificate" - } - ], - "fields": [ - { - "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" + "_key": "400" }, { - "type": "string", - "description": "Name of the developer certificate.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_key": "name" - } - ], - "method": "post", - "mode": "create", - "responses": [ - { - "description": "Developer certificate created successfully.", + "description": "Authentication failure.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "description": "Account to which the developer certificate belongs.", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "PEM-format X.509 developer certificate.", - "api_fieldname": "developer_certificate", - "entity_fieldname": "certificate", - "_key": "developer_certificate" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "PEM-format developer private key associated with the certificate.", - "api_fieldname": "developer_private_key", - "entity_fieldname": "developer_private_key", - "_key": "developer_private_key" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "developerCertificateId", - "in": "path", - "required": true, - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Name of the developer certificate.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Entity name: always `trusted-cert`.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "Content of the `security.c` file flashed to the device to provide security credentials.", - "api_fieldname": "security_file_content", - "entity_fieldname": "security_file_content", - "_key": "security_file_content" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "subtenant_trusted_certificate" - } + ] }, - "examples": [ - { - "object": "trusted-cert", - "id": "015fee4431fd38c98640fbfb00000000", - "etag": "1", - "created_at": "2017-12-11T14:22:20.009Z", - "account_id": "015fee5d9b3538c98640fbfb00000000", - "name": "DeveloperCertificate", - "description": "This certificate will be used with multiple developer devices.", - "developer_certificate": "-----BEGIN CERTIFICATE-----\\nMIICcDCCAhWgAwIBAgIRAPSBbBtLUE/ekQcWE4GzPJEwCgYIKoZIzj0EAwIwgaIx\\nCzAJBgNVBAYTAkdCMRcwFQYDVQQIDA5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBwwJ\\nQ2FtYnJpZGdlMRAwDgYDVQQKDAdBUk0gTHRkMSkwJwYDVQQLDCAwMTU4NDNlMzJl\\nYzkwMjQyMGEwMTVlMDcwMDAwMDAwMDEpMCcGA1UEAwwgMDE2MWRiYmNkZDY2MGE1\\nODBhMDEwYzM0MDNjMDAwMDAwHhcNMTgwMjI4MDkyNzIzWhcNMjgwMjI4MDkyNzIz\\nWjCBojELMAkGA1UEBhMCR0IxFzAVBgNVBAgMDkNhbWJyaWRnZXNoaXJlMRIwEAYD\\nVQQHDAlDYW1icmlkZ2UxEDAOBgNVBAoMB0FSTSBMdGQxKTAnBgNVBAsMIDAxNTg0\\nM2UzMmVjOTAyNDIwYTAxNWUwNzAwMDAwMDAwMSkwJwYDVQQDDCAwMTYxZGJiY2Rk\\nNjYwYTU4MGEwMTBjMzQwM2MwMDAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\\nBEScLDbOXvOb903AYlI9ow8E4hbLSHJPt5E2BO4Q4bHOpuWH2Oh6P+CDPte9pAv3\\nE6g90Xk/ZcZpQ+xBO6qci/ajKjAoMBIGCSsGAQQBoCCBSQQFAgNAAJEwEgYDVR0T\\nAQH/BAgwBgEB/wIBADAKBggqhkjOPQQDAgNJADBGAiEAsi9zSK8Njl22GoEHrsg8\\nQlwFnrkkP9d6FyLFtmqndt4CIQCmVHwisYNcCkqD2SWctG1xQHo0HZePAQW8PstM\\nzhNupQ==\\n-----END CERTIFICATE-----\\n", - "developer_private_key": "-----BEGIN PRIVATE KEY-----\\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgeKc97aC1Z4aniXVG\\njNSvvXw2hl6zwACYIs88OKQx61GgCgYIKoZIzj0DAQehRANCAAREnCw2zl7zm/dN\\nwGJSPaMPBOIWy0hyT7eRNgTuEOGxzqblh9joej/ggz7XvaQL9xOoPdF5P2XGaUPs\\nQTuqnIv2\\n-----END PRIVATE KEY-----\\n", - "security_file_content": "/*\\n * Copyright (c) 2017 ARM Limited. All rights reserved.\\n * SPDX-License-Identifier: Apache-2.0\\n * Licensed under the Apache License, Version 2.0 (the License); you may\\n * not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an AS IS BASIS, WITHOUT\\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n#ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__\\n#define __MBED_CLOUD_DEV_CREDENTIALS_H__\\n\\n#include \\n\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = \\\"0161dbbcdd660a580a010c3403c00000\\\";\\nconst char MBED_CLOUD_DEV_ACCOUNT_ID[] = \\\"015843e32ec902420a015e0700000000\\\";\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = \\\"coaps://coap-integration-lab.dev.mbed.com:5684?aid=015843e32ec902420a015e0700000000\\\";\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x70, 0x30, 0x82, 0x02, 0x15,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00,\\n 0xf4, 0x81, 0x6c, 0x1b, 0x4b, 0x50, 0x4f, 0xde,\\n 0x91, 0x07, 0x16, 0x13, 0x81, 0xb3, 0x3c, 0x91,\\n 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x04, 0x03, 0x02, 0x30, 0x81, 0xa2, 0x31,\\n 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,\\n 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,\\n 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43,\\n 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,\\n 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,\\n 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,\\n 0x04, 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20,\\n 0x4c, 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x20, 0x30, 0x31,\\n 0x35, 0x38, 0x34, 0x33, 0x65, 0x33, 0x32, 0x65,\\n 0x63, 0x39, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61,\\n 0x30, 0x31, 0x35, 0x65, 0x30, 0x37, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x29,\\n 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,\\n 0x20, 0x30, 0x31, 0x36, 0x31, 0x64, 0x62, 0x62,\\n 0x63, 0x64, 0x64, 0x36, 0x36, 0x30, 0x61, 0x35,\\n 0x38, 0x30, 0x61, 0x30, 0x31, 0x30, 0x63, 0x33,\\n 0x34, 0x30, 0x33, 0x63, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30,\\n 0x32, 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32,\\n 0x33, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x32,\\n 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32, 0x33,\\n 0x5a, 0x30, 0x81, 0xa2, 0x31, 0x0b, 0x30, 0x09,\\n 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47,\\n 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55,\\n 0x04, 0x08, 0x0c, 0x0e, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69,\\n 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03,\\n 0x55, 0x04, 0x07, 0x0c, 0x09, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10,\\n 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c,\\n 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64,\\n 0x31, 0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04,\\n 0x0b, 0x0c, 0x20, 0x30, 0x31, 0x35, 0x38, 0x34,\\n 0x33, 0x65, 0x33, 0x32, 0x65, 0x63, 0x39, 0x30,\\n 0x32, 0x34, 0x32, 0x30, 0x61, 0x30, 0x31, 0x35,\\n 0x65, 0x30, 0x37, 0x30, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31,\\n 0x36, 0x31, 0x64, 0x62, 0x62, 0x63, 0x64, 0x64,\\n 0x36, 0x36, 0x30, 0x61, 0x35, 0x38, 0x30, 0x61,\\n 0x30, 0x31, 0x30, 0x63, 0x33, 0x34, 0x30, 0x33,\\n 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x59,\\n 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,\\n 0x04, 0x44, 0x9c, 0x2c, 0x36, 0xce, 0x5e, 0xf3,\\n 0x9b, 0xf7, 0x4d, 0xc0, 0x62, 0x52, 0x3d, 0xa3,\\n 0x0f, 0x04, 0xe2, 0x16, 0xcb, 0x48, 0x72, 0x4f,\\n 0xb7, 0x91, 0x36, 0x04, 0xee, 0x10, 0xe1, 0xb1,\\n 0xce, 0xa6, 0xe5, 0x87, 0xd8, 0xe8, 0x7a, 0x3f,\\n 0xe0, 0x83, 0x3e, 0xd7, 0xbd, 0xa4, 0x0b, 0xf7,\\n 0x13, 0xa8, 0x3d, 0xd1, 0x79, 0x3f, 0x65, 0xc6,\\n 0x69, 0x43, 0xec, 0x41, 0x3b, 0xaa, 0x9c, 0x8b,\\n 0xf6, 0xa3, 0x2a, 0x30, 0x28, 0x30, 0x12, 0x06,\\n 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xa0, 0x20,\\n 0x81, 0x49, 0x04, 0x05, 0x02, 0x03, 0x40, 0x00,\\n 0x91, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,\\n 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xb2, 0x2f, 0x73, 0x48, 0xaf, 0x0d, 0x8e,\\n 0x5d, 0xb6, 0x1a, 0x81, 0x07, 0xae, 0xc8, 0x3c,\\n 0x42, 0x5c, 0x05, 0x9e, 0xb9, 0x24, 0x3f, 0xd7,\\n 0x7a, 0x17, 0x22, 0xc5, 0xb6, 0x6a, 0xa7, 0x76,\\n 0xde, 0x02, 0x21, 0x00, 0xa6, 0x54, 0x7c, 0x22,\\n 0xb1, 0x83, 0x5c, 0x0a, 0x4a, 0x83, 0xd9, 0x25,\\n 0x9c, 0xb4, 0x6d, 0x71, 0x40, 0x7a, 0x34, 0x1d,\\n 0x97, 0x8f, 0x01, 0x05, 0xbc, 0x3e, 0xcb, 0x4c,\\n 0xce, 0x13, 0x6e, 0xa5 };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x35, 0x30, 0x82, 0x01, 0xdb,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x5c,\\n 0x27, 0xa5, 0x76, 0x7d, 0x58, 0x85, 0x8a, 0x43,\\n 0x91, 0xa0, 0x61, 0xab, 0xcf, 0xa6, 0x59, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x72, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74,\\n 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x30,\\n 0x20, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x35, 0x31,\\n 0x35, 0x31, 0x39, 0x34, 0x39, 0x31, 0x31, 0x5a,\\n 0x18, 0x0f, 0x32, 0x30, 0x35, 0x32, 0x30, 0x35,\\n 0x31, 0x35, 0x31, 0x39, 0x35, 0x39, 0x31, 0x30,\\n 0x5a, 0x30, 0x72, 0x31, 0x0b, 0x30, 0x09, 0x06,\\n 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42,\\n 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04,\\n 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d, 0x62, 0x72,\\n 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69, 0x72,\\n 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,\\n 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10, 0x30,\\n 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07,\\n 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64, 0x31,\\n 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03,\\n 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20, 0x49, 0x6e,\\n 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,\\n 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,\\n 0x72, 0x61, 0x70, 0x43, 0x41, 0x30, 0x59, 0x30,\\n 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04,\\n 0x8b, 0x7c, 0x86, 0xc3, 0x88, 0x54, 0xe6, 0x5f,\\n 0xe0, 0x57, 0x4e, 0x1b, 0xac, 0x29, 0x82, 0xea,\\n 0x7d, 0x91, 0x00, 0x63, 0xa7, 0x4a, 0x05, 0xbc,\\n 0x54, 0xc5, 0x71, 0x27, 0x33, 0x19, 0x1b, 0x2e,\\n 0xfa, 0x41, 0xf8, 0x7a, 0x9a, 0x0c, 0x5d, 0xfc,\\n 0xb3, 0x37, 0x01, 0x99, 0xc5, 0xc9, 0xbe, 0x78,\\n 0x5b, 0x1d, 0xec, 0xb0, 0x1a, 0x1d, 0xdc, 0xe4,\\n 0x6f, 0x57, 0x04, 0xf4, 0x3a, 0xca, 0xa8, 0xd2,\\n 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b, 0x06, 0x03,\\n 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x01,\\n 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01,\\n 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,\\n 0x0e, 0x04, 0x16, 0x04, 0x14, 0x13, 0xef, 0x69,\\n 0xfa, 0x62, 0x3f, 0x00, 0x86, 0xf4, 0x05, 0xb8,\\n 0xb6, 0xe6, 0xb2, 0xf1, 0xdb, 0x69, 0x10, 0xb4,\\n 0x39, 0x30, 0x10, 0x06, 0x09, 0x2b, 0x06, 0x01,\\n 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03,\\n 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a,\\n 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,\\n 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xa2,\\n 0x50, 0x88, 0x0f, 0x55, 0xe8, 0x26, 0x49, 0xe6,\\n 0xf5, 0x71, 0x86, 0x33, 0x29, 0x05, 0x4c, 0xf9,\\n 0xfd, 0x1f, 0x14, 0x98, 0x92, 0x85, 0xd9, 0x5c,\\n 0x48, 0x02, 0x9e, 0xc2, 0x79, 0xa8, 0x59, 0x02,\\n 0x20, 0x3e, 0xfe, 0x3c, 0xa0, 0xbf, 0xd3, 0x0f,\\n 0x15, 0x83, 0x56, 0xbc, 0xf2, 0xfa, 0x16, 0x26,\\n 0x7a, 0xc1, 0x68, 0xaa, 0xbc, 0x91, 0x3c, 0x69,\\n 0x44, 0x36, 0xf9, 0x74, 0xa1, 0x82, 0x76, 0x7a,\\n 0x6e };\\n\\nconst uint8_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x30, 0x30, 0x82, 0x01, 0xd5,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x26,\\n 0xf9, 0x08, 0xfc, 0xf1, 0xc0, 0x46, 0xa4, 0x4a,\\n 0x4d, 0x2c, 0xf1, 0x94, 0x27, 0xf9, 0x1f, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x6f, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x18, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x57, 0x4d, 0x32,\\n 0x4d, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d,\\n 0x31, 0x37, 0x30, 0x32, 0x31, 0x32, 0x31, 0x30,\\n 0x33, 0x37, 0x35, 0x32, 0x5a, 0x18, 0x0f, 0x32,\\n 0x30, 0x35, 0x32, 0x30, 0x32, 0x31, 0x32, 0x31,\\n 0x30, 0x34, 0x37, 0x35, 0x32, 0x5a, 0x30, 0x6f,\\n 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,\\n 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30,\\n 0x15, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0e,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12,\\n 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,\\n 0x09, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64,\\n 0x67, 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03,\\n 0x55, 0x04, 0x0a, 0x13, 0x07, 0x41, 0x52, 0x4d,\\n 0x20, 0x4c, 0x74, 0x64, 0x31, 0x21, 0x30, 0x1f,\\n 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x18, 0x41,\\n 0x52, 0x4d, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x67,\\n 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c,\\n 0x57, 0x4d, 0x32, 0x4d, 0x20, 0x43, 0x41, 0x30,\\n 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86,\\n 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,\\n 0x00, 0x04, 0xba, 0xea, 0x80, 0x01, 0x2d, 0xf0,\\n 0xe1, 0xb6, 0xc5, 0x5f, 0xf9, 0x76, 0x84, 0x31,\\n 0xa9, 0x29, 0xa1, 0xc7, 0xa8, 0xfd, 0xa0, 0xad,\\n 0xd9, 0x94, 0xe7, 0xec, 0x5a, 0x33, 0xa1, 0x2c,\\n 0x8e, 0x36, 0x43, 0x9b, 0x18, 0xdf, 0xce, 0x71,\\n 0x14, 0x24, 0xb1, 0xfb, 0x16, 0x34, 0x0e, 0x43,\\n 0xfc, 0x23, 0x77, 0xd4, 0x13, 0xd7, 0x11, 0xaa,\\n 0x39, 0x60, 0xab, 0xa2, 0xdf, 0x24, 0xb3, 0xeb,\\n 0xa0, 0xc5, 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b,\\n 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03,\\n 0x02, 0x01, 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55,\\n 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,\\n 0x03, 0x01, 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03,\\n 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x7b,\\n 0xa1, 0xa5, 0x94, 0xa5, 0xe5, 0x8f, 0x95, 0x5d,\\n 0xd4, 0xce, 0xdc, 0x0f, 0x8a, 0xbe, 0xad, 0x9a,\\n 0x6b, 0x66, 0x3e, 0x30, 0x10, 0x06, 0x09, 0x2b,\\n 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x15, 0x01,\\n 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xd2, 0x06, 0x28, 0xc5, 0x31, 0x3a, 0x11,\\n 0x8d, 0xb6, 0xcb, 0x2b, 0x3f, 0xdd, 0x2a, 0x9a,\\n 0x13, 0x30, 0x52, 0x77, 0xaa, 0xda, 0xda, 0xcb,\\n 0xce, 0xb9, 0x5c, 0xe4, 0x32, 0x1c, 0x02, 0xfa,\\n 0x30, 0x02, 0x21, 0x00, 0xb3, 0x82, 0x24, 0xa2,\\n 0xb1, 0x67, 0x6b, 0x69, 0x07, 0x0e, 0xcd, 0x77,\\n 0x74, 0x99, 0x06, 0x9c, 0x59, 0xb2, 0x00, 0xc0,\\n 0xb3, 0xbb, 0x37, 0x5b, 0xc0, 0x1b, 0xfb, 0xd9,\\n 0x70, 0x98, 0xb9, 0x1e };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] = \\n{ 0x30, 0x81, 0x93, 0x02, 0x01, 0x00, 0x30, 0x13,\\n 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,\\n 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x03, 0x01, 0x07, 0x04, 0x79, 0x30, 0x77, 0x02,\\n 0x01, 0x01, 0x04, 0x20, 0x78, 0xa7, 0x3d, 0xed,\\n 0xa0, 0xb5, 0x67, 0x86, 0xa7, 0x89, 0x75, 0x46,\\n 0x8c, 0xd4, 0xaf, 0xbd, 0x7c, 0x36, 0x86, 0x5e,\\n 0xb3, 0xc0, 0x00, 0x98, 0x22, 0xcf, 0x3c, 0x38,\\n 0xa4, 0x31, 0xeb, 0x51, 0xa0, 0x0a, 0x06, 0x08,\\n 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07,\\n 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x44, 0x9c,\\n 0x2c, 0x36, 0xce, 0x5e, 0xf3, 0x9b, 0xf7, 0x4d,\\n 0xc0, 0x62, 0x52, 0x3d, 0xa3, 0x0f, 0x04, 0xe2,\\n 0x16, 0xcb, 0x48, 0x72, 0x4f, 0xb7, 0x91, 0x36,\\n 0x04, 0xee, 0x10, 0xe1, 0xb1, 0xce, 0xa6, 0xe5,\\n 0x87, 0xd8, 0xe8, 0x7a, 0x3f, 0xe0, 0x83, 0x3e,\\n 0xd7, 0xbd, 0xa4, 0x0b, 0xf7, 0x13, 0xa8, 0x3d,\\n 0xd1, 0x79, 0x3f, 0x65, 0xc6, 0x69, 0x43, 0xec,\\n 0x41, 0x3b, 0xaa, 0x9c, 0x8b, 0xf6 };\\n\\nconst char MBED_CLOUD_DEV_MANUFACTURER[] = \\\"dev_manufacturer\\\";\\n\\nconst char MBED_CLOUD_DEV_MODEL_NUMBER[] = \\\"dev_model_num\\\";\\n\\nconst char MBED_CLOUD_DEV_SERIAL_NUMBER[] = \\\"0\\\";\\n\\nconst char MBED_CLOUD_DEV_DEVICE_TYPE[] = \\\"dev_device_type\\\";\\n\\nconst char MBED_CLOUD_DEV_HARDWARE_VERSION[] = \\\"dev_hardware_version\\\";\\n\\nconst uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0;\\n\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY);\\n\\n#endif //__MBED_CLOUD_DEV_CREDENTIALS_H__\\n", - "_key": "Success" - } - ], - "_key": "201" + "_key": "403" }, { - "description": "Bad request.", + "description": "Color not found.", "schema": { "type": "object", "required": [ @@ -29585,24 +28751,181 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 400, - "type": "validation_error", - "message": "Bad Request. Missing certificate name.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "fields": { - "name": "name", - "message": "Missing certificate name." - }, - "_key": "Bad Request Error" - } + "_key": "404" + } + ], + "path": "/v3/branding-colors/dark/{reference}", + "summary": "Updates a dark theme branding color.", + "return_type": "dark_theme_color", + "return_info": { + "self": true, + "custom": false, + "type": "dark_theme_color" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Branding", + "operation_id": "setDarkColor", + "additional_operations": [ + { + "operation_id": "bulkSetDarkColors", + "notes": "Bulk operation is not appriate for SDK's entity model, this functionality is covered by the update method." + } + ], + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "api_fieldname": "color", + "readOnly": false, + "required": false, + "_key": "color" + }, + { + "enum": [ + "error_color", + "primary", + "secondary", + "success_color", + "warning_color", + "canvas_background", + "canvas_background_font_color", + "workspace_background", + "workspace_background_font_color", + "info_color", + "info_font_color", + "primary_font_color", + "secondary_font_color", + "error_font_color", + "success_font_color", + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" + ], + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "readOnly": false, + "required": false, + "enum_reference": "dark_theme_color_reference_enum", + "_key": "reference" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "User interface configuration - colors" + ], + "group_id": "Branding", + "_key": "dark_theme_color" + }, + { + "swagger_models": [ + "BrandingImage", + "BrandingImageList" + ], + "primary_key_field": "reference", + "methods": [ + { + "description": "Revert an account branding image to dark theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], + "fields": [ + { + "is_primary_key": true, + "_override": true, + "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" ], - "_key": "400" + "name": "reference", + "in": "path", + "description": "Name of the branding images (icon or picture).", + "required": true, + "enum_reference": "dark_theme_image_reference_enum", + "_key": "reference" + } + ], + "method": "post", + "mode": "delete", + "responses": [ + { + "description": "Image reverted successfully.", + "_key": "204" }, { - "description": "Invalid access token.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -29672,20 +28995,10 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 401, - "type": "invalid_auth", - "message": "Invalid access token.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], "_key": "401" }, { - "description": "The maximum number of developer certificates for the given account has already been reached.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -29755,24 +29068,10 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 403, - "type": "account_limit_exceeded", - "message": "Forbidden. Limit for the number of certificates exceeded.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "fields": { - "name": "cert-count", - "message": "10" - }, - "_key": "Account Limit Exceeded Error" - } - ], "_key": "403" }, { - "description": "Certificate with the given name already exists.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -29842,30 +29141,16 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 409, - "type": "duplicate", - "message": "Conflict. Certificate already exists.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "fields": { - "name": "certificate", - "message": "Certificate already exists." - }, - "_key": "Duplicate Error" - } - ], - "_key": "409" + "_key": "404" } ], - "path": "/v3/developer-certificates", - "summary": "Create a new developer certificate to connect to the bootstrap server.", - "return_type": "developer_certificate", + "path": "/v3/branding-images/dark/{reference}/clear", + "summary": "Revert an image to dark theme default.", + "return_type": "dark_theme_image", "return_info": { "self": true, "custom": false, - "type": "developer_certificate" + "type": "dark_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -29873,128 +29158,200 @@ "object", "etag", "type", - "filter", - "id", - "created_at", - "account_id", - "developer_private_key", - "security_file_content", - "certificate" + "filter" ], - "group_id": "Security", - "parameter_map": { - "developerCertificateId": "id" - }, - "operation_id": "createDeveloperCertificate", + "group_id": "Branding", + "operation_id": "clearDarkImage", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "delete" }, { - "description": "Delete a trusted certificate.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [ - { - "api_fieldname": "developer_certificate", - "_key": "certificate" - } - ], + "description": "Retrieve metadata for all dark theme branding images.\n\n**Example:**\n`curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], "fields": [ { - "name": "cert_id", - "in": "path", - "description": "The ID of the trusted certificate to delete.", - "required": true, + "is_primary_key": true, + "_override": true, "type": "string", - "entity_fieldname": "id", - "api_fieldname": "cert_id", - "external_param": false, - "parameter_fieldname": "cert_id", - "_key": "id" + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "list", "responses": [ { - "description": "Deleted successfully.", - "_key": "204" - }, - { - "description": "Authentication failure.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", + "data", + "has_more", + "limit", "object", - "request_id", - "type" + "total_count" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of entities.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Entity name: always 'branding_image'", + "readOnly": true, + "enum": [ + "branding_image" + ], + "_key": "object" + }, + { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], + "type": "string", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "_key": "reference" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", + "readOnly": true, + "_key": "static_uri" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } }, - "_key": "fields" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "example": 50, + "description": "The number of results to return, or equal to `total_count`.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `list`.", "enum": [ - "error" + "list" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "type": "integer", + "format": "int32", + "example": 20, + "description": "The total number of records, if requested.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_image" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -30064,10 +29421,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Certificate not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -30137,16 +29494,16 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Delete a trusted certificate by ID.", - "return_type": "developer_certificate", + "path": "/v3/branding-images/dark", + "summary": "Get metadata of all dark theme images.", + "return_type": "paginated_response(dark_theme_image)", "return_info": { "self": true, "custom": false, - "type": "developer_certificate" + "type": "dark_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -30154,240 +29511,180 @@ "object", "etag", "type", - "filter" + "filter", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" ], - "group_id": "Security", - "parameter_map": { - "developerCertificateId": "id", - "cert_id": "id" + "foreign_key_priority": "self", + "group_id": "Branding", + "operation_id": "getAllDarkImageData", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_image" }, - "operation_id": "deleteCertificate", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "list" }, { - "description": "Retrieve a trusted certificate by ID.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [ - { - "api_fieldname": "developer_certificate", - "_key": "certificate" - } - ], + "description": "Retrieve metadata for one account dark theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [], "fields": [ { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "cert_id", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", "in": "path", "required": true, - "_key": "id" + "enum_reference": "dark_theme_image_reference_enum", + "_key": "reference" } ], "method": "get", - "mode": "get_trusted_certificate_info", + "mode": "read", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", - "required": [ - "account_id", - "certificate", - "certificate_fingerprint", - "etag", - "id", - "issuer", - "name", - "object", - "service", - "subject", - "validity" - ], "properties": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "_key": "certificate" - }, - { - "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "api_fieldname": "certificate_fingerprint", - "entity_fieldname": "certificate_fingerprint", - "_key": "certificate_fingerprint" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "maxLength": 500, - "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, - { - "type": "integer", - "format": "int32", - "example": 1, - "description": "Device execution mode where 1 means a developer certificate.", - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode", - "_key": "device_execution_mode" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "_key": "enrollment_mode" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "entity_fieldname": "issuer", - "_key": "issuer" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'trusted-cert'", + "description": "Entity name: always 'branding_image'", + "readOnly": true, "enum": [ - "trusted-cert" + "branding_image" ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "x-nullable": true, - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the owner.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner_id", - "entity_fieldname": "owner_id", - "_key": "owner_id" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", "enum": [ - "lwm2m", - "bootstrap" + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" ], - "api_fieldname": "service", - "entity_fieldname": "service", - "_key": "service" - }, - { "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" }, { "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", + "readOnly": true, + "api_fieldname": "static_uri", + "entity_fieldname": "static_uri", + "_key": "static_uri" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", + "description": "Last update time in UTC.", + "readOnly": true, "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" - }, - { - "type": "boolean", - "example": true, - "description": "This read-only flag indicates whether the certificate is valid or not.", - "readOnly": true, - "api_fieldname": "valid", - "entity_fieldname": "valid", - "_key": "valid" - }, - { - "type": "string", - "format": "date-time", - "example": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "api_fieldname": "validity", - "entity_fieldname": "validity", - "_key": "validity" } ], - "description": "Represents a trusted certificate in responses.", "foreign_key": { - "group": "Security", - "entity": "developer_certificate" + "group": "Branding", + "entity": "subtenant_light_theme_image" } }, "_key": "200" @@ -30539,7 +29836,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -30612,13 +29909,13 @@ "_key": "404" } ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", - "return_type": "trusted_certificate", + "path": "/v3/branding-images/dark/{reference}", + "summary": "Get metadata of a dark theme image.", + "return_type": "dark_theme_image", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "trusted_certificate" + "type": "dark_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -30627,164 +29924,273 @@ "etag", "type", "filter", - "created_at", - "updated_at", - "name", - "description", - "account_id", - "owner_id", - "certificate", - "service", - "issuer", - "subject", - "validity", - "status", - "device_execution_mode", - "enrollment_mode", - "certificate_fingerprint", - "valid" + "static_uri", + "updated_at" ], - "group_id": "Security", - "parameter_map": { - "developerCertificateId": "id", - "cert_id": "id" - }, - "operation_id": "getCertificate", - "unaggregated": true, - "foreign_key": { - "entity": "trusted_certificate", - "group": "Security" - }, + "group_id": "Branding", + "operation_id": "getDarkImageData", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "get_trusted_certificate_info" + "_key": "read" }, { - "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", - "field_renames": [ - { - "api_fieldname": "developer_certificate", - "_key": "certificate" - } - ], + "description": "Upload a new account branding image as form data in the dark theme in PNG or JPEG format.\nNote: This endpoint is restricted to administrators.", + "field_renames": [], "fields": [ { + "in": "stream", + "name": "image", + "description": "The image in PNG or JPEG format as multipart form data.", + "required": true, + "type": "file", + "entity_fieldname": "image", + "api_fieldname": "image", + "external_param": true, + "parameter_fieldname": "image", + "_key": "image" + }, + { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], "type": "string", - "description": "ID that uniquely identifies the developer certificate.", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "developerCertificateId", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", "in": "path", "required": true, - "_key": "id" + "enum_reference": "dark_theme_image_reference_enum", + "_key": "reference" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "update", "responses": [ { - "description": "Developer certificate returned successfully.", + "description": "Image uploaded successfully.", + "headers": [ + { + "type": "string", + "description": "Location of the image metadata.", + "_key": "Content-Location" + }, + { + "type": "string", + "description": "Location of the image binary.", + "_key": "Location" + } + ], "schema": { "type": "object", "properties": [ { "type": "string", - "description": "Account to which the developer certificate belongs.", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" + "description": "Entity name: always 'branding_image'", + "readOnly": true, + "enum": [ + "branding_image" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" }, { "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", + "readOnly": true, + "api_fieldname": "static_uri", + "entity_fieldname": "static_uri", + "_key": "static_uri" }, { "type": "string", - "description": "PEM-format X.509 developer certificate.", - "api_fieldname": "developer_certificate", - "entity_fieldname": "developer_certificate", - "_key": "developer_certificate" - }, + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_image" + } + }, + "_key": "201" + }, + { + "description": "Error in input data format, for example, image is too large.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "description": "PEM-format developer private key associated with the certificate.", - "api_fieldname": "developer_private_key", - "entity_fieldname": "developer_private_key", - "_key": "developer_private_key" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Name of the developer certificate.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Entity name: always `trusted-cert`.", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "Content of the `security.c` file flashed to the device to provide security credentials.", - "api_fieldname": "security_file_content", - "entity_fieldname": "security_file_content", - "_key": "security_file_content" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "developer_certificate" - } + ] }, - "examples": [ - { - "object": "trusted-cert", - "id": "015fee4431fd38c98640fbfb00000000", - "etag": "1", - "created_at": "2017-12-11T14:22:20.009Z", - "account_id": "015fee5d9b3538c98640fbfb00000000", - "name": "DeveloperCertificate", - "description": "This certificate applies to multiple developer devices.", - "developer_certificate": "-----BEGIN CERTIFICATE-----\\nMIICcDCCAhWgAwIBAgIRAPSBbBtLUE/ekQcWE4GzPJEwCgYIKoZIzj0EAwIwgaIx\\nCzAJBgNVBAYTAkdCMRcwFQYDVQQIDA5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBwwJ\\nQ2FtYnJpZGdlMRAwDgYDVQQKDAdBUk0gTHRkMSkwJwYDVQQLDCAwMTU4NDNlMzJl\\nYzkwMjQyMGEwMTVlMDcwMDAwMDAwMDEpMCcGA1UEAwwgMDE2MWRiYmNkZDY2MGE1\\nODBhMDEwYzM0MDNjMDAwMDAwHhcNMTgwMjI4MDkyNzIzWhcNMjgwMjI4MDkyNzIz\\nWjCBojELMAkGA1UEBhMCR0IxFzAVBgNVBAgMDkNhbWJyaWRnZXNoaXJlMRIwEAYD\\nVQQHDAlDYW1icmlkZ2UxEDAOBgNVBAoMB0FSTSBMdGQxKTAnBgNVBAsMIDAxNTg0\\nM2UzMmVjOTAyNDIwYTAxNWUwNzAwMDAwMDAwMSkwJwYDVQQDDCAwMTYxZGJiY2Rk\\nNjYwYTU4MGEwMTBjMzQwM2MwMDAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\\nBEScLDbOXvOb903AYlI9ow8E4hbLSHJPt5E2BO4Q4bHOpuWH2Oh6P+CDPte9pAv3\\nE6g90Xk/ZcZpQ+xBO6qci/ajKjAoMBIGCSsGAQQBoCCBSQQFAgNAAJEwEgYDVR0T\\nAQH/BAgwBgEB/wIBADAKBggqhkjOPQQDAgNJADBGAiEAsi9zSK8Njl22GoEHrsg8\\nQlwFnrkkP9d6FyLFtmqndt4CIQCmVHwisYNcCkqD2SWctG1xQHo0HZePAQW8PstM\\nzhNupQ==\\n-----END CERTIFICATE-----\\n", - "developer_private_key": "-----BEGIN PRIVATE KEY-----\\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgeKc97aC1Z4aniXVG\\njNSvvXw2hl6zwACYIs88OKQx61GgCgYIKoZIzj0DAQehRANCAAREnCw2zl7zm/dN\\nwGJSPaMPBOIWy0hyT7eRNgTuEOGxzqblh9joej/ggz7XvaQL9xOoPdF5P2XGaUPs\\nQTuqnIv2\\n-----END PRIVATE KEY-----\\n", - "security_file_content": "/*\\n * Copyright (c) 2017 ARM Limited. All rights reserved.\\n * SPDX-License-Identifier: Apache-2.0\\n * Licensed under the Apache License, Version 2.0 (the License); you may\\n * not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an AS IS BASIS, WITHOUT\\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n#ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__\\n#define __MBED_CLOUD_DEV_CREDENTIALS_H__\\n\\n#include \\n\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = \\\"0161dbbcdd660a580a010c3403c00000\\\";\\nconst char MBED_CLOUD_DEV_ACCOUNT_ID[] = \\\"015843e32ec902420a015e0700000000\\\";\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = \\\"coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000\\\";\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x70, 0x30, 0x82, 0x02, 0x15,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00,\\n 0xf4, 0x81, 0x6c, 0x1b, 0x4b, 0x50, 0x4f, 0xde,\\n 0x91, 0x07, 0x16, 0x13, 0x81, 0xb3, 0x3c, 0x91,\\n 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x04, 0x03, 0x02, 0x30, 0x81, 0xa2, 0x31,\\n 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,\\n 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,\\n 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43,\\n 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,\\n 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,\\n 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,\\n 0x04, 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20,\\n 0x4c, 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x20, 0x30, 0x31,\\n 0x35, 0x38, 0x34, 0x33, 0x65, 0x33, 0x32, 0x65,\\n 0x63, 0x39, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61,\\n 0x30, 0x31, 0x35, 0x65, 0x30, 0x37, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x29,\\n 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,\\n 0x20, 0x30, 0x31, 0x36, 0x31, 0x64, 0x62, 0x62,\\n 0x63, 0x64, 0x64, 0x36, 0x36, 0x30, 0x61, 0x35,\\n 0x38, 0x30, 0x61, 0x30, 0x31, 0x30, 0x63, 0x33,\\n 0x34, 0x30, 0x33, 0x63, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30,\\n 0x32, 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32,\\n 0x33, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x32,\\n 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32, 0x33,\\n 0x5a, 0x30, 0x81, 0xa2, 0x31, 0x0b, 0x30, 0x09,\\n 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47,\\n 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55,\\n 0x04, 0x08, 0x0c, 0x0e, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69,\\n 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03,\\n 0x55, 0x04, 0x07, 0x0c, 0x09, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10,\\n 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c,\\n 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64,\\n 0x31, 0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04,\\n 0x0b, 0x0c, 0x20, 0x30, 0x31, 0x35, 0x38, 0x34,\\n 0x33, 0x65, 0x33, 0x32, 0x65, 0x63, 0x39, 0x30,\\n 0x32, 0x34, 0x32, 0x30, 0x61, 0x30, 0x31, 0x35,\\n 0x65, 0x30, 0x37, 0x30, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31,\\n 0x36, 0x31, 0x64, 0x62, 0x62, 0x63, 0x64, 0x64,\\n 0x36, 0x36, 0x30, 0x61, 0x35, 0x38, 0x30, 0x61,\\n 0x30, 0x31, 0x30, 0x63, 0x33, 0x34, 0x30, 0x33,\\n 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x59,\\n 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,\\n 0x04, 0x44, 0x9c, 0x2c, 0x36, 0xce, 0x5e, 0xf3,\\n 0x9b, 0xf7, 0x4d, 0xc0, 0x62, 0x52, 0x3d, 0xa3,\\n 0x0f, 0x04, 0xe2, 0x16, 0xcb, 0x48, 0x72, 0x4f,\\n 0xb7, 0x91, 0x36, 0x04, 0xee, 0x10, 0xe1, 0xb1,\\n 0xce, 0xa6, 0xe5, 0x87, 0xd8, 0xe8, 0x7a, 0x3f,\\n 0xe0, 0x83, 0x3e, 0xd7, 0xbd, 0xa4, 0x0b, 0xf7,\\n 0x13, 0xa8, 0x3d, 0xd1, 0x79, 0x3f, 0x65, 0xc6,\\n 0x69, 0x43, 0xec, 0x41, 0x3b, 0xaa, 0x9c, 0x8b,\\n 0xf6, 0xa3, 0x2a, 0x30, 0x28, 0x30, 0x12, 0x06,\\n 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xa0, 0x20,\\n 0x81, 0x49, 0x04, 0x05, 0x02, 0x03, 0x40, 0x00,\\n 0x91, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,\\n 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xb2, 0x2f, 0x73, 0x48, 0xaf, 0x0d, 0x8e,\\n 0x5d, 0xb6, 0x1a, 0x81, 0x07, 0xae, 0xc8, 0x3c,\\n 0x42, 0x5c, 0x05, 0x9e, 0xb9, 0x24, 0x3f, 0xd7,\\n 0x7a, 0x17, 0x22, 0xc5, 0xb6, 0x6a, 0xa7, 0x76,\\n 0xde, 0x02, 0x21, 0x00, 0xa6, 0x54, 0x7c, 0x22,\\n 0xb1, 0x83, 0x5c, 0x0a, 0x4a, 0x83, 0xd9, 0x25,\\n 0x9c, 0xb4, 0x6d, 0x71, 0x40, 0x7a, 0x34, 0x1d,\\n 0x97, 0x8f, 0x01, 0x05, 0xbc, 0x3e, 0xcb, 0x4c,\\n 0xce, 0x13, 0x6e, 0xa5 };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x35, 0x30, 0x82, 0x01, 0xdb,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x5c,\\n 0x27, 0xa5, 0x76, 0x7d, 0x58, 0x85, 0x8a, 0x43,\\n 0x91, 0xa0, 0x61, 0xab, 0xcf, 0xa6, 0x59, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x72, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74,\\n 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x30,\\n 0x20, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x35, 0x31,\\n 0x35, 0x31, 0x39, 0x34, 0x39, 0x31, 0x31, 0x5a,\\n 0x18, 0x0f, 0x32, 0x30, 0x35, 0x32, 0x30, 0x35,\\n 0x31, 0x35, 0x31, 0x39, 0x35, 0x39, 0x31, 0x30,\\n 0x5a, 0x30, 0x72, 0x31, 0x0b, 0x30, 0x09, 0x06,\\n 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42,\\n 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04,\\n 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d, 0x62, 0x72,\\n 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69, 0x72,\\n 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,\\n 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10, 0x30,\\n 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07,\\n 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64, 0x31,\\n 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03,\\n 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20, 0x49, 0x6e,\\n 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,\\n 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,\\n 0x72, 0x61, 0x70, 0x43, 0x41, 0x30, 0x59, 0x30,\\n 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04,\\n 0x8b, 0x7c, 0x86, 0xc3, 0x88, 0x54, 0xe6, 0x5f,\\n 0xe0, 0x57, 0x4e, 0x1b, 0xac, 0x29, 0x82, 0xea,\\n 0x7d, 0x91, 0x00, 0x63, 0xa7, 0x4a, 0x05, 0xbc,\\n 0x54, 0xc5, 0x71, 0x27, 0x33, 0x19, 0x1b, 0x2e,\\n 0xfa, 0x41, 0xf8, 0x7a, 0x9a, 0x0c, 0x5d, 0xfc,\\n 0xb3, 0x37, 0x01, 0x99, 0xc5, 0xc9, 0xbe, 0x78,\\n 0x5b, 0x1d, 0xec, 0xb0, 0x1a, 0x1d, 0xdc, 0xe4,\\n 0x6f, 0x57, 0x04, 0xf4, 0x3a, 0xca, 0xa8, 0xd2,\\n 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b, 0x06, 0x03,\\n 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x01,\\n 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01,\\n 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,\\n 0x0e, 0x04, 0x16, 0x04, 0x14, 0x13, 0xef, 0x69,\\n 0xfa, 0x62, 0x3f, 0x00, 0x86, 0xf4, 0x05, 0xb8,\\n 0xb6, 0xe6, 0xb2, 0xf1, 0xdb, 0x69, 0x10, 0xb4,\\n 0x39, 0x30, 0x10, 0x06, 0x09, 0x2b, 0x06, 0x01,\\n 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03,\\n 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a,\\n 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,\\n 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xa2,\\n 0x50, 0x88, 0x0f, 0x55, 0xe8, 0x26, 0x49, 0xe6,\\n 0xf5, 0x71, 0x86, 0x33, 0x29, 0x05, 0x4c, 0xf9,\\n 0xfd, 0x1f, 0x14, 0x98, 0x92, 0x85, 0xd9, 0x5c,\\n 0x48, 0x02, 0x9e, 0xc2, 0x79, 0xa8, 0x59, 0x02,\\n 0x20, 0x3e, 0xfe, 0x3c, 0xa0, 0xbf, 0xd3, 0x0f,\\n 0x15, 0x83, 0x56, 0xbc, 0xf2, 0xfa, 0x16, 0x26,\\n 0x7a, 0xc1, 0x68, 0xaa, 0xbc, 0x91, 0x3c, 0x69,\\n 0x44, 0x36, 0xf9, 0x74, 0xa1, 0x82, 0x76, 0x7a,\\n 0x6e };\\n\\nconst uint8_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x30, 0x30, 0x82, 0x01, 0xd5,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x26,\\n 0xf9, 0x08, 0xfc, 0xf1, 0xc0, 0x46, 0xa4, 0x4a,\\n 0x4d, 0x2c, 0xf1, 0x94, 0x27, 0xf9, 0x1f, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x6f, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x18, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x57, 0x4d, 0x32,\\n 0x4d, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d,\\n 0x31, 0x37, 0x30, 0x32, 0x31, 0x32, 0x31, 0x30,\\n 0x33, 0x37, 0x35, 0x32, 0x5a, 0x18, 0x0f, 0x32,\\n 0x30, 0x35, 0x32, 0x30, 0x32, 0x31, 0x32, 0x31,\\n 0x30, 0x34, 0x37, 0x35, 0x32, 0x5a, 0x30, 0x6f,\\n 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,\\n 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30,\\n 0x15, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0e,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12,\\n 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,\\n 0x09, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64,\\n 0x67, 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03,\\n 0x55, 0x04, 0x0a, 0x13, 0x07, 0x41, 0x52, 0x4d,\\n 0x20, 0x4c, 0x74, 0x64, 0x31, 0x21, 0x30, 0x1f,\\n 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x18, 0x41,\\n 0x52, 0x4d, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x67,\\n 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c,\\n 0x57, 0x4d, 0x32, 0x4d, 0x20, 0x43, 0x41, 0x30,\\n 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86,\\n 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,\\n 0x00, 0x04, 0xba, 0xea, 0x80, 0x01, 0x2d, 0xf0,\\n 0xe1, 0xb6, 0xc5, 0x5f, 0xf9, 0x76, 0x84, 0x31,\\n 0xa9, 0x29, 0xa1, 0xc7, 0xa8, 0xfd, 0xa0, 0xad,\\n 0xd9, 0x94, 0xe7, 0xec, 0x5a, 0x33, 0xa1, 0x2c,\\n 0x8e, 0x36, 0x43, 0x9b, 0x18, 0xdf, 0xce, 0x71,\\n 0x14, 0x24, 0xb1, 0xfb, 0x16, 0x34, 0x0e, 0x43,\\n 0xfc, 0x23, 0x77, 0xd4, 0x13, 0xd7, 0x11, 0xaa,\\n 0x39, 0x60, 0xab, 0xa2, 0xdf, 0x24, 0xb3, 0xeb,\\n 0xa0, 0xc5, 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b,\\n 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03,\\n 0x02, 0x01, 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55,\\n 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,\\n 0x03, 0x01, 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03,\\n 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x7b,\\n 0xa1, 0xa5, 0x94, 0xa5, 0xe5, 0x8f, 0x95, 0x5d,\\n 0xd4, 0xce, 0xdc, 0x0f, 0x8a, 0xbe, 0xad, 0x9a,\\n 0x6b, 0x66, 0x3e, 0x30, 0x10, 0x06, 0x09, 0x2b,\\n 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x15, 0x01,\\n 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xd2, 0x06, 0x28, 0xc5, 0x31, 0x3a, 0x11,\\n 0x8d, 0xb6, 0xcb, 0x2b, 0x3f, 0xdd, 0x2a, 0x9a,\\n 0x13, 0x30, 0x52, 0x77, 0xaa, 0xda, 0xda, 0xcb,\\n 0xce, 0xb9, 0x5c, 0xe4, 0x32, 0x1c, 0x02, 0xfa,\\n 0x30, 0x02, 0x21, 0x00, 0xb3, 0x82, 0x24, 0xa2,\\n 0xb1, 0x67, 0x6b, 0x69, 0x07, 0x0e, 0xcd, 0x77,\\n 0x74, 0x99, 0x06, 0x9c, 0x59, 0xb2, 0x00, 0xc0,\\n 0xb3, 0xbb, 0x37, 0x5b, 0xc0, 0x1b, 0xfb, 0xd9,\\n 0x70, 0x98, 0xb9, 0x1e };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] = \\n{ 0x30, 0x81, 0x93, 0x02, 0x01, 0x00, 0x30, 0x13,\\n 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,\\n 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x03, 0x01, 0x07, 0x04, 0x79, 0x30, 0x77, 0x02,\\n 0x01, 0x01, 0x04, 0x20, 0x78, 0xa7, 0x3d, 0xed,\\n 0xa0, 0xb5, 0x67, 0x86, 0xa7, 0x89, 0x75, 0x46,\\n 0x8c, 0xd4, 0xaf, 0xbd, 0x7c, 0x36, 0x86, 0x5e,\\n 0xb3, 0xc0, 0x00, 0x98, 0x22, 0xcf, 0x3c, 0x38,\\n 0xa4, 0x31, 0xeb, 0x51, 0xa0, 0x0a, 0x06, 0x08,\\n 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07,\\n 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x44, 0x9c,\\n 0x2c, 0x36, 0xce, 0x5e, 0xf3, 0x9b, 0xf7, 0x4d,\\n 0xc0, 0x62, 0x52, 0x3d, 0xa3, 0x0f, 0x04, 0xe2,\\n 0x16, 0xcb, 0x48, 0x72, 0x4f, 0xb7, 0x91, 0x36,\\n 0x04, 0xee, 0x10, 0xe1, 0xb1, 0xce, 0xa6, 0xe5,\\n 0x87, 0xd8, 0xe8, 0x7a, 0x3f, 0xe0, 0x83, 0x3e,\\n 0xd7, 0xbd, 0xa4, 0x0b, 0xf7, 0x13, 0xa8, 0x3d,\\n 0xd1, 0x79, 0x3f, 0x65, 0xc6, 0x69, 0x43, 0xec,\\n 0x41, 0x3b, 0xaa, 0x9c, 0x8b, 0xf6 };\\n\\nconst char MBED_CLOUD_DEV_MANUFACTURER[] = \\\"dev_manufacturer\\\";\\n\\nconst char MBED_CLOUD_DEV_MODEL_NUMBER[] = \\\"dev_model_num\\\";\\n\\nconst char MBED_CLOUD_DEV_SERIAL_NUMBER[] = \\\"0\\\";\\n\\nconst char MBED_CLOUD_DEV_DEVICE_TYPE[] = \\\"dev_device_type\\\";\\n\\nconst char MBED_CLOUD_DEV_HARDWARE_VERSION[] = \\\"dev_hardware_version\\\";\\n\\nconst uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0;\\n\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY);\\n\\n#endif //__MBED_CLOUD_DEV_CREDENTIALS_H__\\n", - "_key": "Success" - } - ], - "_key": "200" + "_key": "400" }, { - "description": "Bad request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -30854,10 +30260,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -30927,20 +30333,10 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 401, - "type": "invalid_auth", - "message": "Invalid access token.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], - "_key": "401" + "_key": "403" }, { - "description": "Developer certificate not found with given ID.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -31010,26 +30406,16 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 404, - "type": "not_found", - "message": "Not Found. Not found: 016006724ff53ade90ed948d03c00001", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], "_key": "404" } ], - "path": "/v3/developer-certificates/{developerCertificateId}", - "summary": "Fetch an existing developer certificate to connect to the bootstrap server.", - "return_type": "developer_certificate", + "path": "/v3/branding-images/dark/{reference}/upload-multipart", + "summary": "Upload a dark theme image.", + "return_type": "dark_theme_image", "return_info": { "self": true, "custom": false, - "type": "developer_certificate" + "type": "dark_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -31038,158 +30424,339 @@ "etag", "type", "filter", - "created_at", - "account_id", - "name", - "description", - "developer_private_key", - "security_file_content", - "certificate" + "static_uri", + "updated_at" + ], + "group_id": "Branding", + "operation_id": "uploadDarkImageMultipart", + "additional_operations": [ + { + "operation_id": "uploadDarkImage", + "notes": "The multipart endpoint is used by the SDKs as it offers the same functionality as the standard upload endpoint." + } ], - "group_id": "Security", - "parameter_map": { - "developerCertificateId": "id" - }, - "operation_id": "getDeveloperCertificate", "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" + "request_content_type": "multipart/form-data", + "request_body": "file", + "_key": "update" } ], "fields": [ { + "enum": [ + "brand_logo_portrait", + "brand_logo_square", + "brand_logo_landscape", + "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", + "desktop_background_landscape", + "desktop_background_square", + "desktop_background_portrait", + "carousel_image_portrait_0", + "carousel_image_portrait_1", + "carousel_image_portrait_2", + "carousel_image_portrait_3", + "carousel_image_portrait_4", + "carousel_image_portrait_5", + "carousel_image_portrait_6", + "carousel_image_portrait_7", + "carousel_image_portrait_8", + "carousel_image_portrait_9", + "carousel_image_square_0", + "carousel_image_square_1", + "carousel_image_square_2", + "carousel_image_square_3", + "carousel_image_square_4", + "carousel_image_square_5", + "carousel_image_square_6", + "carousel_image_square_7", + "carousel_image_square_8", + "carousel_image_square_9", + "carousel_image_landscape_0", + "carousel_image_landscape_1", + "carousel_image_landscape_2", + "carousel_image_landscape_3", + "carousel_image_landscape_4", + "carousel_image_landscape_5", + "carousel_image_landscape_6", + "carousel_image_landscape_7", + "carousel_image_landscape_8", + "carousel_image_landscape_9" + ], "type": "string", - "description": "Account to which the developer certificate belongs.", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_key": "account_id" - }, - { - "type": "string", - "description": "PEM-format X.509 developer certificate.", - "api_fieldname": "developer_certificate", - "readOnly": true, - "required": false, - "_key": "certificate" - }, - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, - "api_fieldname": "description", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", "readOnly": false, "required": false, - "_key": "description" + "enum_reference": "dark_theme_image_reference_enum", + "_key": "reference" }, { "type": "string", - "description": "PEM-format developer private key associated with the certificate.", - "api_fieldname": "developer_private_key", + "format": "uri", + "example": "https://static.mbed.com/123456789.jpg", + "description": "The static link to the image.", "readOnly": true, + "api_fieldname": "static_uri", "required": false, - "_key": "developer_private_key" - }, - { - "type": "string", - "description": "ID that uniquely identifies the developer certificate.", - "api_fieldname": "id", - "parameter_fieldname": "developerCertificateId", - "in": "path", - "required": true, - "readOnly": false, - "_key": "id" - }, - { - "type": "string", - "description": "Name of the developer certificate.", - "api_fieldname": "name", - "readOnly": false, - "required": true, - "_key": "name" + "_key": "static_uri" }, { "type": "string", - "description": "Content of the `security.c` file flashed to the device to provide security credentials.", - "api_fieldname": "security_file_content", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", "readOnly": true, + "api_fieldname": "updated_at", "required": false, - "_key": "security_file_content" - } - ], - "field_renames": [ - { - "api_fieldname": "developer_certificate", - "_key": "certificate" + "_key": "updated_at" } ], + "field_renames": [], "tags": [ - "Device security - developer class certificates", - "Device security - certificates" + "User interface configuration - images" ], - "group_id": "Security", - "_key": "developer_certificate" + "group_id": "Branding", + "_key": "dark_theme_image" }, { "swagger_models": [ - "CertificateEnrollment", - "DeviceData", - "DeviceDataPostRequest", - "DeviceDataPutRequest", - "DeviceGroupManipulation", - "DevicePage" + "DeveloperCertificateRequestData", + "DeveloperCertificateResponseData", + "TrustedCertificateResp" ], "primary_key_field": "id", "methods": [ { - "description": "Add one device to a group.", - "field_renames": [], + "description": "Create a developer certificate (a certificate that can be flashed to multiple devices to connect to the bootstrap server).\n\n**Note:** The number of developer certificates allowed per account is limited. Please see [Setting up a Certificate Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html).\n\n**Example:**\n```\ncurl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\" \\\n-d { \"name\": \"\", \"description\": \"\" }\n```", + "field_renames": [ + { + "api_fieldname": "developer_certificate", + "_key": "certificate" + } + ], "fields": [ { - "in": "path", - "description": "The ID of the group.", - "name": "device-group-id", - "required": true, "type": "string", - "entity_fieldname": "device-group-id", - "api_fieldname": "device-group-id", - "external_param": true, - "parameter_fieldname": "device-group-id", - "_key": "device-group-id" + "description": "Description for the developer certificate.", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" }, { "type": "string", - "example": "00000000000000000000000000000000", - "name": "device_id", + "description": "Name of the developer certificate.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", "in": "body", - "schema_param": true, - "entity_fieldname": "id", - "api_fieldname": "device_id", - "external_param": false, - "parameter_fieldname": "device_id", "required": true, - "_key": "id" + "_key": "name" } ], "method": "post", - "mode": "add_to_group", + "mode": "create", "responses": [ { - "description": "Success - device added.", - "_key": "204" + "description": "Developer certificate created successfully.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Account to which the developer certificate belongs.", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "Description for the developer certificate.", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "string", + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "entity_fieldname": "certificate", + "_key": "developer_certificate" + }, + { + "type": "string", + "description": "PEM-format developer private key associated with the certificate.", + "api_fieldname": "developer_private_key", + "entity_fieldname": "developer_private_key", + "_key": "developer_private_key" + }, + { + "type": "string", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "description": "Name of the developer certificate.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `trusted-cert`.", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "Content of the `security.c` file flashed to the device to provide security credentials.", + "api_fieldname": "security_file_content", + "entity_fieldname": "security_file_content", + "_key": "security_file_content" + } + ], + "foreign_key": { + "group": "Security", + "entity": "subtenant_trusted_certificate" + } + }, + "examples": [ + { + "object": "trusted-cert", + "id": "015fee4431fd38c98640fbfb00000000", + "etag": "1", + "created_at": "2017-12-11T14:22:20.009Z", + "account_id": "015fee5d9b3538c98640fbfb00000000", + "name": "DeveloperCertificate", + "description": "This certificate will be used with multiple developer devices.", + "developer_certificate": "-----BEGIN CERTIFICATE-----\\nMIICcDCCAhWgAwIBAgIRAPSBbBtLUE/ekQcWE4GzPJEwCgYIKoZIzj0EAwIwgaIx\\nCzAJBgNVBAYTAkdCMRcwFQYDVQQIDA5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBwwJ\\nQ2FtYnJpZGdlMRAwDgYDVQQKDAdBUk0gTHRkMSkwJwYDVQQLDCAwMTU4NDNlMzJl\\nYzkwMjQyMGEwMTVlMDcwMDAwMDAwMDEpMCcGA1UEAwwgMDE2MWRiYmNkZDY2MGE1\\nODBhMDEwYzM0MDNjMDAwMDAwHhcNMTgwMjI4MDkyNzIzWhcNMjgwMjI4MDkyNzIz\\nWjCBojELMAkGA1UEBhMCR0IxFzAVBgNVBAgMDkNhbWJyaWRnZXNoaXJlMRIwEAYD\\nVQQHDAlDYW1icmlkZ2UxEDAOBgNVBAoMB0FSTSBMdGQxKTAnBgNVBAsMIDAxNTg0\\nM2UzMmVjOTAyNDIwYTAxNWUwNzAwMDAwMDAwMSkwJwYDVQQDDCAwMTYxZGJiY2Rk\\nNjYwYTU4MGEwMTBjMzQwM2MwMDAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\\nBEScLDbOXvOb903AYlI9ow8E4hbLSHJPt5E2BO4Q4bHOpuWH2Oh6P+CDPte9pAv3\\nE6g90Xk/ZcZpQ+xBO6qci/ajKjAoMBIGCSsGAQQBoCCBSQQFAgNAAJEwEgYDVR0T\\nAQH/BAgwBgEB/wIBADAKBggqhkjOPQQDAgNJADBGAiEAsi9zSK8Njl22GoEHrsg8\\nQlwFnrkkP9d6FyLFtmqndt4CIQCmVHwisYNcCkqD2SWctG1xQHo0HZePAQW8PstM\\nzhNupQ==\\n-----END CERTIFICATE-----\\n", + "developer_private_key": "-----BEGIN PRIVATE KEY-----\\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgeKc97aC1Z4aniXVG\\njNSvvXw2hl6zwACYIs88OKQx61GgCgYIKoZIzj0DAQehRANCAAREnCw2zl7zm/dN\\nwGJSPaMPBOIWy0hyT7eRNgTuEOGxzqblh9joej/ggz7XvaQL9xOoPdF5P2XGaUPs\\nQTuqnIv2\\n-----END PRIVATE KEY-----\\n", + "security_file_content": "/*\\n * Copyright (c) 2017 ARM Limited. All rights reserved.\\n * SPDX-License-Identifier: Apache-2.0\\n * Licensed under the Apache License, Version 2.0 (the License); you may\\n * not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an AS IS BASIS, WITHOUT\\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n#ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__\\n#define __MBED_CLOUD_DEV_CREDENTIALS_H__\\n\\n#include \\n\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = \\\"0161dbbcdd660a580a010c3403c00000\\\";\\nconst char MBED_CLOUD_DEV_ACCOUNT_ID[] = \\\"015843e32ec902420a015e0700000000\\\";\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = \\\"coaps://coap-integration-lab.dev.mbed.com:5684?aid=015843e32ec902420a015e0700000000\\\";\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x70, 0x30, 0x82, 0x02, 0x15,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00,\\n 0xf4, 0x81, 0x6c, 0x1b, 0x4b, 0x50, 0x4f, 0xde,\\n 0x91, 0x07, 0x16, 0x13, 0x81, 0xb3, 0x3c, 0x91,\\n 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x04, 0x03, 0x02, 0x30, 0x81, 0xa2, 0x31,\\n 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,\\n 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,\\n 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43,\\n 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,\\n 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,\\n 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,\\n 0x04, 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20,\\n 0x4c, 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x20, 0x30, 0x31,\\n 0x35, 0x38, 0x34, 0x33, 0x65, 0x33, 0x32, 0x65,\\n 0x63, 0x39, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61,\\n 0x30, 0x31, 0x35, 0x65, 0x30, 0x37, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x29,\\n 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,\\n 0x20, 0x30, 0x31, 0x36, 0x31, 0x64, 0x62, 0x62,\\n 0x63, 0x64, 0x64, 0x36, 0x36, 0x30, 0x61, 0x35,\\n 0x38, 0x30, 0x61, 0x30, 0x31, 0x30, 0x63, 0x33,\\n 0x34, 0x30, 0x33, 0x63, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30,\\n 0x32, 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32,\\n 0x33, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x32,\\n 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32, 0x33,\\n 0x5a, 0x30, 0x81, 0xa2, 0x31, 0x0b, 0x30, 0x09,\\n 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47,\\n 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55,\\n 0x04, 0x08, 0x0c, 0x0e, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69,\\n 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03,\\n 0x55, 0x04, 0x07, 0x0c, 0x09, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10,\\n 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c,\\n 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64,\\n 0x31, 0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04,\\n 0x0b, 0x0c, 0x20, 0x30, 0x31, 0x35, 0x38, 0x34,\\n 0x33, 0x65, 0x33, 0x32, 0x65, 0x63, 0x39, 0x30,\\n 0x32, 0x34, 0x32, 0x30, 0x61, 0x30, 0x31, 0x35,\\n 0x65, 0x30, 0x37, 0x30, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31,\\n 0x36, 0x31, 0x64, 0x62, 0x62, 0x63, 0x64, 0x64,\\n 0x36, 0x36, 0x30, 0x61, 0x35, 0x38, 0x30, 0x61,\\n 0x30, 0x31, 0x30, 0x63, 0x33, 0x34, 0x30, 0x33,\\n 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x59,\\n 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,\\n 0x04, 0x44, 0x9c, 0x2c, 0x36, 0xce, 0x5e, 0xf3,\\n 0x9b, 0xf7, 0x4d, 0xc0, 0x62, 0x52, 0x3d, 0xa3,\\n 0x0f, 0x04, 0xe2, 0x16, 0xcb, 0x48, 0x72, 0x4f,\\n 0xb7, 0x91, 0x36, 0x04, 0xee, 0x10, 0xe1, 0xb1,\\n 0xce, 0xa6, 0xe5, 0x87, 0xd8, 0xe8, 0x7a, 0x3f,\\n 0xe0, 0x83, 0x3e, 0xd7, 0xbd, 0xa4, 0x0b, 0xf7,\\n 0x13, 0xa8, 0x3d, 0xd1, 0x79, 0x3f, 0x65, 0xc6,\\n 0x69, 0x43, 0xec, 0x41, 0x3b, 0xaa, 0x9c, 0x8b,\\n 0xf6, 0xa3, 0x2a, 0x30, 0x28, 0x30, 0x12, 0x06,\\n 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xa0, 0x20,\\n 0x81, 0x49, 0x04, 0x05, 0x02, 0x03, 0x40, 0x00,\\n 0x91, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,\\n 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xb2, 0x2f, 0x73, 0x48, 0xaf, 0x0d, 0x8e,\\n 0x5d, 0xb6, 0x1a, 0x81, 0x07, 0xae, 0xc8, 0x3c,\\n 0x42, 0x5c, 0x05, 0x9e, 0xb9, 0x24, 0x3f, 0xd7,\\n 0x7a, 0x17, 0x22, 0xc5, 0xb6, 0x6a, 0xa7, 0x76,\\n 0xde, 0x02, 0x21, 0x00, 0xa6, 0x54, 0x7c, 0x22,\\n 0xb1, 0x83, 0x5c, 0x0a, 0x4a, 0x83, 0xd9, 0x25,\\n 0x9c, 0xb4, 0x6d, 0x71, 0x40, 0x7a, 0x34, 0x1d,\\n 0x97, 0x8f, 0x01, 0x05, 0xbc, 0x3e, 0xcb, 0x4c,\\n 0xce, 0x13, 0x6e, 0xa5 };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x35, 0x30, 0x82, 0x01, 0xdb,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x5c,\\n 0x27, 0xa5, 0x76, 0x7d, 0x58, 0x85, 0x8a, 0x43,\\n 0x91, 0xa0, 0x61, 0xab, 0xcf, 0xa6, 0x59, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x72, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74,\\n 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x30,\\n 0x20, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x35, 0x31,\\n 0x35, 0x31, 0x39, 0x34, 0x39, 0x31, 0x31, 0x5a,\\n 0x18, 0x0f, 0x32, 0x30, 0x35, 0x32, 0x30, 0x35,\\n 0x31, 0x35, 0x31, 0x39, 0x35, 0x39, 0x31, 0x30,\\n 0x5a, 0x30, 0x72, 0x31, 0x0b, 0x30, 0x09, 0x06,\\n 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42,\\n 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04,\\n 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d, 0x62, 0x72,\\n 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69, 0x72,\\n 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,\\n 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10, 0x30,\\n 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07,\\n 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64, 0x31,\\n 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03,\\n 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20, 0x49, 0x6e,\\n 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,\\n 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,\\n 0x72, 0x61, 0x70, 0x43, 0x41, 0x30, 0x59, 0x30,\\n 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04,\\n 0x8b, 0x7c, 0x86, 0xc3, 0x88, 0x54, 0xe6, 0x5f,\\n 0xe0, 0x57, 0x4e, 0x1b, 0xac, 0x29, 0x82, 0xea,\\n 0x7d, 0x91, 0x00, 0x63, 0xa7, 0x4a, 0x05, 0xbc,\\n 0x54, 0xc5, 0x71, 0x27, 0x33, 0x19, 0x1b, 0x2e,\\n 0xfa, 0x41, 0xf8, 0x7a, 0x9a, 0x0c, 0x5d, 0xfc,\\n 0xb3, 0x37, 0x01, 0x99, 0xc5, 0xc9, 0xbe, 0x78,\\n 0x5b, 0x1d, 0xec, 0xb0, 0x1a, 0x1d, 0xdc, 0xe4,\\n 0x6f, 0x57, 0x04, 0xf4, 0x3a, 0xca, 0xa8, 0xd2,\\n 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b, 0x06, 0x03,\\n 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x01,\\n 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01,\\n 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,\\n 0x0e, 0x04, 0x16, 0x04, 0x14, 0x13, 0xef, 0x69,\\n 0xfa, 0x62, 0x3f, 0x00, 0x86, 0xf4, 0x05, 0xb8,\\n 0xb6, 0xe6, 0xb2, 0xf1, 0xdb, 0x69, 0x10, 0xb4,\\n 0x39, 0x30, 0x10, 0x06, 0x09, 0x2b, 0x06, 0x01,\\n 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03,\\n 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a,\\n 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,\\n 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xa2,\\n 0x50, 0x88, 0x0f, 0x55, 0xe8, 0x26, 0x49, 0xe6,\\n 0xf5, 0x71, 0x86, 0x33, 0x29, 0x05, 0x4c, 0xf9,\\n 0xfd, 0x1f, 0x14, 0x98, 0x92, 0x85, 0xd9, 0x5c,\\n 0x48, 0x02, 0x9e, 0xc2, 0x79, 0xa8, 0x59, 0x02,\\n 0x20, 0x3e, 0xfe, 0x3c, 0xa0, 0xbf, 0xd3, 0x0f,\\n 0x15, 0x83, 0x56, 0xbc, 0xf2, 0xfa, 0x16, 0x26,\\n 0x7a, 0xc1, 0x68, 0xaa, 0xbc, 0x91, 0x3c, 0x69,\\n 0x44, 0x36, 0xf9, 0x74, 0xa1, 0x82, 0x76, 0x7a,\\n 0x6e };\\n\\nconst uint8_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x30, 0x30, 0x82, 0x01, 0xd5,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x26,\\n 0xf9, 0x08, 0xfc, 0xf1, 0xc0, 0x46, 0xa4, 0x4a,\\n 0x4d, 0x2c, 0xf1, 0x94, 0x27, 0xf9, 0x1f, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x6f, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x18, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x57, 0x4d, 0x32,\\n 0x4d, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d,\\n 0x31, 0x37, 0x30, 0x32, 0x31, 0x32, 0x31, 0x30,\\n 0x33, 0x37, 0x35, 0x32, 0x5a, 0x18, 0x0f, 0x32,\\n 0x30, 0x35, 0x32, 0x30, 0x32, 0x31, 0x32, 0x31,\\n 0x30, 0x34, 0x37, 0x35, 0x32, 0x5a, 0x30, 0x6f,\\n 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,\\n 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30,\\n 0x15, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0e,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12,\\n 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,\\n 0x09, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64,\\n 0x67, 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03,\\n 0x55, 0x04, 0x0a, 0x13, 0x07, 0x41, 0x52, 0x4d,\\n 0x20, 0x4c, 0x74, 0x64, 0x31, 0x21, 0x30, 0x1f,\\n 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x18, 0x41,\\n 0x52, 0x4d, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x67,\\n 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c,\\n 0x57, 0x4d, 0x32, 0x4d, 0x20, 0x43, 0x41, 0x30,\\n 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86,\\n 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,\\n 0x00, 0x04, 0xba, 0xea, 0x80, 0x01, 0x2d, 0xf0,\\n 0xe1, 0xb6, 0xc5, 0x5f, 0xf9, 0x76, 0x84, 0x31,\\n 0xa9, 0x29, 0xa1, 0xc7, 0xa8, 0xfd, 0xa0, 0xad,\\n 0xd9, 0x94, 0xe7, 0xec, 0x5a, 0x33, 0xa1, 0x2c,\\n 0x8e, 0x36, 0x43, 0x9b, 0x18, 0xdf, 0xce, 0x71,\\n 0x14, 0x24, 0xb1, 0xfb, 0x16, 0x34, 0x0e, 0x43,\\n 0xfc, 0x23, 0x77, 0xd4, 0x13, 0xd7, 0x11, 0xaa,\\n 0x39, 0x60, 0xab, 0xa2, 0xdf, 0x24, 0xb3, 0xeb,\\n 0xa0, 0xc5, 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b,\\n 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03,\\n 0x02, 0x01, 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55,\\n 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,\\n 0x03, 0x01, 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03,\\n 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x7b,\\n 0xa1, 0xa5, 0x94, 0xa5, 0xe5, 0x8f, 0x95, 0x5d,\\n 0xd4, 0xce, 0xdc, 0x0f, 0x8a, 0xbe, 0xad, 0x9a,\\n 0x6b, 0x66, 0x3e, 0x30, 0x10, 0x06, 0x09, 0x2b,\\n 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x15, 0x01,\\n 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xd2, 0x06, 0x28, 0xc5, 0x31, 0x3a, 0x11,\\n 0x8d, 0xb6, 0xcb, 0x2b, 0x3f, 0xdd, 0x2a, 0x9a,\\n 0x13, 0x30, 0x52, 0x77, 0xaa, 0xda, 0xda, 0xcb,\\n 0xce, 0xb9, 0x5c, 0xe4, 0x32, 0x1c, 0x02, 0xfa,\\n 0x30, 0x02, 0x21, 0x00, 0xb3, 0x82, 0x24, 0xa2,\\n 0xb1, 0x67, 0x6b, 0x69, 0x07, 0x0e, 0xcd, 0x77,\\n 0x74, 0x99, 0x06, 0x9c, 0x59, 0xb2, 0x00, 0xc0,\\n 0xb3, 0xbb, 0x37, 0x5b, 0xc0, 0x1b, 0xfb, 0xd9,\\n 0x70, 0x98, 0xb9, 0x1e };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] = \\n{ 0x30, 0x81, 0x93, 0x02, 0x01, 0x00, 0x30, 0x13,\\n 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,\\n 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x03, 0x01, 0x07, 0x04, 0x79, 0x30, 0x77, 0x02,\\n 0x01, 0x01, 0x04, 0x20, 0x78, 0xa7, 0x3d, 0xed,\\n 0xa0, 0xb5, 0x67, 0x86, 0xa7, 0x89, 0x75, 0x46,\\n 0x8c, 0xd4, 0xaf, 0xbd, 0x7c, 0x36, 0x86, 0x5e,\\n 0xb3, 0xc0, 0x00, 0x98, 0x22, 0xcf, 0x3c, 0x38,\\n 0xa4, 0x31, 0xeb, 0x51, 0xa0, 0x0a, 0x06, 0x08,\\n 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07,\\n 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x44, 0x9c,\\n 0x2c, 0x36, 0xce, 0x5e, 0xf3, 0x9b, 0xf7, 0x4d,\\n 0xc0, 0x62, 0x52, 0x3d, 0xa3, 0x0f, 0x04, 0xe2,\\n 0x16, 0xcb, 0x48, 0x72, 0x4f, 0xb7, 0x91, 0x36,\\n 0x04, 0xee, 0x10, 0xe1, 0xb1, 0xce, 0xa6, 0xe5,\\n 0x87, 0xd8, 0xe8, 0x7a, 0x3f, 0xe0, 0x83, 0x3e,\\n 0xd7, 0xbd, 0xa4, 0x0b, 0xf7, 0x13, 0xa8, 0x3d,\\n 0xd1, 0x79, 0x3f, 0x65, 0xc6, 0x69, 0x43, 0xec,\\n 0x41, 0x3b, 0xaa, 0x9c, 0x8b, 0xf6 };\\n\\nconst char MBED_CLOUD_DEV_MANUFACTURER[] = \\\"dev_manufacturer\\\";\\n\\nconst char MBED_CLOUD_DEV_MODEL_NUMBER[] = \\\"dev_model_num\\\";\\n\\nconst char MBED_CLOUD_DEV_SERIAL_NUMBER[] = \\\"0\\\";\\n\\nconst char MBED_CLOUD_DEV_DEVICE_TYPE[] = \\\"dev_device_type\\\";\\n\\nconst char MBED_CLOUD_DEV_HARDWARE_VERSION[] = \\\"dev_hardware_version\\\";\\n\\nconst uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0;\\n\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY);\\n\\n#endif //__MBED_CLOUD_DEV_CREDENTIALS_H__\\n", + "_key": "Success" + } + ], + "_key": "201" + }, + { + "description": "Bad request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "examples": [ + { + "object": "error", + "code": 400, + "type": "validation_error", + "message": "Bad Request. Missing certificate name.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "fields": { + "name": "name", + "message": "Missing certificate name." + }, + "_key": "Bad Request Error" + } + ], + "_key": "400" }, { - "description": "Bad request.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -31259,10 +30826,20 @@ } ] }, - "_key": "400" + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "401" }, { - "description": "Unauthorized.", + "description": "The maximum number of developer certificates for the given account has already been reached.", "schema": { "type": "object", "required": [ @@ -31332,10 +30909,24 @@ } ] }, - "_key": "401" + "examples": [ + { + "object": "error", + "code": 403, + "type": "account_limit_exceeded", + "message": "Forbidden. Limit for the number of certificates exceeded.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "fields": { + "name": "cert-count", + "message": "10" + }, + "_key": "Account Limit Exceeded Error" + } + ], + "_key": "403" }, { - "description": "Not found.", + "description": "Certificate with the given name already exists.", "schema": { "type": "object", "required": [ @@ -31405,16 +30996,30 @@ } ] }, - "_key": "404" + "examples": [ + { + "object": "error", + "code": 409, + "type": "duplicate", + "message": "Conflict. Certificate already exists.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "fields": { + "name": "certificate", + "message": "Certificate already exists." + }, + "_key": "Duplicate Error" + } + ], + "_key": "409" } ], - "path": "/v3/device-groups/{device-group-id}/devices/add/", - "summary": "Add a device to a group.", - "return_type": "void", + "path": "/v3/developer-certificates", + "summary": "Create a new developer certificate to connect to the bootstrap server.", + "return_type": "developer_certificate", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "developer_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -31422,680 +31027,758 @@ "object", "etag", "type", - "filter" + "filter", + "id", + "created_at", + "account_id", + "developer_private_key", + "security_file_content", + "certificate" ], - "group_id": "Devices", - "operation_id": "Group_members_add", + "group_id": "Security", "parameter_map": { - "device_id": "id" - }, - "spec": { - "return_type": "void" + "developerCertificateId": "id" }, + "operation_id": "createDeveloperCertificate", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "add_to_group" + "_key": "create" }, { - "description": "Create a new device.", - "field_renames": [], - "fields": [ - { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "entity_fieldname": "auto_update", - "parameter_fieldname": "auto_update", - "in": "body", - "required": false, - "_key": "auto_update" - }, - { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to bootstrap server.", - "api_fieldname": "bootstrap_expiration_date", - "entity_fieldname": "bootstrap_expiration_date", - "parameter_fieldname": "bootstrap_expiration_date", - "in": "body", - "required": false, - "_key": "bootstrap_expiration_date" - }, - { - "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "entity_fieldname": "ca_id", - "parameter_fieldname": "ca_id", - "in": "body", - "required": false, - "_key": "ca_id" - }, - { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to LwM2M server.", - "api_fieldname": "connector_expiration_date", - "entity_fieldname": "connector_expiration_date", - "parameter_fieldname": "connector_expiration_date", - "in": "body", - "required": false, - "_key": "connector_expiration_date" - }, - { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", - "example": { - "key": "value" - }, - "api_fieldname": "custom_attributes", - "entity_fieldname": "custom_attributes", - "parameter_fieldname": "custom_attributes", - "in": "body", - "required": false, - "_key": "custom_attributes" - }, - { - "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "", - "api_fieldname": "deployment", - "entity_fieldname": "deployment", - "parameter_fieldname": "deployment", - "in": "body", - "required": false, - "_key": "deployment" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "string", - "maxLength": 32, - "description": "An ID representing the model and hardware revision of the device.", - "example": "", - "api_fieldname": "device_class", - "entity_fieldname": "device_class", - "parameter_fieldname": "device_class", - "in": "body", - "required": false, - "_key": "device_class" - }, - { - "enum": [ - 0, - 1, - 5 - ], - "type": "integer", - "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", - "example": 0, - "default": 0, - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode", - "parameter_fieldname": "device_execution_mode", - "in": "body", - "required": false, - "_key": "device_execution_mode" - }, - { - "type": "string", - "maxLength": 512, - "description": "The fingerprint of the device certificate.", - "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", - "api_fieldname": "device_key", - "entity_fieldname": "device_key", - "parameter_fieldname": "device_key", - "in": "body", - "required": false, - "_key": "device_key" - }, - { - "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", - "readOnly": true, - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "parameter_fieldname": "endpoint_name", - "in": "body", - "required": false, - "_key": "endpoint_name" - }, - { - "type": "string", - "description": "The endpoint type of the device. For example, the device is a gateway.", - "maxLength": 64, - "example": "", - "api_fieldname": "endpoint_type", - "entity_fieldname": "endpoint_type", - "parameter_fieldname": "endpoint_type", - "in": "body", - "required": false, - "_key": "endpoint_type" - }, - { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway", - "parameter_fieldname": "host_gateway", - "in": "body", - "required": false, - "_key": "host_gateway" - }, - { - "type": "string", - "pattern": "[A-Fa-f0-9]{64}", - "x-nullable": true, - "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", - "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", - "api_fieldname": "issuer_fingerprint", - "entity_fieldname": "issuer_fingerprint", - "parameter_fieldname": "issuer_fingerprint", - "in": "body", - "required": false, - "_key": "issuer_fingerprint" - }, - { - "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "entity_fieldname": "manifest", - "parameter_fieldname": "manifest", - "in": "body", - "required": false, - "_key": "manifest" - }, - { - "enum": [ - "connector", - "direct" - ], - "type": "string", - "description": "The ID of the channel used to communicate with the device.", - "api_fieldname": "mechanism", - "entity_fieldname": "mechanism", - "parameter_fieldname": "mechanism", - "in": "body", - "required": false, - "enum_reference": "device_mechanism_enum", - "_key": "mechanism" - }, - { - "type": "string", - "description": "The address of the connector to use.", - "example": "", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url", - "parameter_fieldname": "mechanism_url", - "in": "body", - "required": false, - "_key": "mechanism_url" - }, - { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "The serial number of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "serial_number", - "entity_fieldname": "serial_number", - "parameter_fieldname": "serial_number", - "in": "body", - "required": false, - "_key": "serial_number" - }, + "description": "Delete a trusted certificate.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [ { - "enum": [ - "unenrolled", - "cloud_enrolling", - "bootstrapped", - "registered", - "deregistered" - ], - "type": "string", - "description": "The current state of the device.", - "api_fieldname": "state", - "entity_fieldname": "state", - "parameter_fieldname": "state", - "in": "body", - "required": false, - "enum_reference": "device_state_enum", - "_key": "state" - }, + "api_fieldname": "developer_certificate", + "_key": "certificate" + } + ], + "fields": [ { + "name": "cert_id", + "in": "path", + "description": "The ID of the trusted certificate to delete.", + "required": true, "type": "string", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "vendor_id", - "entity_fieldname": "vendor_id", - "parameter_fieldname": "vendor_id", - "in": "body", - "required": false, - "_key": "vendor_id" + "entity_fieldname": "id", + "api_fieldname": "cert_id", + "external_param": false, + "parameter_fieldname": "cert_id", + "_key": "id" } ], - "method": "post", - "mode": "create", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Device created.", - "schema": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "device_execution_mode": { + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", "enum": [ - 0, - 1, - 5 + "error" ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { "type": "integer", - "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", - "example": 0, - "default": 0, - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "groups": { - "description": "An array containing an ID of each group this device belongs to.", + { "type": "array", + "description": "Request fields which failed validation.", "items": { - "type": "string", - "example": "00000000000000000000000000000000" + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] }, - "api_fieldname": "groups", - "entity_fieldname": "groups" + "_key": "fields" }, - "issuer_fingerprint": { + { "type": "string", - "pattern": "[A-Fa-f0-9]{64}", - "x-nullable": true, - "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", - "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", - "api_fieldname": "issuer_fingerprint", - "entity_fieldname": "issuer_fingerprint" - }, - "operator_suspended": { - "type": "boolean", - "description": "Is the device suspended by the operator?", - "api_fieldname": "operator_suspended", - "entity_fieldname": "operator_suspended" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "last_operator_suspended_category": { + { "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance", - "api_fieldname": "last_operator_suspended_category", - "entity_fieldname": "last_operator_suspended_category" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "last_operator_suspended_description": { + { "type": "string", - "maxLength": 2000, - "description": "The most recent description why the device was suspended or returned to service.", - "example": "Suspended for maintenance.", - "api_fieldname": "last_operator_suspended_description", - "entity_fieldname": "last_operator_suspended_description" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "last_operator_suspended_updated_at": { + { "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent suspension activity.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "last_operator_suspended_updated_at", - "entity_fieldname": "last_operator_suspended_updated_at" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "A certificate not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "system_suspended": { - "type": "boolean", - "description": "Is the device suspended by the system?", - "api_fieldname": "system_suspended", - "entity_fieldname": "system_suspended" + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, - "last_system_suspended_category": { + { "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance", - "api_fieldname": "last_system_suspended_category", - "entity_fieldname": "last_system_suspended_category" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "last_system_suspended_description": { + { "type": "string", - "maxLength": 2000, - "description": "The most recent description of why the device was blocked or unblocked by the system.", - "example": "A certificate in the device's certificate chain was blacklisted by the system.", - "api_fieldname": "last_system_suspended_description", - "entity_fieldname": "last_system_suspended_description" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "last_system_suspended_updated_at": { + { "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent system block activity.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "last_system_suspended_updated_at", - "entity_fieldname": "last_system_suspended_updated_at" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "lifecycle_status": { + { "type": "string", - "enum": [ - "enabled", - "blocked" - ], - "description": "The lifecycle status of the device.", - "example": "enabled", - "api_fieldname": "lifecycle_status", - "entity_fieldname": "lifecycle_status" - }, - "account_id": { + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/trusted-certificates/{cert_id}", + "summary": "Delete a trusted certificate by ID.", + "return_type": "developer_certificate", + "return_info": { + "self": true, + "custom": false, + "type": "developer_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Security", + "parameter_map": { + "developerCertificateId": "id", + "cert_id": "id" + }, + "operation_id": "deleteCertificate", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "description": "Retrieve a trusted certificate.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "field_renames": [ + { + "api_fieldname": "developer_certificate", + "_key": "certificate" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "cert_id", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "get", + "mode": "get_trusted_certificate_info", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", + "object", + "service", + "subject", + "validity" + ], + "properties": [ + { "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", - "entity_fieldname": "account_id" + "entity_fieldname": "account_id", + "_key": "account_id" }, - "auto_update": { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "entity_fieldname": "auto_update" + { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "entity_fieldname": "certificate", + "_key": "certificate" }, - "bootstrap_expiration_date": { - "format": "date", + { "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to bootstrap server.", - "api_fieldname": "bootstrap_expiration_date", - "entity_fieldname": "bootstrap_expiration_date" + "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", + "description": "A SHA-256 fingerprint of the certificate.", + "api_fieldname": "certificate_fingerprint", + "entity_fieldname": "certificate_fingerprint", + "_key": "certificate_fingerprint" }, - "bootstrapped_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The timestamp of the device's most recent bootstrap process.", - "api_fieldname": "bootstrapped_timestamp", - "entity_fieldname": "bootstrapped_timestamp" + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, - "ca_id": { + { "type": "string", "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "entity_fieldname": "ca_id" + "x-nullable": true, + "example": "Certificate created by me.", + "description": "Human readable description of this certificate.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, - "connector_expiration_date": { - "format": "date", + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "Device execution mode where 1 means a developer certificate.", + "api_fieldname": "device_execution_mode", + "entity_fieldname": "device_execution_mode", + "_key": "device_execution_mode" + }, + { + "type": "boolean", + "example": false, + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, + "api_fieldname": "enrollment_mode", + "entity_fieldname": "enrollment_mode", + "_key": "enrollment_mode" + }, + { "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to LwM2M server.", - "api_fieldname": "connector_expiration_date", - "entity_fieldname": "connector_expiration_date" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, - "created_at": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The timestamp of when the device was created in the device directory.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at" + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, - "custom_attributes": { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", - "example": { - "key": "value" - }, - "api_fieldname": "custom_attributes", - "entity_fieldname": "custom_attributes" + { + "type": "string", + "example": "CN=issuer", + "description": "Issuer of the certificate.", + "api_fieldname": "issuer", + "entity_fieldname": "issuer", + "_key": "issuer" }, - "deployed_state": { + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'trusted-cert'", "enum": [ - "development", - "production" + "trusted-cert" ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "x-nullable": true, "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", - "entity_fieldname": "deployed_state" + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the owner.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner_id", + "entity_fieldname": "owner_id", + "_key": "owner_id" }, - "deployment": { + { "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "", - "api_fieldname": "deployment", - "entity_fieldname": "deployment" + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "entity_fieldname": "service", + "_key": "service" }, - "description": { + { "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "entity_fieldname": "description" + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, - "device_class": { + { "type": "string", - "maxLength": 32, - "description": "An ID representing the model and hardware revision of the device.", - "example": "", - "api_fieldname": "device_class", - "entity_fieldname": "device_class" + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" }, - "id": { + { "type": "string", - "description": "The ID of the device. The device ID is used across all Device Management APIs.", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" }, - "device_key": { + { + "type": "boolean", + "example": true, + "description": "This read-only flag indicates whether the certificate is valid or not.", + "readOnly": true, + "api_fieldname": "valid", + "entity_fieldname": "valid", + "_key": "valid" + }, + { "type": "string", - "maxLength": 512, - "description": "The fingerprint of the device certificate.", - "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", - "api_fieldname": "device_key", - "entity_fieldname": "device_key" + "format": "date-time", + "example": "2038-02-14T15:24:14Z", + "description": "Expiration time in UTC formatted as RFC3339.", + "api_fieldname": "validity", + "entity_fieldname": "validity", + "_key": "validity" + } + ], + "description": "Represents a trusted certificate in responses.", + "foreign_key": { + "group": "Security", + "entity": "developer_certificate" + } + }, + "_key": "200" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "endpoint_name": { - "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", - "readOnly": true, - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name" + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, - "endpoint_type": { + { "type": "string", - "description": "The endpoint type of the device. For example, the device is a gateway.", - "maxLength": 64, - "example": "", - "api_fieldname": "endpoint_type", - "entity_fieldname": "endpoint_type" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "etag": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The entity instance signature.", - "api_fieldname": "etag", - "entity_fieldname": "etag" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "firmware_checksum": { + { "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "firmware_checksum", - "entity_fieldname": "firmware_checksum" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "host_gateway": { + { "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "manifest": { - "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "entity_fieldname": "manifest" + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, - "manifest_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The timestamp of the current manifest version.", - "api_fieldname": "manifest_timestamp", - "entity_fieldname": "manifest_timestamp" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "mechanism": { + { + "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "connector", - "direct" + "error" ], - "type": "string", - "description": "The ID of the channel used to communicate with the device.", - "api_fieldname": "mechanism", - "entity_fieldname": "mechanism" + "_key": "object" }, - "mechanism_url": { + { "type": "string", - "description": "The address of the connector to use.", - "example": "", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "name": { + { "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "name", - "entity_fieldname": "name" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "A certificate not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "object": { - "type": "string", - "description": "The API resource entity.", - "example": "device", - "api_fieldname": "object", - "entity_fieldname": "object" + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, - "serial_number": { + { "type": "string", - "description": "The serial number of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "serial_number", - "entity_fieldname": "serial_number" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "state": { + { + "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "unenrolled", - "cloud_enrolling", - "bootstrapped", - "registered", - "deregistered" + "error" ], - "type": "string", - "description": "The current state of the device.", - "api_fieldname": "state", - "entity_fieldname": "state" - }, - "updated_at": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The time the object was updated.", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at" + "_key": "object" }, - "vendor_id": { + { "type": "string", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "vendor_id", - "entity_fieldname": "vendor_id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "enrolment_list_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The claim date/time.", - "api_fieldname": "enrolment_list_timestamp", - "entity_fieldname": "enrolment_list_timestamp" - }, - "_key": "properties" - } - ], - "_key": "201" - }, - { - "description": "Validation error: The data used to create the device did not validate.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Account limit reached. Could not create device.", - "_key": "403" - }, - { - "description": "Unique-constrained fields are used by other resources.", - "_key": "409" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" } ], - "path": "/v3/devices/", - "summary": "Create a device.", - "return_type": "device", + "path": "/v3/trusted-certificates/{cert_id}", + "summary": "Get a trusted certificate.", + "return_type": "trusted_certificate", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "device" + "type": "trusted_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -32104,900 +31787,1092 @@ "etag", "type", "filter", - "groups", - "operator_suspended", - "last_operator_suspended_category", - "last_operator_suspended_description", - "last_operator_suspended_updated_at", - "system_suspended", - "last_system_suspended_category", - "last_system_suspended_description", - "last_system_suspended_updated_at", - "lifecycle_status", - "account_id", - "bootstrapped_timestamp", "created_at", - "deployed_state", - "id", - "firmware_checksum", - "manifest_timestamp", "updated_at", - "enrolment_list_timestamp" + "name", + "description", + "account_id", + "owner_id", + "certificate", + "service", + "issuer", + "subject", + "validity", + "status", + "device_execution_mode", + "enrollment_mode", + "certificate_fingerprint", + "valid" ], - "group_id": "Devices", - "operation_id": "Device_create", + "group_id": "Security", + "parameter_map": { + "developerCertificateId": "id", + "cert_id": "id" + }, + "operation_id": "getCertificate", + "unaggregated": true, + "foreign_key": { + "entity": "trusted_certificate", + "group": "Security" + }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "get_trusted_certificate_info" }, { - "description": "Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a production certicate returns a 400 response.", - "field_renames": [], + "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", + "field_renames": [ + { + "api_fieldname": "developer_certificate", + "_key": "certificate" + } + ], "fields": [ { - "description": "The ID of the device.", - "in": "path", - "name": "id", - "required": true, "type": "string", - "entity_fieldname": "id", + "description": "ID that uniquely identifies the developer certificate.", "api_fieldname": "id", - "external_param": false, - "parameter_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", + "required": true, "_key": "id" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { - "description": "Device deleted.", - "_key": "204" - }, - { - "description": "Bad request.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to delete device because it can't be found.", - "_key": "404" - } - ], - "path": "/v3/devices/{id}/", - "summary": "Delete a device.", - "return_type": "device", - "return_info": { - "self": true, - "custom": false, - "type": "device" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter" - ], - "group_id": "Devices", - "operation_id": "Device_destroy", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "List all devices.\n\n**Example:**\nFollowing example filters devices according to state field and returns only devices in 'registered' state:\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\\n-H 'Authorization: Bearer '\n```", - "field_renames": [], - "fields": [ - { - "type": "string", - "description": "The ID of the item after which to retrieve the next page.", - "example": "01631667477600000000000100100374", - "api_fieldname": "after", - "entity_fieldname": "after", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "description": "Comma-separated list of data fields to return. Currently supported: `total_count`.", - "in": "query", - "name": "include", - "type": "string", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "required": false, - "_key": "include" - }, - { - "type": "integer", - "description": "How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "in": "query", - "name": "limit", - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" + "description": "Developer certificate returned successfully.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Account to which the developer certificate belongs.", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "Description for the developer certificate.", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "string", + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "entity_fieldname": "developer_certificate", + "_key": "developer_certificate" + }, + { + "type": "string", + "description": "PEM-format developer private key associated with the certificate.", + "api_fieldname": "developer_private_key", + "entity_fieldname": "developer_private_key", + "_key": "developer_private_key" + }, + { + "type": "string", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "description": "Name of the developer certificate.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `trusted-cert`.", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "Content of the `security.c` file flashed to the device to provide security credentials.", + "api_fieldname": "security_file_content", + "entity_fieldname": "security_file_content", + "_key": "security_file_content" + } + ], + "foreign_key": { + "group": "Security", + "entity": "developer_certificate" + } + }, + "examples": [ + { + "object": "trusted-cert", + "id": "015fee4431fd38c98640fbfb00000000", + "etag": "1", + "created_at": "2017-12-11T14:22:20.009Z", + "account_id": "015fee5d9b3538c98640fbfb00000000", + "name": "DeveloperCertificate", + "description": "This certificate applies to multiple developer devices.", + "developer_certificate": "-----BEGIN CERTIFICATE-----\\nMIICcDCCAhWgAwIBAgIRAPSBbBtLUE/ekQcWE4GzPJEwCgYIKoZIzj0EAwIwgaIx\\nCzAJBgNVBAYTAkdCMRcwFQYDVQQIDA5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBwwJ\\nQ2FtYnJpZGdlMRAwDgYDVQQKDAdBUk0gTHRkMSkwJwYDVQQLDCAwMTU4NDNlMzJl\\nYzkwMjQyMGEwMTVlMDcwMDAwMDAwMDEpMCcGA1UEAwwgMDE2MWRiYmNkZDY2MGE1\\nODBhMDEwYzM0MDNjMDAwMDAwHhcNMTgwMjI4MDkyNzIzWhcNMjgwMjI4MDkyNzIz\\nWjCBojELMAkGA1UEBhMCR0IxFzAVBgNVBAgMDkNhbWJyaWRnZXNoaXJlMRIwEAYD\\nVQQHDAlDYW1icmlkZ2UxEDAOBgNVBAoMB0FSTSBMdGQxKTAnBgNVBAsMIDAxNTg0\\nM2UzMmVjOTAyNDIwYTAxNWUwNzAwMDAwMDAwMSkwJwYDVQQDDCAwMTYxZGJiY2Rk\\nNjYwYTU4MGEwMTBjMzQwM2MwMDAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\\nBEScLDbOXvOb903AYlI9ow8E4hbLSHJPt5E2BO4Q4bHOpuWH2Oh6P+CDPte9pAv3\\nE6g90Xk/ZcZpQ+xBO6qci/ajKjAoMBIGCSsGAQQBoCCBSQQFAgNAAJEwEgYDVR0T\\nAQH/BAgwBgEB/wIBADAKBggqhkjOPQQDAgNJADBGAiEAsi9zSK8Njl22GoEHrsg8\\nQlwFnrkkP9d6FyLFtmqndt4CIQCmVHwisYNcCkqD2SWctG1xQHo0HZePAQW8PstM\\nzhNupQ==\\n-----END CERTIFICATE-----\\n", + "developer_private_key": "-----BEGIN PRIVATE KEY-----\\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgeKc97aC1Z4aniXVG\\njNSvvXw2hl6zwACYIs88OKQx61GgCgYIKoZIzj0DAQehRANCAAREnCw2zl7zm/dN\\nwGJSPaMPBOIWy0hyT7eRNgTuEOGxzqblh9joej/ggz7XvaQL9xOoPdF5P2XGaUPs\\nQTuqnIv2\\n-----END PRIVATE KEY-----\\n", + "security_file_content": "/*\\n * Copyright (c) 2017 ARM Limited. All rights reserved.\\n * SPDX-License-Identifier: Apache-2.0\\n * Licensed under the Apache License, Version 2.0 (the License); you may\\n * not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an AS IS BASIS, WITHOUT\\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n#ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__\\n#define __MBED_CLOUD_DEV_CREDENTIALS_H__\\n\\n#include \\n\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = \\\"0161dbbcdd660a580a010c3403c00000\\\";\\nconst char MBED_CLOUD_DEV_ACCOUNT_ID[] = \\\"015843e32ec902420a015e0700000000\\\";\\nconst char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = \\\"coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000\\\";\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x70, 0x30, 0x82, 0x02, 0x15,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00,\\n 0xf4, 0x81, 0x6c, 0x1b, 0x4b, 0x50, 0x4f, 0xde,\\n 0x91, 0x07, 0x16, 0x13, 0x81, 0xb3, 0x3c, 0x91,\\n 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x04, 0x03, 0x02, 0x30, 0x81, 0xa2, 0x31,\\n 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,\\n 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,\\n 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43,\\n 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,\\n 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,\\n 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,\\n 0x04, 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20,\\n 0x4c, 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x20, 0x30, 0x31,\\n 0x35, 0x38, 0x34, 0x33, 0x65, 0x33, 0x32, 0x65,\\n 0x63, 0x39, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61,\\n 0x30, 0x31, 0x35, 0x65, 0x30, 0x37, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x29,\\n 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c,\\n 0x20, 0x30, 0x31, 0x36, 0x31, 0x64, 0x62, 0x62,\\n 0x63, 0x64, 0x64, 0x36, 0x36, 0x30, 0x61, 0x35,\\n 0x38, 0x30, 0x61, 0x30, 0x31, 0x30, 0x63, 0x33,\\n 0x34, 0x30, 0x33, 0x63, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x38, 0x30,\\n 0x32, 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32,\\n 0x33, 0x5a, 0x17, 0x0d, 0x32, 0x38, 0x30, 0x32,\\n 0x32, 0x38, 0x30, 0x39, 0x32, 0x37, 0x32, 0x33,\\n 0x5a, 0x30, 0x81, 0xa2, 0x31, 0x0b, 0x30, 0x09,\\n 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47,\\n 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55,\\n 0x04, 0x08, 0x0c, 0x0e, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69,\\n 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03,\\n 0x55, 0x04, 0x07, 0x0c, 0x09, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10,\\n 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c,\\n 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64,\\n 0x31, 0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04,\\n 0x0b, 0x0c, 0x20, 0x30, 0x31, 0x35, 0x38, 0x34,\\n 0x33, 0x65, 0x33, 0x32, 0x65, 0x63, 0x39, 0x30,\\n 0x32, 0x34, 0x32, 0x30, 0x61, 0x30, 0x31, 0x35,\\n 0x65, 0x30, 0x37, 0x30, 0x30, 0x30, 0x30, 0x30,\\n 0x30, 0x30, 0x30, 0x31, 0x29, 0x30, 0x27, 0x06,\\n 0x03, 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31,\\n 0x36, 0x31, 0x64, 0x62, 0x62, 0x63, 0x64, 0x64,\\n 0x36, 0x36, 0x30, 0x61, 0x35, 0x38, 0x30, 0x61,\\n 0x30, 0x31, 0x30, 0x63, 0x33, 0x34, 0x30, 0x33,\\n 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x59,\\n 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,\\n 0x04, 0x44, 0x9c, 0x2c, 0x36, 0xce, 0x5e, 0xf3,\\n 0x9b, 0xf7, 0x4d, 0xc0, 0x62, 0x52, 0x3d, 0xa3,\\n 0x0f, 0x04, 0xe2, 0x16, 0xcb, 0x48, 0x72, 0x4f,\\n 0xb7, 0x91, 0x36, 0x04, 0xee, 0x10, 0xe1, 0xb1,\\n 0xce, 0xa6, 0xe5, 0x87, 0xd8, 0xe8, 0x7a, 0x3f,\\n 0xe0, 0x83, 0x3e, 0xd7, 0xbd, 0xa4, 0x0b, 0xf7,\\n 0x13, 0xa8, 0x3d, 0xd1, 0x79, 0x3f, 0x65, 0xc6,\\n 0x69, 0x43, 0xec, 0x41, 0x3b, 0xaa, 0x9c, 0x8b,\\n 0xf6, 0xa3, 0x2a, 0x30, 0x28, 0x30, 0x12, 0x06,\\n 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xa0, 0x20,\\n 0x81, 0x49, 0x04, 0x05, 0x02, 0x03, 0x40, 0x00,\\n 0x91, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,\\n 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xb2, 0x2f, 0x73, 0x48, 0xaf, 0x0d, 0x8e,\\n 0x5d, 0xb6, 0x1a, 0x81, 0x07, 0xae, 0xc8, 0x3c,\\n 0x42, 0x5c, 0x05, 0x9e, 0xb9, 0x24, 0x3f, 0xd7,\\n 0x7a, 0x17, 0x22, 0xc5, 0xb6, 0x6a, 0xa7, 0x76,\\n 0xde, 0x02, 0x21, 0x00, 0xa6, 0x54, 0x7c, 0x22,\\n 0xb1, 0x83, 0x5c, 0x0a, 0x4a, 0x83, 0xd9, 0x25,\\n 0x9c, 0xb4, 0x6d, 0x71, 0x40, 0x7a, 0x34, 0x1d,\\n 0x97, 0x8f, 0x01, 0x05, 0xbc, 0x3e, 0xcb, 0x4c,\\n 0xce, 0x13, 0x6e, 0xa5 };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x35, 0x30, 0x82, 0x01, 0xdb,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x5c,\\n 0x27, 0xa5, 0x76, 0x7d, 0x58, 0x85, 0x8a, 0x43,\\n 0x91, 0xa0, 0x61, 0xab, 0xcf, 0xa6, 0x59, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x72, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x24, 0x30, 0x22, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74,\\n 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x30,\\n 0x20, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x35, 0x31,\\n 0x35, 0x31, 0x39, 0x34, 0x39, 0x31, 0x31, 0x5a,\\n 0x18, 0x0f, 0x32, 0x30, 0x35, 0x32, 0x30, 0x35,\\n 0x31, 0x35, 0x31, 0x39, 0x35, 0x39, 0x31, 0x30,\\n 0x5a, 0x30, 0x72, 0x31, 0x0b, 0x30, 0x09, 0x06,\\n 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42,\\n 0x31, 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04,\\n 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d, 0x62, 0x72,\\n 0x69, 0x64, 0x67, 0x65, 0x73, 0x68, 0x69, 0x72,\\n 0x65, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,\\n 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x6d, 0x62,\\n 0x72, 0x69, 0x64, 0x67, 0x65, 0x31, 0x10, 0x30,\\n 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07,\\n 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64, 0x31,\\n 0x24, 0x30, 0x22, 0x06, 0x03, 0x55, 0x04, 0x03,\\n 0x13, 0x1b, 0x41, 0x52, 0x4d, 0x20, 0x49, 0x6e,\\n 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,\\n 0x6e, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,\\n 0x72, 0x61, 0x70, 0x43, 0x41, 0x30, 0x59, 0x30,\\n 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,\\n 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04,\\n 0x8b, 0x7c, 0x86, 0xc3, 0x88, 0x54, 0xe6, 0x5f,\\n 0xe0, 0x57, 0x4e, 0x1b, 0xac, 0x29, 0x82, 0xea,\\n 0x7d, 0x91, 0x00, 0x63, 0xa7, 0x4a, 0x05, 0xbc,\\n 0x54, 0xc5, 0x71, 0x27, 0x33, 0x19, 0x1b, 0x2e,\\n 0xfa, 0x41, 0xf8, 0x7a, 0x9a, 0x0c, 0x5d, 0xfc,\\n 0xb3, 0x37, 0x01, 0x99, 0xc5, 0xc9, 0xbe, 0x78,\\n 0x5b, 0x1d, 0xec, 0xb0, 0x1a, 0x1d, 0xdc, 0xe4,\\n 0x6f, 0x57, 0x04, 0xf4, 0x3a, 0xca, 0xa8, 0xd2,\\n 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b, 0x06, 0x03,\\n 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x01,\\n 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13,\\n 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01,\\n 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d,\\n 0x0e, 0x04, 0x16, 0x04, 0x14, 0x13, 0xef, 0x69,\\n 0xfa, 0x62, 0x3f, 0x00, 0x86, 0xf4, 0x05, 0xb8,\\n 0xb6, 0xe6, 0xb2, 0xf1, 0xdb, 0x69, 0x10, 0xb4,\\n 0x39, 0x30, 0x10, 0x06, 0x09, 0x2b, 0x06, 0x01,\\n 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03,\\n 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a,\\n 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,\\n 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xa2,\\n 0x50, 0x88, 0x0f, 0x55, 0xe8, 0x26, 0x49, 0xe6,\\n 0xf5, 0x71, 0x86, 0x33, 0x29, 0x05, 0x4c, 0xf9,\\n 0xfd, 0x1f, 0x14, 0x98, 0x92, 0x85, 0xd9, 0x5c,\\n 0x48, 0x02, 0x9e, 0xc2, 0x79, 0xa8, 0x59, 0x02,\\n 0x20, 0x3e, 0xfe, 0x3c, 0xa0, 0xbf, 0xd3, 0x0f,\\n 0x15, 0x83, 0x56, 0xbc, 0xf2, 0xfa, 0x16, 0x26,\\n 0x7a, 0xc1, 0x68, 0xaa, 0xbc, 0x91, 0x3c, 0x69,\\n 0x44, 0x36, 0xf9, 0x74, 0xa1, 0x82, 0x76, 0x7a,\\n 0x6e };\\n\\nconst uint8_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE[] = \\n{ 0x30, 0x82, 0x02, 0x30, 0x30, 0x82, 0x01, 0xd5,\\n 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x26,\\n 0xf9, 0x08, 0xfc, 0xf1, 0xc0, 0x46, 0xa4, 0x4a,\\n 0x4d, 0x2c, 0xf1, 0x94, 0x27, 0xf9, 0x1f, 0x30,\\n 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x04, 0x03, 0x02, 0x30, 0x6f, 0x31, 0x0b, 0x30,\\n 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,\\n 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,\\n 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,\\n 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,\\n 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,\\n 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,\\n 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,\\n 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,\\n 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,\\n 0x64, 0x31, 0x21, 0x30, 0x1f, 0x06, 0x03, 0x55,\\n 0x04, 0x03, 0x13, 0x18, 0x41, 0x52, 0x4d, 0x20,\\n 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,\\n 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x57, 0x4d, 0x32,\\n 0x4d, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d,\\n 0x31, 0x37, 0x30, 0x32, 0x31, 0x32, 0x31, 0x30,\\n 0x33, 0x37, 0x35, 0x32, 0x5a, 0x18, 0x0f, 0x32,\\n 0x30, 0x35, 0x32, 0x30, 0x32, 0x31, 0x32, 0x31,\\n 0x30, 0x34, 0x37, 0x35, 0x32, 0x5a, 0x30, 0x6f,\\n 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,\\n 0x06, 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30,\\n 0x15, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0e,\\n 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,\\n 0x65, 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12,\\n 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,\\n 0x09, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64,\\n 0x67, 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03,\\n 0x55, 0x04, 0x0a, 0x13, 0x07, 0x41, 0x52, 0x4d,\\n 0x20, 0x4c, 0x74, 0x64, 0x31, 0x21, 0x30, 0x1f,\\n 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x18, 0x41,\\n 0x52, 0x4d, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x67,\\n 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c,\\n 0x57, 0x4d, 0x32, 0x4d, 0x20, 0x43, 0x41, 0x30,\\n 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48,\\n 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86,\\n 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42,\\n 0x00, 0x04, 0xba, 0xea, 0x80, 0x01, 0x2d, 0xf0,\\n 0xe1, 0xb6, 0xc5, 0x5f, 0xf9, 0x76, 0x84, 0x31,\\n 0xa9, 0x29, 0xa1, 0xc7, 0xa8, 0xfd, 0xa0, 0xad,\\n 0xd9, 0x94, 0xe7, 0xec, 0x5a, 0x33, 0xa1, 0x2c,\\n 0x8e, 0x36, 0x43, 0x9b, 0x18, 0xdf, 0xce, 0x71,\\n 0x14, 0x24, 0xb1, 0xfb, 0x16, 0x34, 0x0e, 0x43,\\n 0xfc, 0x23, 0x77, 0xd4, 0x13, 0xd7, 0x11, 0xaa,\\n 0x39, 0x60, 0xab, 0xa2, 0xdf, 0x24, 0xb3, 0xeb,\\n 0xa0, 0xc5, 0xa3, 0x51, 0x30, 0x4f, 0x30, 0x0b,\\n 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03,\\n 0x02, 0x01, 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55,\\n 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,\\n 0x03, 0x01, 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03,\\n 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x7b,\\n 0xa1, 0xa5, 0x94, 0xa5, 0xe5, 0x8f, 0x95, 0x5d,\\n 0xd4, 0xce, 0xdc, 0x0f, 0x8a, 0xbe, 0xad, 0x9a,\\n 0x6b, 0x66, 0x3e, 0x30, 0x10, 0x06, 0x09, 0x2b,\\n 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x15, 0x01,\\n 0x04, 0x03, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,\\n 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,\\n 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,\\n 0x00, 0xd2, 0x06, 0x28, 0xc5, 0x31, 0x3a, 0x11,\\n 0x8d, 0xb6, 0xcb, 0x2b, 0x3f, 0xdd, 0x2a, 0x9a,\\n 0x13, 0x30, 0x52, 0x77, 0xaa, 0xda, 0xda, 0xcb,\\n 0xce, 0xb9, 0x5c, 0xe4, 0x32, 0x1c, 0x02, 0xfa,\\n 0x30, 0x02, 0x21, 0x00, 0xb3, 0x82, 0x24, 0xa2,\\n 0xb1, 0x67, 0x6b, 0x69, 0x07, 0x0e, 0xcd, 0x77,\\n 0x74, 0x99, 0x06, 0x9c, 0x59, 0xb2, 0x00, 0xc0,\\n 0xb3, 0xbb, 0x37, 0x5b, 0xc0, 0x1b, 0xfb, 0xd9,\\n 0x70, 0x98, 0xb9, 0x1e };\\n\\nconst uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] = \\n{ 0x30, 0x81, 0x93, 0x02, 0x01, 0x00, 0x30, 0x13,\\n 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,\\n 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,\\n 0x03, 0x01, 0x07, 0x04, 0x79, 0x30, 0x77, 0x02,\\n 0x01, 0x01, 0x04, 0x20, 0x78, 0xa7, 0x3d, 0xed,\\n 0xa0, 0xb5, 0x67, 0x86, 0xa7, 0x89, 0x75, 0x46,\\n 0x8c, 0xd4, 0xaf, 0xbd, 0x7c, 0x36, 0x86, 0x5e,\\n 0xb3, 0xc0, 0x00, 0x98, 0x22, 0xcf, 0x3c, 0x38,\\n 0xa4, 0x31, 0xeb, 0x51, 0xa0, 0x0a, 0x06, 0x08,\\n 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07,\\n 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x44, 0x9c,\\n 0x2c, 0x36, 0xce, 0x5e, 0xf3, 0x9b, 0xf7, 0x4d,\\n 0xc0, 0x62, 0x52, 0x3d, 0xa3, 0x0f, 0x04, 0xe2,\\n 0x16, 0xcb, 0x48, 0x72, 0x4f, 0xb7, 0x91, 0x36,\\n 0x04, 0xee, 0x10, 0xe1, 0xb1, 0xce, 0xa6, 0xe5,\\n 0x87, 0xd8, 0xe8, 0x7a, 0x3f, 0xe0, 0x83, 0x3e,\\n 0xd7, 0xbd, 0xa4, 0x0b, 0xf7, 0x13, 0xa8, 0x3d,\\n 0xd1, 0x79, 0x3f, 0x65, 0xc6, 0x69, 0x43, 0xec,\\n 0x41, 0x3b, 0xaa, 0x9c, 0x8b, 0xf6 };\\n\\nconst char MBED_CLOUD_DEV_MANUFACTURER[] = \\\"dev_manufacturer\\\";\\n\\nconst char MBED_CLOUD_DEV_MODEL_NUMBER[] = \\\"dev_model_num\\\";\\n\\nconst char MBED_CLOUD_DEV_SERIAL_NUMBER[] = \\\"0\\\";\\n\\nconst char MBED_CLOUD_DEV_DEVICE_TYPE[] = \\\"dev_device_type\\\";\\n\\nconst char MBED_CLOUD_DEV_HARDWARE_VERSION[] = \\\"dev_hardware_version\\\";\\n\\nconst uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0;\\n\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE);\\nconst uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY);\\n\\n#endif //__MBED_CLOUD_DEV_CREDENTIALS_H__\\n", + "_key": "Success" + } + ], + "_key": "200" }, { - "type": "string", - "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "_key": "order" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "Request successful.", + "description": "Bad request.", "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "description": "An offset token for current page.", - "example": "01631667477600000000000100100374", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "items": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "device_execution_mode": { - "enum": [ - 0, - 1, - 5 - ], - "type": "integer", - "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", - "example": 0, - "default": 0 - }, - "groups": { - "description": "An array containing an ID of each group this device belongs to.", - "type": "array", - "items": { - "type": "string", - "example": "00000000000000000000000000000000" - } - }, - "issuer_fingerprint": { - "type": "string", - "pattern": "[A-Fa-f0-9]{64}", - "x-nullable": true, - "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", - "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322" - }, - "operator_suspended": { - "type": "boolean", - "description": "Is the device suspended by the operator?" - }, - "last_operator_suspended_category": { - "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance" - }, - "last_operator_suspended_description": { - "type": "string", - "maxLength": 2000, - "description": "The most recent description why the device was suspended or returned to service.", - "example": "Suspended for maintenance." - }, - "last_operator_suspended_updated_at": { - "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent suspension activity.", - "example": "2017-05-22T12:37:55.576563Z" - }, - "system_suspended": { - "type": "boolean", - "description": "Is the device suspended by the system?" - }, - "last_system_suspended_category": { - "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance" - }, - "last_system_suspended_description": { - "type": "string", - "maxLength": 2000, - "description": "The most recent description of why the device was blocked or unblocked by the system.", - "example": "A certificate in the device's certificate chain was blacklisted by the system." - }, - "last_system_suspended_updated_at": { - "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent system block activity.", - "example": "2017-05-22T12:37:55.576563Z" - }, - "lifecycle_status": { - "type": "string", - "enum": [ - "enabled", - "blocked" - ], - "description": "The lifecycle status of the device.", - "example": "enabled" - }, - "account_id": { - "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000" - }, - "auto_update": { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update." - }, - "bootstrap_expiration_date": { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to bootstrap server." - }, - "bootstrapped_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of the device's most recent bootstrap process." - }, - "ca_id": { - "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000" - }, - "connector_expiration_date": { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to LwM2M server." - }, - "created_at": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of when the device was created in the device directory." - }, - "custom_attributes": { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", - "example": { - "key": "value" - } - }, - "deployed_state": { - "enum": [ - "development", - "production" - ], - "type": "string", - "description": "DEPRECATED: The state of the device's deployment." - }, - "deployment": { - "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "" - }, - "description": { - "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description" - }, - "device_class": { - "type": "string", - "maxLength": 32, - "description": "An ID representing the model and hardware revision of the device.", - "example": "" - }, - "id": { - "type": "string", - "description": "The ID of the device. The device ID is used across all Device Management APIs.", - "example": "00000000000000000000000000000000" - }, - "device_key": { - "type": "string", - "maxLength": 512, - "description": "The fingerprint of the device certificate.", - "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00" - }, - "endpoint_name": { - "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "endpoint_type": { - "type": "string", - "description": "The endpoint type of the device. For example, the device is a gateway.", - "maxLength": 64, - "example": "" - }, - "etag": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The entity instance signature." - }, - "firmware_checksum": { - "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000" - }, - "host_gateway": { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "" - }, - "manifest": { - "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "" - }, - "manifest_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of the current manifest version." - }, - "mechanism": { - "enum": [ - "connector", - "direct" - ], - "type": "string", - "description": "The ID of the channel used to communicate with the device." - }, - "mechanism_url": { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { "type": "string", - "description": "The address of the connector to use.", - "example": "" + "description": "Message describing the error condition.", + "_key": "message" }, - "name": { + { "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000" - }, - "object": { + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Invalid access token.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { "type": "string", - "description": "The API resource entity.", - "example": "device" + "description": "Message describing the error condition.", + "_key": "message" }, - "serial_number": { + { "type": "string", - "description": "The serial number of the device.", - "example": "00000000-0000-0000-0000-000000000000" - }, - "state": { - "enum": [ - "unenrolled", - "cloud_enrolling", - "bootstrapped", - "registered", - "deregistered" - ], + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "401" + }, + { + "description": "Developer certificate not found with given ID.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { "type": "string", - "description": "The current state of the device." + "description": "Message describing the error condition.", + "_key": "message" }, - "updated_at": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The time the object was updated." - }, - "vendor_id": { + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "examples": [ + { + "object": "error", + "code": 404, + "type": "not_found", + "message": "Not Found. Not found: 016006724ff53ade90ed948d03c00001", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "404" + } + ], + "path": "/v3/developer-certificates/{developerCertificateId}", + "summary": "Fetch an existing developer certificate to connect to the bootstrap server.", + "return_type": "developer_certificate", + "return_info": { + "self": true, + "custom": false, + "type": "developer_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "account_id", + "name", + "description", + "developer_private_key", + "security_file_content", + "certificate" + ], + "group_id": "Security", + "parameter_map": { + "developerCertificateId": "id" + }, + "operation_id": "getDeveloperCertificate", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "description": "Account to which the developer certificate belongs.", + "api_fieldname": "account_id", + "readOnly": true, + "required": false, + "_key": "account_id" + }, + { + "type": "string", + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "readOnly": true, + "required": false, + "_key": "certificate" + }, + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "string", + "description": "Description for the developer certificate.", + "x-nullable": true, + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "type": "string", + "description": "PEM-format developer private key associated with the certificate.", + "api_fieldname": "developer_private_key", + "readOnly": true, + "required": false, + "_key": "developer_private_key" + }, + { + "type": "string", + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "type": "string", + "description": "Name of the developer certificate.", + "api_fieldname": "name", + "readOnly": false, + "required": true, + "_key": "name" + }, + { + "type": "string", + "description": "Content of the `security.c` file flashed to the device to provide security credentials.", + "api_fieldname": "security_file_content", + "readOnly": true, + "required": false, + "_key": "security_file_content" + } + ], + "field_renames": [ + { + "api_fieldname": "developer_certificate", + "_key": "certificate" + } + ], + "tags": [ + "Security and identity - developer class certificates", + "Security and identity - certificates" + ], + "group_id": "Security", + "_key": "developer_certificate" + }, + { + "swagger_models": [ + "CertificateEnrollment", + "DeviceData", + "DeviceDataPostRequest", + "DeviceDataPutRequest", + "DeviceGroupManipulation", + "DevicePage" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Add one device to a group. A device can be in multiple groups.", + "field_renames": [], + "fields": [ + { + "in": "path", + "description": "The ID of the group.", + "name": "device-group-id", + "required": true, + "type": "string", + "entity_fieldname": "device-group-id", + "api_fieldname": "device-group-id", + "external_param": true, + "parameter_fieldname": "device-group-id", + "_key": "device-group-id" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "name": "device_id", + "in": "body", + "schema_param": true, + "entity_fieldname": "id", + "api_fieldname": "device_id", + "external_param": false, + "parameter_fieldname": "device_id", + "required": true, + "_key": "id" + } + ], + "method": "post", + "mode": "add_to_group", + "responses": [ + { + "description": "Success - device added.", + "_key": "204" + }, + { + "description": "Bad request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { "type": "string", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000" + "description": "Message describing the error condition.", + "_key": "message" }, - "enrolment_list_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "description": "The claim date/time." - }, - "_key": "properties" - } - ], - "type": "array", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "description": "Are there more results available.", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { - "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "The type of this API object is a \"list\".", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "format": "integer", - "type": "integer", - "example": 1, - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device" - } + ] }, - "_key": "200" - }, - { - "description": "Bad request.", "_key": "400" }, { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to find page.", - "_key": "404" - } - ], - "path": "/v3/devices/", - "summary": "List all devices.", - "return_type": "paginated_response(device)", - "return_info": { - "self": true, - "custom": false, - "type": "device" - }, - "x_filter": { - "lifecycle_status": [ - "eq", - "neq", - "in", - "nin" - ], - "operator_suspended": [ - "eq", - "neq" - ], - "last_operator_suspended_category": [ - "eq", - "neq", - "in", - "nin" - ], - "last_operator_suspended_updated_at": [ - "in", - "nin", - "lte", - "gte" - ], - "system_suspended": [ - "eq", - "neq" - ], - "last_system_suspended_category": [ - "eq", - "neq", - "in", - "nin" - ], - "last_system_suspended_updated_at": [ - "in", - "nin", - "lte", - "gte" - ], - "account_id": [ - "eq", - "neq", - "in", - "nin" - ], - "auto_update": [ - "eq", - "neq" - ], - "bootstrap_expiration_date": [ - "in", - "nin", - "lte", - "gte" - ], - "bootstrapped_timestamp": [ - "in", - "nin", - "lte", - "gte" - ], - "ca_id": [ - "eq", - "neq", - "in", - "nin" - ], - "connector_expiration_date": [ - "in", - "nin", - "lte", - "gte" - ], - "created_at": [ - "in", - "nin", - "lte", - "gte" - ], - "deployed_state": [ - "eq", - "neq", - "in", - "nin" - ], - "deployment": [ - "eq", - "neq", - "in", - "nin" - ], - "description": [ - "eq", - "neq", - "in", - "nin" - ], - "device_class": [ - "eq", - "neq", - "in", - "nin" - ], - "device_execution_mode": [ - "eq", - "neq", - "in", - "nin" - ], - "device_key": [ - "eq", - "neq", - "in", - "nin" - ], - "endpoint_name": [ - "eq", - "neq", - "in", - "nin" - ], - "endpoint_type": [ - "eq", - "neq", - "in", - "nin" - ], - "enrolment_list_timestamp": [ - "in", - "nin", - "lte", - "gte" - ], - "firmware_checksum": [ - "eq", - "neq", - "in", - "nin" - ], - "host_gateway": [ - "eq", - "neq", - "in", - "nin" - ], - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "manifest": [ - "eq", - "neq", - "in", - "nin" - ], - "manifest_timestamp": [ - "in", - "nin", - "lte", - "gte" - ], - "mechanism": [ - "eq", - "neq", - "in", - "nin" - ], - "mechanism_url": [ - "eq", - "neq", - "in", - "nin" - ], - "name": [ - "eq", - "neq", - "in", - "nin" - ], - "serial_number": [ - "eq", - "neq", - "in", - "nin" - ], - "state": [ - "eq", - "neq", - "in", - "nin" - ], - "updated_at": [ - "in", - "nin", - "lte", - "gte" - ], - "vendor_id": [ - "eq", - "neq", - "in", - "nin" - ] + "description": "Unauthorized.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/device-groups/{device-group-id}/devices/add/", + "summary": "Add a device to a group.", + "return_type": "void", + "return_info": { + "self": false, + "custom": true, + "type": "void" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "filter", - "data", - "has_more", - "total_count", - "lifecycle_status__eq", - "lifecycle_status__neq", - "lifecycle_status__in", - "lifecycle_status__nin", - "operator_suspended__eq", - "operator_suspended__neq", - "last_operator_suspended_category__eq", - "last_operator_suspended_category__neq", - "last_operator_suspended_category__in", - "last_operator_suspended_category__nin", - "last_operator_suspended_updated_at__in", - "last_operator_suspended_updated_at__nin", - "last_operator_suspended_updated_at__lte", - "last_operator_suspended_updated_at__gte", - "system_suspended__eq", - "system_suspended__neq", - "last_system_suspended_category__eq", - "last_system_suspended_category__neq", - "last_system_suspended_category__in", - "last_system_suspended_category__nin", - "last_system_suspended_updated_at__in", - "last_system_suspended_updated_at__nin", - "last_system_suspended_updated_at__lte", - "last_system_suspended_updated_at__gte", - "account_id__eq", - "account_id__neq", - "account_id__in", - "account_id__nin", - "auto_update__eq", - "auto_update__neq", - "bootstrap_expiration_date__in", - "bootstrap_expiration_date__nin", - "bootstrap_expiration_date__lte", - "bootstrap_expiration_date__gte", - "bootstrapped_timestamp__in", - "bootstrapped_timestamp__nin", - "bootstrapped_timestamp__lte", - "bootstrapped_timestamp__gte", - "ca_id__eq", - "ca_id__neq", - "ca_id__in", - "ca_id__nin", - "connector_expiration_date__in", - "connector_expiration_date__nin", - "connector_expiration_date__lte", - "connector_expiration_date__gte", - "created_at__in", - "created_at__nin", - "created_at__lte", - "created_at__gte", - "deployed_state__eq", - "deployed_state__neq", - "deployed_state__in", - "deployed_state__nin", - "deployment__eq", - "deployment__neq", - "deployment__in", - "deployment__nin", - "description__eq", - "description__neq", - "description__in", - "description__nin", - "device_class__eq", - "device_class__neq", - "device_class__in", - "device_class__nin", - "device_execution_mode__eq", - "device_execution_mode__neq", - "device_execution_mode__in", - "device_execution_mode__nin", - "device_key__eq", - "device_key__neq", - "device_key__in", - "device_key__nin", - "endpoint_name__eq", - "endpoint_name__neq", - "endpoint_name__in", - "endpoint_name__nin", - "endpoint_type__eq", - "endpoint_type__neq", - "endpoint_type__in", - "endpoint_type__nin", - "enrolment_list_timestamp__in", - "enrolment_list_timestamp__nin", - "enrolment_list_timestamp__lte", - "enrolment_list_timestamp__gte", - "firmware_checksum__eq", - "firmware_checksum__neq", - "firmware_checksum__in", - "firmware_checksum__nin", - "host_gateway__eq", - "host_gateway__neq", - "host_gateway__in", - "host_gateway__nin", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "manifest__eq", - "manifest__neq", - "manifest__in", - "manifest__nin", - "manifest_timestamp__in", - "manifest_timestamp__nin", - "manifest_timestamp__lte", - "manifest_timestamp__gte", - "mechanism__eq", - "mechanism__neq", - "mechanism__in", - "mechanism__nin", - "mechanism_url__eq", - "mechanism_url__neq", - "mechanism_url__in", - "mechanism_url__nin", - "name__eq", - "name__neq", - "name__in", - "name__nin", - "serial_number__eq", - "serial_number__neq", - "serial_number__in", - "serial_number__nin", - "state__eq", - "state__neq", - "state__in", - "state__nin", - "updated_at__in", - "updated_at__nin", - "updated_at__lte", - "updated_at__gte", - "vendor_id__eq", - "vendor_id__neq", - "vendor_id__in", - "vendor_id__nin" + "filter" ], - "foreign_key_priority": "self", "group_id": "Devices", - "operation_id": "Device_list", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device" + "operation_id": "Group_members_add", + "parameter_map": { + "device_id": "id" + }, + "spec": { + "return_type": "void" }, + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "add_to_group" }, { - "description": "Retrieve information about a specific device.\n\n**Example:**\nFollowing example must be updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\"\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/ \\\n-H 'Authorization: Bearer '\n```", + "description": "Create a new device in Device Management. Usually you do not need to create a device this way, as it is automatically created when it bootstraps or connects to Device Management.", "field_renames": [], "fields": [ + { + "type": "boolean", + "description": "DEPRECATED: Mark this device for automatic firmware update.", + "api_fieldname": "auto_update", + "entity_fieldname": "auto_update", + "parameter_fieldname": "auto_update", + "in": "body", + "required": false, + "_key": "auto_update" + }, + { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to bootstrap server.", + "api_fieldname": "bootstrap_expiration_date", + "entity_fieldname": "bootstrap_expiration_date", + "parameter_fieldname": "bootstrap_expiration_date", + "in": "body", + "required": false, + "_key": "bootstrap_expiration_date" + }, + { + "type": "string", + "maxLength": 500, + "description": "The certificate issuer's ID.", + "example": "00000000000000000000000000000000", + "api_fieldname": "ca_id", + "entity_fieldname": "ca_id", + "parameter_fieldname": "ca_id", + "in": "body", + "required": false, + "_key": "ca_id" + }, + { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to LwM2M server.", + "api_fieldname": "connector_expiration_date", + "entity_fieldname": "connector_expiration_date", + "parameter_fieldname": "connector_expiration_date", + "in": "body", + "required": false, + "_key": "connector_expiration_date" + }, + { + "type": "object", + "maxProperties": 5, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "parameter_fieldname": "custom_attributes", + "in": "body", + "required": false, + "_key": "custom_attributes" + }, + { + "type": "string", + "description": "DEPRECATED: The last deployment used on the device.", + "example": "", + "api_fieldname": "deployment", + "entity_fieldname": "deployment", + "parameter_fieldname": "deployment", + "in": "body", + "required": false, + "_key": "deployment" + }, + { + "type": "string", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "type": "string", + "maxLength": 32, + "description": "An ID representing the model and hardware revision of the device.", + "example": "", + "api_fieldname": "device_class", + "entity_fieldname": "device_class", + "parameter_fieldname": "device_class", + "in": "body", + "required": false, + "_key": "device_class" + }, + { + "enum": [ + 0, + 1, + 5 + ], + "type": "integer", + "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", + "example": 0, + "default": 0, + "api_fieldname": "device_execution_mode", + "entity_fieldname": "device_execution_mode", + "parameter_fieldname": "device_execution_mode", + "in": "body", + "required": false, + "_key": "device_execution_mode" + }, + { + "type": "string", + "maxLength": 512, + "description": "The fingerprint of the device certificate.", + "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "api_fieldname": "device_key", + "entity_fieldname": "device_key", + "parameter_fieldname": "device_key", + "in": "body", + "required": false, + "_key": "device_key" + }, + { + "type": "string", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", + "example": "00000000-0000-0000-0000-000000000000", + "readOnly": true, + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "parameter_fieldname": "endpoint_name", + "in": "body", + "required": false, + "_key": "endpoint_name" + }, + { + "type": "string", + "description": "The endpoint type of the device. For example, the device is a gateway.", + "maxLength": 64, + "example": "", + "api_fieldname": "endpoint_type", + "entity_fieldname": "endpoint_type", + "parameter_fieldname": "endpoint_type", + "in": "body", + "required": false, + "_key": "endpoint_type" + }, + { + "type": "string", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", + "example": "", + "api_fieldname": "host_gateway", + "entity_fieldname": "host_gateway", + "parameter_fieldname": "host_gateway", + "in": "body", + "required": false, + "_key": "host_gateway" + }, + { + "type": "string", + "pattern": "[A-Fa-f0-9]{64}", + "x-nullable": true, + "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", + "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", + "api_fieldname": "issuer_fingerprint", + "entity_fieldname": "issuer_fingerprint", + "parameter_fieldname": "issuer_fingerprint", + "in": "body", + "required": false, + "_key": "issuer_fingerprint" + }, + { + "type": "string", + "description": "DEPRECATED: The URL for the current device manifest.", + "example": "", + "api_fieldname": "manifest", + "entity_fieldname": "manifest", + "parameter_fieldname": "manifest", + "in": "body", + "required": false, + "_key": "manifest" + }, + { + "enum": [ + "connector", + "direct" + ], + "type": "string", + "description": "NOT USED: The ID of the channel used to communicate with the device.", + "api_fieldname": "mechanism", + "entity_fieldname": "mechanism", + "parameter_fieldname": "mechanism", + "in": "body", + "required": false, + "enum_reference": "device_mechanism_enum", + "_key": "mechanism" + }, + { + "type": "string", + "description": "NOT USED: The address of the connector to use.", + "example": "", + "api_fieldname": "mechanism_url", + "entity_fieldname": "mechanism_url", + "parameter_fieldname": "mechanism_url", + "in": "body", + "required": false, + "_key": "mechanism_url" + }, + { + "type": "string", + "maxLength": 128, + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, { "type": "string", - "description": "The ID of the device. The device ID is used across all Device Management APIs.", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, - "_key": "id" + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "serial_number", + "entity_fieldname": "serial_number", + "parameter_fieldname": "serial_number", + "in": "body", + "required": false, + "_key": "serial_number" + }, + { + "enum": [ + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" + ], + "type": "string", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired.", + "api_fieldname": "state", + "entity_fieldname": "state", + "parameter_fieldname": "state", + "in": "body", + "required": false, + "enum_reference": "device_state_enum", + "_key": "state" + }, + { + "type": "string", + "description": "The device vendor ID.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "vendor_id", + "entity_fieldname": "vendor_id", + "parameter_fieldname": "vendor_id", + "in": "body", + "required": false, + "_key": "vendor_id" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Retrieved result successfully.", + "description": "Device created.", "schema": [ { "group": "Devices", @@ -33039,7 +32914,7 @@ }, "operator_suspended": { "type": "boolean", - "description": "Is the device suspended by the operator?", + "description": "Device has been suspended by operator.", "api_fieldname": "operator_suspended", "entity_fieldname": "operator_suspended" }, @@ -33103,7 +32978,7 @@ "enabled", "blocked" ], - "description": "The lifecycle status of the device.", + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", "example": "enabled", "api_fieldname": "lifecycle_status", "entity_fieldname": "lifecycle_status" @@ -33145,6 +33020,20 @@ "api_fieldname": "ca_id", "entity_fieldname": "ca_id" }, + "component_attributes": { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "component_attributes", + "entity_fieldname": "component_attributes" + }, "connector_expiration_date": { "format": "date", "type": "string", @@ -33197,7 +33086,7 @@ "type": "string", "maxLength": 2000, "description": "The description of the device.", - "example": "description", + "example": "Temperature measuring device", "api_fieldname": "description", "entity_fieldname": "description" }, @@ -33226,7 +33115,7 @@ }, "endpoint_name": { "type": "string", - "description": "The endpoint name given to the device.", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", "example": "00000000-0000-0000-0000-000000000000", "readOnly": true, "api_fieldname": "endpoint_name", @@ -33257,7 +33146,7 @@ }, "host_gateway": { "type": "string", - "description": "The ID of the host gateway, if appropriate.", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", "example": "", "api_fieldname": "host_gateway", "entity_fieldname": "host_gateway" @@ -33283,13 +33172,13 @@ "direct" ], "type": "string", - "description": "The ID of the channel used to communicate with the device.", + "description": "NOT USED: The ID of the channel used to communicate with the device.", "api_fieldname": "mechanism", "entity_fieldname": "mechanism" }, "mechanism_url": { "type": "string", - "description": "The address of the connector to use.", + "description": "NOT USED: The address of the connector to use.", "example": "", "api_fieldname": "mechanism_url", "entity_fieldname": "mechanism_url" @@ -33297,11 +33186,20 @@ "name": { "type": "string", "maxLength": 128, - "description": "The name of the device.", + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", "example": "00000000-0000-0000-0000-000000000000", "api_fieldname": "name", "entity_fieldname": "name" }, + "net_id": { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000", + "api_fieldname": "net_id", + "entity_fieldname": "net_id" + }, "object": { "type": "string", "description": "The API resource entity.", @@ -33311,7 +33209,7 @@ }, "serial_number": { "type": "string", - "description": "The serial number of the device.", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", "example": "00000000-0000-0000-0000-000000000000", "api_fieldname": "serial_number", "entity_fieldname": "serial_number" @@ -33325,7 +33223,7 @@ "deregistered" ], "type": "string", - "description": "The current state of the device.", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired.", "api_fieldname": "state", "entity_fieldname": "state" }, @@ -33333,7 +33231,7 @@ "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The time the object was updated.", + "description": "The time this data object was updated.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at" }, @@ -33355,10 +33253,10 @@ "_key": "properties" } ], - "_key": "200" + "_key": "201" }, { - "description": "Bad request.", + "description": "Validation error: The data used to create the device did not validate.", "_key": "400" }, { @@ -33366,12 +33264,16 @@ "_key": "401" }, { - "description": "Unable to find device.", - "_key": "404" + "description": "Account limit reached. Could not create device.", + "_key": "403" + }, + { + "description": "Unique-constrained fields are used by other resources.", + "_key": "409" } ], - "path": "/v3/devices/{id}/", - "summary": "Get a device.", + "path": "/v3/devices/", + "summary": "Create a device.", "return_type": "device", "return_info": { "self": true, @@ -33385,9 +33287,7 @@ "etag", "type", "filter", - "device_execution_mode", "groups", - "issuer_fingerprint", "operator_suspended", "last_operator_suspended_category", "last_operator_suspended_description", @@ -33398,304 +33298,68 @@ "last_system_suspended_updated_at", "lifecycle_status", "account_id", - "auto_update", - "bootstrap_expiration_date", "bootstrapped_timestamp", - "ca_id", - "connector_expiration_date", + "component_attributes", "created_at", - "custom_attributes", "deployed_state", - "deployment", - "description", - "device_class", - "device_key", - "endpoint_name", - "endpoint_type", + "id", "firmware_checksum", - "host_gateway", - "manifest", "manifest_timestamp", - "mechanism", - "mechanism_url", - "name", - "serial_number", - "state", + "net_id", "updated_at", - "vendor_id", "enrolment_list_timestamp" ], "group_id": "Devices", - "operation_id": "Device_retrieve", + "operation_id": "Device_create", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "create" }, { - "description": "Remove one device from a group.", + "description": "Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a production certificate returns a 400 response.", "field_renames": [], "fields": [ { + "description": "The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management.", "in": "path", - "description": "The ID of the group.", - "name": "device-group-id", + "name": "id", "required": true, "type": "string", - "entity_fieldname": "device-group-id", - "api_fieldname": "device-group-id", - "external_param": true, - "parameter_fieldname": "device-group-id", - "_key": "device-group-id" - }, - { - "type": "string", - "example": "00000000000000000000000000000000", - "name": "device_id", - "in": "body", - "schema_param": true, "entity_fieldname": "id", - "api_fieldname": "device_id", + "api_fieldname": "id", "external_param": false, - "parameter_fieldname": "device_id", - "required": true, + "parameter_fieldname": "id", "_key": "id" } ], - "method": "post", - "mode": "remove_from_group", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Success - device removed.", + "description": "Device deleted.", "_key": "204" }, { "description": "Bad request.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, "_key": "400" }, { - "description": "Unauthorized.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, + "description": "Not authenticated.", "_key": "401" }, { - "description": "Not found.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" - }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, + "description": "Unable to delete device because it can't be found.", "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/devices/remove/", - "summary": "Remove a device from a group.", - "return_type": "void", + "path": "/v3/devices/{id}/", + "summary": "Delete a device.", + "return_type": "device", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "device" }, "x_filter": {}, "x_deprecation": null, @@ -33706,684 +33370,831 @@ "filter" ], "group_id": "Devices", - "operation_id": "Group_members_remove", - "parameter_map": { - "device_id": "id" - }, - "spec": { - "return_type": "void" - }, + "operation_id": "Device_destroy", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "remove_from_group" + "_key": "delete" }, { - "description": "Request a certificate renewal.\n\n**Example:**\n\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \\\n-H 'Authorization: Bearer ' \\\n-H 'content-length: 0'\n```", + "description": "List all devices enrolled to Device Management for the account.\nThe URL length must be fewer than 4096 characters. Requests that exceed this limit, such as those including too many query parameters in a filter, fail with a bad request response.\ndevices with too long list of query parameters, the request is deemed as bad request.\n\n**Example:**\nFollowing example filters devices according to state field and returns only devices in 'registered' state:\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate-name", - "entity_fieldname": "certificate_name", - "in": "path", - "name": "certificate-name", - "required": true, - "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "description": "The ID of the item after which to retrieve the next page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "in": "query", + "name": "after", "external_param": true, - "parameter_fieldname": "certificate-name", - "_key": "certificate_name" - }, - { - "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device-id", - "in": "path", - "required": true, - "_key": "id" - } - ], - "method": "post", - "mode": "renew_certificate", - "responses": [ - { - "description": "Created.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate_name", - "entity_fieldname": "certificate_name", - "_key": "certificate_name" - }, - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "string", - "description": "The device ID.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" - }, - { - "type": "string", - "enum": [ - "success", - "failure" - ], - "description": "The result of certificate enrollment request.", - "example": "success", - "api_fieldname": "enroll_result", - "entity_fieldname": "enroll_result", - "_key": "enroll_result" - }, - { - "type": "string", - "description": "Additional information in case of failure.", - "example": "The device is currently processing too many certificate renewals.", - "api_fieldname": "enroll_result_detail", - "entity_fieldname": "enroll_result_detail", - "_key": "enroll_result_detail" - }, - { - "type": "string", - "description": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", - "entity_fieldname": "enroll_status", - "_key": "enroll_status" - }, - { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "enum": [ - "certificate-enrollment" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "description": "Update UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "required": [ - "created_at", - "etag", - "id", - "device_id", - "certificate_name" - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_enrollment" - } - }, - "_key": "201" + "parameter_fieldname": "after", + "required": false, + "_key": "after" }, { - "description": "Validation error: There is no certificate issuer configured for this certificate.", + "description": "Comma-separated list of data fields to return. Currently supported: `total_count`.", + "in": "query", + "name": "include", + "type": "string", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "required": false, + "_key": "include" + }, + { + "type": "integer", + "description": "How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "in": "query", + "name": "limit", + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "_key": "order" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "Request successful.", "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" + "type": "string", + "description": "An offset token for current page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "items": [ + { + "group": "Devices", + "entity": "device", + "_key": "foreign_key" + }, + { + "device_execution_mode": { + "enum": [ + 0, + 1, + 5 + ], + "type": "integer", + "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", + "example": 0, + "default": 0 + }, + "groups": { + "description": "An array containing an ID of each group this device belongs to.", + "type": "array", + "items": { + "type": "string", + "example": "00000000000000000000000000000000" + } + }, + "issuer_fingerprint": { "type": "string", - "description": "Field name.", - "_key": "field" + "pattern": "[A-Fa-f0-9]{64}", + "x-nullable": true, + "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", + "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322" }, - { + "operator_suspended": { + "type": "boolean", + "description": "Device has been suspended by operator." + }, + "last_operator_suspended_category": { "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "description": "You are not authorized to perform the action.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance" + }, + "last_operator_suspended_description": { "type": "string", - "description": "Field name.", - "_key": "field" + "maxLength": 2000, + "description": "The most recent description why the device was suspended or returned to service.", + "example": "Suspended for maintenance." }, - { + "last_operator_suspended_updated_at": { "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "401" - }, - { - "description": "Forbidden.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "format": "date-time", + "description": "The timestamp of the most recent suspension activity.", + "example": "2017-05-22T12:37:55.576563Z" + }, + "system_suspended": { + "type": "boolean", + "description": "Is the device suspended by the system?" + }, + "last_system_suspended_category": { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance" }, - { + "last_system_suspended_description": { "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "The device ID or certificate name is not found.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "maxLength": 2000, + "description": "The most recent description of why the device was blocked or unblocked by the system.", + "example": "A certificate in the device's certificate chain was blacklisted by the system." + }, + "last_system_suspended_updated_at": { "type": "string", - "description": "Field name.", - "_key": "field" + "format": "date-time", + "description": "The timestamp of the most recent system block activity.", + "example": "2017-05-22T12:37:55.576563Z" }, - { + "lifecycle_status": { "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "404" - }, - { - "description": "Conflict. A renewal request for this certificate is in progress.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "enum": [ + "enabled", + "blocked" + ], + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", + "example": "enabled" + }, + "account_id": { + "type": "string", + "description": "The ID of the associated account.", + "example": "00000000000000000000000000000000" + }, + "auto_update": { + "type": "boolean", + "description": "DEPRECATED: Mark this device for automatic firmware update." + }, + "bootstrap_expiration_date": { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to bootstrap server." + }, + "bootstrapped_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of the device's most recent bootstrap process." + }, + "ca_id": { + "type": "string", + "maxLength": 500, + "description": "The certificate issuer's ID.", + "example": "00000000000000000000000000000000" + }, + "component_attributes": { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + } + }, + "connector_expiration_date": { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to LwM2M server." + }, + "created_at": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of when the device was created in the device directory." + }, + "custom_attributes": { + "type": "object", + "maxProperties": 5, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + } + }, + "deployed_state": { + "enum": [ + "development", + "production" + ], + "type": "string", + "description": "DEPRECATED: The state of the device's deployment." + }, + "deployment": { + "type": "string", + "description": "DEPRECATED: The last deployment used on the device.", + "example": "" + }, + "description": { + "type": "string", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device" + }, + "device_class": { + "type": "string", + "maxLength": 32, + "description": "An ID representing the model and hardware revision of the device.", + "example": "" + }, + "id": { + "type": "string", + "description": "The ID of the device. The device ID is used across all Device Management APIs.", + "example": "00000000000000000000000000000000" + }, + "device_key": { + "type": "string", + "maxLength": 512, + "description": "The fingerprint of the device certificate.", + "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00" + }, + "endpoint_name": { + "type": "string", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", + "example": "00000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "endpoint_type": { + "type": "string", + "description": "The endpoint type of the device. For example, the device is a gateway.", + "maxLength": 64, + "example": "" + }, + "etag": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The entity instance signature." + }, + "firmware_checksum": { + "type": "string", + "description": "The SHA256 checksum of the current firmware image.", + "example": "0000000000000000000000000000000000000000000000000000000000000000" + }, + "host_gateway": { + "type": "string", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", + "example": "" + }, + "manifest": { + "type": "string", + "description": "DEPRECATED: The URL for the current device manifest.", + "example": "" + }, + "manifest_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Field name.", - "_key": "field" + "description": "The timestamp of the current manifest version." }, - { + "mechanism": { + "enum": [ + "connector", + "direct" + ], "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" - }, - { - "type": "string", - "description": "Entity name: `error`.", - "_key": "object" - }, - { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "409" - }, - { - "description": "Either:\n- Operation not supported for this device.\n- The device is not connected.", - "schema": { - "type": "object", - "required": [ - "code", - "fields", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" - }, - { - "type": "array", - "description": "A list of request fields that failed validation.", - "items": { - "type": "object", - "properties": [ - { + "description": "NOT USED: The ID of the channel used to communicate with the device." + }, + "mechanism_url": { "type": "string", - "description": "Field name.", - "_key": "field" + "description": "NOT USED: The address of the connector to use.", + "example": "" }, - { + "name": { "type": "string", - "description": "Error message related to the field.", - "_key": "message" - } - ] - }, - "_key": "fields" + "maxLength": 128, + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", + "example": "00000000-0000-0000-0000-000000000000" + }, + "net_id": { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000" + }, + "object": { + "type": "string", + "description": "The API resource entity.", + "example": "device" + }, + "serial_number": { + "type": "string", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", + "example": "00000000-0000-0000-0000-000000000000" + }, + "state": { + "enum": [ + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" + ], + "type": "string", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired." + }, + "updated_at": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The time this data object was updated." + }, + "vendor_id": { + "type": "string", + "description": "The device vendor ID.", + "example": "00000000-0000-0000-0000-000000000000" + }, + "enrolment_list_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The claim date/time." + }, + "_key": "properties" + } + ], + "type": "array", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "Error message.", - "_key": "message" + "type": "boolean", + "description": "Are there more results available.", + "example": false, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "The type of this API object is a \"list\".", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type.", - "_key": "type" + "format": "integer", + "type": "integer", + "example": 1, + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device" + } }, - "_key": "423" + "_key": "200" + }, + { + "description": "Bad request.", + "_key": "400" + }, + { + "description": "Not authenticated.", + "_key": "401" + }, + { + "description": "Unable to find page.", + "_key": "404" } ], - "path": "/v3/devices/{device-id}/certificates/{certificate-name}/renew", - "summary": "Request certificate renewal.", - "return_type": "certificate_enrollment", + "path": "/v3/devices/", + "summary": "List all devices.", + "return_type": "paginated_response(device)", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "certificate_enrollment" + "type": "device" + }, + "x_filter": { + "lifecycle_status": [ + "eq", + "neq", + "in", + "nin" + ], + "operator_suspended": [ + "eq", + "neq" + ], + "last_operator_suspended_category": [ + "eq", + "neq", + "in", + "nin" + ], + "last_operator_suspended_updated_at": [ + "in", + "nin", + "lte", + "gte" + ], + "system_suspended": [ + "eq", + "neq" + ], + "last_system_suspended_category": [ + "eq", + "neq", + "in", + "nin" + ], + "last_system_suspended_updated_at": [ + "in", + "nin", + "lte", + "gte" + ], + "account_id": [ + "eq", + "neq", + "in", + "nin" + ], + "auto_update": [ + "eq", + "neq" + ], + "bootstrap_expiration_date": [ + "in", + "nin", + "lte", + "gte" + ], + "bootstrapped_timestamp": [ + "in", + "nin", + "lte", + "gte" + ], + "ca_id": [ + "eq", + "neq", + "in", + "nin" + ], + "connector_expiration_date": [ + "in", + "nin", + "lte", + "gte" + ], + "created_at": [ + "in", + "nin", + "lte", + "gte" + ], + "deployed_state": [ + "eq", + "neq", + "in", + "nin" + ], + "deployment": [ + "eq", + "neq", + "in", + "nin" + ], + "description": [ + "eq", + "neq", + "in", + "nin" + ], + "device_class": [ + "eq", + "neq", + "in", + "nin" + ], + "device_execution_mode": [ + "eq", + "neq", + "in", + "nin" + ], + "device_key": [ + "eq", + "neq", + "in", + "nin" + ], + "endpoint_name": [ + "eq", + "neq", + "in", + "nin" + ], + "endpoint_type": [ + "eq", + "neq", + "in", + "nin" + ], + "enrolment_list_timestamp": [ + "in", + "nin", + "lte", + "gte" + ], + "firmware_checksum": [ + "eq", + "neq", + "in", + "nin" + ], + "host_gateway": [ + "eq", + "neq", + "in", + "nin" + ], + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "manifest": [ + "eq", + "neq", + "in", + "nin" + ], + "manifest_timestamp": [ + "in", + "nin", + "lte", + "gte" + ], + "mechanism": [ + "eq", + "neq", + "in", + "nin" + ], + "mechanism_url": [ + "eq", + "neq", + "in", + "nin" + ], + "name": [ + "eq", + "neq", + "in", + "nin" + ], + "net_id": [ + "eq", + "neq", + "in", + "nin" + ], + "serial_number": [ + "eq", + "neq", + "in", + "nin" + ], + "state": [ + "eq", + "neq", + "in", + "nin" + ], + "updated_at": [ + "in", + "nin", + "lte", + "gte" + ], + "vendor_id": [ + "eq", + "neq", + "in", + "nin" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", "filter", - "created_at", - "device_id", - "enroll_status", - "enroll_result", - "enroll_result_detail", - "updated_at" + "data", + "has_more", + "total_count", + "lifecycle_status__eq", + "lifecycle_status__neq", + "lifecycle_status__in", + "lifecycle_status__nin", + "operator_suspended__eq", + "operator_suspended__neq", + "last_operator_suspended_category__eq", + "last_operator_suspended_category__neq", + "last_operator_suspended_category__in", + "last_operator_suspended_category__nin", + "last_operator_suspended_updated_at__in", + "last_operator_suspended_updated_at__nin", + "last_operator_suspended_updated_at__lte", + "last_operator_suspended_updated_at__gte", + "system_suspended__eq", + "system_suspended__neq", + "last_system_suspended_category__eq", + "last_system_suspended_category__neq", + "last_system_suspended_category__in", + "last_system_suspended_category__nin", + "last_system_suspended_updated_at__in", + "last_system_suspended_updated_at__nin", + "last_system_suspended_updated_at__lte", + "last_system_suspended_updated_at__gte", + "account_id__eq", + "account_id__neq", + "account_id__in", + "account_id__nin", + "auto_update__eq", + "auto_update__neq", + "bootstrap_expiration_date__in", + "bootstrap_expiration_date__nin", + "bootstrap_expiration_date__lte", + "bootstrap_expiration_date__gte", + "bootstrapped_timestamp__in", + "bootstrapped_timestamp__nin", + "bootstrapped_timestamp__lte", + "bootstrapped_timestamp__gte", + "ca_id__eq", + "ca_id__neq", + "ca_id__in", + "ca_id__nin", + "connector_expiration_date__in", + "connector_expiration_date__nin", + "connector_expiration_date__lte", + "connector_expiration_date__gte", + "created_at__in", + "created_at__nin", + "created_at__lte", + "created_at__gte", + "deployed_state__eq", + "deployed_state__neq", + "deployed_state__in", + "deployed_state__nin", + "deployment__eq", + "deployment__neq", + "deployment__in", + "deployment__nin", + "description__eq", + "description__neq", + "description__in", + "description__nin", + "device_class__eq", + "device_class__neq", + "device_class__in", + "device_class__nin", + "device_execution_mode__eq", + "device_execution_mode__neq", + "device_execution_mode__in", + "device_execution_mode__nin", + "device_key__eq", + "device_key__neq", + "device_key__in", + "device_key__nin", + "endpoint_name__eq", + "endpoint_name__neq", + "endpoint_name__in", + "endpoint_name__nin", + "endpoint_type__eq", + "endpoint_type__neq", + "endpoint_type__in", + "endpoint_type__nin", + "enrolment_list_timestamp__in", + "enrolment_list_timestamp__nin", + "enrolment_list_timestamp__lte", + "enrolment_list_timestamp__gte", + "firmware_checksum__eq", + "firmware_checksum__neq", + "firmware_checksum__in", + "firmware_checksum__nin", + "host_gateway__eq", + "host_gateway__neq", + "host_gateway__in", + "host_gateway__nin", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "manifest__eq", + "manifest__neq", + "manifest__in", + "manifest__nin", + "manifest_timestamp__in", + "manifest_timestamp__nin", + "manifest_timestamp__lte", + "manifest_timestamp__gte", + "mechanism__eq", + "mechanism__neq", + "mechanism__in", + "mechanism__nin", + "mechanism_url__eq", + "mechanism_url__neq", + "mechanism_url__in", + "mechanism_url__nin", + "name__eq", + "name__neq", + "name__in", + "name__nin", + "net_id__eq", + "net_id__neq", + "net_id__in", + "net_id__nin", + "serial_number__eq", + "serial_number__neq", + "serial_number__in", + "serial_number__nin", + "state__eq", + "state__neq", + "state__in", + "state__nin", + "updated_at__in", + "updated_at__nin", + "updated_at__lte", + "updated_at__gte", + "vendor_id__eq", + "vendor_id__neq", + "vendor_id__in", + "vendor_id__nin" ], + "foreign_key_priority": "self", "group_id": "Devices", - "operation_id": "RequestCertificateRenewal", - "unaggregated": true, - "parameter_map": { - "device-id": "id", - "certificate-name": "certificate_name" - }, + "operation_id": "Device_list", + "pagination": true, "foreign_key": { - "entity": "certificate_enrollment", - "group": "Security" + "group": "Devices", + "entity": "device" }, - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "renew_certificate" + "_key": "list" }, { - "description": "Update a specific device.\n\n**Example:**\nFollowing example will update the specific devices description field to contain \"Testing description field\".\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/devices/ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"description\": \"Testing description field\"}'\n```", + "description": "Retrieve information about a specific device. This API returns [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). If you want to see the structure of resources in the device or the actual resource values, use the [Connect API](https://developer.pelion.com/docs/device-management-api/connect/).\n\n**Example:**\nFollowing example must be updated with the device's ID to the URL. The id is from of \"01667c6e992c00000000000100100370\"\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/ \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ - { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "entity_fieldname": "auto_update", - "parameter_fieldname": "auto_update", - "in": "body", - "required": false, - "_key": "auto_update" - }, - { - "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "entity_fieldname": "ca_id", - "parameter_fieldname": "ca_id", - "in": "body", - "required": false, - "_key": "ca_id" - }, - { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", - "example": { - "key": "value" - }, - "api_fieldname": "custom_attributes", - "entity_fieldname": "custom_attributes", - "parameter_fieldname": "custom_attributes", - "in": "body", - "required": false, - "_key": "custom_attributes" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "string", - "maxLength": 512, - "description": "The fingerprint of the device certificate.", - "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", - "api_fieldname": "device_key", - "entity_fieldname": "device_key", - "parameter_fieldname": "device_key", - "in": "body", - "required": false, - "_key": "device_key" - }, - { - "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", - "readOnly": true, - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "parameter_fieldname": "endpoint_name", - "in": "body", - "required": false, - "_key": "endpoint_name" - }, - { - "type": "string", - "description": "The endpoint type of the device. For example, the device is a gateway.", - "maxLength": 64, - "example": "", - "api_fieldname": "endpoint_type", - "entity_fieldname": "endpoint_type", - "parameter_fieldname": "endpoint_type", - "in": "body", - "required": false, - "_key": "endpoint_type" - }, - { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway", - "parameter_fieldname": "host_gateway", - "in": "body", - "required": false, - "_key": "host_gateway" - }, { "type": "string", "description": "The ID of the device. The device ID is used across all Device Management APIs.", @@ -34394,25 +34205,13 @@ "in": "path", "required": true, "_key": "id" - }, - { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "read", "responses": [ { - "description": "Device updated.", + "description": "Retrieved result successfully.", "schema": [ { "group": "Devices", @@ -34454,7 +34253,7 @@ }, "operator_suspended": { "type": "boolean", - "description": "Is the device suspended by the operator?", + "description": "Device has been suspended by operator.", "api_fieldname": "operator_suspended", "entity_fieldname": "operator_suspended" }, @@ -34518,7 +34317,7 @@ "enabled", "blocked" ], - "description": "The lifecycle status of the device.", + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", "example": "enabled", "api_fieldname": "lifecycle_status", "entity_fieldname": "lifecycle_status" @@ -34560,6 +34359,20 @@ "api_fieldname": "ca_id", "entity_fieldname": "ca_id" }, + "component_attributes": { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "component_attributes", + "entity_fieldname": "component_attributes" + }, "connector_expiration_date": { "format": "date", "type": "string", @@ -34612,7 +34425,7 @@ "type": "string", "maxLength": 2000, "description": "The description of the device.", - "example": "description", + "example": "Temperature measuring device", "api_fieldname": "description", "entity_fieldname": "description" }, @@ -34641,7 +34454,7 @@ }, "endpoint_name": { "type": "string", - "description": "The endpoint name given to the device.", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", "example": "00000000-0000-0000-0000-000000000000", "readOnly": true, "api_fieldname": "endpoint_name", @@ -34672,7 +34485,7 @@ }, "host_gateway": { "type": "string", - "description": "The ID of the host gateway, if appropriate.", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", "example": "", "api_fieldname": "host_gateway", "entity_fieldname": "host_gateway" @@ -34698,13 +34511,13 @@ "direct" ], "type": "string", - "description": "The ID of the channel used to communicate with the device.", + "description": "NOT USED: The ID of the channel used to communicate with the device.", "api_fieldname": "mechanism", "entity_fieldname": "mechanism" }, "mechanism_url": { "type": "string", - "description": "The address of the connector to use.", + "description": "NOT USED: The address of the connector to use.", "example": "", "api_fieldname": "mechanism_url", "entity_fieldname": "mechanism_url" @@ -34712,11 +34525,20 @@ "name": { "type": "string", "maxLength": 128, - "description": "The name of the device.", + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", "example": "00000000-0000-0000-0000-000000000000", "api_fieldname": "name", "entity_fieldname": "name" }, + "net_id": { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000", + "api_fieldname": "net_id", + "entity_fieldname": "net_id" + }, "object": { "type": "string", "description": "The API resource entity.", @@ -34726,7 +34548,7 @@ }, "serial_number": { "type": "string", - "description": "The serial number of the device.", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", "example": "00000000-0000-0000-0000-000000000000", "api_fieldname": "serial_number", "entity_fieldname": "serial_number" @@ -34740,7 +34562,7 @@ "deregistered" ], "type": "string", - "description": "The current state of the device.", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired.", "api_fieldname": "state", "entity_fieldname": "state" }, @@ -34748,7 +34570,7 @@ "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The time the object was updated.", + "description": "The time this data object was updated.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at" }, @@ -34759,39 +34581,360 @@ "api_fieldname": "vendor_id", "entity_fieldname": "vendor_id" }, - "enrolment_list_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + "enrolment_list_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The claim date/time.", + "api_fieldname": "enrolment_list_timestamp", + "entity_fieldname": "enrolment_list_timestamp" + }, + "_key": "properties" + } + ], + "_key": "200" + }, + { + "description": "Bad request.", + "_key": "400" + }, + { + "description": "Not authenticated.", + "_key": "401" + }, + { + "description": "Unable to find device.", + "_key": "404" + } + ], + "path": "/v3/devices/{id}/", + "summary": "Get a device.", + "return_type": "device", + "return_info": { + "self": true, + "custom": false, + "type": "device" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "device_execution_mode", + "groups", + "issuer_fingerprint", + "operator_suspended", + "last_operator_suspended_category", + "last_operator_suspended_description", + "last_operator_suspended_updated_at", + "system_suspended", + "last_system_suspended_category", + "last_system_suspended_description", + "last_system_suspended_updated_at", + "lifecycle_status", + "account_id", + "auto_update", + "bootstrap_expiration_date", + "bootstrapped_timestamp", + "ca_id", + "component_attributes", + "connector_expiration_date", + "created_at", + "custom_attributes", + "deployed_state", + "deployment", + "description", + "device_class", + "device_key", + "endpoint_name", + "endpoint_type", + "firmware_checksum", + "host_gateway", + "manifest", + "manifest_timestamp", + "mechanism", + "mechanism_url", + "name", + "net_id", + "serial_number", + "state", + "updated_at", + "vendor_id", + "enrolment_list_timestamp" + ], + "group_id": "Devices", + "operation_id": "Device_retrieve", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "description": "Remove one device from a group.", + "field_renames": [], + "fields": [ + { + "in": "path", + "description": "The ID of the group.", + "name": "device-group-id", + "required": true, + "type": "string", + "entity_fieldname": "device-group-id", + "api_fieldname": "device-group-id", + "external_param": true, + "parameter_fieldname": "device-group-id", + "_key": "device-group-id" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "name": "device_id", + "in": "body", + "schema_param": true, + "entity_fieldname": "id", + "api_fieldname": "device_id", + "external_param": false, + "parameter_fieldname": "device_id", + "required": true, + "_key": "id" + } + ], + "method": "post", + "mode": "remove_from_group", + "responses": [ + { + "description": "Success - device removed.", + "_key": "204" + }, + { + "description": "Bad request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Unauthorized.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { "type": "string", - "description": "The claim date/time.", - "api_fieldname": "enrolment_list_timestamp", - "entity_fieldname": "enrolment_list_timestamp" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "_key": "properties" - } - ], - "_key": "200" - }, - { - "description": "Validation error: The data used to update the device did not validate.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to update device because it can't be found.", + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], - "path": "/v3/devices/{id}/", - "summary": "Update a device.", - "return_type": "device", + "path": "/v3/device-groups/{device-group-id}/devices/remove/", + "summary": "Remove a device from a group.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "device" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -34799,579 +34942,129 @@ "object", "etag", "type", - "filter", - "device_execution_mode", - "groups", - "issuer_fingerprint", - "operator_suspended", - "last_operator_suspended_category", - "last_operator_suspended_description", - "last_operator_suspended_updated_at", - "system_suspended", - "last_system_suspended_category", - "last_system_suspended_description", - "last_system_suspended_updated_at", - "lifecycle_status", - "account_id", - "bootstrap_expiration_date", - "bootstrapped_timestamp", - "connector_expiration_date", - "created_at", - "deployed_state", - "deployment", - "device_class", - "firmware_checksum", - "manifest", - "manifest_timestamp", - "mechanism", - "mechanism_url", - "serial_number", - "state", - "updated_at", - "vendor_id", - "enrolment_list_timestamp" + "filter" ], "group_id": "Devices", - "operation_id": "Device_update", + "operation_id": "Group_members_remove", + "parameter_map": { + "device_id": "id" + }, + "spec": { + "return_type": "void" + }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "update" - } - ], - "fields": [ - { - "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_key": "account_id" - }, - { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "readOnly": false, - "required": false, - "_key": "auto_update" - }, - { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to bootstrap server.", - "api_fieldname": "bootstrap_expiration_date", - "readOnly": false, - "required": false, - "_key": "bootstrap_expiration_date" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of the device's most recent bootstrap process.", - "api_fieldname": "bootstrapped_timestamp", - "readOnly": true, - "required": false, - "_key": "bootstrapped_timestamp" - }, - { - "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "readOnly": false, - "required": false, - "_key": "ca_id" - }, - { - "format": "date", - "type": "string", - "x-nullable": true, - "description": "The expiration date of the certificate used to connect to LwM2M server.", - "api_fieldname": "connector_expiration_date", - "readOnly": false, - "required": false, - "_key": "connector_expiration_date" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of when the device was created in the device directory.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", - "example": { - "key": "value" - }, - "api_fieldname": "custom_attributes", - "readOnly": false, - "required": false, - "_key": "custom_attributes" - }, - { - "enum": [ - "development", - "production" - ], - "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", - "readOnly": true, - "required": false, - "enum_reference": "device_deployed_state_enum", - "_key": "deployed_state" - }, - { - "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "", - "api_fieldname": "deployment", - "readOnly": false, - "required": false, - "_key": "deployment" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "type": "string", - "maxLength": 32, - "description": "An ID representing the model and hardware revision of the device.", - "example": "", - "api_fieldname": "device_class", - "readOnly": false, - "required": false, - "_key": "device_class" - }, - { - "enum": [ - 0, - 1, - 5 - ], - "type": "integer", - "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", - "example": 0, - "default": 0, - "api_fieldname": "device_execution_mode", - "readOnly": false, - "required": false, - "_key": "device_execution_mode" - }, - { - "type": "string", - "maxLength": 512, - "description": "The fingerprint of the device certificate.", - "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", - "api_fieldname": "device_key", - "readOnly": false, - "required": false, - "_key": "device_key" - }, - { - "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", - "readOnly": true, - "api_fieldname": "endpoint_name", - "required": false, - "_key": "endpoint_name" - }, - { - "type": "string", - "description": "The endpoint type of the device. For example, the device is a gateway.", - "maxLength": 64, - "example": "", - "api_fieldname": "endpoint_type", - "readOnly": false, - "required": false, - "_key": "endpoint_type" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The claim date/time.", - "api_fieldname": "enrolment_list_timestamp", - "readOnly": true, - "required": false, - "_key": "enrolment_list_timestamp" - }, - { - "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "firmware_checksum", - "readOnly": true, - "required": false, - "_key": "firmware_checksum" - }, - { - "description": "An array containing an ID of each group this device belongs to.", - "type": "array", - "items": { - "type": "string", - "example": "00000000000000000000000000000000" - }, - "api_fieldname": "groups", - "readOnly": true, - "required": false, - "_key": "groups" - }, - { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "readOnly": false, - "required": false, - "_key": "host_gateway" - }, - { - "type": "string", - "description": "The ID of the device. The device ID is used across all Device Management APIs.", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "pattern": "[A-Fa-f0-9]{64}", - "x-nullable": true, - "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", - "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", - "api_fieldname": "issuer_fingerprint", - "readOnly": false, - "required": false, - "_key": "issuer_fingerprint" - }, - { - "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance", - "api_fieldname": "last_operator_suspended_category", - "readOnly": true, - "required": false, - "_key": "last_operator_suspended_category" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The most recent description why the device was suspended or returned to service.", - "example": "Suspended for maintenance.", - "api_fieldname": "last_operator_suspended_description", - "readOnly": true, - "required": false, - "_key": "last_operator_suspended_description" - }, - { - "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent suspension activity.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "last_operator_suspended_updated_at", - "readOnly": true, - "required": false, - "_key": "last_operator_suspended_updated_at" - }, - { - "type": "string", - "description": "The reference of the block category.", - "pattern": "[a-f0-9_]{32}", - "example": "maintenance", - "api_fieldname": "last_system_suspended_category", - "readOnly": true, - "required": false, - "_key": "last_system_suspended_category" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The most recent description of why the device was blocked or unblocked by the system.", - "example": "A certificate in the device's certificate chain was blacklisted by the system.", - "api_fieldname": "last_system_suspended_description", - "readOnly": true, - "required": false, - "_key": "last_system_suspended_description" - }, - { - "type": "string", - "format": "date-time", - "description": "The timestamp of the most recent system block activity.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "last_system_suspended_updated_at", - "readOnly": true, - "required": false, - "_key": "last_system_suspended_updated_at" - }, - { - "type": "string", - "enum": [ - "enabled", - "blocked" - ], - "description": "The lifecycle status of the device.", - "example": "enabled", - "api_fieldname": "lifecycle_status", - "readOnly": true, - "required": false, - "enum_reference": "device_lifecycle_status_enum", - "_key": "lifecycle_status" - }, - { - "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "readOnly": false, - "required": false, - "_key": "manifest" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The timestamp of the current manifest version.", - "api_fieldname": "manifest_timestamp", - "readOnly": true, - "required": false, - "_key": "manifest_timestamp" - }, - { - "enum": [ - "connector", - "direct" - ], - "type": "string", - "description": "The ID of the channel used to communicate with the device.", - "api_fieldname": "mechanism", - "readOnly": false, - "required": false, - "enum_reference": "device_mechanism_enum", - "_key": "mechanism" - }, - { - "type": "string", - "description": "The address of the connector to use.", - "example": "", - "api_fieldname": "mechanism_url", - "readOnly": false, - "required": false, - "_key": "mechanism_url" - }, - { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "name", - "readOnly": false, - "required": false, - "_key": "name" - }, - { - "type": "boolean", - "description": "Is the device suspended by the operator?", - "api_fieldname": "operator_suspended", - "readOnly": true, - "required": false, - "_key": "operator_suspended" - }, - { - "type": "string", - "description": "The serial number of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "serial_number", - "readOnly": false, - "required": false, - "_key": "serial_number" - }, - { - "enum": [ - "unenrolled", - "cloud_enrolling", - "bootstrapped", - "registered", - "deregistered" - ], - "type": "string", - "description": "The current state of the device.", - "api_fieldname": "state", - "readOnly": false, - "required": false, - "enum_reference": "device_state_enum", - "_key": "state" - }, - { - "type": "boolean", - "description": "Is the device suspended by the system?", - "api_fieldname": "system_suspended", - "readOnly": true, - "required": false, - "_key": "system_suspended" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The time the object was updated.", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" + "_key": "remove_from_group" }, { - "type": "string", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "vendor_id", - "readOnly": false, - "required": false, - "_key": "vendor_id" - } - ], - "field_renames": [], - "tags": [ - "Device directory - devices", - "Device security - device certificate renewals", - "Device directory - groups" - ], - "group_id": "Devices", - "_key": "device" - }, - { - "swagger_models": [ - "EnrollmentId", - "EnrollmentIdentities", - "EnrollmentIdentity" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account.\n
\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments \\\n-d '{\"enrollment_identity\": \"A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5\"}'\n```", + "description": "Request a certificate renewal.\n\n**Example:**\n\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \\\n-H 'Authorization: Bearer ' \\\n-H 'content-length: 0'\n```", "field_renames": [], "fields": [ { "type": "string", - "description": "Enrollment identity.", - "pattern": "^A-[A-Za-z0-9:]{95}$", - "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", - "api_fieldname": "enrollment_identity", - "entity_fieldname": "enrollment_identity", - "parameter_fieldname": "enrollment_identity", - "in": "body", + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate-name", + "entity_fieldname": "certificate_name", + "in": "path", + "name": "certificate-name", + "required": true, + "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "external_param": true, + "parameter_fieldname": "certificate-name", + "_key": "certificate_name" + }, + { + "type": "string", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "device-id", + "in": "path", "required": true, - "_key": "enrollment_identity" + "_key": "id" } ], "method": "post", - "mode": "create", + "mode": "renew_certificate", "responses": [ { - "description": "Created. The enrollment claim has been created and is waiting for the device to connect.", + "description": "Created.", "schema": { "type": "object", - "required": [ - "object", - "id", - "etag", - "account_id", - "created_at", - "expires_at", - "claimed_at", - "enrollment_identity", - "enrolled_device_id" - ], "properties": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "description": "The time the device was claimed.", - "format": "date-time", - "api_fieldname": "claimed_at", - "entity_fieldname": "claimed_at", - "_key": "claimed_at" + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate_name", + "entity_fieldname": "certificate_name", + "_key": "certificate_name" }, { "type": "string", - "description": "The time of the enrollment identity creation.", "format": "date-time", + "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, { "type": "string", - "description": "The ID of the device in the Device Directory once it is registered.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "enrolled_device_id", - "entity_fieldname": "enrolled_device_id", - "_key": "enrolled_device_id" + "description": "The device ID.", + "example": "01625daa23230a580a0100bd00000000", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" }, { "type": "string", - "description": "Enrollment identity.", - "pattern": "^A-[A-Za-z0-9:]{95}$", - "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", - "api_fieldname": "enrollment_identity", - "entity_fieldname": "enrollment_identity", - "_key": "enrollment_identity" + "enum": [ + "success", + "failure" + ], + "description": "The result of certificate enrollment request.", + "example": "success", + "api_fieldname": "enroll_result", + "entity_fieldname": "enroll_result", + "_key": "enroll_result" }, { "type": "string", - "pattern": "[A-Za-z0-9]{1,256}", - "example": "7642xfaxz", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "Additional information in case of failure.", + "example": "The device is currently processing too many certificate renewals.", + "api_fieldname": "enroll_result_detail", + "entity_fieldname": "enroll_result_detail", + "_key": "enroll_result_detail" }, { "type": "string", - "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", - "format": "date-time", - "api_fieldname": "expires_at", - "entity_fieldname": "expires_at", - "_key": "expires_at" + "description": "The status of certificate enrollment request.", + "enum": [ + "new", + "completed" + ], + "api_fieldname": "enroll_status", + "entity_fieldname": "enroll_status", + "_key": "enroll_status" }, { "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" @@ -35379,27 +35072,43 @@ { "type": "string", "enum": [ - "enrollment" + "certificate-enrollment" ], - "example": "enrollment", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "Update UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } ], + "required": [ + "created_at", + "etag", + "id", + "device_id", + "certificate_name" + ], "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" + "group": "Security", + "entity": "certificate_enrollment" } }, "_key": "201" }, { - "description": "Bad request. The enrollment identity is not valid.", + "description": "Validation error: There is no certificate issuer configured for this certificate.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -35409,29 +35118,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -35439,28 +35143,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -35468,11 +35166,12 @@ "_key": "400" }, { - "description": "The provided access token is not valid.", + "description": "You are not authorized to perform the action.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -35482,29 +35181,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -35512,28 +35206,22 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] @@ -35541,11 +35229,12 @@ "_key": "401" }, { - "description": "Conflict. The requested identity to add already exists on this or another account.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -35555,29 +35244,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -35585,94 +35269,35 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "409" - } - ], - "path": "/v3/device-enrollments", - "summary": "Create a single enrollment.", - "return_type": "device_enrollment", - "return_info": { - "self": true, - "custom": false, - "type": "device_enrollment" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "id", - "created_at", - "claimed_at", - "account_id", - "expires_at", - "enrolled_device_id" - ], - "group_id": "Devices", - "operation_id": "createDeviceEnrollment", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "create" - }, - { - "description": "To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to delete the enrollment and factory reset the device. For more information, see [Transferring ownership using First-to-Claim](../connecting/device-ownership-first-to-claim-by-enrollment-list.html).\n
\n**Example:**\n```\ncurl -X DELETE \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id}\n```", - "field_renames": [], - "fields": [ - { - "in": "path", - "name": "id", - "type": "string", - "required": true, - "description": "Enrollment identity.", - "entity_fieldname": "id", - "api_fieldname": "id", - "external_param": false, - "parameter_fieldname": "id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "No content. The enrollment claim has been deleted.", - "_key": "204" + "_key": "403" }, { - "description": "Bad request. Invalid enrollment identity.", + "description": "The device ID or certificate name is not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -35682,29 +35307,24 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -35712,40 +35332,35 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "400" + "_key": "404" }, { - "description": "Not found.", + "description": "Conflict. A renewal request for this certificate is in progress.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -35755,29 +35370,87 @@ { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, + "description": "Error code. Correlates with response status code.", "_key": "code" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of request fields that failed validation.", "items": { "type": "object", - "required": [ - "name", - "message" - ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", "_key": "message" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name: `error`.", + "_key": "object" + }, + { + "type": "string", + "description": "Request ID from JWT.", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "409" + }, + { + "description": "Either:\n- Operation not supported for this device.\n- The device is not connected.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" + }, + { + "type": "array", + "description": "A list of request fields that failed validation.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "description": "Error message related to the field.", + "_key": "message" } ] }, @@ -35785,42 +35458,36 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", + "description": "Error message.", "_key": "message" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], + "description": "Entity name: `error`.", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", + "description": "Request ID from JWT.", "_key": "request_id" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Error type.", "_key": "type" } ] }, - "_key": "404" + "_key": "423" } ], - "path": "/v3/device-enrollments/{id}", - "summary": "Delete an enrollment by ID.", - "return_type": "device_enrollment", + "path": "/v3/devices/{device-id}/certificates/{certificate-name}/renew", + "summary": "Request certificate renewal.", + "return_type": "certificate_enrollment", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "device_enrollment" + "type": "certificate_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -35828,448 +35495,1097 @@ "object", "etag", "type", - "filter" + "filter", + "created_at", + "device_id", + "enroll_status", + "enroll_result", + "enroll_result_detail", + "updated_at" ], "group_id": "Devices", - "operation_id": "deleteDeviceEnrollment", + "operation_id": "RequestCertificateRenewal", + "unaggregated": true, + "parameter_map": { + "device-id": "id", + "certificate-name": "certificate_name" + }, + "foreign_key": { + "entity": "certificate_enrollment", + "group": "Security" + }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "renew_certificate" }, { - "description": "Provides a list of pending and claimed enrollments.\n\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments\n```\nWith query parameters:\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\n'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'\n```", + "description": "Update a specific device.\n\n**Example:**\nFollowing example will update the specific devices description field to contain \"Testing description field\".\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/devices/ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"description\": \"Testing description field\"}'\n```", "field_renames": [], "fields": [ + { + "type": "boolean", + "description": "DEPRECATED: Mark this device for automatic firmware update.", + "api_fieldname": "auto_update", + "entity_fieldname": "auto_update", + "parameter_fieldname": "auto_update", + "in": "body", + "required": false, + "_key": "auto_update" + }, + { + "type": "string", + "maxLength": 500, + "description": "The certificate issuer's ID.", + "example": "00000000000000000000000000000000", + "api_fieldname": "ca_id", + "entity_fieldname": "ca_id", + "parameter_fieldname": "ca_id", + "in": "body", + "required": false, + "_key": "ca_id" + }, + { + "type": "object", + "maxProperties": 5, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "parameter_fieldname": "custom_attributes", + "in": "body", + "required": false, + "_key": "custom_attributes" + }, { "type": "string", - "description": "Entity ID to fetch after.", - "example": "00005a4e027f0a580a01081c00000000", - "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "_key": "description" }, { - "name": "include", "type": "string", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", + "maxLength": 512, + "description": "The fingerprint of the device certificate.", + "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "api_fieldname": "device_key", + "entity_fieldname": "device_key", + "parameter_fieldname": "device_key", + "in": "body", "required": false, - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" + "_key": "device_key" }, { - "type": "integer", - "description": "Number of results to return (2-1000).", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", + "type": "string", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", + "example": "00000000-0000-0000-0000-000000000000", + "readOnly": true, + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "parameter_fieldname": "endpoint_name", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "_key": "endpoint_name" }, { "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "default": "ASC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "description": "ASC or DESC", + "description": "The endpoint type of the device. For example, the device is a gateway.", + "maxLength": 64, + "example": "", + "api_fieldname": "endpoint_type", + "entity_fieldname": "endpoint_type", + "parameter_fieldname": "endpoint_type", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "device_enrollment_order_enum", - "_key": "order" + "_key": "endpoint_type" + }, + { + "type": "string", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", + "example": "", + "api_fieldname": "host_gateway", + "entity_fieldname": "host_gateway", + "parameter_fieldname": "host_gateway", + "in": "body", + "required": false, + "_key": "host_gateway" + }, + { + "type": "string", + "description": "The ID of the device. The device ID is used across all Device Management APIs.", + "example": "00000000000000000000000000000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "maxLength": 128, + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" } ], - "method": "get", - "mode": "list", + "method": "put", + "mode": "update", "responses": [ { - "description": "OK.", - "schema": { - "type": "object", - "required": [ - "object", - "limit", - "after", - "order", - "has_more", - "total_count", - "data" - ], - "properties": [ - { - "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "description": "Device updated.", + "schema": [ + { + "group": "Devices", + "entity": "device", + "_key": "foreign_key" + }, + { + "device_execution_mode": { + "enum": [ + 0, + 1, + 5 + ], + "type": "integer", + "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", + "example": 0, + "default": 0, + "api_fieldname": "device_execution_mode", + "entity_fieldname": "device_execution_mode" }, - { + "groups": { + "description": "An array containing an ID of each group this device belongs to.", "type": "array", "items": { - "type": "object", - "required": [ - "object", - "id", - "etag", - "account_id", - "created_at", - "expires_at", - "claimed_at", - "enrollment_identity", - "enrolled_device_id" - ], - "properties": [ - { - "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "account_id" - }, - { - "type": "string", - "description": "The time the device was claimed.", - "format": "date-time", - "_key": "claimed_at" - }, - { - "type": "string", - "description": "The time of the enrollment identity creation.", - "format": "date-time", - "_key": "created_at" - }, - { - "type": "string", - "description": "The ID of the device in the Device Directory once it is registered.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "enrolled_device_id" - }, - { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^A-[A-Za-z0-9:]{95}$", - "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", - "_key": "enrollment_identity" - }, - { - "type": "string", - "pattern": "[A-Za-z0-9]{1,256}", - "example": "7642xfaxz", - "_key": "etag" - }, - { - "type": "string", - "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", - "format": "date-time", - "_key": "expires_at" - }, - { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "id" - }, - { - "type": "string", - "enum": [ - "enrollment" - ], - "example": "enrollment", - "_key": "object" - } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" - } + "type": "string", + "example": "00000000000000000000000000000000" }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "api_fieldname": "groups", + "entity_fieldname": "groups" }, - { + "issuer_fingerprint": { + "type": "string", + "pattern": "[A-Fa-f0-9]{64}", + "x-nullable": true, + "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", + "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", + "api_fieldname": "issuer_fingerprint", + "entity_fieldname": "issuer_fingerprint" + }, + "operator_suspended": { "type": "boolean", - "example": true, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "description": "Device has been suspended by operator.", + "api_fieldname": "operator_suspended", + "entity_fieldname": "operator_suspended" }, - { - "type": "integer", - "description": "Range 2-1000, or default.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "last_operator_suspended_category": { + "type": "string", + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance", + "api_fieldname": "last_operator_suspended_category", + "entity_fieldname": "last_operator_suspended_category" }, - { + "last_operator_suspended_description": { + "type": "string", + "maxLength": 2000, + "description": "The most recent description why the device was suspended or returned to service.", + "example": "Suspended for maintenance.", + "api_fieldname": "last_operator_suspended_description", + "entity_fieldname": "last_operator_suspended_description" + }, + "last_operator_suspended_updated_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the most recent suspension activity.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "last_operator_suspended_updated_at", + "entity_fieldname": "last_operator_suspended_updated_at" + }, + "system_suspended": { + "type": "boolean", + "description": "Is the device suspended by the system?", + "api_fieldname": "system_suspended", + "entity_fieldname": "system_suspended" + }, + "last_system_suspended_category": { + "type": "string", + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance", + "api_fieldname": "last_system_suspended_category", + "entity_fieldname": "last_system_suspended_category" + }, + "last_system_suspended_description": { + "type": "string", + "maxLength": 2000, + "description": "The most recent description of why the device was blocked or unblocked by the system.", + "example": "A certificate in the device's certificate chain was blacklisted by the system.", + "api_fieldname": "last_system_suspended_description", + "entity_fieldname": "last_system_suspended_description" + }, + "last_system_suspended_updated_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the most recent system block activity.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "last_system_suspended_updated_at", + "entity_fieldname": "last_system_suspended_updated_at" + }, + "lifecycle_status": { "type": "string", "enum": [ - "list" + "enabled", + "blocked" ], - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", + "example": "enabled", + "api_fieldname": "lifecycle_status", + "entity_fieldname": "lifecycle_status" }, - { + "account_id": { + "type": "string", + "description": "The ID of the associated account.", + "example": "00000000000000000000000000000000", + "api_fieldname": "account_id", + "entity_fieldname": "account_id" + }, + "auto_update": { + "type": "boolean", + "description": "DEPRECATED: Mark this device for automatic firmware update.", + "api_fieldname": "auto_update", + "entity_fieldname": "auto_update" + }, + "bootstrap_expiration_date": { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to bootstrap server.", + "api_fieldname": "bootstrap_expiration_date", + "entity_fieldname": "bootstrap_expiration_date" + }, + "bootstrapped_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of the device's most recent bootstrap process.", + "api_fieldname": "bootstrapped_timestamp", + "entity_fieldname": "bootstrapped_timestamp" + }, + "ca_id": { + "type": "string", + "maxLength": 500, + "description": "The certificate issuer's ID.", + "example": "00000000000000000000000000000000", + "api_fieldname": "ca_id", + "entity_fieldname": "ca_id" + }, + "component_attributes": { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "component_attributes", + "entity_fieldname": "component_attributes" + }, + "connector_expiration_date": { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to LwM2M server.", + "api_fieldname": "connector_expiration_date", + "entity_fieldname": "connector_expiration_date" + }, + "created_at": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", + "description": "The timestamp of when the device was created in the device directory.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at" + }, + "custom_attributes": { + "type": "object", + "maxProperties": 5, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes" + }, + "deployed_state": { "enum": [ - "ASC", - "DESC" + "development", + "production" ], - "default": "ASC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "type": "string", + "description": "DEPRECATED: The state of the device's deployment.", + "api_fieldname": "deployed_state", + "entity_fieldname": "deployed_state" }, - { - "type": "integer", - "example": 100, - "format": "int32", - "minimum": 1, - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" - } - ], - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" - } - }, - "_key": "200" - }, - { - "description": "Bad request. The access token could not be read.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "deployment": { + "type": "string", + "description": "DEPRECATED: The last deployment used on the device.", + "example": "", + "api_fieldname": "deployment", + "entity_fieldname": "deployment" + }, + "description": { + "type": "string", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device", + "api_fieldname": "description", + "entity_fieldname": "description" + }, + "device_class": { + "type": "string", + "maxLength": 32, + "description": "An ID representing the model and hardware revision of the device.", + "example": "", + "api_fieldname": "device_class", + "entity_fieldname": "device_class" + }, + "id": { + "type": "string", + "description": "The ID of the device. The device ID is used across all Device Management APIs.", + "example": "00000000000000000000000000000000", + "api_fieldname": "id", + "entity_fieldname": "id" + }, + "device_key": { + "type": "string", + "maxLength": 512, + "description": "The fingerprint of the device certificate.", + "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "api_fieldname": "device_key", + "entity_fieldname": "device_key" + }, + "endpoint_name": { + "type": "string", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", + "example": "00000000-0000-0000-0000-000000000000", + "readOnly": true, + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name" + }, + "endpoint_type": { + "type": "string", + "description": "The endpoint type of the device. For example, the device is a gateway.", + "maxLength": 64, + "example": "", + "api_fieldname": "endpoint_type", + "entity_fieldname": "endpoint_type" + }, + "etag": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The entity instance signature.", + "api_fieldname": "etag", + "entity_fieldname": "etag" }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" + "firmware_checksum": { + "type": "string", + "description": "The SHA256 checksum of the current firmware image.", + "example": "0000000000000000000000000000000000000000000000000000000000000000", + "api_fieldname": "firmware_checksum", + "entity_fieldname": "firmware_checksum" }, - { + "host_gateway": { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", + "example": "", + "api_fieldname": "host_gateway", + "entity_fieldname": "host_gateway" }, - { + "manifest": { "type": "string", - "description": "Entity name, always `error`.", + "description": "DEPRECATED: The URL for the current device manifest.", + "example": "", + "api_fieldname": "manifest", + "entity_fieldname": "manifest" + }, + "manifest_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of the current manifest version.", + "api_fieldname": "manifest_timestamp", + "entity_fieldname": "manifest_timestamp" + }, + "mechanism": { "enum": [ - "error" + "connector", + "direct" ], - "_key": "object" + "type": "string", + "description": "NOT USED: The ID of the channel used to communicate with the device.", + "api_fieldname": "mechanism", + "entity_fieldname": "mechanism" }, - { + "mechanism_url": { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "NOT USED: The address of the connector to use.", + "example": "", + "api_fieldname": "mechanism_url", + "entity_fieldname": "mechanism_url" }, - { + "name": { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "description": "The provided access token is not valid.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "maxLength": 128, + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "name", + "entity_fieldname": "name" }, - { - "type": "array", - "description": "Request fields which failed validation.", - "items": { - "type": "object", - "required": [ - "name", - "message" - ], - "properties": [ - { - "type": "string", - "description": "Message describing the error condition.", - "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] - }, - "_key": "fields" + "net_id": { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000", + "api_fieldname": "net_id", + "entity_fieldname": "net_id" }, - { + "object": { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "description": "The API resource entity.", + "example": "device", + "api_fieldname": "object", + "entity_fieldname": "object" }, - { + "serial_number": { "type": "string", - "description": "Entity name, always `error`.", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "serial_number", + "entity_fieldname": "serial_number" + }, + "state": { "enum": [ - "error" + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" ], - "_key": "object" + "type": "string", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired.", + "api_fieldname": "state", + "entity_fieldname": "state" }, - { + "updated_at": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "The time this data object was updated.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at" }, - { + "vendor_id": { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, + "description": "The device vendor ID.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "vendor_id", + "entity_fieldname": "vendor_id" + }, + "enrolment_list_timestamp": { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The claim date/time.", + "api_fieldname": "enrolment_list_timestamp", + "entity_fieldname": "enrolment_list_timestamp" + }, + "_key": "properties" + } + ], + "_key": "200" + }, + { + "description": "Validation error: The data used to update the device did not validate.", + "_key": "400" + }, + { + "description": "Not authenticated.", "_key": "401" + }, + { + "description": "Unable to update device because it can't be found.", + "_key": "404" } ], - "path": "/v3/device-enrollments", - "summary": "Get a list of enrollments per account.", - "return_type": "paginated_response(device_enrollment)", - "return_info": { - "self": true, - "custom": false, - "type": "device_enrollment" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "has_more", - "total_count", - "data" + "path": "/v3/devices/{id}/", + "summary": "Update a device.", + "return_type": "device", + "return_info": { + "self": true, + "custom": false, + "type": "device" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "device_execution_mode", + "groups", + "issuer_fingerprint", + "operator_suspended", + "last_operator_suspended_category", + "last_operator_suspended_description", + "last_operator_suspended_updated_at", + "system_suspended", + "last_system_suspended_category", + "last_system_suspended_description", + "last_system_suspended_updated_at", + "lifecycle_status", + "account_id", + "bootstrap_expiration_date", + "bootstrapped_timestamp", + "component_attributes", + "connector_expiration_date", + "created_at", + "deployed_state", + "deployment", + "device_class", + "firmware_checksum", + "manifest", + "manifest_timestamp", + "mechanism", + "mechanism_url", + "net_id", + "serial_number", + "state", + "updated_at", + "vendor_id", + "enrolment_list_timestamp" + ], + "group_id": "Devices", + "operation_id": "Device_update", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "description": "The ID of the associated account.", + "example": "00000000000000000000000000000000", + "api_fieldname": "account_id", + "readOnly": true, + "required": false, + "_key": "account_id" + }, + { + "type": "boolean", + "description": "DEPRECATED: Mark this device for automatic firmware update.", + "api_fieldname": "auto_update", + "readOnly": false, + "required": false, + "_key": "auto_update" + }, + { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to bootstrap server.", + "api_fieldname": "bootstrap_expiration_date", + "readOnly": false, + "required": false, + "_key": "bootstrap_expiration_date" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of the device's most recent bootstrap process.", + "api_fieldname": "bootstrapped_timestamp", + "readOnly": true, + "required": false, + "_key": "bootstrapped_timestamp" + }, + { + "type": "string", + "maxLength": 500, + "description": "The certificate issuer's ID.", + "example": "00000000000000000000000000000000", + "api_fieldname": "ca_id", + "readOnly": false, + "required": false, + "_key": "ca_id" + }, + { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "component_attributes", + "readOnly": true, + "required": false, + "_key": "component_attributes" + }, + { + "format": "date", + "type": "string", + "x-nullable": true, + "description": "The expiration date of the certificate used to connect to LwM2M server.", + "api_fieldname": "connector_expiration_date", + "readOnly": false, + "required": false, + "_key": "connector_expiration_date" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of when the device was created in the device directory.", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "object", + "maxProperties": 5, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "description": "Up to five custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + }, + "api_fieldname": "custom_attributes", + "readOnly": false, + "required": false, + "_key": "custom_attributes" + }, + { + "enum": [ + "development", + "production" + ], + "type": "string", + "description": "DEPRECATED: The state of the device's deployment.", + "api_fieldname": "deployed_state", + "readOnly": true, + "required": false, + "enum_reference": "device_deployed_state_enum", + "_key": "deployed_state" + }, + { + "type": "string", + "description": "DEPRECATED: The last deployment used on the device.", + "example": "", + "api_fieldname": "deployment", + "readOnly": false, + "required": false, + "_key": "deployment" + }, + { + "type": "string", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device", + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "type": "string", + "maxLength": 32, + "description": "An ID representing the model and hardware revision of the device.", + "example": "", + "api_fieldname": "device_class", + "readOnly": false, + "required": false, + "_key": "device_class" + }, + { + "enum": [ + 0, + 1, + 5 + ], + "type": "integer", + "description": "The execution mode from the certificate of the device. Defaults to inheriting from host_gateway device.\nPermitted values:\n - 0 - Unspecified execution mode (default if host_gateway invalid or not set). The device firmware uses a certificate that is not identified as a developer or production certificate.\n - 1 - Development device. The device firmware uses a developer certificate to communicate with Device Management.\n - 5 - Production device. The device firmware uses a factory-generated certificate to communicate with Device Management.", + "example": 0, + "default": 0, + "api_fieldname": "device_execution_mode", + "readOnly": false, + "required": false, + "_key": "device_execution_mode" + }, + { + "type": "string", + "maxLength": 512, + "description": "The fingerprint of the device certificate.", + "example": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00", + "api_fieldname": "device_key", + "readOnly": false, + "required": false, + "_key": "device_key" + }, + { + "type": "string", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", + "example": "00000000-0000-0000-0000-000000000000", + "readOnly": true, + "api_fieldname": "endpoint_name", + "required": false, + "_key": "endpoint_name" + }, + { + "type": "string", + "description": "The endpoint type of the device. For example, the device is a gateway.", + "maxLength": 64, + "example": "", + "api_fieldname": "endpoint_type", + "readOnly": false, + "required": false, + "_key": "endpoint_type" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The claim date/time.", + "api_fieldname": "enrolment_list_timestamp", + "readOnly": true, + "required": false, + "_key": "enrolment_list_timestamp" + }, + { + "type": "string", + "description": "The SHA256 checksum of the current firmware image.", + "example": "0000000000000000000000000000000000000000000000000000000000000000", + "api_fieldname": "firmware_checksum", + "readOnly": true, + "required": false, + "_key": "firmware_checksum" + }, + { + "description": "An array containing an ID of each group this device belongs to.", + "type": "array", + "items": { + "type": "string", + "example": "00000000000000000000000000000000" + }, + "api_fieldname": "groups", + "readOnly": true, + "required": false, + "_key": "groups" + }, + { + "type": "string", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", + "example": "", + "api_fieldname": "host_gateway", + "readOnly": false, + "required": false, + "_key": "host_gateway" + }, + { + "type": "string", + "description": "The ID of the device. The device ID is used across all Device Management APIs.", + "example": "00000000000000000000000000000000", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "pattern": "[A-Fa-f0-9]{64}", + "x-nullable": true, + "description": "SHA256 fingerprint of the certificate used to validate the signature of the device certificate.", + "example": "C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322", + "api_fieldname": "issuer_fingerprint", + "readOnly": false, + "required": false, + "_key": "issuer_fingerprint" + }, + { + "type": "string", + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance", + "api_fieldname": "last_operator_suspended_category", + "readOnly": true, + "required": false, + "_key": "last_operator_suspended_category" + }, + { + "type": "string", + "maxLength": 2000, + "description": "The most recent description why the device was suspended or returned to service.", + "example": "Suspended for maintenance.", + "api_fieldname": "last_operator_suspended_description", + "readOnly": true, + "required": false, + "_key": "last_operator_suspended_description" + }, + { + "type": "string", + "format": "date-time", + "description": "The timestamp of the most recent suspension activity.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "last_operator_suspended_updated_at", + "readOnly": true, + "required": false, + "_key": "last_operator_suspended_updated_at" + }, + { + "type": "string", + "description": "The reference of the block category.", + "pattern": "[a-f0-9_]{32}", + "example": "maintenance", + "api_fieldname": "last_system_suspended_category", + "readOnly": true, + "required": false, + "_key": "last_system_suspended_category" + }, + { + "type": "string", + "maxLength": 2000, + "description": "The most recent description of why the device was blocked or unblocked by the system.", + "example": "A certificate in the device's certificate chain was blacklisted by the system.", + "api_fieldname": "last_system_suspended_description", + "readOnly": true, + "required": false, + "_key": "last_system_suspended_description" + }, + { + "type": "string", + "format": "date-time", + "description": "The timestamp of the most recent system block activity.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "last_system_suspended_updated_at", + "readOnly": true, + "required": false, + "_key": "last_system_suspended_updated_at" + }, + { + "type": "string", + "enum": [ + "enabled", + "blocked" + ], + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", + "example": "enabled", + "api_fieldname": "lifecycle_status", + "readOnly": true, + "required": false, + "enum_reference": "device_lifecycle_status_enum", + "_key": "lifecycle_status" + }, + { + "type": "string", + "description": "DEPRECATED: The URL for the current device manifest.", + "example": "", + "api_fieldname": "manifest", + "readOnly": false, + "required": false, + "_key": "manifest" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The timestamp of the current manifest version.", + "api_fieldname": "manifest_timestamp", + "readOnly": true, + "required": false, + "_key": "manifest_timestamp" + }, + { + "enum": [ + "connector", + "direct" ], - "foreign_key_priority": "self", - "group_id": "Devices", - "operation_id": "getDeviceEnrollments", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "list" + "type": "string", + "description": "NOT USED: The ID of the channel used to communicate with the device.", + "api_fieldname": "mechanism", + "readOnly": false, + "required": false, + "enum_reference": "device_mechanism_enum", + "_key": "mechanism" + }, + { + "type": "string", + "description": "NOT USED: The address of the connector to use.", + "example": "", + "api_fieldname": "mechanism_url", + "readOnly": false, + "required": false, + "_key": "mechanism_url" + }, + { + "type": "string", + "maxLength": 128, + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "name", + "readOnly": false, + "required": false, + "_key": "name" + }, + { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000", + "api_fieldname": "net_id", + "readOnly": true, + "required": false, + "_key": "net_id" + }, + { + "type": "boolean", + "description": "Device has been suspended by operator.", + "api_fieldname": "operator_suspended", + "readOnly": true, + "required": false, + "_key": "operator_suspended" + }, + { + "type": "string", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "serial_number", + "readOnly": false, + "required": false, + "_key": "serial_number" + }, + { + "enum": [ + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" + ], + "type": "string", + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired.", + "api_fieldname": "state", + "readOnly": false, + "required": false, + "enum_reference": "device_state_enum", + "_key": "state" + }, + { + "type": "boolean", + "description": "Is the device suspended by the system?", + "api_fieldname": "system_suspended", + "readOnly": true, + "required": false, + "_key": "system_suspended" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The time this data object was updated.", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" }, { - "description": "Check detailed enrollment info, for example, date of claim or expiration date.\n\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id}\n```", + "type": "string", + "description": "The device vendor ID.", + "example": "00000000-0000-0000-0000-000000000000", + "api_fieldname": "vendor_id", + "readOnly": false, + "required": false, + "_key": "vendor_id" + } + ], + "field_renames": [], + "tags": [ + "Device directory - devices", + "Device security - device certificate renewals", + "Device directory - groups" + ], + "group_id": "Devices", + "_key": "device" + }, + { + "swagger_models": [ + "EnrollmentId", + "EnrollmentIdentities", + "EnrollmentIdentity" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account.\n
\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments \\\n-d '{\"enrollment_identity\": \"A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5\"}'\n```", "field_renames": [], "fields": [ { "type": "string", "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", + "pattern": "^A-[A-Za-z0-9:]{95}$", + "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", + "api_fieldname": "enrollment_identity", + "entity_fieldname": "enrollment_identity", + "parameter_fieldname": "enrollment_identity", + "in": "body", "required": true, - "_key": "id" + "_key": "enrollment_identity" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "OK. Pending enrollment data.", + "description": "Created. The enrollment claim has been created and is waiting for the device to connect.", "schema": { "type": "object", "required": [ @@ -36367,10 +36683,10 @@ "entity": "device_enrollment" } }, - "_key": "200" + "_key": "201" }, { - "description": "Bad request. Invalid enrollment identity.", + "description": "Bad request. The enrollment identity is not valid.", "schema": { "type": "object", "required": [ @@ -36443,7 +36759,7 @@ "_key": "400" }, { - "description": "Not found.", + "description": "The provided access token is not valid.", "schema": { "type": "object", "required": [ @@ -36513,274 +36829,137 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/device-enrollments/{id}", - "summary": "Get details of an single enrollment by ID.", - "return_type": "device_enrollment", - "return_info": { - "self": true, - "custom": false, - "type": "device_enrollment" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "created_at", - "claimed_at", - "enrollment_identity", - "account_id", - "expires_at", - "enrolled_device_id" - ], - "group_id": "Devices", - "operation_id": "getDeviceEnrollment", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_key": "account_id" - }, - { - "type": "string", - "description": "The time the device was claimed.", - "format": "date-time", - "api_fieldname": "claimed_at", - "readOnly": true, - "required": false, - "_key": "claimed_at" - }, - { - "type": "string", - "description": "The time of the enrollment identity creation.", - "format": "date-time", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "The ID of the device in the Device Directory once it is registered.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "enrolled_device_id", - "readOnly": true, - "required": false, - "_key": "enrolled_device_id" - }, - { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^A-[A-Za-z0-9:]{95}$", - "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", - "api_fieldname": "enrollment_identity", - "readOnly": false, - "required": true, - "_key": "enrollment_identity" - }, - { - "type": "string", - "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", - "format": "date-time", - "api_fieldname": "expires_at", - "readOnly": true, - "required": false, - "_key": "expires_at" - }, - { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - } - ], - "field_renames": [], - "tags": [ - "Public API" - ], - "group_id": "Devices", - "_key": "device_enrollment" - }, - { - "swagger_models": [ - "BulkResponse" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads\n\n```\n **To ensure your CSV file is valid:**\n 1. The first line of the file (header) is ignored.\n 1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored.\n 1. Valid enrollments begin with A followed by a - and 95 characters (examples below).\n 1. One enrollment ID per line. Empty lines are ignored.\n 1. Trailing comma at the end of the line is optional.\n 1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n 1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation.\n 1. Empty identities are ignored.\n 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid.\n 1. Use UTF-8 encoding.\n\n\n**A valid enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\",\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored.\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short identity.\n\"\", Empty quotation marks are an invalid identity\n\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored\"\n\n,,\n, This is also considered a blank line.\n```", - "field_renames": [], - "fields": [ - { - "in": "stream", - "name": "enrollment_identities", - "type": "file", - "required": true, - "description": "The `CSV` file containing the enrollment IDs. The maximum file size is 10 MB.", - "entity_fieldname": "enrollment_identities", - "api_fieldname": "enrollment_identities", - "external_param": true, - "parameter_fieldname": "enrollment_identities", - "_key": "enrollment_identities" - } - ], - "method": "post", - "mode": "create", - "responses": [ + "_key": "401" + }, { - "description": "Bulk upload data received and asynchronous processing started.", + "description": "Conflict. The requested identity to add already exists on this or another account.", "schema": { "type": "object", "required": [ + "code", + "message", "object", - "id", - "etag", - "created_at", - "account_id", - "status", - "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "request_id", + "type" ], "properties": [ - { - "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" - }, - { - "type": "string", - "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", - "format": "date-time", - "api_fieldname": "completed_at", - "entity_fieldname": "completed_at", - "_key": "completed_at" - }, - { - "type": "string", - "description": "The time of receiving the bulk creation task.", - "format": "date-time", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, { "type": "integer", - "example": 0, - "description": "The number of enrollment identities with failed processing.", - "api_fieldname": "errors_count", - "entity_fieldname": "errors_count", - "_key": "errors_count" - }, - { - "type": "string", - "description": "Link to error report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", - "api_fieldname": "errors_report_file", - "entity_fieldname": "errors_report_file", - "_key": "errors_report_file" - }, - { - "type": "string", - "description": "etag", - "example": "1", - "pattern": "[A-Za-z0-9]{0,256}", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "Link to full report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", - "api_fieldname": "full_report_file", - "entity_fieldname": "full_report_file", - "_key": "full_report_file" + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" }, { "type": "string", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "enrollment-identity-bulk-uploads" + "error" ], - "example": "enrollment-identity-bulk-uploads", - "api_fieldname": "object", - "entity_fieldname": "object", "_key": "object" }, { - "type": "integer", - "example": 0, - "description": "The number of enrollment identities processed until now.", - "api_fieldname": "processed_count", - "entity_fieldname": "processed_count", - "_key": "processed_count" - }, - { - "enum": [ - "new", - "processing", - "completed" - ], - "default": "new", - "example": "new", - "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", "type": "string", - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" - }, - { - "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_bulk_delete" - } + ] }, - "_key": "201" + "_key": "409" + } + ], + "path": "/v3/device-enrollments", + "summary": "Create a single enrollment.", + "return_type": "device_enrollment", + "return_info": { + "self": true, + "custom": false, + "type": "device_enrollment" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "id", + "created_at", + "claimed_at", + "account_id", + "expires_at", + "enrolled_device_id" + ], + "group_id": "Devices", + "operation_id": "createDeviceEnrollment", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "description": "To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to delete the enrollment and factory reset the device. For more information, see [Transferring ownership using First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html).\n
\n**Example:**\n```\ncurl -X DELETE \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id}\n```", + "field_renames": [], + "fields": [ + { + "in": "path", + "name": "id", + "type": "string", + "required": true, + "description": "Enrollment identity.", + "entity_fieldname": "id", + "api_fieldname": "id", + "external_param": false, + "parameter_fieldname": "id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "No content. The enrollment claim has been deleted.", + "_key": "204" }, { - "description": "Bad request.", + "description": "Bad request. Invalid enrollment identity.", "schema": { "type": "object", "required": [ @@ -36853,7 +37032,7 @@ "_key": "400" }, { - "description": "Invalid access token.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -36923,90 +37102,16 @@ } ] }, - "_key": "401" + "_key": "404" } ], - "path": "/v3/device-enrollments-bulk-uploads", - "summary": "Bulk upload.", - "return_type": "device_enrollment_bulk_create", + "path": "/v3/device-enrollments/{id}", + "summary": "Delete an enrollment by ID.", + "return_type": "device_enrollment", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_create" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter", - "id", - "account_id", - "created_at", - "status", - "total_count", - "processed_count", - "errors_count", - "completed_at", - "full_report_file", - "errors_report_file" - ], - "group_id": "Devices", - "operation_id": "createBulkDeviceEnrollment", - "pagination": false, - "request_content_type": "multipart/form-data", - "request_body": "file", - "_key": "create" - }, - { - "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", - "field_renames": [], - "fields": [], - "method": null, - "mode": "download_errors_report_file", - "responses": [], - "path": null, - "summary": "Download the error report file for the created the bulk enrollment.", - "return_type": "file", - "return_info": { - "self": false, - "custom": true, - "type": "file" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "filter" - ], - "group_id": "Devices", - "custom_method": "download_errors_report_file", - "spec": { - "summary": "Download the error report file for the created the bulk enrollment.", - "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", - "return_type": "file" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "download_errors_report_file" - }, - { - "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", - "field_renames": [], - "fields": [], - "method": null, - "mode": "download_full_report_file", - "responses": [], - "path": null, - "summary": "Download the full report file for the created of the bulk enrollment.", - "return_type": "file", - "return_info": { - "self": false, - "custom": true, - "type": "file" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -37017,169 +37122,320 @@ "filter" ], "group_id": "Devices", - "custom_method": "download_full_report_file", - "spec": { - "summary": "Download the full report file for the created of the bulk enrollment.", - "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", - "return_type": "file" - }, + "operation_id": "deleteDeviceEnrollment", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "download_full_report_file" + "_key": "delete" }, { - "description": "Provides information on bulk upload for the given ID, for example, bulk status and number of processed enrollment identities. Provides links to bulk upload reports as well.\n\n**Report file format:**\nThe report files have a header line, and the values are separated by commas. Delimit lines with a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180).\n\nAn example of a full report file:\n```\n\"entity__id\",\"entity__created_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n```\nAn example of an error report file:\n```\n\"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n```\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id}\n```", + "description": "Provides a list of pending and claimed enrollments.\n\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments\n```\nWith query parameters:\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\n'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'\n```", "field_renames": [], "fields": [ { "type": "string", - "description": "Bulk ID", + "description": "Entity ID to fetch after.", + "example": "00005a4e027f0a580a01081c00000000", "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, - "_key": "id" + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "name": "include", + "type": "string", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, + { + "type": "integer", + "description": "Number of results to return (2-1000).", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "default": "ASC", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "description": "ASC or DESC", + "required": false, + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "device_enrollment_order_enum", + "_key": "order" } ], "method": "get", - "mode": "read", + "mode": "list", "responses": [ { - "description": "Bulk upload entity found.", + "description": "OK.", "schema": { "type": "object", "required": [ "object", - "id", - "etag", - "created_at", - "account_id", - "status", + "limit", + "after", + "order", + "has_more", "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "data" ], "properties": [ { "type": "string", "description": "ID", "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_id" + "pattern": "^[A-Za-z0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { - "type": "string", - "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", - "format": "date-time", - "api_fieldname": "completed_at", - "entity_fieldname": "completed_at", - "_key": "completed_at" + "type": "array", + "items": { + "type": "object", + "required": [ + "object", + "id", + "etag", + "account_id", + "created_at", + "expires_at", + "claimed_at", + "enrollment_identity", + "enrolled_device_id" + ], + "properties": [ + { + "type": "string", + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "_key": "account_id" + }, + { + "type": "string", + "description": "The time the device was claimed.", + "format": "date-time", + "_key": "claimed_at" + }, + { + "type": "string", + "description": "The time of the enrollment identity creation.", + "format": "date-time", + "_key": "created_at" + }, + { + "type": "string", + "description": "The ID of the device in the Device Directory once it is registered.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "_key": "enrolled_device_id" + }, + { + "type": "string", + "description": "Enrollment identity.", + "pattern": "^A-[A-Za-z0-9:]{95}$", + "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", + "_key": "enrollment_identity" + }, + { + "type": "string", + "pattern": "[A-Za-z0-9]{1,256}", + "example": "7642xfaxz", + "_key": "etag" + }, + { + "type": "string", + "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", + "format": "date-time", + "_key": "expires_at" + }, + { + "type": "string", + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "_key": "id" + }, + { + "type": "string", + "enum": [ + "enrollment" + ], + "example": "enrollment", + "_key": "object" + } + ], + "foreign_key": { + "group": "Devices", + "entity": "device_enrollment" + } + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "The time of receiving the bulk creation task.", - "format": "date-time", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "type": "boolean", + "example": true, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { "type": "integer", - "example": 0, - "description": "The number of enrollment identities with failed processing.", - "api_fieldname": "errors_count", - "entity_fieldname": "errors_count", - "_key": "errors_count" - }, - { - "type": "string", - "description": "Link to error report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", - "api_fieldname": "errors_report_file", - "entity_fieldname": "errors_report_file", - "_key": "errors_report_file" - }, - { - "type": "string", - "description": "etag", - "example": "1", - "pattern": "[A-Za-z0-9]{0,256}", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "description": "Link to full report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", - "api_fieldname": "full_report_file", - "entity_fieldname": "full_report_file", - "_key": "full_report_file" - }, - { - "type": "string", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "Range 2-1000, or default.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", "enum": [ - "enrollment-identity-bulk-uploads" + "list" ], - "example": "enrollment-identity-bulk-uploads", + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "type": "integer", - "example": 0, - "description": "The number of enrollment identities processed until now.", - "api_fieldname": "processed_count", - "entity_fieldname": "processed_count", - "_key": "processed_count" - }, - { + "type": "string", "enum": [ - "new", - "processing", - "completed" + "ASC", + "DESC" ], - "default": "new", - "example": "new", - "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", - "type": "string", - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "default": "ASC", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", + "example": 100, + "format": "int32", + "minimum": 1, "api_fieldname": "total_count", "entity_fieldname": "total_count", "_key": "total_count" } ], + "pagination": true, "foreign_key": { "group": "Devices", - "entity": "device_enrollment_bulk_delete" + "entity": "device_enrollment" } }, "_key": "200" }, { - "description": "Bad request. Invalid bulk identity.", + "description": "Bad request. The access token could not be read.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "The provided access token is not valid.", "schema": { "type": "object", "required": [ @@ -37249,10 +37505,163 @@ } ] }, - "_key": "400" + "_key": "401" + } + ], + "path": "/v3/device-enrollments", + "summary": "Get a list of enrollments per account.", + "return_type": "paginated_response(device_enrollment)", + "return_info": { + "self": true, + "custom": false, + "type": "device_enrollment" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "has_more", + "total_count", + "data" + ], + "foreign_key_priority": "self", + "group_id": "Devices", + "operation_id": "getDeviceEnrollments", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device_enrollment" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Check detailed enrollment info, for example, date of claim or expiration date.\n\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id}\n```", + "field_renames": [], + "fields": [ + { + "type": "string", + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "OK. Pending enrollment data.", + "schema": { + "type": "object", + "required": [ + "object", + "id", + "etag", + "account_id", + "created_at", + "expires_at", + "claimed_at", + "enrollment_identity", + "enrolled_device_id" + ], + "properties": [ + { + "type": "string", + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "string", + "description": "The time the device was claimed.", + "format": "date-time", + "api_fieldname": "claimed_at", + "entity_fieldname": "claimed_at", + "_key": "claimed_at" + }, + { + "type": "string", + "description": "The time of the enrollment identity creation.", + "format": "date-time", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" + }, + { + "type": "string", + "description": "The ID of the device in the Device Directory once it is registered.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "enrolled_device_id", + "entity_fieldname": "enrolled_device_id", + "_key": "enrolled_device_id" + }, + { + "type": "string", + "description": "Enrollment identity.", + "pattern": "^A-[A-Za-z0-9:]{95}$", + "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", + "api_fieldname": "enrollment_identity", + "entity_fieldname": "enrollment_identity", + "_key": "enrollment_identity" + }, + { + "type": "string", + "pattern": "[A-Za-z0-9]{1,256}", + "example": "7642xfaxz", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", + "format": "date-time", + "api_fieldname": "expires_at", + "entity_fieldname": "expires_at", + "_key": "expires_at" + }, + { + "type": "string", + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "enum": [ + "enrollment" + ], + "example": "enrollment", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + } + ], + "foreign_key": { + "group": "Devices", + "entity": "device_enrollment" + } + }, + "_key": "200" }, { - "description": "Invalid access token.", + "description": "Bad request. Invalid enrollment identity.", "schema": { "type": "object", "required": [ @@ -37322,7 +37731,7 @@ } ] }, - "_key": "401" + "_key": "400" }, { "description": "Not found.", @@ -37398,13 +37807,13 @@ "_key": "404" } ], - "path": "/v3/device-enrollments-bulk-uploads/{id}", - "summary": "Get bulk upload entity.", - "return_type": "device_enrollment_bulk_create", + "path": "/v3/device-enrollments/{id}", + "summary": "Get details of an single enrollment by ID.", + "return_type": "device_enrollment", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_create" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -37413,18 +37822,15 @@ "etag", "type", "filter", - "account_id", "created_at", - "status", - "total_count", - "processed_count", - "errors_count", - "completed_at", - "full_report_file", - "errors_report_file" + "claimed_at", + "enrollment_identity", + "account_id", + "expires_at", + "enrolled_device_id" ], "group_id": "Devices", - "operation_id": "getBulkDeviceEnrollment", + "operation_id": "getDeviceEnrollment", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -37443,16 +37849,16 @@ }, { "type": "string", - "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", + "description": "The time the device was claimed.", "format": "date-time", - "api_fieldname": "completed_at", + "api_fieldname": "claimed_at", "readOnly": true, "required": false, - "_key": "completed_at" + "_key": "claimed_at" }, { "type": "string", - "description": "The time of receiving the bulk creation task.", + "description": "The time of the enrollment identity creation.", "format": "date-time", "api_fieldname": "created_at", "readOnly": true, @@ -37460,82 +37866,51 @@ "_key": "created_at" }, { - "type": "integer", - "example": 0, - "description": "The number of enrollment identities with failed processing.", - "api_fieldname": "errors_count", + "type": "string", + "description": "The ID of the device in the Device Directory once it is registered.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "enrolled_device_id", "readOnly": true, "required": false, - "_key": "errors_count" + "_key": "enrolled_device_id" }, { "type": "string", - "description": "Link to error report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", - "api_fieldname": "errors_report_file", - "readOnly": true, - "required": false, - "_key": "errors_report_file" + "description": "Enrollment identity.", + "pattern": "^A-[A-Za-z0-9:]{95}$", + "example": "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5", + "api_fieldname": "enrollment_identity", + "readOnly": false, + "required": true, + "_key": "enrollment_identity" }, { "type": "string", - "description": "Link to full report file.\nNull when creating bulk upload or delete.", - "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", - "api_fieldname": "full_report_file", + "description": "The enrollment claim expiration time. If the device does not connect to Device Management before expiration, the claim is removed without separate notice.", + "format": "date-time", + "api_fieldname": "expires_at", "readOnly": true, "required": false, - "_key": "full_report_file" + "_key": "expires_at" }, { "type": "string", - "description": "Bulk ID", + "description": "Enrollment identity.", "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", "api_fieldname": "id", "readOnly": false, "required": true, "_key": "id" - }, - { - "type": "integer", - "example": 0, - "description": "The number of enrollment identities processed until now.", - "api_fieldname": "processed_count", - "readOnly": true, - "required": false, - "_key": "processed_count" - }, - { - "enum": [ - "new", - "processing", - "completed" - ], - "default": "new", - "example": "new", - "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", - "type": "string", - "api_fieldname": "status", - "readOnly": true, - "required": false, - "enum_reference": "device_enrollment_bulk_create_status_enum", - "_key": "status" - }, - { - "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", - "api_fieldname": "total_count", - "readOnly": true, - "required": false, - "_key": "total_count" } ], "field_renames": [], "tags": [ - "Public API" + "Device ownership - enrollments" ], "group_id": "Devices", - "_key": "device_enrollment_bulk_create" + "_key": "device_enrollment" }, { "swagger_models": [ @@ -37544,7 +37919,7 @@ "primary_key_field": "id", "methods": [ { - "description": "With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to delete.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes\n\n```\n**To ensure your CSV file is valid:**\n1. The first line of the file (header) is ignored.\n1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored.\n1. Valid enrollments begin with A followed by a - and 95 characters (examples below).\n1. One enrollment ID per line. Empty lines are ignored.\n1. Trailing comma at the end of the line is optional.\n1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation.\n1. Empty identities are ignored.\n1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid.\n1. Use UTF-8 encoding.\n\n**A valid enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\",\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored,\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short identity.\n\"\", Empty quotation marks are an invalid identity.\n\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored.\"\n\n,,\n, This is also considered to a blank line.\n```", + "description": "With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads\n\n```\n **To ensure your CSV file is valid:**\n 1. The first line of the file (header) is ignored.\n 1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored.\n 1. Valid enrollments begin with A followed by a - and 95 characters (examples below).\n 1. One enrollment ID per line. Empty lines are ignored.\n 1. Trailing comma at the end of the line is optional.\n 1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n 1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation.\n 1. Empty identities are ignored.\n 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid.\n 1. Use UTF-8 encoding.\n\n\n**A valid enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\",\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored.\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short identity.\n\"\", Empty quotation marks are an invalid identity\n\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored\"\n\n,,\n, This is also considered a blank line.\n```", "field_renames": [], "fields": [ { @@ -37552,7 +37927,7 @@ "name": "enrollment_identities", "type": "file", "required": true, - "description": "The `CSV` file containing the enrollment IDs. The maximum file size is 10MB.", + "description": "The `CSV` file containing the enrollment IDs. The maximum file size is 10 MB.", "entity_fieldname": "enrollment_identities", "api_fieldname": "enrollment_identities", "external_param": true, @@ -37561,10 +37936,10 @@ } ], "method": "post", - "mode": "delete", + "mode": "create", "responses": [ { - "description": "Bulk delete data received and asynchronous processing started.", + "description": "Bulk upload data received and asynchronous processing started.", "schema": { "type": "object", "required": [ @@ -37616,6 +37991,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to error report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", "api_fieldname": "errors_report_file", @@ -37633,6 +38009,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to full report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", "api_fieldname": "full_report_file", @@ -37645,9 +38022,6 @@ "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, "_key": "id" }, { @@ -37693,7 +38067,7 @@ ], "foreign_key": { "group": "Devices", - "entity": "device_enrollment_bulk_create" + "entity": "device_enrollment_bulk_delete" } }, "_key": "201" @@ -37845,13 +38219,13 @@ "_key": "401" } ], - "path": "/v3/device-enrollments-bulk-deletes", - "summary": "Bulk delete.", - "return_type": "device_enrollment_bulk_delete", + "path": "/v3/device-enrollments-bulk-uploads", + "summary": "Bulk upload.", + "return_type": "device_enrollment_bulk_create", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_delete" + "type": "device_enrollment_bulk_create" }, "x_filter": {}, "x_deprecation": null, @@ -37872,11 +38246,11 @@ "errors_report_file" ], "group_id": "Devices", - "operation_id": "deleteBulkDeviceEnrollment", + "operation_id": "createBulkDeviceEnrollment", "pagination": false, "request_content_type": "multipart/form-data", "request_body": "file", - "_key": "delete" + "_key": "create" }, { "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", @@ -37886,7 +38260,7 @@ "mode": "download_errors_report_file", "responses": [], "path": null, - "summary": "Download the error report file for the bulk enrollment deletion.", + "summary": "Download the error report file for the created the bulk enrollment.", "return_type": "file", "return_info": { "self": false, @@ -37904,7 +38278,7 @@ "group_id": "Devices", "custom_method": "download_errors_report_file", "spec": { - "summary": "Download the error report file for the bulk enrollment deletion.", + "summary": "Download the error report file for the created the bulk enrollment.", "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", "return_type": "file" }, @@ -37920,7 +38294,7 @@ "mode": "download_full_report_file", "responses": [], "path": null, - "summary": "Download the full report file for the bulk enrollment deletion.", + "summary": "Download the full report file for the created of the bulk enrollment.", "return_type": "file", "return_info": { "self": false, @@ -37938,7 +38312,7 @@ "group_id": "Devices", "custom_method": "download_full_report_file", "spec": { - "summary": "Download the full report file for the bulk enrollment deletion.", + "summary": "Download the full report file for the created of the bulk enrollment.", "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", "return_type": "file" }, @@ -37947,7 +38321,7 @@ "_key": "download_full_report_file" }, { - "description": "Provides information on bulk delete for the given ID, for example, bulk status and the number of processed enrollment identities. Provides links to bulk delete reports as well.\n\n**Report file format:**\nThe report files have a header line and the value are separated by commas. The lines are delimited by a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180).\n\nAn example of a full report file:\n```\n\"entity__id\",\"entity__deleted_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n```\nAn example of an error report file:\n```\n\"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n```\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id}\n```", + "description": "Provides information on bulk upload for the given ID, for example, bulk status and number of processed enrollment identities. Provides links to bulk upload reports as well.\n\n**Report file format:**\nThe report files have a header line, and the values are separated by commas. Delimit lines with a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180).\n\nAn example of a full report file:\n```\n\"entity__id\",\"entity__created_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n```\nAn example of an error report file:\n```\n\"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n```\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id}\n```", "field_renames": [], "fields": [ { @@ -37966,7 +38340,7 @@ "mode": "read", "responses": [ { - "description": "Bulk delete entity found.", + "description": "Bulk upload entity found.", "schema": { "type": "object", "required": [ @@ -38018,6 +38392,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to error report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", "api_fieldname": "errors_report_file", @@ -38035,6 +38410,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to full report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", "api_fieldname": "full_report_file", @@ -38047,9 +38423,6 @@ "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, "_key": "id" }, { @@ -38095,7 +38468,7 @@ ], "foreign_key": { "group": "Devices", - "entity": "device_enrollment_bulk_create" + "entity": "device_enrollment_bulk_delete" } }, "_key": "200" @@ -38320,13 +38693,13 @@ "_key": "404" } ], - "path": "/v3/device-enrollments-bulk-deletes/{id}", - "summary": "Get bulk delete entity.", - "return_type": "device_enrollment_bulk_delete", + "path": "/v3/device-enrollments-bulk-uploads/{id}", + "summary": "Get bulk upload entity.", + "return_type": "device_enrollment_bulk_create", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_delete" + "type": "device_enrollment_bulk_create" }, "x_filter": {}, "x_deprecation": null, @@ -38346,7 +38719,7 @@ "errors_report_file" ], "group_id": "Devices", - "operation_id": "getBulkDeviceEnrollmentDelete", + "operation_id": "getBulkDeviceEnrollment", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -38392,6 +38765,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to error report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", "api_fieldname": "errors_report_file", @@ -38401,6 +38775,7 @@ }, { "type": "string", + "x-nullable": true, "description": "Link to full report file.\nNull when creating bulk upload or delete.", "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", "api_fieldname": "full_report_file", @@ -38413,10 +38788,8 @@ "description": "Bulk ID", "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, "readOnly": false, + "required": true, "_key": "id" }, { @@ -38441,7 +38814,7 @@ "api_fieldname": "status", "readOnly": true, "required": false, - "enum_reference": "device_enrollment_bulk_delete_status_enum", + "enum_reference": "device_enrollment_bulk_create_status_enum", "_key": "status" }, { @@ -38456,207 +38829,176 @@ ], "field_renames": [], "tags": [ - "Public API" + "Device ownership - enrollments" ], "group_id": "Devices", - "_key": "device_enrollment_bulk_delete" + "_key": "device_enrollment_bulk_create" }, { "swagger_models": [ - "BlackListedDeviceData", - "DenialAttemptsResponse" + "BulkResponse" ], "primary_key_field": "id", "methods": [ { - "description": "This produces a list of failed attempts to bootstrap using a particular certificate which is blacklisted (trusted_certificate).\nReturned list can be filtered by endpoint name. Trusted certificate ID filter is required.\n\n**Example usage:**\n```\ncurl -X GET -H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials?trusted_certificate_id__eq={cert-id}&endpoint_name__eq={endpoint_name}\n```\n", + "description": "With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to delete.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization: Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes\n\n```\n**To ensure your CSV file is valid:**\n1. The first line of the file (header) is ignored.\n1. Each line can contain comma-separated values, where the first value is the Enrollment ID. Everything after the first comma is ignored.\n1. Valid enrollments begin with A followed by a - and 95 characters (examples below).\n1. One enrollment ID per line. Empty lines are ignored.\n1. Trailing comma at the end of the line is optional.\n1. Lines are terminated with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n1. Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from the identity before validation.\n1. Empty identities are ignored.\n1. Valid enrollment identities may be enclosed within quotation marks. Whitespace inside quotation marks is not trimmed and will cause validation to fail. Empty quotation marks are also invalid.\n1. Use UTF-8 encoding.\n\n**A valid enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\",\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12, This text is ignored,\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12 , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\" , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\", First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23, Too-short identity.\n\"\", Empty quotation marks are an invalid identity.\n\" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored.\"\n\n,,\n, This is also considered to a blank line.\n```", "field_renames": [], "fields": [ { - "type": "string", - "description": "Optional parameter for pagination. Denied device ID.", - "api_fieldname": "after", - "entity_fieldname": "after", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "type": "integer", - "description": "Optional parameter for pagination.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "in": "query", - "name": "limit", - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" - }, - { - "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "Optional parameter for pagination.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", + "in": "stream", + "name": "enrollment_identities", + "type": "file", + "required": true, + "description": "The `CSV` file containing the enrollment IDs. The maximum file size is 10MB.", + "entity_fieldname": "enrollment_identities", + "api_fieldname": "enrollment_identities", "external_param": true, - "parameter_fieldname": "order", - "required": false, - "enum_reference": "device_enrollment_denial_order_enum", - "_key": "order" + "parameter_fieldname": "enrollment_identities", + "_key": "enrollment_identities" } ], - "method": "get", - "mode": "list", + "method": "post", + "mode": "delete", "responses": [ { - "description": "Query Success. Responding with List of Devices.", + "description": "Bulk delete data received and asynchronous processing started.", "schema": { "type": "object", "required": [ "object", - "data" + "id", + "etag", + "created_at", + "account_id", + "status", + "total_count", + "processed_count", + "errors_count", + "completet_at", + "full_report_file", + "errors_report_file" ], "properties": [ { "type": "string", - "description": "An offset token for current page.", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { - "items": { - "required": [ - "id", - "account_id", - "endpoint_name", - "trusted_certificate_id", - "created_at", - "object" - ], - "properties": [ - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "account id", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "account_id" - }, - { - "type": "string", - "format": "date-time", - "description": "date on which the failed bootstrap was attempted on", - "example": "2000-01-23T04:56:07.000+00:00", - "_key": "created_at" - }, - { - "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", - "_key": "endpoint_name" - }, - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "id of the recorded failed bootstrap attempt", - "example": "00005a4e027f0a580a04567c00000000", - "_key": "id" - }, - { - "type": "string", - "enum": [ - "denied_device" - ], - "_key": "object" - }, - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "Trusted certificate id", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "trusted_certificate_id" - } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_denial" - } - }, - "type": "array", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "type": "string", + "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", + "format": "date-time", + "api_fieldname": "completed_at", + "entity_fieldname": "completed_at", + "_key": "completed_at" }, { - "type": "boolean", - "description": "Are there more results available.", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "type": "string", + "description": "The time of receiving the bulk creation task.", + "format": "date-time", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "integer", - "description": "How many objects to retrieve in the page. The minimum limit is 2 and the maximum is 1000. Limit values outside of this range are set to the closest limit.", - "example": 50, - "minimum": 2, - "maximum": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "example": 0, + "description": "The number of enrollment identities with failed processing.", + "api_fieldname": "errors_count", + "entity_fieldname": "errors_count", + "_key": "errors_count" }, { "type": "string", - "description": "The type of this API object is a \"list\".", - "example": "list", + "x-nullable": true, + "description": "Link to error report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", + "api_fieldname": "errors_report_file", + "entity_fieldname": "errors_report_file", + "_key": "errors_report_file" + }, + { + "type": "string", + "description": "etag", + "example": "1", + "pattern": "[A-Za-z0-9]{0,256}", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "description": "Link to full report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", + "api_fieldname": "full_report_file", + "entity_fieldname": "full_report_file", + "_key": "full_report_file" + }, + { + "type": "string", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "enum": [ + "enrollment-identity-bulk-uploads" + ], + "example": "enrollment-identity-bulk-uploads", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "type": "string", + "type": "integer", + "example": 0, + "description": "The number of enrollment identities processed until now.", + "api_fieldname": "processed_count", + "entity_fieldname": "processed_count", + "_key": "processed_count" + }, + { "enum": [ - "ASC", - "DESC" + "new", + "processing", + "completed" ], - "description": "The creation time based order of the entries.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "default": "new", + "example": "new", + "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", + "type": "string", + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { - "format": "integer", "type": "integer", - "example": 1, + "example": 10, + "description": "Total number of enrollment identities found in the input CSV.", "api_fieldname": "total_count", "entity_fieldname": "total_count", "_key": "total_count" } ], - "pagination": true, "foreign_key": { "group": "Devices", - "entity": "device_enrollment_denial" + "entity": "device_enrollment_bulk_create" } }, - "_key": "200" + "_key": "201" }, { - "description": "JWT validation failed.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -38726,10 +39068,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "ID set in pagination parameter `after` not found.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -38799,85 +39141,151 @@ } ] }, - "_key": "404" + "_key": "401" } ], - "path": "/v3/device-enrollment-denials", - "summary": "Return list of devices which were denied to bootstrap due to being subjected to blacklisting.", - "return_type": "paginated_response(device_enrollment_denial)", + "path": "/v3/device-enrollments-bulk-deletes", + "summary": "Bulk delete.", + "return_type": "device_enrollment_bulk_delete", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_denial" - }, - "x_filter": { - "trusted_certificate_id": [ - "eq" - ], - "endpoint_name": [ - "eq" - ] + "type": "device_enrollment_bulk_delete" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", "filter", - "has_more", + "id", + "account_id", + "created_at", + "status", "total_count", - "data", - "trusted_certificate_id__eq", - "endpoint_name__eq" + "processed_count", + "errors_count", + "completed_at", + "full_report_file", + "errors_report_file" ], - "foreign_key_priority": "self", "group_id": "Devices", - "operation_id": "listEnrollmentDenialAttempts", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_denial" + "operation_id": "deleteBulkDeviceEnrollment", + "pagination": false, + "request_content_type": "multipart/form-data", + "request_body": "file", + "_key": "delete" + }, + { + "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", + "field_renames": [], + "fields": [], + "method": null, + "mode": "download_errors_report_file", + "responses": [], + "path": null, + "summary": "Download the error report file for the bulk enrollment deletion.", + "return_type": "file", + "return_info": { + "self": false, + "custom": true, + "type": "file" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Devices", + "custom_method": "download_errors_report_file", + "spec": { + "summary": "Download the error report file for the bulk enrollment deletion.", + "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", + "return_type": "file" }, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "download_errors_report_file" + }, + { + "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", + "field_renames": [], + "fields": [], + "method": null, + "mode": "download_full_report_file", + "responses": [], + "path": null, + "summary": "Download the full report file for the bulk enrollment deletion.", + "return_type": "file", + "return_info": { + "self": false, + "custom": true, + "type": "file" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Devices", + "custom_method": "download_full_report_file", + "spec": { + "summary": "Download the full report file for the bulk enrollment deletion.", + "description": "This method will download the CSV file containing detailed information on status of the bulk enrollment.", + "return_type": "file" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "download_full_report_file" }, { - "description": "Query for a single attempt to bootstrap with a blacklisted certificate by ID.\n\n**Example usage:**\n```\ncurl -X GET -H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials/{device_enrollment_denial_id}\n```\n", + "description": "Provides information on bulk delete for the given ID, for example, bulk status and the number of processed enrollment identities. Provides links to bulk delete reports as well.\n\n**Report file format:**\nThe report files have a header line and the value are separated by commas. The lines are delimited by a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180).\n\nAn example of a full report file:\n```\n\"entity__id\",\"entity__deleted_at\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"2018-09-07T12:10:58.428Z\",\"\",\"\",\"\",\"\"\n```\nAn example of an error report file:\n```\n\"entity__id\",\"error__code\",\"error__type\",\"error__message\",\"error__fields\"\n\"A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n\"A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72\",\"409\",\"duplicate\",\"Enrollment identity is already claimed in the mbed Cloud.\",\"\"\n```\n**Example:**\n```\ncurl -X GET \\\n-H 'Authorization: Bearer ' \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id}\n```", "field_renames": [], "fields": [ { - "in": "path", - "name": "device_enrollment_denial_id", "type": "string", - "description": "id of the recorded failed bootstrap attempt", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", "required": true, - "entity_fieldname": "device_enrollment_denial_id", - "api_fieldname": "device_enrollment_denial_id", - "external_param": true, - "parameter_fieldname": "device_enrollment_denial_id", - "_key": "device_enrollment_denial_id" + "_key": "id" } ], "method": "get", "mode": "read", "responses": [ { - "description": "Query Success. Responding with blacklisted device.", + "description": "Bulk delete entity found.", "schema": { + "type": "object", "required": [ + "object", "id", - "account_id", - "endpoint_name", - "trusted_certificate_id", + "etag", "created_at", - "object" + "account_id", + "status", + "total_count", + "processed_count", + "errors_count", + "completet_at", + "full_report_file", + "errors_report_file" ], "properties": [ { "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "account id", + "description": "ID", "example": "00005a4e027f0a580a01081c00000000", "api_fieldname": "account_id", "entity_fieldname": "account_id", @@ -38885,58 +39293,189 @@ }, { "type": "string", + "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", + "format": "date-time", + "api_fieldname": "completed_at", + "entity_fieldname": "completed_at", + "_key": "completed_at" + }, + { + "type": "string", + "description": "The time of receiving the bulk creation task.", "format": "date-time", - "description": "date on which the failed bootstrap was attempted on", - "example": "2000-01-23T04:56:07.000+00:00", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, + { + "type": "integer", + "example": 0, + "description": "The number of enrollment identities with failed processing.", + "api_fieldname": "errors_count", + "entity_fieldname": "errors_count", + "_key": "errors_count" + }, { "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" + "x-nullable": true, + "description": "Link to error report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", + "api_fieldname": "errors_report_file", + "entity_fieldname": "errors_report_file", + "_key": "errors_report_file" }, { "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "id of the recorded failed bootstrap attempt", - "example": "00005a4e027f0a580a04567c00000000", + "description": "etag", + "example": "1", + "pattern": "[A-Za-z0-9]{0,256}", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "x-nullable": true, + "description": "Link to full report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", + "api_fieldname": "full_report_file", + "entity_fieldname": "full_report_file", + "_key": "full_report_file" + }, + { + "type": "string", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", + "required": true, "_key": "id" }, { "type": "string", "enum": [ - "denied_device" + "enrollment-identity-bulk-uploads" ], + "example": "enrollment-identity-bulk-uploads", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { + "type": "integer", + "example": 0, + "description": "The number of enrollment identities processed until now.", + "api_fieldname": "processed_count", + "entity_fieldname": "processed_count", + "_key": "processed_count" + }, + { + "enum": [ + "new", + "processing", + "completed" + ], + "default": "new", + "example": "new", + "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "Trusted certificate id", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "trusted_certificate_id", - "entity_fieldname": "trusted_certificate_id", - "_key": "trusted_certificate_id" + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" + }, + { + "type": "integer", + "example": 10, + "description": "Total number of enrollment identities found in the input CSV.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], "foreign_key": { "group": "Devices", - "entity": "device_enrollment_denial" + "entity": "device_enrollment_bulk_create" } }, "_key": "200" }, { - "description": "JWT validation failed.", + "description": "Bad request. Invalid bulk identity.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -39009,7 +39548,7 @@ "_key": "401" }, { - "description": "ID not found.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -39082,13 +39621,13 @@ "_key": "404" } ], - "path": "/v3/device-enrollment-denials/{device_enrollment_denial_id}", - "summary": "Query for a single device by ID", - "return_type": "device_enrollment_denial", + "path": "/v3/device-enrollments-bulk-deletes/{id}", + "summary": "Get bulk delete entity.", + "return_type": "device_enrollment_bulk_delete", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_denial" + "type": "device_enrollment_bulk_delete" }, "x_filter": {}, "x_deprecation": null, @@ -39097,14 +39636,18 @@ "etag", "type", "filter", - "id", "account_id", - "endpoint_name", - "trusted_certificate_id", - "created_at" + "created_at", + "status", + "total_count", + "processed_count", + "errors_count", + "completed_at", + "full_report_file", + "errors_report_file" ], "group_id": "Devices", - "operation_id": "getEnrollmentDenialAttempt", + "operation_id": "getBulkDeviceEnrollmentDelete", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -39114,8 +39657,7 @@ "fields": [ { "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "account id", + "description": "ID", "example": "00005a4e027f0a580a01081c00000000", "api_fieldname": "account_id", "readOnly": true, @@ -39124,50 +39666,103 @@ }, { "type": "string", + "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", + "format": "date-time", + "api_fieldname": "completed_at", + "readOnly": true, + "required": false, + "_key": "completed_at" + }, + { + "type": "string", + "description": "The time of receiving the bulk creation task.", "format": "date-time", - "description": "date on which the failed bootstrap was attempted on", - "example": "2000-01-23T04:56:07.000+00:00", "api_fieldname": "created_at", "readOnly": true, "required": false, "_key": "created_at" }, + { + "type": "integer", + "example": 0, + "description": "The number of enrollment identities with failed processing.", + "api_fieldname": "errors_count", + "readOnly": true, + "required": false, + "_key": "errors_count" + }, { "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", - "api_fieldname": "endpoint_name", + "x-nullable": true, + "description": "Link to error report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv", + "api_fieldname": "errors_report_file", "readOnly": true, "required": false, - "_key": "endpoint_name" + "_key": "errors_report_file" }, { "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "id of the recorded failed bootstrap attempt", - "example": "00005a4e027f0a580a04567c00000000", - "api_fieldname": "id", + "x-nullable": true, + "description": "Link to full report file.\nNull when creating bulk upload or delete.", + "example": "https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv", + "api_fieldname": "full_report_file", "readOnly": true, "required": false, + "_key": "full_report_file" + }, + { + "type": "string", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "id", + "in": "path", + "required": true, + "readOnly": false, "_key": "id" }, { + "type": "integer", + "example": 0, + "description": "The number of enrollment identities processed until now.", + "api_fieldname": "processed_count", + "readOnly": true, + "required": false, + "_key": "processed_count" + }, + { + "enum": [ + "new", + "processing", + "completed" + ], + "default": "new", + "example": "new", + "description": "The state of the process is 'new' at the time of creation. If creation is still in progress, the state shows as 'processing'. When the request is fully processed, the state changes to 'completed'.", "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "Trusted certificate id", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "trusted_certificate_id", + "api_fieldname": "status", "readOnly": true, "required": false, - "_key": "trusted_certificate_id" + "enum_reference": "device_enrollment_bulk_delete_status_enum", + "_key": "status" + }, + { + "type": "integer", + "example": 10, + "description": "Total number of enrollment identities found in the input CSV.", + "api_fieldname": "total_count", + "readOnly": true, + "required": false, + "_key": "total_count" } ], "field_renames": [], "tags": [ - "EnrollmentDenials" + "Device ownership - enrollments" ], "group_id": "Devices", - "_key": "device_enrollment_denial" + "_key": "device_enrollment_bulk_delete" }, { "swagger_models": [ @@ -39177,7 +39772,7 @@ "primary_key_field": "id", "methods": [ { - "description": "List all device events for an account.\n\n**Example:**\nFollowing example gets device-events limiting returned results to max 5 events\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\\n-H 'Authorization: Bearer '\n```\nor to get events for certain device filter based on device_id:\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id= \\\n-H 'Authorization: Bearer '\n```", + "description": "List all or a filtered list of device events for the account. Device events are events significant to operation or lifetime, such as creation, firmware update, and suspension.\n\nTo see statistics for device connectivity and usage, use the [Statistics API](https://developer.pelion.com/docs/device-management-api/connect-statistics/).\n\n **Example:**\n Following example gets device-events limiting returned results to max 5 events\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \\\n -H 'Authorization: Bearer '\n ```\n or to get events for certain device filter based on device_id:\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id= \\\n -H 'Authorization: Bearer '\n ```", "field_renames": [], "fields": [ { @@ -39314,7 +39909,7 @@ { "type": "string", "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", + "description": "Category code that groups the event type by a summary category.", "_key": "event_type_category" }, { @@ -39500,7 +40095,7 @@ "_key": "list" }, { - "description": "Retrieve a specific device event.\n\n**Example:**\nTo fetch a specific event you can use the 'id' field form the '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4'\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/ \\\n-H 'Authorization: Bearer '\n```", + "description": "\"Retrieve a specific device event. See '/v3/device-events/' for information on device events, and how to get the device_event_id.\"\n\n**Example:**\nTo fetch a specific event you can use the 'id' field from '/v3/device-events'. Form of '016c03d40a4e000000000001001003b4'\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/ \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -39600,7 +40195,7 @@ { "type": "string", "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", + "description": "Category code that groups the event type by a summary category.", "api_fieldname": "event_type_category", "entity_fieldname": "event_type_category", "_key": "event_type_category" @@ -39775,7 +40370,7 @@ { "type": "string", "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", + "description": "Category code that groups the event type by a summary category.", "api_fieldname": "event_type_category", "readOnly": true, "required": false, @@ -39823,7 +40418,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Add one device to a group.", + "description": "Add one device to a group. A device can be in multiple groups.", "field_renames": [], "fields": [ { @@ -40135,7 +40730,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -40173,7 +40768,7 @@ { "type": "string", "format": "date-time", - "description": "The time the campaign was created.", + "description": "The time the group was created.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", @@ -40197,7 +40792,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -40248,7 +40843,7 @@ { "type": "string", "format": "date-time", - "description": "The time the object was updated.", + "description": "The time this object was updated.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", @@ -40513,7 +41108,7 @@ "_key": "create" }, { - "description": "Delete a group.", + "description": "Delete a group. This deletes the group, but not the devices in the group.", "field_renames": [], "fields": [ { @@ -40710,7 +41305,7 @@ "_key": "delete" }, { - "description": "Get a page of devices.", + "description": "Get a page of devices in a specified group.", "field_renames": [], "fields": [ { @@ -40834,7 +41429,7 @@ }, "operator_suspended": { "type": "boolean", - "description": "Is the device suspended by the operator?" + "description": "Device has been suspended by operator." }, "last_operator_suspended_category": { "type": "string", @@ -40882,7 +41477,7 @@ "enabled", "blocked" ], - "description": "The lifecycle status of the device.", + "description": "The lifecycle status of the device.\n* Enabled: The device is allowed to connect to Pelion Device Management.\n* Blocked: The device is prevented from connecting to Pelion Device Management. Device can be, for example, 'suspended'.", "example": "enabled" }, "account_id": { @@ -40912,6 +41507,18 @@ "description": "The certificate issuer's ID.", "example": "00000000000000000000000000000000" }, + "component_attributes": { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128 + }, + "description": "Up to ten custom key-value attributes. Note that keys cannot begin with a number. Both keys and values are limited to 128 characters. Updating this field replaces existing contents.", + "example": { + "key": "value" + } + }, "connector_expiration_date": { "format": "date", "type": "string", @@ -40954,7 +41561,7 @@ "type": "string", "maxLength": 2000, "description": "The description of the device.", - "example": "description" + "example": "Temperature measuring device" }, "device_class": { "type": "string", @@ -40975,7 +41582,7 @@ }, "endpoint_name": { "type": "string", - "description": "The endpoint name given to the device.", + "description": "The endpoint name given to the device. The endpoint_name is from the device certificate and is set by factory tool.", "example": "00000000-0000-0000-0000-000000000000", "readOnly": true }, @@ -40998,7 +41605,7 @@ }, "host_gateway": { "type": "string", - "description": "The ID of the host gateway, if appropriate.", + "description": "The ID of the host gateway, if appropriate. A device behind Edge has this host_gateway set.", "example": "" }, "manifest": { @@ -41018,19 +41625,26 @@ "direct" ], "type": "string", - "description": "The ID of the channel used to communicate with the device." + "description": "NOT USED: The ID of the channel used to communicate with the device." }, "mechanism_url": { "type": "string", - "description": "The address of the connector to use.", + "description": "NOT USED: The address of the connector to use.", "example": "" }, "name": { "type": "string", "maxLength": 128, - "description": "The name of the device.", + "description": "The name given by the web application for the device. Device itself provides only the endpoint_name.", "example": "00000000-0000-0000-0000-000000000000" }, + "net_id": { + "type": "string", + "default": "", + "maxLength": 40, + "description": "Private network identifier. Used to group nodes connected to a specific border router.", + "example": "0000:0000:0000:0000:0000:0000:0000:0000" + }, "object": { "type": "string", "description": "The API resource entity.", @@ -41038,7 +41652,7 @@ }, "serial_number": { "type": "string", - "description": "The serial number of the device.", + "description": "The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) of the device. The serial number is injected by the factory tool during manufacturing.", "example": "00000000-0000-0000-0000-000000000000" }, "state": { @@ -41050,13 +41664,13 @@ "deregistered" ], "type": "string", - "description": "The current state of the device." + "description": "The current state of the device.\n* Unenrolled: The device has been created, but has not yet bootstrapped or connected to Device Management.\n* Cloud_enrolling: The device is bootstrapping for the first time. This state is set only while bootstrapping is in progress. For example, an external CA gives an error, and the device tries to bootstrap again after few seconds.\n* Bootstrapped: The device has bootstrapped, and has credentials to connect to Device Management.\n* Registered: The device has registered with Pelion Device Management. [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) resources.\n* Deregistered: The device has requested deregistration, or its registration has expired." }, "updated_at": { "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The time the object was updated." + "description": "The time this data object was updated." }, "vendor_id": { "type": "string", @@ -41547,6 +42161,12 @@ "in", "nin" ], + "net_id": [ + "eq", + "neq", + "in", + "nin" + ], "serial_number": [ "eq", "neq", @@ -41699,6 +42319,10 @@ "name__neq", "name__in", "name__nin", + "net_id__eq", + "net_id__neq", + "net_id__in", + "net_id__nin", "serial_number__eq", "serial_number__neq", "serial_number__in", @@ -41811,7 +42435,7 @@ { "type": "string", "format": "date-time", - "description": "The time the campaign was created.", + "description": "The time the group was created.", "example": "2017-05-22T12:37:55.576563Z", "_key": "created_at" }, @@ -41831,7 +42455,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "_key": "description" @@ -41870,7 +42494,7 @@ { "type": "string", "format": "date-time", - "description": "The time the object was updated.", + "description": "The time this object was updated.", "example": "2017-05-22T12:37:55.576563Z", "_key": "updated_at" } @@ -42173,7 +42797,7 @@ "_key": "list" }, { - "description": "Get a group.", + "description": "Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) info what contains info of the group, for example, name and updated date. To list the devices in the group, use '/v3/device-groups/{device-group-id}/devices/'.", "field_renames": [], "fields": [ { @@ -42199,7 +42823,7 @@ { "type": "string", "format": "date-time", - "description": "The time the campaign was created.", + "description": "The time the group was created.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", @@ -42223,7 +42847,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -42274,7 +42898,7 @@ { "type": "string", "format": "date-time", - "description": "The time the object was updated.", + "description": "The time this object was updated.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", @@ -42827,7 +43451,7 @@ "_key": "remove_device" }, { - "description": "Modify the attributes of a group.", + "description": "Modify the attributes of a group, such as the description.", "field_renames": [], "fields": [ { @@ -42853,7 +43477,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -42902,7 +43526,7 @@ { "type": "string", "format": "date-time", - "description": "The time the campaign was created.", + "description": "The time the group was created.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", @@ -42926,7 +43550,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -42977,7 +43601,7 @@ { "type": "string", "format": "date-time", - "description": "The time the object was updated.", + "description": "The time this object was updated.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", @@ -43245,7 +43869,7 @@ { "type": "string", "format": "date-time", - "description": "The time the campaign was created.", + "description": "The time the group was created.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "readOnly": true, @@ -43271,7 +43895,7 @@ }, { "type": "string", - "maxLength": 2000, + "maxLength": 1024, "description": "The description of the group.", "example": "Devices on the factory floor.", "api_fieldname": "description", @@ -43310,7 +43934,7 @@ { "type": "string", "format": "date-time", - "description": "The time the object was updated.", + "description": "The time this object was updated.", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "updated_at", "readOnly": true, @@ -43333,7 +43957,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create a firmware image.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \\\n-H 'Authorization: ' \\\n-H 'Content-Type: multipart/form-data' \\\n-F 'datafile=@myimage.bin;type=application/octet-stream'\n-F 'description=bla bla' \\\n-F 'name=My Linux Image'\n```\n", + "description": "Create a firmware image.\n
**Note:** Only use this API for images smaller than 100 MB. For larger images, [upload in chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html).\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \\\n-H 'Authorization: Bearer ' \\\n-H 'Content-Type: multipart/form-data' \\\n-F 'datafile=@myimage.bin;type=application/octet-stream'\n-F 'description=bla bla' \\\n-F 'name=My Linux Image'\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -43344,6 +43968,7 @@ { "description": "The description of the object.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "a description", "api_fieldname": "description", @@ -43354,11 +43979,12 @@ "_key": "description" }, { - "description": "The firmware image file to upload.", + "description": "The firmware image file to upload. File name must not exceed 166 characters.", "in": "stream", "name": "datafile", "required": true, "type": "file", + "maxLength": 166, "entity_fieldname": "firmware_image_file", "api_fieldname": "datafile", "external_param": true, @@ -43368,6 +43994,7 @@ { "description": "The firmware image name.", "type": "string", + "format": "free text", "maxLength": 128, "api_fieldname": "name", "entity_fieldname": "name", @@ -43415,71 +44042,351 @@ "object": { "description": "Entity name: always 'firmware-image'.", "type": "string", + "example": "firmware-image", "api_fieldname": "object", "entity_fieldname": "object" }, "datafile": { - "description": "The firmware image file URL", + "description": "The firmware image file URL.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "http://bucket.com/myimage.elf", "api_fieldname": "datafile", "entity_fieldname": "datafile_url" }, - "datafile_checksum": { - "description": "The checksum (sha256) generated for the datafile.", + "datafile_checksum": { + "description": "The checksum (sha256) generated for the datafile.", + "type": "string", + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", + "api_fieldname": "datafile_checksum", + "entity_fieldname": "datafile_checksum" + }, + "datafile_size": { + "description": "The size of the datafile in bytes.", + "format": "int64", + "type": "integer", + "api_fieldname": "datafile_size", + "entity_fieldname": "datafile_size" + }, + "description": { + "description": "The description of the object.", + "type": "string", + "format": "free text", + "maxLength": 2000, + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description" + }, + "id": { + "description": "The firmware image ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", + "api_fieldname": "id", + "entity_fieldname": "id" + }, + "name": { + "description": "The firmware image name.", + "type": "string", + "format": "free text", + "maxLength": 128, + "api_fieldname": "name", + "entity_fieldname": "name" + }, + "_key": "properties" + } + ], + "_key": "201" + }, + { + "description": "Cannot validate the data used to create the firmware image.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Firmware image too large.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "datafile_checksum", - "entity_fieldname": "datafile_checksum" - }, - "datafile_size": { - "description": "The size of the datafile in bytes.", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "entity_fieldname": "datafile_size" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "description": { - "description": "The description of the object.", + { "type": "string", - "maxLength": 2000, - "example": "a description", - "api_fieldname": "description", - "entity_fieldname": "description" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "id": { - "description": "The firmware image ID.", + { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "name": { - "description": "The firmware image name.", + { "type": "string", - "maxLength": 128, - "api_fieldname": "name", - "entity_fieldname": "name" - }, - "_key": "properties" - } - ], - "_key": "201" - }, - { - "description": "Cannot validate the data used to create the firmware image.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Forbidden.", - "_key": "403" - }, - { - "description": "Firmware image too large.", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "413" } ], @@ -43519,7 +44426,7 @@ "_key": "create" }, { - "description": "Delete a firmware image.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Delete a firmware image.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -43533,8 +44440,7 @@ "name": "image_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "image_id", "external_param": false, @@ -43551,14 +44457,221 @@ }, { "description": "Bad Request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Firmware image not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -43589,7 +44702,7 @@ "_key": "delete" }, { - "description": "List all firmware images.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \\\n-H 'Authorization: '\n```\n", + "description": "List all firmware images.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -43704,17 +44817,18 @@ }, "object": { "description": "Entity name: always 'firmware-image'.", - "type": "string" + "type": "string", + "example": "firmware-image" }, "datafile": { - "description": "The firmware image file URL", + "description": "The firmware image file URL.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000" + "example": "http://bucket.com/myimage.elf" }, "datafile_checksum": { "description": "The checksum (sha256) generated for the datafile.", "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000" + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e" }, "datafile_size": { "description": "The size of the datafile in bytes.", @@ -43724,17 +44838,20 @@ "description": { "description": "The description of the object.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "a description" }, "id": { "description": "The firmware image ID.", "type": "string", - "example": "00000000000000000000000000000000" + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5" }, "name": { "description": "The firmware image name.", "type": "string", + "format": "free text", "maxLength": 128 }, "_key": "properties" @@ -43758,50 +44875,258 @@ "_key": "limit" }, { - "description": "Entity name: always 'list'.", + "description": "Entity name: always 'list'.", + "type": "string", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "format": "int32", + "type": "integer", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "firmware_image" + } + }, + "_key": "200" + }, + { + "description": "Bad Request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Unable to find content.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { "type": "string", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "ASC", - "DESC" + "error" ], - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "_key": "object" }, { - "format": "int32", - "type": "integer", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_image" - } + ] }, - "_key": "200" - }, - { - "description": "Bad Request.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to find content.", "_key": "404" } ], @@ -43921,7 +45246,7 @@ "_key": "list" }, { - "description": "Retrieve a firmware image.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Retrieve a firmware image.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -43932,7 +45257,8 @@ { "description": "The firmware image ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", "api_fieldname": "id", "entity_fieldname": "id", "parameter_fieldname": "image_id", @@ -43979,20 +45305,21 @@ "object": { "description": "Entity name: always 'firmware-image'.", "type": "string", + "example": "firmware-image", "api_fieldname": "object", "entity_fieldname": "object" }, "datafile": { - "description": "The firmware image file URL", + "description": "The firmware image file URL.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "http://bucket.com/myimage.elf", "api_fieldname": "datafile", "entity_fieldname": "datafile_url" }, "datafile_checksum": { "description": "The checksum (sha256) generated for the datafile.", "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", "api_fieldname": "datafile_checksum", "entity_fieldname": "datafile_checksum" }, @@ -44006,6 +45333,7 @@ "description": { "description": "The description of the object.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "a description", "api_fieldname": "description", @@ -44014,13 +45342,15 @@ "id": { "description": "The firmware image ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", "api_fieldname": "id", "entity_fieldname": "id" }, "name": { "description": "The firmware image name.", "type": "string", + "format": "free text", "maxLength": 128, "api_fieldname": "name", "entity_fieldname": "name" @@ -44032,14 +45362,221 @@ }, { "description": "Bad Request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Firmware image can't be found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -44091,7 +45628,7 @@ { "description": "The checksum (sha256) generated for the datafile.", "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", "api_fieldname": "datafile_checksum", "readOnly": true, "required": false, @@ -44107,9 +45644,9 @@ "_key": "datafile_size" }, { - "description": "The firmware image file URL", + "description": "The firmware image file URL.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "http://bucket.com/myimage.elf", "api_fieldname": "datafile", "readOnly": true, "required": false, @@ -44118,6 +45655,7 @@ { "description": "The description of the object.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "a description", "api_fieldname": "description", @@ -44128,7 +45666,8 @@ { "description": "The firmware image ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", "api_fieldname": "id", "readOnly": false, "required": true, @@ -44137,6 +45676,7 @@ { "description": "The firmware image name.", "type": "string", + "format": "free text", "maxLength": 128, "api_fieldname": "name", "readOnly": false, @@ -44174,7 +45714,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Upload a firmware manifest. The API enforces a maximum manifest size of 2KB.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\\n-H 'Authorization: ' \\\n-H 'Content-Type: multipart/form-data' \\\n-F 'datafile=@myimage.bin;type=application/octet-stream' \\\n-F 'description=bla bla' \\\n-F 'key_table=@myKeyTable.proto;type=' \\\n-F 'name=My Manifest'\n```\n", + "description": "Upload a firmware manifest. The API enforces a maximum manifest size of 2KB.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\\n-H 'Authorization: Bearer ' \\\n-H 'Content-Type: multipart/form-data' \\\n-F 'datafile=@myimage.bin;type=application/octet-stream' \\\n-F 'description=bla bla' \\\n-F 'key_table=@myKeyTable.proto;type=' \\\n-F 'name=My Manifest'\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -44189,6 +45729,7 @@ { "description": "The description of the firmware manifest.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "", "api_fieldname": "description", @@ -44199,7 +45740,7 @@ "_key": "description" }, { - "description": "The manifest file to create. The API gateway enforces the account-specific file size.", + "description": "The manifest file to create. The API gateway enforces the account-specific file size. File name must not exceed 100 characters.", "in": "stream", "name": "datafile", "required": true, @@ -44211,7 +45752,7 @@ "_key": "firmware_manifest_file" }, { - "description": "The key table of pre-shared keys for devices. The table is generated by the manifest tool.", + "description": "The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name must not exceed 100 characters.", "in": "stream", "name": "key_table", "required": false, @@ -44223,15 +45764,16 @@ "_key": "key_table_file" }, { - "description": "The name of the object.", + "description": "The name of the manifest.", "type": "string", + "format": "free text", "maxLength": 128, - "example": "default_object_name", + "example": "manifest_name", "api_fieldname": "name", "entity_fieldname": "name", "parameter_fieldname": "name", "in": "stream", - "required": false, + "required": true, "_key": "name" } ], @@ -44273,84 +45815,368 @@ "object": { "description": "Entity name: always 'firmware-manifest'.", "type": "string", + "example": "firmware-manifest", "api_fieldname": "object", "entity_fieldname": "object" }, + "manifest_schema_version": { + "description": "Version of the manifest schema (1 or 3).", + "type": "string", + "enum": [ + "1", + "3" + ], + "api_fieldname": "manifest_schema_version", + "entity_fieldname": "manifest_schema_version" + }, "datafile": { - "description": "The URL of the firmware manifest binary", + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", "type": "string", - "example": "http://example.com/12345678901234567890123456789012", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest", "api_fieldname": "datafile", "entity_fieldname": "datafile_url" }, "datafile_size": { - "description": "The size of the datafile in bytes", - "format": "int64", + "description": "The size of the firmware manifest in bytes.", "type": "integer", + "format": "int64", "api_fieldname": "datafile_size", "entity_fieldname": "datafile_size" }, + "delivered_payload_url": { + "description": "The URL of the payload to deliver to the device.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/myimage.elf", + "api_fieldname": "delivered_payload_url", + "entity_fieldname": "delivered_payload_url" + }, + "delivered_payload_size": { + "description": "The size in bytes of the payload to deliver to the device.", + "type": "integer", + "format": "int64", + "api_fieldname": "delivered_payload_size", + "entity_fieldname": "delivered_payload_size" + }, + "delivered_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the payload to deliver to the device.", + "type": "string", + "format": "hex", + "example": "c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc", + "api_fieldname": "delivered_payload_digest", + "entity_fieldname": "delivered_payload_digest" + }, + "delivered_payload_type": { + "description": "Type of the payload to deliver to the device (full or delta image).", + "type": "string", + "enum": [ + "full", + "delta" + ], + "api_fieldname": "delivered_payload_type", + "entity_fieldname": "delivered_payload_type" + }, + "precursor_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the currently installed payload.", + "type": "string", + "example": "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f", + "api_fieldname": "precursor_payload_digest", + "entity_fieldname": "precursor_payload_digest" + }, "description": { "description": "The description of the firmware manifest.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "", "api_fieldname": "description", "entity_fieldname": "description" }, "device_class": { - "description": "The class of the device.", + "description": "The device class ID.", "type": "string", - "example": "00000000-0000-0000-0000-000000000000", + "format": "uuid", + "example": "42c4d8de-704d-546e-b9d3-1ce1eb316167", "api_fieldname": "device_class", "entity_fieldname": "device_class" }, - "key_table": { - "description": "The key table of pre-shared keys for devices.", + "device_vendor": { + "description": "The device vendor ID.", + "type": "string", + "format": "uuid", + "example": "5d645eae-c231-5a89-9764-2e655cd94fa8", + "api_fieldname": "device_vendor", + "entity_fieldname": "device_vendor" + }, + "update_priority": { + "description": "Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions.", + "type": "integer", + "format": "int64", + "api_fieldname": "update_priority", + "entity_fieldname": "update_priority" + }, + "key_table": { + "description": "The key table of pre-shared keys for devices.", + "type": "string", + "format": "uri", + "example": "http://example.com/key-table", + "api_fieldname": "key_table", + "entity_fieldname": "key_table_url" + }, + "id": { + "description": "The firmware manifest ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "12345678901234567890123456789012", + "api_fieldname": "id", + "entity_fieldname": "id" + }, + "name": { + "description": "The name of the manifest.", + "type": "string", + "format": "free text", + "maxLength": 128, + "example": "manifest_name", + "api_fieldname": "name", + "entity_fieldname": "name" + }, + "timestamp": { + "description": "The firmware manifest version as a timestamp.", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "api_fieldname": "timestamp", + "entity_fieldname": "timestamp" + }, + "parsed_raw_manifest": { + "description": "Raw manifest in JSON format, parsed from ASN.1 DER encoding.\nFields may change. Backwards compatibility is not guaranteed.\nRecommended for debugging only.\n", + "type": "object", + "api_fieldname": "parsed_raw_manifest", + "entity_fieldname": "parsed_raw_manifest" + }, + "_key": "properties" + } + ], + "_key": "201" + }, + { + "description": "Validation error. The data used to create the firmware manifest did not validate and/or the manifest uploaded exceeded 2 KB in size.\n", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { "type": "string", - "format": "uri", - "example": "http://example.com", - "api_fieldname": "key_table", - "entity_fieldname": "key_table_url" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "id": { - "description": "The firmware manifest ID.", + { "type": "string", - "example": "12345678901234567890123456789012", - "api_fieldname": "id", - "entity_fieldname": "id" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "name": { - "description": "The name of the object.", + { "type": "string", - "maxLength": 128, - "example": "default_object_name", - "api_fieldname": "name", - "entity_fieldname": "name" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "timestamp": { - "description": "The firmware manifest version as a timestamp.", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "api_fieldname": "timestamp", - "entity_fieldname": "timestamp" - }, - "_key": "properties" - } - ], - "_key": "201" - }, - { - "description": "Validation error. The data used to create the firmware manifest did not validate and/or the manifest uploaded exceeded 2 KB in size.\n", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Forbidden.", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "403" } ], @@ -44371,10 +46197,19 @@ "filter", "created_at", "updated_at", + "manifest_schema_version", "datafile_size", + "delivered_payload_url", + "delivered_payload_size", + "delivered_payload_digest", + "delivered_payload_type", + "precursor_payload_digest", "device_class", + "device_vendor", + "update_priority", "id", "timestamp", + "parsed_raw_manifest", "datafile_url", "key_table_url" ], @@ -44393,7 +46228,7 @@ "_key": "create" }, { - "description": "Delete a firmware manifest.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Delete a firmware manifest.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -44411,8 +46246,7 @@ "name": "manifest_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "manifest_id", "external_param": false, @@ -44429,14 +46263,221 @@ }, { "description": "Bad Request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Firmware manifest not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -44467,7 +46508,7 @@ "_key": "delete" }, { - "description": "List all firmware manifests.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\\n-H 'Authorization: '\n```\n", + "description": "List all firmware manifests.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -44586,45 +46627,100 @@ }, "object": { "description": "Entity name: always 'firmware-manifest'.", - "type": "string" + "type": "string", + "example": "firmware-manifest" + }, + "manifest_schema_version": { + "description": "Version of the manifest schema (1 or 3).", + "type": "string", + "enum": [ + "1", + "3" + ] }, "datafile": { - "description": "The URL of the firmware manifest binary", + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", "type": "string", - "example": "http://example.com/12345678901234567890123456789012" + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest" }, "datafile_size": { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer" + "description": "The size of the firmware manifest in bytes.", + "type": "integer", + "format": "int64" + }, + "delivered_payload_url": { + "description": "The URL of the payload to deliver to the device.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/myimage.elf" + }, + "delivered_payload_size": { + "description": "The size in bytes of the payload to deliver to the device.", + "type": "integer", + "format": "int64" + }, + "delivered_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the payload to deliver to the device.", + "type": "string", + "format": "hex", + "example": "c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc" + }, + "delivered_payload_type": { + "description": "Type of the payload to deliver to the device (full or delta image).", + "type": "string", + "enum": [ + "full", + "delta" + ] + }, + "precursor_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the currently installed payload.", + "type": "string", + "example": "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f" }, "description": { "description": "The description of the firmware manifest.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "" }, "device_class": { - "description": "The class of the device.", + "description": "The device class ID.", "type": "string", - "example": "00000000-0000-0000-0000-000000000000" + "format": "uuid", + "example": "42c4d8de-704d-546e-b9d3-1ce1eb316167" + }, + "device_vendor": { + "description": "The device vendor ID.", + "type": "string", + "format": "uuid", + "example": "5d645eae-c231-5a89-9764-2e655cd94fa8" + }, + "update_priority": { + "description": "Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions.", + "type": "integer", + "format": "int64" }, "key_table": { "description": "The key table of pre-shared keys for devices.", "type": "string", "format": "uri", - "example": "http://example.com" + "example": "http://example.com/key-table" }, "id": { "description": "The firmware manifest ID.", "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "example": "12345678901234567890123456789012" }, "name": { - "description": "The name of the object.", + "description": "The name of the manifest.", "type": "string", + "format": "free text", "maxLength": 128, - "example": "default_object_name" + "example": "manifest_name" }, "timestamp": { "description": "The firmware manifest version as a timestamp.", @@ -44632,6 +46728,10 @@ "example": "2017-05-22T12:37:55.576563Z", "type": "string" }, + "parsed_raw_manifest": { + "description": "Raw manifest in JSON format, parsed from ASN.1 DER encoding.\nFields may change. Backwards compatibility is not guaranteed.\nRecommended for debugging only.\n", + "type": "object" + }, "_key": "properties" } ], @@ -44655,6 +46755,7 @@ { "description": "Entity name: always 'list'.", "type": "string", + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -44689,14 +46790,221 @@ }, { "description": "Bad Request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Unable to find content.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -44826,7 +47134,7 @@ "_key": "list" }, { - "description": "Retrieve a firmware manifest.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Retrieve a firmware manifest.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [ { "api_fieldname": "datafile", @@ -44841,6 +47149,7 @@ { "description": "The firmware manifest ID.", "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "example": "12345678901234567890123456789012", "api_fieldname": "id", "entity_fieldname": "id", @@ -44888,58 +47197,129 @@ "object": { "description": "Entity name: always 'firmware-manifest'.", "type": "string", + "example": "firmware-manifest", "api_fieldname": "object", "entity_fieldname": "object" }, + "manifest_schema_version": { + "description": "Version of the manifest schema (1 or 3).", + "type": "string", + "enum": [ + "1", + "3" + ], + "api_fieldname": "manifest_schema_version", + "entity_fieldname": "manifest_schema_version" + }, "datafile": { - "description": "The URL of the firmware manifest binary", + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", "type": "string", - "example": "http://example.com/12345678901234567890123456789012", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest", "api_fieldname": "datafile", "entity_fieldname": "datafile_url" }, "datafile_size": { - "description": "The size of the datafile in bytes", - "format": "int64", + "description": "The size of the firmware manifest in bytes.", "type": "integer", + "format": "int64", "api_fieldname": "datafile_size", "entity_fieldname": "datafile_size" }, + "delivered_payload_url": { + "description": "The URL of the payload to deliver to the device.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/myimage.elf", + "api_fieldname": "delivered_payload_url", + "entity_fieldname": "delivered_payload_url" + }, + "delivered_payload_size": { + "description": "The size in bytes of the payload to deliver to the device.", + "type": "integer", + "format": "int64", + "api_fieldname": "delivered_payload_size", + "entity_fieldname": "delivered_payload_size" + }, + "delivered_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the payload to deliver to the device.", + "type": "string", + "format": "hex", + "example": "c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc", + "api_fieldname": "delivered_payload_digest", + "entity_fieldname": "delivered_payload_digest" + }, + "delivered_payload_type": { + "description": "Type of the payload to deliver to the device (full or delta image).", + "type": "string", + "enum": [ + "full", + "delta" + ], + "api_fieldname": "delivered_payload_type", + "entity_fieldname": "delivered_payload_type" + }, + "precursor_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the currently installed payload.", + "type": "string", + "example": "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f", + "api_fieldname": "precursor_payload_digest", + "entity_fieldname": "precursor_payload_digest" + }, "description": { "description": "The description of the firmware manifest.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "", "api_fieldname": "description", "entity_fieldname": "description" }, "device_class": { - "description": "The class of the device.", + "description": "The device class ID.", "type": "string", - "example": "00000000-0000-0000-0000-000000000000", + "format": "uuid", + "example": "42c4d8de-704d-546e-b9d3-1ce1eb316167", "api_fieldname": "device_class", "entity_fieldname": "device_class" }, + "device_vendor": { + "description": "The device vendor ID.", + "type": "string", + "format": "uuid", + "example": "5d645eae-c231-5a89-9764-2e655cd94fa8", + "api_fieldname": "device_vendor", + "entity_fieldname": "device_vendor" + }, + "update_priority": { + "description": "Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions.", + "type": "integer", + "format": "int64", + "api_fieldname": "update_priority", + "entity_fieldname": "update_priority" + }, "key_table": { "description": "The key table of pre-shared keys for devices.", "type": "string", "format": "uri", - "example": "http://example.com", + "example": "http://example.com/key-table", "api_fieldname": "key_table", "entity_fieldname": "key_table_url" }, "id": { "description": "The firmware manifest ID.", "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "example": "12345678901234567890123456789012", "api_fieldname": "id", "entity_fieldname": "id" }, "name": { - "description": "The name of the object.", + "description": "The name of the manifest.", "type": "string", + "format": "free text", "maxLength": 128, - "example": "default_object_name", + "example": "manifest_name", "api_fieldname": "name", "entity_fieldname": "name" }, @@ -44951,6 +47331,12 @@ "api_fieldname": "timestamp", "entity_fieldname": "timestamp" }, + "parsed_raw_manifest": { + "description": "Raw manifest in JSON format, parsed from ASN.1 DER encoding.\nFields may change. Backwards compatibility is not guaranteed.\nRecommended for debugging only.\n", + "type": "object", + "api_fieldname": "parsed_raw_manifest", + "entity_fieldname": "parsed_raw_manifest" + }, "_key": "properties" } ], @@ -44958,14 +47344,221 @@ }, { "description": "Bad request.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Firmware manifest can't be found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -44986,11 +47579,20 @@ "filter", "created_at", "updated_at", + "manifest_schema_version", "datafile_size", + "delivered_payload_url", + "delivered_payload_size", + "delivered_payload_digest", + "delivered_payload_type", + "precursor_payload_digest", "description", "device_class", + "device_vendor", + "update_priority", "name", "timestamp", + "parsed_raw_manifest", "datafile_url", "key_table_url" ], @@ -45017,26 +47619,70 @@ "_key": "created_at" }, { - "description": "The size of the datafile in bytes", - "format": "int64", + "description": "The size of the firmware manifest in bytes.", "type": "integer", + "format": "int64", "api_fieldname": "datafile_size", "readOnly": true, "required": false, "_key": "datafile_size" }, { - "description": "The URL of the firmware manifest binary", + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", "type": "string", - "example": "http://example.com/12345678901234567890123456789012", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest", "api_fieldname": "datafile", "readOnly": true, "required": false, "_key": "datafile_url" }, + { + "description": "Digest (SHA256, hex-encoded) of the payload to deliver to the device.", + "type": "string", + "format": "hex", + "example": "c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc", + "api_fieldname": "delivered_payload_digest", + "readOnly": true, + "required": false, + "_key": "delivered_payload_digest" + }, + { + "description": "The size in bytes of the payload to deliver to the device.", + "type": "integer", + "format": "int64", + "api_fieldname": "delivered_payload_size", + "readOnly": true, + "required": false, + "_key": "delivered_payload_size" + }, + { + "description": "Type of the payload to deliver to the device (full or delta image).", + "type": "string", + "enum": [ + "full", + "delta" + ], + "api_fieldname": "delivered_payload_type", + "readOnly": true, + "required": false, + "enum_reference": "firmware_manifest_delivered_payload_type_enum", + "_key": "delivered_payload_type" + }, + { + "description": "The URL of the payload to deliver to the device.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/myimage.elf", + "api_fieldname": "delivered_payload_url", + "readOnly": true, + "required": false, + "_key": "delivered_payload_url" + }, { "description": "The description of the firmware manifest.", "type": "string", + "format": "free text", "maxLength": 2000, "example": "", "api_fieldname": "description", @@ -45045,17 +47691,29 @@ "_key": "description" }, { - "description": "The class of the device.", + "description": "The device class ID.", "type": "string", - "example": "00000000-0000-0000-0000-000000000000", + "format": "uuid", + "example": "42c4d8de-704d-546e-b9d3-1ce1eb316167", "api_fieldname": "device_class", "readOnly": true, "required": false, "_key": "device_class" }, + { + "description": "The device vendor ID.", + "type": "string", + "format": "uuid", + "example": "5d645eae-c231-5a89-9764-2e655cd94fa8", + "api_fieldname": "device_vendor", + "readOnly": true, + "required": false, + "_key": "device_vendor" + }, { "description": "The firmware manifest ID.", "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "example": "12345678901234567890123456789012", "api_fieldname": "id", "readOnly": false, @@ -45066,22 +47724,53 @@ "description": "The key table of pre-shared keys for devices.", "type": "string", "format": "uri", - "example": "http://example.com", + "example": "http://example.com/key-table", "api_fieldname": "key_table", "readOnly": true, "required": false, "_key": "key_table_url" }, { - "description": "The name of the object.", + "description": "Version of the manifest schema (1 or 3).", + "type": "string", + "enum": [ + "1", + "3" + ], + "api_fieldname": "manifest_schema_version", + "readOnly": true, + "required": false, + "enum_reference": "firmware_manifest_schema_version_enum", + "_key": "manifest_schema_version" + }, + { + "description": "The name of the manifest.", "type": "string", + "format": "free text", "maxLength": 128, - "example": "default_object_name", + "example": "manifest_name", "api_fieldname": "name", "readOnly": false, - "required": false, + "required": true, "_key": "name" }, + { + "description": "Raw manifest in JSON format, parsed from ASN.1 DER encoding.\nFields may change. Backwards compatibility is not guaranteed.\nRecommended for debugging only.\n", + "type": "object", + "api_fieldname": "parsed_raw_manifest", + "readOnly": true, + "required": false, + "_key": "parsed_raw_manifest" + }, + { + "description": "Digest (SHA256, hex-encoded) of the currently installed payload.", + "type": "string", + "example": "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f", + "api_fieldname": "precursor_payload_digest", + "readOnly": true, + "required": false, + "_key": "precursor_payload_digest" + }, { "description": "The firmware manifest version as a timestamp.", "format": "date-time", @@ -45092,6 +47781,15 @@ "required": false, "_key": "timestamp" }, + { + "description": "Update priority, passed to the application callback when an update is performed. Allows the application to make application-specific decisions.", + "type": "integer", + "format": "int64", + "api_fieldname": "update_priority", + "readOnly": true, + "required": false, + "_key": "update_priority" + }, { "type": "string", "format": "date-time", @@ -45130,7 +47828,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create a new identity provider.", + "description": "Create a new identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -45220,42 +47918,49 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "_key": "email_verified" }, { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "_key": "family_name" }, { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "_key": "given_name" }, { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "_key": "name" }, { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "_key": "phone_number" }, { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "_key": "sub" }, { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "_key": "updated_at" }, @@ -45381,13 +48086,10 @@ "group": "Accounts", "entity": "oidc_request" }, - "name": "oidc_attributes", - "in": "body", - "schema_param": true, - "entity_fieldname": "oidc_attributes", "api_fieldname": "oidc_attributes", - "external_param": true, + "entity_fieldname": "oidc_attributes", "parameter_fieldname": "oidc_attributes", + "in": "body", "_key": "oidc_attributes" }, { @@ -45560,6 +48262,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -45908,7 +48814,7 @@ "_key": "create" }, { - "description": "Delete an identity provider by ID.", + "description": "Delete an identity provider by ID.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -46083,7 +48989,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -46183,7 +49089,7 @@ "_key": "delete" }, { - "description": "Delete a service provider certificate.", + "description": "Delete a service provider certificate.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -46295,6 +49201,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -46538,7 +49648,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -46632,6 +49742,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "account_id", "is_default", "identity_provider_type" @@ -46647,7 +49758,7 @@ "_key": "delete_service_provider_certificate" }, { - "description": "Generate a new service provider certificate.", + "description": "Generate a new service provider certificate.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -46799,6 +49910,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -47115,7 +50430,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -47209,6 +50524,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "account_id", "is_default", "identity_provider_type" @@ -47224,7 +50540,7 @@ "_key": "generate_service_provider_certificate" }, { - "description": "Retrieve identity providers in an array.", + "description": "Retrieve an array of identity providers.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -47235,7 +50551,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -47275,7 +50591,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -47310,7 +50626,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -47382,6 +50698,208 @@ ], "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -47710,7 +51228,7 @@ "_key": "list" }, { - "description": "Retrieve by ID.", + "description": "Retrieve an identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -47815,6 +51333,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -48058,7 +51780,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -48132,7 +51854,7 @@ } ], "path": "/v3/identity-providers/{identity_provider_id}", - "summary": "Get identity provider by ID.", + "summary": "Get identity provider.", "return_type": "identity_provider", "return_info": { "self": true, @@ -48152,6 +51874,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "account_id", "is_default", "identity_provider_type" @@ -48167,7 +51890,7 @@ "_key": "read" }, { - "description": "Refreshes an OIDC IdP's signing keys.", + "description": "Refreshes an OIDC IdP's signing keys.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -48279,6 +52002,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -48595,7 +52522,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -48689,6 +52616,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "account_id", "is_default", "identity_provider_type" @@ -48704,7 +52632,7 @@ "_key": "refresh_tokens" }, { - "description": "Update an existing identity provider.", + "description": "Update an existing identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { "api_fieldname": "type", @@ -48806,42 +52734,49 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "_key": "email_verified" }, { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "_key": "family_name" }, { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "_key": "given_name" }, { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "_key": "name" }, { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "_key": "phone_number" }, { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "_key": "sub" }, { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "_key": "updated_at" }, @@ -48967,13 +52902,10 @@ "group": "Accounts", "entity": "oidc_request" }, - "name": "oidc_attributes", - "in": "body", - "schema_param": true, - "entity_fieldname": "oidc_attributes", "api_fieldname": "oidc_attributes", - "external_param": true, + "entity_fieldname": "oidc_attributes", "parameter_fieldname": "oidc_attributes", + "in": "body", "_key": "oidc_attributes" }, { @@ -49134,6 +53066,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -49450,7 +53586,7 @@ "_key": "403" }, { - "description": "Identity provider not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -49626,6 +53762,208 @@ "required": true, "_key": "name" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "readOnly": false, + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -49755,7 +54093,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Resets the branding color to its light theme default.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Resets the branding color to its light theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -49780,7 +54118,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "name": "reference", "in": "path", @@ -50044,7 +54390,7 @@ "_key": "delete" }, { - "description": "Retrieve the light theme branding colors.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the light theme branding colors.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -50074,7 +54420,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -50119,7 +54465,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -50138,7 +54492,7 @@ ], "foreign_key": { "group": "Branding", - "entity": "dark_theme_color" + "entity": "subtenant_light_theme_color" } }, "api_fieldname": "data", @@ -50383,7 +54737,7 @@ "_key": "list" }, { - "description": "Retrieve the requested light theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the requested light theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -50403,7 +54757,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -50472,7 +54834,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -50753,7 +55123,7 @@ "_key": "read" }, { - "description": "Update light theme branding color.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"purple\" }'\n```", + "description": "Update light theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"purple\" }'\n```", "field_renames": [], "fields": [ { @@ -50785,7 +55155,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -50867,7 +55245,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -51255,7 +55641,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -51297,7 +55691,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Revert an account branding image to light theme default.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", + "description": "Revert an account branding image to light theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -51311,6 +55705,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -51604,7 +56001,7 @@ "_key": "delete" }, { - "description": "Retrieve the metadata of all light theme branding images.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the metadata of all light theme branding images.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -51634,7 +56031,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -51661,6 +56058,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -51720,7 +56120,7 @@ ], "foreign_key": { "group": "Branding", - "entity": "dark_theme_image" + "entity": "subtenant_light_theme_image" } }, "api_fieldname": "data", @@ -51965,7 +56365,7 @@ "_key": "list" }, { - "description": "Retrieve metadata for one account light theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve metadata for one account light theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -51974,6 +56374,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -52046,6 +56449,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -52366,7 +56772,7 @@ "_key": "read" }, { - "description": "Upload a new account branding image as form data in the light theme in PNG or JPEG format.", + "description": "Upload a new account branding image as form data in the light theme in PNG or JPEG format.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -52387,6 +56793,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -52471,6 +56880,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -52877,6 +57289,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -53010,6 +57425,16 @@ "fields": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "required": false, + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -53020,6 +57445,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -53034,6 +57460,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -53091,42 +57518,49 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "_key": "email_verified" }, { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "_key": "family_name" }, { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "_key": "given_name" }, { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "_key": "name" }, { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "_key": "phone_number" }, { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "_key": "sub" }, { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "_key": "updated_at" }, @@ -53315,6 +57749,7 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "api_fieldname": "email_verified", "readOnly": true, @@ -53324,6 +57759,7 @@ { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "api_fieldname": "family_name", "readOnly": true, @@ -53333,6 +57769,7 @@ { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "api_fieldname": "given_name", "readOnly": true, @@ -53342,6 +57779,7 @@ { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "api_fieldname": "name", "readOnly": true, @@ -53351,6 +57789,7 @@ { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "api_fieldname": "phone_number", "readOnly": true, @@ -53360,6 +57799,7 @@ { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "api_fieldname": "sub", "readOnly": true, @@ -53369,6 +57809,7 @@ { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "api_fieldname": "updated_at", "readOnly": true, @@ -53553,13 +57994,13 @@ "primary_key_field": "id", "methods": [ { - "description": "Manage policy groups.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of API keys associated with a policy group.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -53611,7 +58052,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -53646,7 +58087,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -53810,7 +58251,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -54065,7 +58506,7 @@ } ], "path": "/v3/policy-groups/{group_id}/api-keys", - "summary": "Get the API keys of a group.", + "summary": "Get the API keys of a policy group.", "return_type": "paginated_response(api_key)", "return_info": { "self": false, @@ -54073,7 +58514,12 @@ "type": "api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated, GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -54097,7 +58543,7 @@ "_key": "api_keys" }, { - "description": "Create a new group.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}'\n```", + "description": "Create a new group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' -d '{\"name\": \"MyGroup1\"}'\n```", "field_renames": [], "fields": [ { @@ -54109,8 +58555,22 @@ "items": { "type": "string" }, + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This field is deprecated, use 'applications'", + "links": [] + }, "_key": "apikeys" }, + { + "type": "array", + "description": "An array of applicationIDs.", + "items": { + "type": "string" + }, + "_key": "applications" + }, { "type": "array", "description": "An array of user IDs.", @@ -54175,10 +58635,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -54564,6 +59039,7 @@ "updated_at", "account_id", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -54577,7 +59053,7 @@ "_key": "create" }, { - "description": "Delete a group.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -54847,13 +59323,13 @@ "_key": "delete" }, { - "description": "Retrieve all group information.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of policy groups.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -54893,7 +59369,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -54928,7 +59404,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -54966,8 +59442,21 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -55063,7 +59552,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -55245,7 +59734,7 @@ } ], "path": "/v3/policy-groups", - "summary": "Get all group information.", + "summary": "Get policy groups.", "return_type": "paginated_response(policy_group)", "return_info": { "self": true, @@ -55284,7 +59773,7 @@ "_key": "list" }, { - "description": "Retrieve general information about a group.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve a policy group.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -55331,10 +59820,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -55628,7 +60132,7 @@ } ], "path": "/v3/policy-groups/{group_id}", - "summary": "Get group information.", + "summary": "Get a policy group.", "return_type": "policy_group", "return_info": { "self": true, @@ -55647,6 +60151,7 @@ "account_id", "name", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -55660,7 +60165,7 @@ "_key": "read" }, { - "description": "Update a group name.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestGroup2\"}'\n```", + "description": "Update a group name.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestGroup2\"}'\n```", "field_renames": [], "fields": [ { @@ -55719,10 +60224,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -56107,6 +60627,7 @@ "updated_at", "account_id", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -56120,13 +60641,13 @@ "_key": "update" }, { - "description": "Retrieve users of a group with details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of users associated with a policy group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -56178,7 +60699,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -56213,7 +60734,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -56493,6 +61014,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -56502,6 +61033,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -56512,6 +61044,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -56645,7 +61178,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -56900,7 +61433,7 @@ } ], "path": "/v3/policy-groups/{group_id}/users", - "summary": "Get users of a group.", + "summary": "Get users of a policy group.", "return_type": "paginated_response(user)", "return_info": { "self": false, @@ -56957,11 +61490,27 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "readOnly": true, "required": false, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "readOnly": true, + "required": false, + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -57029,7 +61578,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Upload a PSK for an endpoint to allow it to bootstrap. The existing key cannot be overwritten, but needs\nto be deleted first in the case of re-setting a PSK for an endpoint.\n\n**Note**: The PSK APIs are available only to accounts that have this feature enabled.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\" \\\n -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }'\n```", + "description": "Upload a PSK for an endpoint to allow it to bootstrap. The existing key cannot be overwritten, but needs\nto be deleted first in the case of re-setting a PSK for an endpoint.\n\n**Note**: The PSK APIs are available only to accounts that have this feature enabled.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\" \\\n -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": \"4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }'\n```", "field_renames": [], "fields": [ { @@ -57130,7 +61679,7 @@ "_key": "create" }, { - "description": "Remove a PSK.\n\n**Example:**\n\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\\n-H \"Authorization: Bearer \"\n```", + "description": "Remove a PSK.\n\n**Example:**\n\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [ { @@ -57203,7 +61752,7 @@ "_key": "delete" }, { - "description": "Retrieve pre-shared keys (PSKs) with pagination. Default page size of 50 entries.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n-H \"Authorization: Bearer \"\n```", + "description": "Retrieve pre-shared keys (PSKs) with pagination. Default page size of 50 entries.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [ { @@ -57241,13 +61790,16 @@ }, { "type": "integer", - "description": "The number of entries per page.", + "description": "The number of objects to retrieve on a page (2-1000). Values outside the range are set to the closest limit.", "example": 50, "api_fieldname": "limit", "entity_fieldname": "limit", "name": "limit", "in": "query", "required": false, + "default": 50, + "minimum": 2, + "maximum": 1000, "external_param": true, "parameter_fieldname": "limit", "_key": "limit" @@ -57404,7 +61956,7 @@ "_key": "list" }, { - "description": "Check if a PSK for an endpoint exists or not. The response does not contain the secret itself.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\\n-H \"Authorization: Bearer \"\n```", + "description": "Check if a PSK for an endpoint exists or not. The response does not contain the secret itself.\n\n**Example:**\n\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [ { @@ -57557,7 +62109,7 @@ ], "field_renames": [], "tags": [ - "PreSharedKeys" + "Security and identity - pre-shared keys" ], "group_id": "Security", "_key": "pre_shared_key" @@ -57635,7 +62187,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Return bootstrap server credentials for client to connect to bootstrap server.\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \\\n-H \"Authorization: Bearer \"\n```", + "description": "Return bootstrap server credentials for client to connect to bootstrap server.\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [], "method": "get", @@ -57899,7 +62451,7 @@ "_key": "get_bootstrap" }, { - "description": "Return LwM2M server credentials for client to connect to LwM2M server.\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \\\n-H \"Authorization: Bearer \"\n```", + "description": "Return LwM2M server credentials for client to connect to LwM2M server.\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [], "method": "get", @@ -58200,7 +62752,7 @@ ], "field_renames": [], "tags": [ - "Service security - server credentials" + "Security and identity - server credentials" ], "group_id": "Security", "_key": "server_credentials" @@ -58215,7 +62767,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create a new API key. There is no default value for the owner ID, and it must be from the same account where the new API key is created.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"MyKey1\"}'\n```", + "description": "Create a new API key. There is no default value for the owner ID, and it must be from the same account where the new API key is created.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"MyKey1\"}'\n```", "field_renames": [], "fields": [ { @@ -58252,7 +62804,7 @@ "entity_fieldname": "name", "parameter_fieldname": "name", "in": "body", - "required": true, + "required": false, "_key": "name" }, { @@ -58385,7 +62937,7 @@ "entity_fieldname": "name", "parameter_fieldname": "name", "in": "body", - "required": true, + "required": false, "_key": "name" }, { @@ -58445,7 +62997,7 @@ "_key": "201" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Error in input data, for example, missing API key name.", "schema": { "type": "object", "required": [ @@ -58746,7 +63298,12 @@ "type": "subtenant_api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -58770,7 +63327,7 @@ "_key": "create" }, { - "description": "Delete an API key.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete an API key.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -59034,7 +63591,12 @@ "type": "subtenant_api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -59052,7 +63614,7 @@ "_key": "delete" }, { - "description": "Retrieve groups associated with the API key.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of policy groups associated with an API key.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -59070,7 +63632,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -59122,7 +63684,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -59157,7 +63719,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -59195,8 +63757,21 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -59292,7 +63867,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -59547,7 +64122,7 @@ } ], "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}/groups", - "summary": "Get groups associated with the API key.", + "summary": "Get policy groups of an API key.", "return_type": "paginated_response(subtenant_policy_group)", "return_info": { "self": false, @@ -59555,7 +64130,12 @@ "type": "subtenant_policy_group" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -59579,7 +64159,7 @@ "_key": "policy_groups" }, { - "description": "Retrieve API key details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n -H 'Authorization: Bearer '\n```", + "description": "Retrieve details of an API key.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n -H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -59708,7 +64288,7 @@ "entity_fieldname": "name", "parameter_fieldname": "name", "in": "body", - "required": true, + "required": false, "_key": "name" }, { @@ -59996,7 +64576,12 @@ "type": "subtenant_api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -60023,7 +64608,7 @@ "_key": "read" }, { - "description": "Update API key details.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestApiKey25\"}'\n```", + "description": "Update API key details.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestApiKey25\"}'\n```", "field_renames": [], "fields": [ { @@ -60072,7 +64657,7 @@ "entity_fieldname": "name", "parameter_fieldname": "name", "in": "body", - "required": true, + "required": false, "_key": "name" }, { @@ -60205,7 +64790,7 @@ "entity_fieldname": "name", "parameter_fieldname": "name", "in": "body", - "required": true, + "required": false, "_key": "name" }, { @@ -60265,7 +64850,7 @@ "_key": "200" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Error in input data, for example, invalid API key name.", "schema": { "type": "object", "required": [ @@ -60566,7 +65151,12 @@ "type": "subtenant_api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -60729,7 +65319,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Resets the branding color of a tenant account to its dark theme default.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Resets the branding color to its dark theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -60766,7 +65356,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "name": "reference", "in": "path", @@ -61030,7 +65628,7 @@ "_key": "delete" }, { - "description": "Retrieve the requested dark theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the requested dark theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -61062,7 +65660,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -61131,7 +65737,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -61412,7 +66026,7 @@ "_key": "read" }, { - "description": "Update a dark theme branding color of a tenant account.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"#f3f93e\" }'\n```", + "description": "Update a dark theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"#f3f93e\" }'\n```", "field_renames": [], "fields": [ { @@ -61456,7 +66070,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -61538,7 +66160,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -61926,7 +66556,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -61967,7 +66605,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Revert an account branding image to dark theme default.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", + "description": "Revert an account branding image to dark theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -61993,6 +66631,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -62286,7 +66927,7 @@ "_key": "delete" }, { - "description": "Retrieve metadata of one account dark theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve metadata of one account dark theme branding image.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -62307,6 +66948,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -62379,6 +67023,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -62699,7 +67346,7 @@ "_key": "read" }, { - "description": "Upload a new account dark theme branding image as form data in PNG or JPEG format.", + "description": "Upload a new account dark theme branding image as form data in PNG or JPEG format.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -62732,6 +67379,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -62816,6 +67466,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -63222,6 +67875,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -63307,7 +67963,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create a new identity provider.", + "description": "Create a new identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -63387,42 +68043,49 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "_key": "email_verified" }, { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "_key": "family_name" }, { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "_key": "given_name" }, { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "_key": "name" }, { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "_key": "phone_number" }, { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "_key": "sub" }, { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "_key": "updated_at" }, @@ -63548,13 +68211,10 @@ "group": "Accounts", "entity": "oidc_request" }, - "name": "oidc_attributes", - "in": "body", - "schema_param": true, - "entity_fieldname": "oidc_attributes", "api_fieldname": "oidc_attributes", - "external_param": true, + "entity_fieldname": "oidc_attributes", "parameter_fieldname": "oidc_attributes", + "in": "body", "_key": "oidc_attributes" }, { @@ -63736,6 +68396,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -64167,7 +69031,7 @@ "_key": "create" }, { - "description": "Delete an identity provider by ID.", + "description": "Delete an identity provider by ID.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -64349,7 +69213,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -64449,7 +69313,7 @@ "_key": "delete" }, { - "description": "Delete a service provider certificate.", + "description": "Delete a service provider certificate.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -64577,6 +69441,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -64831,7 +69899,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -64925,6 +69993,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "is_default" ], "group_id": "Accounts", @@ -64938,7 +70007,7 @@ "_key": "delete_service_provider_certificate" }, { - "description": "Generate a new service provider certificate.", + "description": "Generate a new service provider certificate.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -65106,6 +70175,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -65433,7 +70706,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -65527,6 +70800,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "is_default" ], "group_id": "Accounts", @@ -65540,7 +70814,7 @@ "_key": "generate_service_provider_certificate" }, { - "description": "Retrieve identity providers in an array.", + "description": "Retrieve an array of identity providers.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -65558,7 +70832,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -65598,7 +70872,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -65633,7 +70907,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -65710,6 +70984,208 @@ ], "_key": "object" }, + { + "type": "object", + "required": [ + "issuer" + ], + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -65835,7 +71311,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -66124,7 +71600,7 @@ "_key": "list" }, { - "description": "Manage identity providers of a tenant account.", + "description": "Retrieve an identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -66245,6 +71721,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -66499,7 +72179,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -66573,7 +72253,7 @@ } ], "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", - "summary": "Retrieve identity provider by ID.", + "summary": "Get an identity provider.", "return_type": "subtenant_identity_provider", "return_info": { "self": true, @@ -66593,6 +72273,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "is_default" ], "group_id": "Accounts", @@ -66606,7 +72287,7 @@ "_key": "read" }, { - "description": "Refreshes an OIDC IdP's signing keys.", + "description": "Refresh an OIDC IdP's signing keys.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -66734,6 +72415,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -67061,7 +72946,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -67135,7 +73020,7 @@ } ], "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks", - "summary": "Refreshes the OIDC signing keys.", + "summary": "Refresh the OIDC signing keys.", "return_type": "subtenant_identity_provider", "return_info": { "self": true, @@ -67155,6 +73040,7 @@ "description", "status", "saml2_attributes", + "oidc_attributes", "is_default" ], "group_id": "Accounts", @@ -67168,7 +73054,7 @@ "_key": "refresh_tokens" }, { - "description": "Update an existing identity provider.", + "description": "Update an existing identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -67260,42 +73146,49 @@ { "type": "string", "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", "x-nullable": true, "_key": "email_verified" }, { "type": "string", "description": "Custom claim name for 'family_name'.", + "example": "family_name", "x-nullable": true, "_key": "family_name" }, { "type": "string", "description": "Custom claim name for 'given_name'.", + "example": "given_name", "x-nullable": true, "_key": "given_name" }, { "type": "string", "description": "Custom claim name for 'name'.", + "example": "name", "x-nullable": true, "_key": "name" }, { "type": "string", "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "x-nullable": true, "_key": "phone_number" }, { "type": "string", "description": "Custom claim name for 'sub'.", + "example": "sub", "x-nullable": true, "_key": "sub" }, { "type": "string", "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", "x-nullable": true, "_key": "updated_at" }, @@ -67421,13 +73314,10 @@ "group": "Accounts", "entity": "oidc_request" }, - "name": "oidc_attributes", - "in": "body", - "schema_param": true, - "entity_fieldname": "oidc_attributes", "api_fieldname": "oidc_attributes", - "external_param": true, + "entity_fieldname": "oidc_attributes", "parameter_fieldname": "oidc_attributes", + "in": "body", "_key": "oidc_attributes" }, { @@ -67597,6 +73487,210 @@ "entity_fieldname": "object", "_key": "object" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -67924,7 +74018,7 @@ "_key": "403" }, { - "description": "Account or identity provider not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -68090,6 +74184,210 @@ "readOnly": false, "_key": "name" }, + { + "type": "object", + "required": false, + "properties": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "_key": "auto_enrollment" + }, + { + "description": "Mapping for non-standard OIDC claim names.", + "type": "object", + "properties": [ + { + "type": "string", + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "_key": "email" + }, + { + "type": "string", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "_key": "email_verified" + }, + { + "type": "string", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "_key": "family_name" + }, + { + "type": "string", + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "_key": "given_name" + }, + { + "type": "string", + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "_key": "name" + }, + { + "type": "string", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", + "x-nullable": true, + "_key": "phone_number" + }, + { + "type": "string", + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "_key": "sub" + }, + { + "type": "string", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "_key": "updated_at" + }, + { + "type": "string", + "description": "Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat class.", + "example": "yyyy-MM-dd'T'HH:mm:ssXXX", + "x-nullable": true, + "_key": "updated_at_pattern" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request_claim_mapping" + }, + "x-nullable": true, + "_key": "claim_mapping" + }, + { + "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_id" + }, + { + "type": "string", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "_key": "client_secret" + }, + { + "type": "string", + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "_key": "end_session_endpoint" + }, + { + "type": "string", + "description": "Issuer of the identity provider.", + "_key": "issuer" + }, + { + "type": "string", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "_key": "jwks_uri" + }, + { + "type": "array", + "description": "Provider's public keys and key IDs used to sign ID tokens. PEM-encoded.", + "items": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The public key.", + "_key": "key" + }, + { + "type": "string", + "description": "The public key ID.", + "_key": "kid" + } + ], + "description": "Represents provider's public key and key ID used to sign ID tokens. PEM-encoded.", + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider_public_key" + } + }, + "x-nullable": true, + "_key": "keys" + }, + { + "type": "string", + "description": "The URI needed to authenticate and gain access to identity provider's API. Leave this empty to use the default redirect URI.", + "x-nullable": true, + "_key": "redirect_uri" + }, + { + "type": "string", + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "_key": "revocation_endpoint" + }, + { + "type": "string", + "description": "Space-separated list of scopes sent in the authentication request. When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims).", + "example": "openid email", + "_key": "scopes" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "_key": "token_endpoint" + }, + { + "type": "string", + "enum": [ + "POST", + "GET" + ], + "default": "POST", + "description": "One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode.", + "_key": "token_request_mode" + }, + { + "type": "string", + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "_key": "token_response_path" + }, + { + "type": "string", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "_key": "userinfo_endpoint" + } + ], + "description": "Represents OIDC specific attributes.", + "foreign_key": { + "group": "Accounts", + "entity": "oidc_request" + }, + "api_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "readOnly": false, + "_key": "oidc_attributes" + }, { "type": "object", "properties": [ @@ -68188,7 +74486,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Resets the branding color of a tenant account to its light theme default.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Resets the branding color to its light theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -68225,7 +74523,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "name": "reference", "in": "path", @@ -68489,7 +74795,7 @@ "_key": "delete" }, { - "description": "Retrieve the requested light theme branding color.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference}\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the requested light theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference}\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -68521,7 +74827,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -68590,7 +74904,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -68871,7 +75193,7 @@ "_key": "read" }, { - "description": "Update a light theme branding color of a tenant account.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"purple\" }'\n```", + "description": "Update a light theme branding color.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{ \"color\": \"purple\" }'\n```", "field_renames": [], "fields": [ { @@ -68915,7 +75237,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -68997,7 +75327,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -69385,7 +75723,15 @@ "secondary_font_color", "error_font_color", "success_font_color", - "warning_font_color" + "warning_font_color", + "menu_background_color", + "menu_text_color", + "nav_menu_background", + "nav_menu_background_font_color", + "nav_menu_active_background", + "nav_menu_active_background_font_color", + "nav_menu_highlight", + "nav_menu_highlight_font_color" ], "type": "string", "description": "Color name.", @@ -69426,7 +75772,7 @@ "primary_key_field": "reference", "methods": [ { - "description": "Revert an account branding image to light theme default.\n\n**Example:**\n```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", + "description": "Revert an account branding image to light theme default.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -69452,6 +75798,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -69745,7 +76094,7 @@ "_key": "delete" }, { - "description": "Retrieve metadata for one account light theme branding image.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve metadata for one account light theme branding image.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -69766,6 +76115,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -69838,6 +76190,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -70158,7 +76513,7 @@ "_key": "read" }, { - "description": "Upload a new account branding image as form data in PNG or JPEG format.", + "description": "Upload a new account branding image as form data in PNG or JPEG format.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { @@ -70191,6 +76546,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -70275,6 +76633,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -70681,6 +77042,9 @@ "brand_logo_square", "brand_logo_landscape", "brand_logo_email", + "app_logo_landscape", + "app_logo_portrait", + "app_logo_square", "desktop_background_landscape", "desktop_background_square", "desktop_background_portrait", @@ -70767,7 +77131,7 @@ "primary_key_field": "id", "methods": [ { - "description": "List the API keys of the group with details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of API keys associated with a policy group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -70785,7 +77149,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -70837,7 +77201,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -70872,7 +77236,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -71036,7 +77400,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -71291,7 +77655,7 @@ } ], "path": "/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys", - "summary": "Get API keys of a group.", + "summary": "Get API keys in a group.", "return_type": "paginated_response(subtenant_api_key)", "return_info": { "self": false, @@ -71299,7 +77663,12 @@ "type": "subtenant_api_key" }, "x_filter": {}, - "x_deprecation": null, + "x_deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications", + "links": [] + }, "drop_fields": [ "object", "etag", @@ -71323,7 +77692,7 @@ "_key": "api_keys" }, { - "description": "Create a new group.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"MyGroup1\"}'\n```", + "description": "Create a new group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"MyGroup1\"}'\n```", "field_renames": [], "fields": [ { @@ -71347,8 +77716,22 @@ "items": { "type": "string" }, + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This field is deprecated, use 'applications'", + "links": [] + }, "_key": "apikeys" }, + { + "type": "array", + "description": "An array of applicationIDs.", + "items": { + "type": "string" + }, + "_key": "applications" + }, { "type": "array", "description": "An array of user IDs.", @@ -71413,10 +77796,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -71880,6 +78278,7 @@ "created_at", "updated_at", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -71893,7 +78292,7 @@ "_key": "create" }, { - "description": "Delete a group.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -72175,7 +78574,7 @@ "_key": "delete" }, { - "description": "Retrieve all group information.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of policy groups.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -72193,7 +78592,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -72233,7 +78632,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -72268,7 +78667,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -72306,8 +78705,21 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -72403,7 +78815,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -72658,7 +79070,7 @@ } ], "path": "/v3/accounts/{account_id}/policy-groups", - "summary": "Get all group information.", + "summary": "Get policy groups.", "return_type": "paginated_response(subtenant_policy_group)", "return_info": { "self": true, @@ -72697,7 +79109,7 @@ "_key": "list" }, { - "description": "Retrieve general information about the group.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve policy group details.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -72756,10 +79168,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -73059,7 +79486,7 @@ } ], "path": "/v3/accounts/{account_id}/policy-groups/{group_id}", - "summary": "Get group information.", + "summary": "Get policy group.", "return_type": "subtenant_policy_group", "return_info": { "self": true, @@ -73077,6 +79504,7 @@ "updated_at", "name", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -73090,7 +79518,7 @@ "_key": "read" }, { - "description": "Update a group name.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestGroup2\"}'\n```", + "description": "Update a group name.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"name\": \"TestGroup2\"}'\n```", "field_renames": [], "fields": [ { @@ -73161,10 +79589,25 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "entity_fieldname": "apikey_count", "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -73554,6 +79997,7 @@ "created_at", "updated_at", "user_count", + "application_count", "apikey_count" ], "group_id": "Accounts", @@ -73567,7 +80011,7 @@ "_key": "update" }, { - "description": "List a group's users, with details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of users associated with a policy group.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -73585,7 +80029,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -73637,7 +80081,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -73672,7 +80116,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -73952,6 +80396,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -73961,6 +80415,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -73971,6 +80426,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -74104,7 +80560,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -74359,7 +80815,7 @@ } ], "path": "/v3/accounts/{account_id}/policy-groups/{group_id}/users", - "summary": "Get users of a group.", + "summary": "Get users in a policy group.", "return_type": "paginated_response(subtenant_user)", "return_info": { "self": false, @@ -74416,11 +80872,27 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "api_fieldname": "apikey_count", "readOnly": true, "required": false, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "readOnly": true, + "required": false, + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -74493,7 +80965,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Upload new trusted certificates.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"}\n```", + "description": "Upload new trusted certificate.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"}\n```", "field_renames": [], "fields": [ { @@ -74535,7 +81007,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -74681,7 +81159,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -74971,7 +81455,7 @@ "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -75153,7 +81637,7 @@ "_key": "create" }, { - "description": "Delete the trusted certificate.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a trusted certificate.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -75273,7 +81757,7 @@ "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -75346,7 +81830,7 @@ "_key": "403" }, { - "description": "Account or certificate with the given ID not found.", + "description": "An account or certificate with the given ID not found.", "schema": { "type": "object", "required": [ @@ -75420,7 +81904,7 @@ } ], "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", - "summary": "Delete trusted certificate by ID.", + "summary": "Delete a trusted certificate by ID.", "return_type": "subtenant_trusted_certificate", "return_info": { "self": true, @@ -75447,7 +81931,7 @@ "_key": "delete" }, { - "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", + "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [ { @@ -75855,7 +82339,7 @@ "_key": "get_developer_certificate_info" }, { - "description": "Retrieve a trusted certificate by ID.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve a trusted certificate.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -75977,7 +82461,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -76194,7 +82684,7 @@ "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -76267,7 +82757,7 @@ "_key": "403" }, { - "description": "Account or certificate with the given ID not found.", + "description": "An account or certificate with the given ID not found.", "schema": { "type": "object", "required": [ @@ -76341,7 +82831,7 @@ } ], "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", + "summary": "Get a trusted certificate.", "return_type": "subtenant_trusted_certificate", "return_info": { "self": true, @@ -76383,7 +82873,7 @@ "_key": "read" }, { - "description": "Update existing trusted certificates.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json' \\\n -d {\"description\": \"very important cert\"}\n ```", + "description": "Update a trusted certificate.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json' \\\n -d {\"description\": \"very important cert\"}\n ```", "field_renames": [], "fields": [ { @@ -76425,7 +82915,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -76583,7 +83079,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -76873,7 +83375,7 @@ "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -77124,7 +83626,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", "in": "body", @@ -77259,8 +83767,8 @@ ], "field_renames": [], "tags": [ - "Tenant device security - certificates", - "Device security - developer class certificates" + "Tenant security and identity - certificates", + "Security and identity - developer class certificates" ], "group_id": "Security", "_key": "subtenant_trusted_certificate" @@ -77275,7 +83783,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create or invite a new user to the account. Only email address is used; other attributes are set in the second step.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", + "description": "Create or invite a new user to the account. Only email address is used; other attributes are set in the second step.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", "field_renames": [], "fields": [ { @@ -77387,6 +83895,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -77396,6 +83914,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -77406,6 +83925,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -77799,6 +84319,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -77808,6 +84338,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -77818,6 +84349,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -78353,7 +84885,7 @@ "_key": "create" }, { - "description": "Delete a user.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -78708,7 +85240,7 @@ "_key": "delete" }, { - "description": "Retrieve user's groups.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of policy groups associated with a user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -78726,7 +85258,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -78778,7 +85310,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -78813,7 +85345,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -78851,8 +85383,21 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -78948,7 +85493,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -79203,7 +85748,7 @@ } ], "path": "/v3/accounts/{account_id}/users/{user_id}/groups", - "summary": "Get user's groups.", + "summary": "Get policy groups for a user.", "return_type": "paginated_response(subtenant_policy_group)", "return_info": { "self": false, @@ -79235,7 +85780,7 @@ "_key": "policy_groups" }, { - "description": "Retrieve user details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve user details.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -79592,6 +86137,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -79601,6 +86156,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -79611,6 +86167,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -80009,7 +86566,7 @@ "_key": "read" }, { - "description": "Update user details.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"username\": \"myusername\"}'\n```", + "description": "Update user details.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"username\": \"myusername\"}'\n```", "field_renames": [], "fields": [ { @@ -80119,6 +86676,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -80128,6 +86695,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -80138,6 +86706,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -80519,6 +87088,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -80528,6 +87107,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -80538,6 +87118,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -81074,7 +87655,7 @@ "_key": "update" }, { - "description": "Validate user email.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\\n-H 'Authorization: Bearer '\n```", + "description": "Validate user email.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -81670,6 +88251,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -81679,6 +88270,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -81689,6 +88281,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -81819,7 +88412,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Invite a new or existing user.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", + "description": "Invite a new or existing user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", "field_renames": [], "fields": [ { @@ -81871,6 +88464,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -81880,6 +88483,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -81890,6 +88494,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -82033,6 +88638,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -82042,6 +88657,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -82052,6 +88668,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -82366,7 +88983,7 @@ "_key": "create" }, { - "description": "Delete an active user invitation sent to a new or existing user.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete an active user invitation sent to a new or existing user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -82648,7 +89265,7 @@ "_key": "delete" }, { - "description": "Retrieve details of an active user invitation sent for a new or existing user.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve details of an active user invitation sent for a new or existing user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -82776,6 +89393,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -82785,6 +89412,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -82795,6 +89423,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -83191,6 +89820,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -83200,6 +89839,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -83210,6 +89850,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -83274,7 +89915,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Upload new trusted certificates.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"}\n```", + "description": "Upload new trusted certificates.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"name\": \"myCert1\", \"description\": \"very important cert\", \"certificate\": \"certificate_data\", \"service\": \"lwm2m\"}\n```", "field_renames": [], "fields": [ { @@ -83304,7 +89945,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -83444,7 +90091,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "_key": "enrollment_mode" @@ -83717,7 +90370,7 @@ "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -83900,7 +90553,7 @@ "_key": "create" }, { - "description": "Delete a trusted certificate.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a trusted certificate.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -84081,7 +90734,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -84182,7 +90835,7 @@ "_key": "delete" }, { - "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", + "description": "Return an existing developer certificate (a certificate that can be flashed to multiple devices to connect to bootstrap server).\n\n**Example:**\n```\ncurl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \\\n-H \"Authorization: Bearer \"\n```", "field_renames": [], "fields": [ { @@ -84590,13 +91243,13 @@ "_key": "get_developer_certificate_info" }, { - "description": "Retrieve trusted certificates in an array.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of trusted certificates.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -84647,7 +91300,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -84682,10 +91335,15 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", "_key": "after" }, { @@ -84751,7 +91409,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "_key": "enrollment_mode" }, { @@ -84846,7 +91510,7 @@ "description": "Represents a trusted certificate in responses.", "foreign_key": { "group": "Security", - "entity": "trusted_certificate" + "entity": "developer_certificate" } }, "api_fieldname": "data", @@ -84865,9 +91529,15 @@ "type": "integer", "format": "int32", "example": 50, - "description": "The number of results to return (2-1000), or equal to `total_count`.", + "description": "The number of results to return (2-1000). Default 50.", "api_fieldname": "limit", "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", "_key": "limit" }, { @@ -84882,13 +91552,20 @@ }, { "type": "string", - "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" ], "api_fieldname": "order", "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "account_order_enum", "_key": "order" }, { @@ -85093,6 +91770,9 @@ "subject": [ "like" ], + "certificate_fingerprint": [ + "eq" + ], "valid": [ "eq" ] @@ -85117,6 +91797,7 @@ "status__eq", "issuer__like", "subject__like", + "certificate_fingerprint__eq", "valid__eq" ], "foreign_key_priority": "self", @@ -85132,7 +91813,7 @@ "_key": "list" }, { - "description": "Retrieve a trusted certificate by ID.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve a trusted certificate.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -85236,7 +91917,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "_key": "enrollment_mode" @@ -85509,7 +92196,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -85583,7 +92270,7 @@ } ], "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", + "summary": "Get a trusted certificate.", "return_type": "trusted_certificate", "return_info": { "self": true, @@ -85626,7 +92313,7 @@ "_key": "read" }, { - "description": "Update existing trusted certificates.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"description\": \"very important cert\"}\n```", + "description": "Update existing trusted certificates.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"description\": \"very important cert\"}\n```", "field_renames": [], "fields": [ { @@ -85656,7 +92343,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "parameter_fieldname": "enrollment_mode", @@ -85808,7 +92501,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "entity_fieldname": "enrollment_mode", "_key": "enrollment_mode" @@ -86154,7 +92853,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -86402,7 +93101,13 @@ { "type": "boolean", "example": false, - "description": "If true, signature is not required. Default value false.", + "description": "DEPRECATED: Certificate is used in enrollment mode. Default value is false.", + "x-deprecation": { + "issued_at": "2020-11-01T00:00:00+00:00", + "end_of_life_at": "2021-11-01T00:00:00+00:00", + "comment": "This field is deprecated, do not use it anymore.", + "links": [] + }, "api_fieldname": "enrollment_mode", "readOnly": false, "required": false, @@ -86527,8 +93232,8 @@ ], "field_renames": [], "tags": [ - "Device security - certificates", - "Device security - developer class certificates" + "Security and identity - certificates", + "Security and identity - developer class certificates" ], "group_id": "Security", "_key": "trusted_certificate" @@ -86544,7 +93249,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Archive a campaign.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive \\\n-H 'Authorization: '\n```\n", + "description": "Archive a campaign.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -86565,8 +93270,7 @@ "name": "campaign_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -86583,18 +93287,294 @@ }, { "description": "Unable to change the phase of the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Cannot find the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" }, { "description": "Cannot archive the campaign while in the current phase.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "409" } ], @@ -86626,7 +93606,7 @@ "_key": "archive" }, { - "description": "Create an update campaign.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n-d '{\n \"campaign_strategy\": \"one-shot\",\n \"description\": \"Campaign is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\",\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\",\n}'\n```\n", + "description": "Create an update campaign.\n\nTo include a filter for targeted devices, refer to the filter using `` in the message body.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\n-d '{\n \"campaign_strategy\": \"one-shot\",\n \"description\": \"Campaign is for ...\",\n \"device_filter\": \"\",\n \"name\": \"campaign\",\n \"root_manifest_id\": \"56780000000000a5b70000000000bd98\"\n}'\n```\n", "field_renames": [], "fields": [ { @@ -86692,9 +93672,9 @@ "_key": "description" }, { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "entity_fieldname": "device_filter", "parameter_fieldname": "device_filter", @@ -86729,13 +93709,26 @@ { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "entity_fieldname": "root_manifest_id", "parameter_fieldname": "root_manifest_id", "in": "body", "required": false, "_key": "root_manifest_id" + }, + { + "description": "The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "x-nullable": true, + "api_fieldname": "when", + "entity_fieldname": "when", + "parameter_fieldname": "when", + "in": "body", + "required": false, + "_key": "when" } ], "method": "post", @@ -86787,6 +93780,7 @@ "object": { "description": "Entity name: always 'update-campaign'.", "type": "string", + "example": "update-campaign", "api_fieldname": "object", "entity_fieldname": "object" }, @@ -86844,9 +93838,9 @@ "entity_fieldname": "description" }, "device_filter": { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "entity_fieldname": "device_filter" }, @@ -86861,7 +93855,8 @@ "id": { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id" }, @@ -86876,14 +93871,14 @@ "root_manifest_id": { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "entity_fieldname": "root_manifest_id" }, "root_manifest_url": { "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_url", "entity_fieldname": "root_manifest_url" }, @@ -86936,60 +93931,271 @@ "api_fieldname": "phase", "entity_fieldname": "phase" }, - "state": { - "description": "The state of the campaign.", + "state": { + "description": "The state of the campaign.", + "type": "string", + "enum": [ + "draft", + "scheduled", + "allocatingquota", + "allocatedquota", + "quotaallocationfailed", + "checkingmanifest", + "checkedmanifest", + "devicefetch", + "devicecopy", + "devicecheck", + "publishing", + "deploying", + "deployed", + "manifestremoved", + "expired", + "stopping", + "autostopped", + "userstopped", + "conflict" + ], + "x-deprecation": { + "issued_at": "2019-03-18T14:55:20+00:00", + "end_of_life_at": "2020-03-18T14:55:20+00:00", + "comment": "Use phase instead", + "links": [] + }, + "api_fieldname": "state", + "entity_fieldname": "state" + }, + "when": { + "description": "The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "x-nullable": true, + "api_fieldname": "when", + "entity_fieldname": "when" + }, + "_key": "properties" + } + ], + "_key": "201" + }, + { + "description": "Validation error: The data used to create the campaign did not validate.\n", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Conflict, a campaign with the same name already exists", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "draft", - "scheduled", - "allocatingquota", - "allocatedquota", - "quotaallocationfailed", - "checkingmanifest", - "checkedmanifest", - "devicefetch", - "devicecopy", - "devicecheck", - "publishing", - "deploying", - "deployed", - "manifestremoved", - "expired", - "stopping", - "autostopped", - "userstopped", - "conflict" + "error" ], - "x-deprecation": { - "issued_at": "2019-03-18T14:55:20+00:00", - "end_of_life_at": "2020-03-18T14:55:20+00:00", - "comment": "Use phase instead", - "links": [] - }, - "api_fieldname": "state", - "entity_fieldname": "state" + "_key": "object" }, - "when": { - "description": "The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed.", + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "x-nullable": true, - "api_fieldname": "when", - "entity_fieldname": "when" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "_key": "properties" - } - ], - "_key": "201" - }, - { - "description": "Validation error: The data used to create the campaign did not validate.\n", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "409" } ], "path": "/v3/update-campaigns", @@ -87020,8 +94226,7 @@ "started_at", "stopping_at", "stopped_at", - "phase", - "when" + "phase" ], "group_id": "Device_Update", "parameter_map": { @@ -87034,7 +94239,7 @@ "_key": "create" }, { - "description": "Delete an update campaign.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Delete an update campaign.\n
\n**Usage example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -87055,8 +94260,7 @@ "name": "campaign_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -87073,14 +94277,221 @@ }, { "description": "Validation error: The data used to update the campaign did not validate.\n", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Update campaign can't be found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" }, { @@ -87185,7 +94596,7 @@ "_key": "delete" }, { - "description": "Get metadata for all devices in a campaign.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata \\\n-H 'Authorization: '\n```\n", + "description": "Get metadata for all devices in a campaign.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -87219,8 +94630,7 @@ "name": "campaign_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -87358,6 +94768,7 @@ { "type": "string", "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", "example": "015c3029f6f7000000000001001000c3", "api_fieldname": "id", "entity_fieldname": "id", @@ -87393,6 +94804,7 @@ { "type": "string", "description": "The entity name: always 'update-campaign-device-metadata'.", + "example": "update-campaign-device-metadata", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -87437,6 +94849,7 @@ { "type": "string", "description": "The entity name: always 'list'.", + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -87510,7 +94923,7 @@ "_key": "device_metadata" }, { - "description": "Get update campaigns for devices specified by a filter.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization: '\n```\n", + "description": "Get update campaigns for devices specified by a filter.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -87640,7 +95053,8 @@ }, "object": { "description": "Entity name: always 'update-campaign'.", - "type": "string" + "type": "string", + "example": "update-campaign" }, "active_at": { "description": "The time the campaign entered the active state.", @@ -87682,9 +95096,9 @@ "example": "This campaign updates Class XX devices to version 1.34" }, "device_filter": { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000" + "example": "state__eq=registered" }, "finished": { "description": "The time the campaign finished.", @@ -87695,7 +95109,8 @@ "id": { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000" + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5" }, "name": { "description": "The campaign name.", @@ -87706,12 +95121,12 @@ "root_manifest_id": { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000" + "example": "016e83dce36a00000000000100100102" }, "root_manifest_url": { "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000" + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102" }, "starting_at": { "description": "The time the campaign will be started.", @@ -87812,6 +95227,7 @@ { "description": "Entity name: always 'list'.", "type": "string", + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -87834,25 +95250,232 @@ "entity_fieldname": "total_count", "_key": "total_count" } - ], - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "update_campaign" - } + ], + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "update_campaign" + } + }, + "_key": "200" + }, + { + "description": "Validation error: The data used to update the campaign did not validate.\n", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Unable to find content.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] }, - "_key": "200" - }, - { - "description": "Validation error: The data used to update the campaign did not validate.\n", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to find content.", "_key": "404" } ], @@ -88003,7 +95626,7 @@ "_key": "list" }, { - "description": "Get an update campaign.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\\n-H 'Authorization: '\n```\n", + "description": "Get an update campaign.\n
\n**Usage example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -88021,7 +95644,8 @@ { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id", "parameter_fieldname": "campaign_id", @@ -88079,6 +95703,7 @@ "object": { "description": "Entity name: always 'update-campaign'.", "type": "string", + "example": "update-campaign", "api_fieldname": "object", "entity_fieldname": "object" }, @@ -88136,9 +95761,9 @@ "entity_fieldname": "description" }, "device_filter": { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "entity_fieldname": "device_filter" }, @@ -88153,7 +95778,8 @@ "id": { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id" }, @@ -88168,14 +95794,14 @@ "root_manifest_id": { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "entity_fieldname": "root_manifest_id" }, "root_manifest_url": { "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_url", "entity_fieldname": "root_manifest_url" }, @@ -88277,14 +95903,221 @@ }, { "description": "Validation error: The data used to update the campaign did not validate.\n", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Unable to find campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" } ], @@ -88337,7 +96170,7 @@ "_key": "read" }, { - "description": "Start a campaign.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start \\\n-H 'Authorization: '\n```\n", + "description": "Start a campaign.\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -88358,8 +96191,7 @@ "name": "campaign_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -88376,18 +96208,294 @@ }, { "description": "Unable to change the phase of the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Cannot find the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" }, { "description": "Cannot start the campaign while in the current phase.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "409" } ], @@ -88419,7 +96527,7 @@ "_key": "start" }, { - "description": "Stop a campaign. Stopping is a process that requires the campaign go through several [phases](../updating-firmware/running-update-campaigns.html#stopping).\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop \\\n-H 'Authorization: '\n```\n", + "description": "Stop a campaign. Stopping is a process that requires the campaign go through several [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html).\n
\n**Usage example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \\\n-H 'Authorization: Bearer '\n```\n", "field_renames": [], "fields": [ { @@ -88440,8 +96548,7 @@ "name": "campaign_id", "required": true, "type": "string", - "minLength": 32, - "maxLength": 32, + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -88458,18 +96565,294 @@ }, { "description": "Unable to change the phase of the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "400" }, { "description": "Not authenticated.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "401" }, { "description": "Cannot find the campaign.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "404" }, { "description": "Cannot stop the campaign while in the current phase.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" + } + ] + }, + "_key": "fields" + }, + { + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" + }, + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" + }, + { + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "409" } ], @@ -88501,7 +96884,7 @@ "_key": "stop" }, { - "description": "Modify an update campaign.\n
\n**Usage example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \\\n-H 'Authorization: ' \\\nd '{\n \"description\": \"Campaign is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\",\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\",\n}'\n```\n", + "description": "Modify an update campaign.\n
\n**Usage example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012 \\\n-H 'Authorization: Bearer ' \\\nd '{\n \"description\": \"Campaign is for ...\",\n \"device_filter\": \"123400000000000000000000000ae45\",\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\",\n}'\n```\n", "field_renames": [], "fields": [ { @@ -88551,9 +96934,9 @@ "_key": "description" }, { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "entity_fieldname": "device_filter", "parameter_fieldname": "device_filter", @@ -88576,7 +96959,8 @@ { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id", "parameter_fieldname": "campaign_id", @@ -88599,13 +96983,26 @@ { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "entity_fieldname": "root_manifest_id", "parameter_fieldname": "root_manifest_id", "in": "body", "required": false, "_key": "root_manifest_id" + }, + { + "description": "The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "x-nullable": true, + "api_fieldname": "when", + "entity_fieldname": "when", + "parameter_fieldname": "when", + "in": "body", + "required": false, + "_key": "when" } ], "method": "put", @@ -88657,6 +97054,7 @@ "object": { "description": "Entity name: always 'update-campaign'.", "type": "string", + "example": "update-campaign", "api_fieldname": "object", "entity_fieldname": "object" }, @@ -88714,9 +97112,9 @@ "entity_fieldname": "description" }, "device_filter": { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "entity_fieldname": "device_filter" }, @@ -88731,7 +97129,8 @@ "id": { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id" }, @@ -88746,14 +97145,14 @@ "root_manifest_id": { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "entity_fieldname": "root_manifest_id" }, "root_manifest_url": { "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_url", "entity_fieldname": "root_manifest_url" }, @@ -88898,8 +97297,7 @@ "started_at", "stopping_at", "stopped_at", - "phase", - "when" + "phase" ], "group_id": "Device_Update", "parameter_map": { @@ -89005,9 +97403,9 @@ "_key": "description" }, { - "description": "The filter for the devices the campaign is targeting at.", + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "example": "id__eq=00000000000000000000000000000000", + "example": "state__eq=registered", "api_fieldname": "device_filter", "readOnly": false, "required": true, @@ -89039,7 +97437,8 @@ { "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "readOnly": false, "required": true, @@ -89078,7 +97477,7 @@ { "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "00000000000000000000000000000000", + "example": "016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_id", "readOnly": false, "required": false, @@ -89087,7 +97486,7 @@ { "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", "api_fieldname": "root_manifest_url", "readOnly": true, "required": false, @@ -89150,7 +97549,7 @@ "example": "2017-05-22T12:37:55.576563Z", "x-nullable": true, "api_fieldname": "when", - "readOnly": true, + "readOnly": false, "required": false, "_key": "when" } @@ -89173,7 +97572,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Create or invite a new user to the account. Only email address is used; other attributes are set in the second step.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", + "description": "Create or invite a new user to the account. The invited user has to accept the invitation by clicking the link in the invitation email.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", "field_renames": [], "fields": [ { @@ -89273,6 +97672,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -89282,6 +97691,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -89292,6 +97702,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -89661,6 +98072,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -89670,6 +98091,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -89680,6 +98102,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -90128,7 +98551,7 @@ "_key": "create" }, { - "description": "Delete a user.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -90471,13 +98894,13 @@ "_key": "delete" }, { - "description": "Retrieve the details of all users.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of users.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -90517,7 +98940,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -90552,7 +98975,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -90827,6 +99250,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -90836,6 +99269,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -90846,6 +99280,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -91148,7 +99583,7 @@ } ], "path": "/v3/users", - "summary": "Get the details of all users.", + "summary": "Get users.", "return_type": "paginated_response(user)", "return_info": { "self": true, @@ -91199,13 +99634,13 @@ "_key": "list" }, { - "description": "Retrieve groups of the user.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of policy groups associated with a user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -91257,7 +99692,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -91292,7 +99727,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -91325,8 +99760,21 @@ "format": "int32", "example": 0, "description": "The number of API keys in this group.", + "x-deprecation": { + "issued_at": "2020-08-01T00:00:00+00:00", + "end_of_life_at": "2021-08-01T00:00:00+00:00", + "comment": "This property is deprecated. See 'application_count' property.", + "links": [] + }, "_key": "apikey_count" }, + { + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" + }, { "type": "string", "format": "date-time", @@ -91664,7 +100112,7 @@ } ], "path": "/v3/users/{user_id}/groups", - "summary": "Get groups of the user.", + "summary": "Get policy groups for a user.", "return_type": "paginated_response(policy_group)", "return_info": { "self": false, @@ -91696,7 +100144,7 @@ "_key": "policy_groups" }, { - "description": "Retrieve the details of a user.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the details of a user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -92017,6 +100465,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -92026,6 +100484,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -92036,6 +100495,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -92420,7 +100880,7 @@ "_key": "read" }, { - "description": "Update user details\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"username\": \"myusername\"}'\n```", + "description": "Update user details.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d '{\"username\": \"myusername\"}'\n```", "field_renames": [], "fields": [ { @@ -92518,6 +100978,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -92527,6 +100997,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -92537,6 +101008,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -92894,6 +101366,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -92903,6 +101385,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -92913,6 +101396,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -93733,6 +102217,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -93742,6 +102236,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -93752,6 +102247,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -93873,7 +102369,7 @@ "primary_key_field": "id", "methods": [ { - "description": "Invite a new or existing user.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", + "description": "Invite a new or existing user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json' \\\n-d {\"email\": \"myemail@company.com\"}\n```", "field_renames": [], "fields": [ { @@ -93913,6 +102409,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -93922,6 +102428,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -93932,6 +102439,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -94066,6 +102574,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -94075,6 +102593,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -94085,6 +102604,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -94397,7 +102917,7 @@ "_key": "create" }, { - "description": "Delete an active user invitation sent to a new or existing user.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete an active user invitation sent to a new or existing user.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -94667,13 +103187,13 @@ "_key": "delete" }, { - "description": "Retrieve details for all the active user invitations.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve an array of active user invitations sent by email.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -94701,7 +103221,7 @@ }, { "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ "ASC", "DESC" @@ -94736,7 +103256,7 @@ { "type": "string", "example": "01619571f3c00242ac12000600000000", - "description": "The entity ID to fetch after the given one.", + "description": "The entity ID to retrieve after the given one.", "pattern": "[a-f0-9]{32}", "api_fieldname": "after", "entity_fieldname": "after", @@ -94817,6 +103337,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -94826,6 +103356,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -94836,6 +103367,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -95093,7 +103625,7 @@ } ], "path": "/v3/user-invitations", - "summary": "Get the details of all user invitations.", + "summary": "Get user invitations.", "return_type": "paginated_response(user_invitation)", "return_info": { "self": true, @@ -95132,7 +103664,7 @@ "_key": "list" }, { - "description": "Retrieve the details of an active user invitation.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", + "description": "Retrieve the details of an active user invitation.\nNote: This endpoint is restricted to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \\\n-H 'Authorization: Bearer '\n```", "field_renames": [], "fields": [ { @@ -95239,6 +103771,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -95248,6 +103790,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -95258,6 +103801,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -95646,6 +104190,16 @@ "properties": [ { "type": "string", + "example": "fed/user_007", + "description": "The ID of the user in the identity provider's service.", + "readOnly": true, + "api_fieldname": "foreign_id", + "entity_fieldname": "foreign_id", + "_key": "foreign_id" + }, + { + "type": "string", + "example": "01619571f3c00242ac12000600000000", "description": "ID of the identity provider.", "readOnly": false, "_override": true, @@ -95655,6 +104209,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -95665,6 +104220,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -95725,8 +104281,8 @@ "fields": [ { "type": "string", - "description": "Provides details in case of failure.\n", - "example": "message describing the verification failure", + "description": "Provides details in case of failure.", + "example": "Message describing the verification failure", "api_fieldname": "message", "readOnly": true, "required": false, @@ -95734,7 +104290,7 @@ }, { "type": "boolean", - "description": "Indicates whether the certificate issuer was verified successfully.\n", + "description": "Indicates whether the certificate issuer was verified successfully.", "example": false, "api_fieldname": "successful", "readOnly": true, diff --git a/config/pelion/sdk_foundation_definition.yaml b/config/pelion/sdk_foundation_definition.yaml index 011ca67f5..63b06a013 100644 --- a/config/pelion/sdk_foundation_definition.yaml +++ b/config/pelion/sdk_foundation_definition.yaml @@ -58,6 +58,11 @@ entities: readOnly: true required: false type: string + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-09-01T00:00:00+00:00' + issued_at: '2020-09-01T00:00:00+00:00' + links: [] x-nullable: true - _key: admin_name api_fieldname: admin_name @@ -80,7 +85,8 @@ entities: x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases must be + globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -104,18 +110,25 @@ entities: api_fieldname: business_model_history description: Business model history for this account. items: + foreign_key: + entity: business_model_history + group: Accounts properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model example: api_calls_1_business_model type: string - _key: updated_at + api_fieldname: updated_at description: Last update UTC time RFC3339. + entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time type: string @@ -134,7 +147,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 readOnly: false @@ -194,7 +207,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 readOnly: false @@ -259,78 +272,130 @@ entities: description: List of account limitation objects. items: description: This object represents an account limitation. + foreign_key: + entity: account_limitation + group: Accounts properties: - _key: billing_period + api_fieldname: billing_period description: Billing period of the account limitation. + entity_fieldname: billing_period + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at + api_fieldname: created_at description: Creation UTC time RFC3339. + entity_fieldname: created_at example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description + api_fieldname: description description: Description of the account limitation. + entity_fieldname: description readOnly: true type: string - _key: etag + api_fieldname: etag description: API resource entity version. + entity_fieldname: etag example: '1' + readOnly: true type: string - _key: id + api_fieldname: id description: Entity ID. + entity_fieldname: id example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited + api_fieldname: inherited description: Flag indicating whether this limitation is inherited. + entity_fieldname: inherited readOnly: true type: boolean - _key: inherited_from + api_fieldname: inherited_from description: Indicates where this limit is inherited from. + entity_fieldname: inherited_from readOnly: true type: string - _key: inherited_type + api_fieldname: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + entity_fieldname: inherited_type + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + api_fieldname: inherited_value + description: Used as default value if parent entity has this limitation defined. + If parent entity does not have such a limitation, the value is null. + entity_fieldname: inherited_value + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit + api_fieldname: limit description: The value of the limit. - format: int32 + entity_fieldname: limit + example: 25 + format: int64 type: integer - _key: name + api_fieldname: name description: Name of the account limitation. + entity_fieldname: name + example: iam_limit_user_count type: string - _key: object + api_fieldname: object description: 'Entity name: always ''limitation''' + entity_fieldname: object enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota + api_fieldname: quota description: Quota of the account limitation. - format: int32 + entity_fieldname: quota + example: 0 + format: int64 type: integer - _key: updated_at + api_fieldname: updated_at description: Last update UTC time RFC3339. + entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object readOnly: true @@ -340,13 +405,12 @@ entities: additionalProperties: type: string api_fieldname: limits - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' readOnly: true required: false type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -592,6 +656,28 @@ entities: readOnly: true required: false type: string + - _key: tier_history + api_fieldname: tier_history + description: Tier history for this account. + items: + foreign_key: + entity: tier_history + group: Accounts + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + readOnly: true + required: false + type: array - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -611,7 +697,9 @@ entities: group_id: Accounts methods: - _key: api_keys - description: 'Retrieve API keys in an array, optionally filtered by the owner. + description: 'Retrieve an array of API keys, optionally filtered by the owner. + + Note: This endpoint is restricted to administrators. **Example:** @@ -621,7 +709,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -639,7 +727,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -686,7 +774,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -723,7 +811,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -846,8 +934,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -1023,7 +1111,11 @@ entities: type: subtenant_api_key return_type: paginated_response(subtenant_api_key) summary: Get all API keys. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: key: - eq @@ -1032,6 +1124,8 @@ entities: - _key: create description: 'Create a new account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -1039,14 +1133,14 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"display_name": "MyAccount1", "admin_name": "accountAdmin1", "email": - "example_admin@myaccount.info", "country": "United Kingdom", "end_market": "Smart - City", "address_line1": "110 Fulbourn Rd", "city": "Cambridge", "contact": "J. - Doe", "company": "Arm"}'' + -d ''{"display_name": "MyAccount1", "aliases": [ "my-account" ], "admin_name": + "accountAdmin1", "email": "example_admin@myaccount.info", "country": "United + Kingdom", "end_market": "Smart City", "address_line1": "110 Fulbourn Rd", "city": + "Cambridge", "contact": "J. Doe", "company": "Arm"}'' ```' drop_fields: @@ -1081,6 +1175,7 @@ entities: - limitations - password_recovery_expiration - business_model_history + - tier_history field_renames: [] fields: - _key: action @@ -1176,7 +1271,8 @@ entities: x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. entity_fieldname: aliases in: body items: @@ -1191,7 +1287,7 @@ entities: default: active_device_business_model description: Business model for this account. Manageable by the root admin only. entity_fieldname: business_model - enum: &id001 + enum: - active_device_business_model - api_calls_1_business_model enum_reference: account_business_model_enum @@ -1213,7 +1309,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc in: body @@ -1266,7 +1362,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM in: body @@ -1293,7 +1389,7 @@ entities: example: IT in: body parameter_fieldname: end_market - required: false + required: true type: string - _key: phone_number api_fieldname: phone_number @@ -1343,6 +1439,9 @@ entities: description: Successful operation. schema: description: Represents an account in requests and responses. + foreign_key: + entity: account + group: Accounts properties: - _key: address_line1 api_fieldname: address_line1 @@ -1395,6 +1494,11 @@ entities: example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT readOnly: true type: string + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-09-01T00:00:00+00:00' + issued_at: '2020-09-01T00:00:00+00:00' + links: [] x-nullable: true - _key: admin_name api_fieldname: admin_name @@ -1415,7 +1519,8 @@ entities: x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. entity_fieldname: aliases items: pattern: '[\w\-._]{8,100}' @@ -1440,9 +1545,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -1465,7 +1572,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc maxLength: 100 @@ -1518,7 +1625,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM maxLength: 100 @@ -1586,12 +1693,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -1600,10 +1711,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -1616,45 +1729,61 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the value + is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array @@ -1662,12 +1791,11 @@ entities: additionalProperties: type: string api_fieldname: limits - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' entity_fieldname: limits type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -1910,49 +2038,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present only - in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -1972,9 +2060,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model - description: Business model for this account. Manageable by the - root admin only. + description: Business model for this account. Manageable by + the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -1994,7 +2084,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -2033,7 +2123,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -2085,12 +2175,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -2099,10 +2193,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -2115,56 +2211,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the + value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent + entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -2361,374 +2473,961 @@ entities: type: string - _key: sub_accounts description: List of sub accounts. Not available for developer users. - items: [] - type: array - x-nullable: true - - _key: template_id - description: Account template ID. - example: 01619571e7160242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: tier - description: 'The tier level of the account; `0`: free tier, `1`: commercial - account, `2`: partner tier. Other values are reserved for the future.' - example: '1' - type: string - - _key: updated_at - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - - _key: upgraded_at - description: Time when upgraded to commercial account in UTC format - RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - required: - - end_market - - etag - - id - - object - - status - - tier - type: object - type: array - x-nullable: true - - _key: template_id - api_fieldname: template_id - description: Account template ID. - entity_fieldname: template_id - example: 01619571e7160242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: tier - api_fieldname: tier - description: 'The tier level of the account; `0`: free tier, `1`: commercial - account, `2`: partner tier. Other values are reserved for the future.' - entity_fieldname: tier - example: '1' - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update UTC time RFC3339. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - - _key: upgraded_at - api_fieldname: upgraded_at - description: Time when upgraded to commercial account in UTC format RFC3339. - entity_fieldname: upgraded_at - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - required: - - end_market - - etag - - id - - object - - status - - tier - type: object - - _key: '400' - description: Error in input data, for example, invalid username. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '401' - description: Authentication failure. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - return_info: - custom: false - self: true - type: account - return_type: account - summary: Create a new account. - x_deprecation: null - x_filter: {} - - _key: dark_theme_branding_colors - description: 'Retrieve dark theme branding colors for an account. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark - \ - - -H ''Authorization: Bearer '' - - ```' - drop_fields: - - object - - etag - - type - - filter - - sub_accounts - - limit - - after - - order - - total_count - - has_more - - data - field_renames: [] - fields: - - _key: id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: id - external_param: false - in: path - name: account_id - parameter_fieldname: account_id - required: true - type: string - foreign_key: - entity: subtenant_dark_theme_color - group_id: Accounts - method: get - mode: dark_theme_branding_colors - notes: This lists the dark theme banding colors of the subtenant account. - operation_id: getAccountDarkColors - pagination: true - parameter_map: - account_id: id - path: /v3/accounts/{account_id}/branding-colors/dark - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: dark_theme_color - group: Branding - pagination: true - properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch after the given one. - entity_fieldname: after - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data - items: - foreign_key: - entity: dark_theme_color - group: Branding - properties: - - _key: color - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' - type: string - x-nullable: true - - _key: object - description: 'Entity name: always ''branding_color''' - enum: - - branding_color - readOnly: true - type: string - - _key: reference - _override: true - description: Color name. - enum: - - error_color - - primary - - secondary - - success_color - - warning_color - - canvas_background - - canvas_background_font_color - - workspace_background - - workspace_background_font_color - - info_color - - info_font_color - - primary_font_color - - secondary_font_color - - error_font_color - - success_font_color - - warning_font_color - is_primary_key: true - type: string - - _key: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object - type: array - - _key: has_more - api_fieldname: has_more - description: Flag indicating whether there are more results. - entity_fieldname: has_more - example: false - type: boolean - - _key: limit - api_fieldname: limit - description: The number of results to return, or equal to `total_count`. - entity_fieldname: limit - example: 50 - format: int32 - type: integer - - _key: object - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object - enum: - - list - type: string - - _key: order - api_fieldname: order - description: 'The order of the records to return based on creation time. - Available values: ASC, DESC; by default ASC.' - entity_fieldname: order - enum: - - ASC + items: + description: Represents an account in requests and responses. + properties: + - _key: address_line1 + description: Postal address line 1. + example: 110 Fulbourn Rd + maxLength: 100 + type: string + x-nullable: true + - _key: address_line2 + description: Postal address line 2. + example: ' ' + maxLength: 100 + type: string + x-nullable: true + - _key: aliases + description: An array of aliases for the tenant account ID. The + aliases must be globally unique. + items: + pattern: '[\w\-._]{8,100}' + type: string + maxItems: 10 + type: array + - _key: business_model + default: active_device_business_model + description: Business model for this account. Manageable by the + root admin only. + enum: + - active_device_business_model + - api_calls_1_business_model + example: api_calls_1_business_model + type: string + - _key: business_model_history + description: Business model history for this account. + items: + properties: + - _key: business_model + api_fieldname: business_model + default: active_device_business_model + description: Business model for this account. Manageable by + the root admin only. + entity_fieldname: business_model + enum: + - active_device_business_model + - api_calls_1_business_model + example: api_calls_1_business_model + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array + - _key: city + description: The city part of the postal address. + example: Cambridge + maxLength: 100 + type: string + x-nullable: true + - _key: company + description: The name of the company used in billing. + example: ARM Holdings Plc + maxLength: 100 + type: string + x-nullable: true + - _key: contact + description: The name of the contact person for this account. + example: J. Doe + maxLength: 100 + type: string + x-nullable: true + - _key: contract_number + description: Contract number of the customer. + example: 1NX25_0001 + type: string + x-nullable: true + - _key: country + description: The country part of the postal address. + example: United Kingdom + maxLength: 100 + type: string + x-nullable: true + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: custom_fields + additionalProperties: + type: string + description: Account's custom properties as key-value pairs. + type: object + x-nullable: true + - _key: customer_number + description: Customer number of the customer. + example: 1NC25_0001 + type: string + x-nullable: true + - _key: display_name + description: The display name for the tenant account. + example: ARM + maxLength: 100 + type: string + x-nullable: true + - _key: email + description: The company email address for this account. + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + x-nullable: true + - _key: end_market + description: Account end market. + example: IT + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: expiration + description: Expiration time of the account, as UTC time RFC3339. + format: date-time + type: string + x-nullable: true + - _key: expiration_warning_threshold + description: Indicates how many days (1-180) before account expiration + a notification email is sent. + example: '180' + maximum: 180 + minimum: 1 + type: integer + x-nullable: true + - _key: id + description: Account ID. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: idle_timeout + description: The reference token expiration time, in minutes, for + this account. + example: '30' + maximum: 120 + minimum: 1 + type: integer + x-nullable: true + - _key: limitations + description: List of account limitation objects. + items: + description: This object represents an account limitation. + properties: + - _key: billing_period + description: Billing period of the account limitation. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + readOnly: true + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + readOnly: true + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + readOnly: true + type: string + - _key: inherited + description: Flag indicating whether this limitation is inherited. + readOnly: true + type: boolean + - _key: inherited_from + description: Indicates where this limit is inherited from. + readOnly: true + type: string + - _key: inherited_type + description: Indicates the type of the entity where the limitation + is inherited from. + enum: + - account + - template + - tier_template + readOnly: true + type: string + - _key: inherited_value + description: Used as default value if parent entity has this + limitation defined. If parent entity does not have such a + limitation, the value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the + parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object + - _key: limit + description: The value of the limit. + example: 25 + format: int64 + type: integer + - _key: name + description: Name of the account limitation. + example: iam_limit_user_count + type: string + - _key: object + description: 'Entity name: always ''limitation''' + enum: + - limitation + readOnly: true + type: string + - _key: quota + description: Quota of the account limitation. + example: 0 + format: int64 + type: integer + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + type: array + - _key: limits + additionalProperties: + type: string + description: 'DEPRECATED: Replaced by the limitations parameter.' + type: object + x-deprecation: + comment: Replaced by the limitations parameter. + end_of_life_at: '2020-08-27T12:03:58+00:00' + issued_at: '2019-08-27T12:03:58+00:00' + x-nullable: true + - _key: mfa_status + description: The enforcement status of multi-factor authentication, + either `enforced` or `optional`. + enum: + - enforced + - optional + type: string + x-nullable: true + - _key: notification_emails + description: A list of notification email addresses. + items: + pattern: ^(?=.{3,254}$).+\@.+ + type: string + type: array + x-nullable: true + - _key: object + description: 'Entity name: always `account`.' + enum: + - account + type: string + - _key: parent_account + description: Represents parent account contact details in responses. + foreign_key: + entity: parent_account + group: Accounts + properties: + - _key: admin_email + api_fieldname: admin_email + description: The email address of the admin user who is the contact + person of the parent account. + entity_fieldname: admin_email + example: info@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + - _key: admin_name + api_fieldname: admin_name + description: The name of the admin user who is the contact person + of the parent account. + entity_fieldname: admin_name + example: J. Doe + maxLength: 100 + type: string + - _key: id + api_fieldname: id + description: The ID of the parent account. + entity_fieldname: id + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + type: object + x-nullable: true + - _key: parent_id + description: The ID of the parent account, if any. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + - _key: password_policy + description: The password policy for this account. + foreign_key: + entity: password_policy + group: Accounts + properties: + - _key: minimum_length + api_fieldname: minimum_length + description: Minimum length for the password. + entity_fieldname: minimum_length + example: '8' + maximum: 512 + minimum: 8 + type: integer + required: + - minimum_length + type: object + x-nullable: true + - _key: password_recovery_expiration + description: Indicates for how many minutes a password recovery + email is valid. + format: int32 + maximum: 45 + minimum: 1 + type: integer + - _key: phone_number + description: The phone number of a company representative. + example: +44 (1223) 400 400 + maxLength: 100 + type: string + x-nullable: true + - _key: policies + description: List of policies if requested. + items: + description: Represents a feature policy. Either the feature or + the resource must be specified. + foreign_key: + entity: policy + group: Accounts + properties: + - _key: action + api_fieldname: action + description: Comma-separated list of actions, empty string represents + all actions. + entity_fieldname: action + example: GET + type: string + - _key: allow + api_fieldname: allow + description: True or false controlling whether an action is + allowed or not. + entity_fieldname: allow + example: true + type: boolean + - _key: feature + api_fieldname: feature + description: Feature name corresponding to this policy. + entity_fieldname: feature + example: update-campaigns + type: string + - _key: inherited + api_fieldname: inherited + description: Flag indicating whether this feature is inherited + or overwritten specifically. + entity_fieldname: inherited + example: false + readOnly: true + type: boolean + - _key: inherited_from + api_fieldname: inherited_from + description: An ID indicating where this policy is inherited + from. + entity_fieldname: inherited_from + example: 016ada3ec2d46665bf66e32e00000000 + pattern: '[a-f0-9]{32}' + readOnly: true + type: string + - _key: inherited_type + api_fieldname: inherited_type + description: Indicates the type of entity this policy is inherited + from. + entity_fieldname: inherited_type + enum: + - account + - template + - tier_template + example: account + readOnly: true + type: string + - _key: resource + api_fieldname: resource + description: Resource that is protected by this policy. + entity_fieldname: resource + example: /v3/update-campaign + type: string + type: object + type: array + x-nullable: true + - _key: postal_code + description: The postal code part of the postal address. + example: CB1 9NJ + maxLength: 100 + type: string + x-nullable: true + - _key: reason + description: A note with the reason for account status update. + example: Subscription paid. + type: string + x-nullable: true + - _key: reference_note + description: A reference note for updating the status of the account. + example: ARM-INT-0001 + type: string + x-nullable: true + - _key: sales_contact + description: Email address of the sales contact. + example: sales@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + x-nullable: true + - _key: state + description: The state part of the postal address. + example: ' ' + maxLength: 100 + type: string + x-nullable: true + - _key: status + description: The status of the account. + enum: + - ENROLLING + - ACTIVE + - RESTRICTED + - SUSPENDED + example: ACTIVE + type: string + - _key: sub_accounts + description: List of sub accounts. Not available for developer users. + items: [] + type: array + x-nullable: true + - _key: template_id + description: Account template ID. + example: 01619571e7160242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, + `1`: commercial account, `2`: partner tier. Other values are + reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: upgraded_at + description: Time when upgraded to commercial account in UTC format + RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + required: + - end_market + - etag + - id + - object + - status + - tier + type: object + type: array + x-nullable: true + - _key: template_id + description: Account template ID. + example: 01619571e7160242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: upgraded_at + description: Time when upgraded to commercial account in UTC format + RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + required: + - end_market + - etag + - id + - object + - status + - tier + type: object + type: array + x-nullable: true + - _key: template_id + api_fieldname: template_id + description: Account template ID. + entity_fieldname: template_id + example: 01619571e7160242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + - _key: tier + api_fieldname: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + entity_fieldname: tier + example: '1' + type: string + - _key: tier_history + api_fieldname: tier_history + description: Tier history for this account. + entity_fieldname: tier_history + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array + - _key: updated_at + api_fieldname: updated_at + description: Last update UTC time RFC3339. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: upgraded_at + api_fieldname: upgraded_at + description: Time when upgraded to commercial account in UTC format RFC3339. + entity_fieldname: upgraded_at + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + - _key: '400' + description: Error in input data, for example, invalid username. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Authentication failure. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '409' + description: Account with the specified alias exists already. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: account + return_type: account + summary: Create a new account. + x_deprecation: null + x_filter: {} + - _key: dark_theme_branding_colors + description: 'Retrieve dark theme branding colors for an account. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - sub_accounts + - limit + - after + - order + - total_count + - has_more + - data + field_renames: [] + fields: + - _key: id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + foreign_key: + entity: subtenant_dark_theme_color + group_id: Accounts + method: get + mode: dark_theme_branding_colors + notes: This lists the dark theme banding colors of the subtenant account. + operation_id: getAccountDarkColors + pagination: true + parameter_map: + account_id: id + path: /v3/accounts/{account_id}/branding-colors/dark + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + pagination: true + properties: + - _key: after + api_fieldname: after + description: The entity ID to retrieve after the given one. + entity_fieldname: after + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: data + api_fieldname: data + description: A list of entities. + entity_fieldname: data + items: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + properties: + - _key: color + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' + type: string + x-nullable: true + - _key: object + description: 'Entity name: always ''branding_color''' + enum: + - branding_color + readOnly: true + type: string + - _key: reference + _override: true + description: Color name. + enum: + - error_color + - primary + - secondary + - success_color + - warning_color + - canvas_background + - canvas_background_font_color + - workspace_background + - workspace_background_font_color + - info_color + - info_font_color + - primary_font_color + - secondary_font_color + - error_font_color + - success_font_color + - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color + is_primary_key: true + type: string + - _key: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + type: array + - _key: has_more + api_fieldname: has_more + description: Flag indicating whether there are more results. + entity_fieldname: has_more + example: false + type: boolean + - _key: limit + api_fieldname: limit + description: The number of results to return, or equal to `total_count`. + entity_fieldname: limit + example: 50 + format: int32 + type: integer + - _key: object + api_fieldname: object + description: 'Entity name: always `list`.' + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + description: 'The order of the records to return based on creation time. + Available values: ASC, DESC; by default ASC.' + entity_fieldname: order + enum: + - ASC - DESC type: string - _key: total_count @@ -2900,6 +3599,8 @@ entities: - _key: dark_theme_branding_images description: 'Retrieve the metadata of all dark theme branding images. + Note: This endpoint is restricted to administrators. + **Example:** @@ -2908,7 +3609,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -2953,13 +3654,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding pagination: true properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -2970,7 +3671,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding properties: - _key: object @@ -2987,6 +3688,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -3234,6 +3938,8 @@ entities: - _key: light_theme_branding_colors description: 'Retrieve light theme branding colors for an account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -3242,7 +3948,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -3287,13 +3993,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: dark_theme_color + entity: subtenant_light_theme_color group: Branding pagination: true properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -3304,7 +4010,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_color + entity: subtenant_light_theme_color group: Branding properties: - _key: color @@ -3338,6 +4044,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color is_primary_key: true type: string - _key: updated_at @@ -3546,6 +4260,8 @@ entities: - _key: light_theme_branding_images description: 'Retrieve the metadata of all light theme branding images. + Note: This endpoint is restricted to administrators. + **Example:** @@ -3554,7 +4270,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -3599,13 +4315,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding pagination: true properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -3616,7 +4332,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding properties: - _key: object @@ -3633,6 +4349,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -3878,9 +4597,11 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Returns an array of account objects, optionally filtered by status + description: 'Retrieve an array of tenant accounts, optionally filtered by status and tier level. + Note: This endpoint is restricted to administrators. + **Example:** @@ -3888,7 +4609,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -3911,7 +4632,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -4005,7 +4726,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -4029,49 +4750,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present only - in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -4091,6 +4772,8 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model + entity_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. @@ -4113,7 +4796,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -4152,7 +4835,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -4204,12 +4887,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -4218,10 +4905,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -4234,56 +4923,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the + value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent + entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -4495,49 +5200,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this - account. Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. - Present only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present - only in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The + aliases must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -4557,9 +5222,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -4579,7 +5246,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -4618,7 +5285,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -4670,12 +5337,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -4684,10 +5355,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -4700,56 +5373,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this + limitation defined. If parent entity does not have such a + limitation, the value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the + parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -4962,6 +5651,23 @@ entities: for the future.' example: '1' type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, + `1`: commercial account, `2`: partner tier. Other values are + reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -4994,6 +5700,23 @@ entities: account, `2`: partner tier. Other values are reserved for the future.' example: '1' type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -5174,7 +5897,7 @@ entities: tier: - eq - _key: me - description: 'Retrieve detailed information about the account. + description: 'Retrieve information about the account. **Example:** @@ -5184,7 +5907,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -5229,16 +5952,11 @@ entities: - customer_number - parent_account - expiration - - admin_id - - admin_name - - admin_email - - admin_key - - admin_password - - admin_full_name - limitations - password_recovery_expiration - business_model - business_model_history + - tier_history field_renames: [] fields: - _key: include @@ -5296,62 +6014,10 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - api_fieldname: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - entity_fieldname: admin_email - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - api_fieldname: admin_full_name - description: The full name of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_full_name - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - api_fieldname: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - entity_fieldname: admin_id - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - api_fieldname: admin_key - description: The admin API key created for this account. Present only in - the response for account creation. - entity_fieldname: admin_key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - api_fieldname: admin_name - description: The username of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_name - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - api_fieldname: admin_password - description: The password of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_password - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. entity_fieldname: aliases items: pattern: '[\w\-._]{8,100}' @@ -5376,9 +6042,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -5401,7 +6069,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc maxLength: 100 @@ -5454,7 +6122,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM maxLength: 100 @@ -5522,12 +6190,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -5536,10 +6208,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -5552,45 +6226,61 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the value + is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array @@ -5598,12 +6288,11 @@ entities: additionalProperties: type: string api_fieldname: limits - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' entity_fieldname: limits type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -5846,49 +6535,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present only - in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -5908,9 +6557,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -5930,7 +6581,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -5969,7 +6620,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -6021,12 +6672,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -6035,10 +6690,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -6051,56 +6708,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the + value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent + entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -6311,6 +6984,23 @@ entities: account, `2`: partner tier. Other values are reserved for the future.' example: '1' type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -6347,6 +7037,24 @@ entities: entity_fieldname: tier example: '1' type: string + - _key: tier_history + api_fieldname: tier_history + description: Tier history for this account. + entity_fieldname: tier_history + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -6470,12 +7178,14 @@ entities: self: true type: account return_type: account - summary: Get account info. + summary: Get account information. x_deprecation: null x_filter: {} - _key: read description: 'Retrieve detailed information about an account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -6484,7 +7194,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -6528,16 +7238,11 @@ entities: - customer_number - parent_account - expiration - - admin_id - - admin_name - - admin_email - - admin_key - - admin_password - - admin_full_name - limitations - password_recovery_expiration - business_model - business_model_history + - tier_history field_renames: [] fields: - _key: id @@ -6603,62 +7308,10 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - api_fieldname: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - entity_fieldname: admin_email - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - api_fieldname: admin_full_name - description: The full name of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_full_name - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - api_fieldname: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - entity_fieldname: admin_id - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - api_fieldname: admin_key - description: The admin API key created for this account. Present only in - the response for account creation. - entity_fieldname: admin_key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - api_fieldname: admin_name - description: The username of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_name - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - api_fieldname: admin_password - description: The password of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_password - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. entity_fieldname: aliases items: pattern: '[\w\-._]{8,100}' @@ -6683,9 +7336,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -6708,7 +7363,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc maxLength: 100 @@ -6761,7 +7416,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM maxLength: 100 @@ -6829,12 +7484,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -6843,10 +7502,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -6859,45 +7520,61 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the value + is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array @@ -6905,12 +7582,11 @@ entities: additionalProperties: type: string api_fieldname: limits - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' entity_fieldname: limits type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -7153,49 +7829,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present only - in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -7215,9 +7851,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -7237,7 +7875,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -7276,7 +7914,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -7328,12 +7966,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -7342,10 +7984,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -7358,56 +8002,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the + value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent + entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -7618,6 +8278,23 @@ entities: account, `2`: partner tier. Other values are reserved for the future.' example: '1' type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -7654,6 +8331,24 @@ entities: entity_fieldname: tier example: '1' type: string + - _key: tier_history + api_fieldname: tier_history + description: Tier history for this account. + entity_fieldname: tier_history + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -7825,11 +8520,13 @@ entities: self: true type: account return_type: account - summary: Get account info. + summary: Get account information. x_deprecation: null x_filter: {} - _key: trusted_certificates - description: 'Retrieve trusted certificates in an array. + description: 'Retrieve an array of trusted certificates. + + Note: This endpoint is restricted to administrators. **Example:** @@ -7839,7 +8536,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -7861,12 +8558,13 @@ entities: - status__eq - issuer__like - subject__like + - certificate_fingerprint__eq - valid__eq field_renames: [] fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -7913,7 +8611,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -7944,21 +8642,16 @@ entities: description: Successful operation. schema: foreign_key: - entity: trusted_certificate + entity: developer_certificate group: Security pagination: true properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 - external_param: true - in: query - name: after - parameter_fieldname: after pattern: '[a-f0-9]{32}' - required: false type: string - _key: data api_fieldname: data @@ -7967,7 +8660,7 @@ entities: items: description: Represents a trusted certificate in responses. foreign_key: - entity: trusted_certificate + entity: developer_certificate group: Security properties: - _key: account_id @@ -8000,9 +8693,15 @@ entities: format: int32 type: integer - _key: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag description: API resource entity version. example: '1' @@ -8087,16 +8786,10 @@ entities: type: boolean - _key: limit api_fieldname: limit - default: 50 - description: The number of results to return (2-1000). Default 50. + description: The number of results to return (2-1000), or equal to `total_count`. entity_fieldname: limit example: 50 - external_param: true format: int32 - in: query - name: limit - parameter_fieldname: limit - required: false type: integer - _key: object api_fieldname: object @@ -8107,19 +8800,12 @@ entities: type: string - _key: order api_fieldname: order - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'The order of the records to return based on creation time. + Available values: ASC, DESC; by default ASC.' entity_fieldname: order enum: - ASC - DESC - enum_reference: trusted_certificate_order_enum - external_param: true - in: query - name: order - parameter_fieldname: order - required: false type: string - _key: total_count api_fieldname: total_count @@ -8184,7 +8870,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -8284,9 +8970,11 @@ entities: self: false type: subtenant_trusted_certificate return_type: paginated_response(subtenant_trusted_certificate) - summary: Get all trusted certificates. + summary: Get trusted certificates. x_deprecation: null x_filter: + certificate_fingerprint: + - eq device_execution_mode: - eq - neq @@ -8315,6 +9003,8 @@ entities: operation_id: updateMyAccount description: 'Update an account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -8323,7 +9013,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -8349,14 +9039,9 @@ entities: - reference_note - parent_account - expiration - - admin_id - - admin_name - - admin_email - - admin_key - - admin_password - - admin_full_name - limitations - business_model_history + - tier_history field_renames: [] fields: - _key: address_line1 @@ -8383,7 +9068,8 @@ entities: x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. entity_fieldname: aliases in: body items: @@ -8398,7 +9084,9 @@ entities: default: active_device_business_model description: Business model for this account. Manageable by the root admin only. entity_fieldname: business_model - enum: *id001 + enum: + - active_device_business_model + - api_calls_1_business_model enum_reference: account_business_model_enum example: api_calls_1_business_model in: body @@ -8418,7 +9106,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc in: body @@ -8482,7 +9170,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM in: body @@ -8680,62 +9368,10 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - api_fieldname: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - entity_fieldname: admin_email - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - api_fieldname: admin_full_name - description: The full name of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_full_name - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - api_fieldname: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - entity_fieldname: admin_id - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - api_fieldname: admin_key - description: The admin API key created for this account. Present only in - the response for account creation. - entity_fieldname: admin_key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - api_fieldname: admin_name - description: The username of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_name - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - api_fieldname: admin_password - description: The password of the admin user created for this account. Present - only in the response for account creation. - entity_fieldname: admin_password - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases api_fieldname: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. entity_fieldname: aliases items: pattern: '[\w\-._]{8,100}' @@ -8760,9 +9396,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -8785,7 +9423,7 @@ entities: x-nullable: true - _key: company api_fieldname: company - description: The name of the company. + description: The name of the company used in billing. entity_fieldname: company example: ARM Holdings Plc maxLength: 100 @@ -8838,7 +9476,7 @@ entities: x-nullable: true - _key: display_name api_fieldname: display_name - description: The display name for the account. + description: The display name for the tenant account. entity_fieldname: display_name example: ARM maxLength: 100 @@ -8906,12 +9544,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -8920,10 +9562,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -8936,45 +9580,61 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the value + is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined + in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array @@ -8982,12 +9642,11 @@ entities: additionalProperties: type: string api_fieldname: limits - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' entity_fieldname: limits type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -9230,49 +9889,9 @@ entities: maxLength: 100 type: string x-nullable: true - - _key: admin_email - description: The email address of the admin user created for this account. - Present only in the response for account creation. - example: admin@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - x-nullable: true - - _key: admin_full_name - description: The full name of the admin user created for this account. - Present only in the response for account creation. - example: Admin Doe - maxLength: 100 - type: string - x-nullable: true - - _key: admin_id - description: The ID of the admin user created for this account. Present - only in the response for the account creation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: admin_key - description: The admin API key created for this account. Present only - in the response for account creation. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000B40IkJADMANmAscAj0Ot0n2yeQnyt9tT - readOnly: true - type: string - x-nullable: true - - _key: admin_name - description: The username of the admin user created for this account. - Present only in the response for account creation. - example: admin - maxLength: 100 - type: string - x-nullable: true - - _key: admin_password - description: The password of the admin user created for this account. - Present only in the response for account creation. - example: PZf9eEUH43DAPE9ULINFeuj - type: string - x-nullable: true - _key: aliases - description: An array of aliases. + description: An array of aliases for the tenant account ID. The aliases + must be globally unique. items: pattern: '[\w\-._]{8,100}' type: string @@ -9292,9 +9911,11 @@ entities: items: properties: - _key: business_model + api_fieldname: business_model default: active_device_business_model description: Business model for this account. Manageable by the root admin only. + entity_fieldname: business_model enum: - active_device_business_model - api_calls_1_business_model @@ -9314,7 +9935,7 @@ entities: type: string x-nullable: true - _key: company - description: The name of the company. + description: The name of the company used in billing. example: ARM Holdings Plc maxLength: 100 type: string @@ -9353,7 +9974,7 @@ entities: type: string x-nullable: true - _key: display_name - description: The display name for the account. + description: The display name for the tenant account. example: ARM maxLength: 100 type: string @@ -9405,12 +10026,16 @@ entities: properties: - _key: billing_period description: Billing period of the account limitation. + example: 1 format: int32 + maximum: 120 + minimum: 1 type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' format: date-time + readOnly: true type: string - _key: description description: Description of the account limitation. @@ -9419,10 +10044,12 @@ entities: - _key: etag description: API resource entity version. example: '1' + readOnly: true type: string - _key: id description: Entity ID. example: 01619571d01d0242ac12000600000000 + readOnly: true type: string - _key: inherited description: Flag indicating whether this limitation is inherited. @@ -9435,56 +10062,72 @@ entities: - _key: inherited_type description: Indicates the type of the entity where the limitation is inherited from. + enum: + - account + - template + - tier_template readOnly: true type: string + - _key: inherited_value + description: Used as default value if parent entity has this limitation + defined. If parent entity does not have such a limitation, the + value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation + as defined in the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent + entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + type: object - _key: limit description: The value of the limit. - format: int32 + example: 25 + format: int64 type: integer - _key: name description: Name of the account limitation. + example: iam_limit_user_count type: string - _key: object description: 'Entity name: always ''limitation''' enum: - - user - - api-key - - group - - account - - account_template - - trusted_cert - - list - - error - - agreement - - signed_agreement - - policy - limitation - - identity_provider - - user_session - - user_invitation - - notification_entry - - branding_color - - branding_image + readOnly: true type: string - _key: quota description: Quota of the account limitation. - format: int32 + example: 0 + format: int64 type: integer - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true type: string type: object type: array - _key: limits additionalProperties: type: string - deprecated: true - description: List of limits as key-value pairs if requested. + description: 'DEPRECATED: Replaced by the limitations parameter.' type: object x-deprecation: - comment: Superseded by the limitations parameter. + comment: Replaced by the limitations parameter. end_of_life_at: '2020-08-27T12:03:58+00:00' issued_at: '2019-08-27T12:03:58+00:00' x-nullable: true @@ -9695,6 +10338,23 @@ entities: account, `2`: partner tier. Other values are reserved for the future.' example: '1' type: string + - _key: tier_history + description: Tier history for this account. + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: + commercial account, `2`: partner tier. Other values are reserved + for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' @@ -9731,6 +10391,24 @@ entities: entity_fieldname: tier example: '1' type: string + - _key: tier_history + api_fieldname: tier_history + description: Tier history for this account. + entity_fieldname: tier_history + items: + properties: + - _key: tier + description: 'The tier level of the account; `0`: free tier, `1`: commercial + account, `2`: partner tier. Other values are reserved for the future.' + example: '1' + type: string + - _key: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + type: object + type: array - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -9945,6 +10623,54 @@ entities: - request_id - type type: object + - _key: '409' + description: Account with the specified new alias exists already. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -9954,8 +10680,9 @@ entities: x_deprecation: null x_filter: {} - _key: user_invitations - description: 'Retrieve details of all active user invitations sent for new or - existing users. + description: 'Retrieve an array of active user invitations. + + Note: This endpoint is restricted to administrators. **Example:** @@ -9965,7 +10692,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -9982,7 +10709,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -10018,7 +10745,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -10055,7 +10782,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -10118,11 +10845,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -10130,6 +10865,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -10141,6 +10877,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -10201,8 +10938,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -10377,13 +11114,15 @@ entities: self: false type: subtenant_user_invitation return_type: paginated_response(subtenant_user_invitation) - summary: Get the details of all user invitations. + summary: Get user invitations. x_deprecation: null x_filter: login_profiles: - eq - _key: users - description: 'Retrieve details of all users. + description: 'Retrieve an array of users. + + Note: This endpoint is restricted to administrators. **Example:** @@ -10393,7 +11132,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -10414,7 +11153,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -10461,7 +11200,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -10498,7 +11237,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -10712,11 +11451,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -10724,6 +11471,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -10735,6 +11483,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -10835,8 +11584,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -11011,7 +11760,7 @@ entities: self: false type: subtenant_user return_type: paginated_response(subtenant_user) - summary: Get the details of all users. + summary: Get users. x_deprecation: null x_filter: email: @@ -11025,6 +11774,7 @@ entities: primary_key_field: id swagger_models: - AccountCreationReq + - AccountCreationResp - AccountInfo - AccountInfoList - AccountUpdateRootReq @@ -11040,9 +11790,130 @@ entities: - Tenant accounts - API keys - Tenant accounts - users - Tenant accounts - user invitations - - Tenant device security - certificates + - Tenant security and identity - certificates - Tenant user interface configuration - colors - Tenant user interface configuration - images +- _key: account_limitation + field_renames: [] + fields: + - _key: billing_period + api_fieldname: billing_period + description: Billing period of the account limitation. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + readOnly: true + required: false + type: integer + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + description: Description of the account limitation. + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + readOnly: true + required: false + type: string + - _key: inherited + api_fieldname: inherited + description: Flag indicating whether this limitation is inherited. + readOnly: true + required: false + type: boolean + - _key: inherited_from + api_fieldname: inherited_from + description: Indicates where this limit is inherited from. + readOnly: true + required: false + type: string + - _key: inherited_type + api_fieldname: inherited_type + description: Indicates the type of the entity where the limitation is inherited + from. + enum: + - account + - template + - tier_template + enum_reference: account_limitation_inherited_type_enum + readOnly: true + required: false + type: string + - _key: inherited_value + api_fieldname: inherited_value + description: Used as default value if parent entity has this limitation defined. + If parent entity does not have such a limitation, the value is null. + properties: + - _key: billing_period + description: Default billing period of the account limitation as defined in + the parent entity. + example: 1 + format: int32 + maximum: 120 + minimum: 1 + type: integer + - _key: limit + description: Default value of the limit as defined in the parent entity. + example: 25 + format: int64 + type: integer + - _key: quota + description: Default quota as defined in the parent entity. + example: 0 + format: int64 + type: integer + readOnly: true + required: false + type: object + - _key: limit + api_fieldname: limit + description: The value of the limit. + example: 25 + format: int64 + readOnly: true + required: false + type: integer + - _key: name + api_fieldname: name + description: Name of the account limitation. + example: iam_limit_user_count + readOnly: true + required: false + type: string + - _key: quota + api_fieldname: quota + description: Quota of the account limitation. + example: 0 + format: int64 + readOnly: true + required: false + type: integer + - _key: updated_at + api_fieldname: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: id + swagger_models: + - AccountLimitation + tags: [] - _key: active_session field_renames: [] fields: @@ -11204,7 +12075,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d ''{"name": "MyKey1"}'' \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' @@ -11241,7 +12112,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: owner api_fieldname: owner @@ -11257,7 +12128,7 @@ entities: api_fieldname: status description: The status of the API key. entity_fieldname: status - enum: &id002 + enum: &id001 - ACTIVE - INACTIVE enum_reference: api_key_status_enum @@ -11384,7 +12255,7 @@ entities: - object type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data, for example, missing API key name. schema: properties: - _key: code @@ -11533,7 +12404,11 @@ entities: type: api_key return_type: api_key summary: Create a new API key. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: delete description: 'Delete the API key. @@ -11545,7 +12420,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -11627,7 +12502,8 @@ entities: - type type: object - _key: '403' - description: Forbidden. + description: Forbidden. Only the owner of the API key or an administrator can + delete an API key. schema: properties: - _key: code @@ -11675,7 +12551,7 @@ entities: - type type: object - _key: '404' - description: The API key with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: properties: - _key: code @@ -11728,10 +12604,14 @@ entities: type: api_key return_type: api_key summary: Delete API key. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: list - description: 'Retrieve API keys in an array, optionally filtered by the owner. + description: 'Retrieve an array of API keys, optionally filtered by the owner. **Example:** @@ -11740,7 +12620,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -11757,7 +12637,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -11794,7 +12674,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -11832,7 +12712,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -12066,14 +12946,18 @@ entities: type: api_key return_type: paginated_response(api_key) summary: Get all API keys. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: key: - eq owner: - eq - _key: me - description: 'Retrieve API key details. + description: 'Retrieve details of current API key. **Example:** @@ -12082,7 +12966,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -12323,11 +13207,17 @@ entities: self: true type: api_key return_type: api_key - summary: Get API key details. - x_deprecation: null + summary: Get current API key. + x_deprecation: + comment: This endpoint is deprecated. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: policy_groups - description: 'Retrieve groups associated with the API key. + description: 'Retrieve an array of policy groups associated with an API key. + + Note: This endpoint is restricted to administrators. **Example:** @@ -12337,7 +13227,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -12352,7 +13242,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -12399,7 +13289,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -12435,7 +13325,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -12465,6 +13355,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -12538,8 +13438,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -12714,11 +13614,15 @@ entities: self: false type: policy_group return_type: paginated_response(policy_group) - summary: Get groups of the API key. - x_deprecation: null + summary: Get policy groups of an API key. + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: read - description: 'Retrieve API key details. + description: 'Retrieve details of an API key. **Example:** @@ -12727,7 +13631,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -12971,7 +13875,7 @@ entities: - type type: object - _key: '404' - description: API key with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: properties: - _key: code @@ -13023,8 +13927,12 @@ entities: self: true type: api_key return_type: api_key - summary: Get API key details. - x_deprecation: null + summary: Get API key. + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: update additional_operations: @@ -13038,7 +13946,7 @@ entities: `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -13086,7 +13994,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: owner api_fieldname: owner @@ -13102,7 +14010,7 @@ entities: api_fieldname: status description: The status of the API key. entity_fieldname: status - enum: *id002 + enum: *id001 enum_reference: api_key_status_enum example: ACTIVE in: body @@ -13227,7 +14135,7 @@ entities: - object type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data, for example, invalid API key name. schema: properties: - _key: code @@ -13323,7 +14231,8 @@ entities: - type type: object - _key: '403' - description: Forbidden. + description: Forbidden. Only the owner of the API key or an administrator can + update an API key. schema: properties: - _key: code @@ -13371,7 +14280,7 @@ entities: - type type: object - _key: '404' - description: The API key with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: properties: - _key: code @@ -13424,7 +14333,11 @@ entities: type: api_key return_type: api_key summary: Update API key details. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} primary_key_field: id swagger_models: @@ -13435,6 +14348,29 @@ entities: - GroupSummaryList tags: - Account - API keys +- _key: business_model_history + field_renames: [] + fields: + - $ref: '#/definitions/BusinessModel' + _key: business_model + api_fieldname: business_model + readOnly: true + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - BusinessModelHistory + tags: [] - _key: campaign_device_metadata field_renames: - _key: campaign_id @@ -13488,6 +14424,7 @@ entities: api_fieldname: id description: The metadata record ID. example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' readOnly: false required: true type: string @@ -13531,10 +14468,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -13572,6 +14509,7 @@ entities: example: 015c3029f6f7000000000001001000c3 in: path parameter_fieldname: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -13641,6 +14579,7 @@ entities: description: The metadata record ID. entity_fieldname: id example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string - _key: mechanism api_fieldname: mechanism @@ -13664,6 +14603,7 @@ entities: api_fieldname: object description: 'The entity name: always ''update-campaign-device-metadata''.' entity_fieldname: object + example: update-campaign-device-metadata type: string - _key: updated_at api_fieldname: updated_at @@ -13696,7 +14636,7 @@ entities: - _key: campaign_id api_fieldname: campaign_id description: ID of the associated campaign. - example: '00000000000000000000000000000000' + example: 016e652be6710000000000010010013d readOnly: false required: true type: string @@ -13750,10 +14690,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -13777,16 +14717,21 @@ entities: entity_fieldname: campaign_id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: id api_fieldname: summary_status_id description: The summary status. For example, fail. entity_fieldname: id + enum: + - fail + - success + - info + - skipped + enum_reference: campaign_statistics_id_enum external_param: false in: path name: summary_status_id @@ -13824,6 +14769,11 @@ entities: - _key: data api_fieldname: data entity_fieldname: data + enum: + - fail + - skipped + - info + - success items: foreign_key: entity: campaign_statistics_events @@ -13831,7 +14781,7 @@ entities: properties: - _key: campaign_id description: ID of the associated campaign. - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 type: string - _key: count example: 10 @@ -13851,6 +14801,7 @@ entities: type: string - _key: object description: 'Entity name: always ''event-type''.' + example: event-type type: string - _key: summary_status example: FAIL @@ -13995,15 +14946,269 @@ entities: type: object return_info: custom: false - self: false - type: campaign_statistics_events - return_type: paginated_response(campaign_statistics_events) - summary: Get a list of events grouped by summary + self: false + type: campaign_statistics_events + return_type: paginated_response(campaign_statistics_events) + summary: Get a list of events grouped by summary + x_deprecation: null + x_filter: {} + - _key: list + description: 'Get a list of statistics for a campaign, including the number of + devices reporting specific event codes. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + drop_fields: + - object + - etag + - type + - filter + - order + - limit + - after + - has_more + - total_count + - data + field_renames: [] + fields: + - _key: campaign_id + api_fieldname: campaign_id + description: The campaign ID. + entity_fieldname: campaign_id + external_param: false + in: path + name: campaign_id + parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + foreign_key: + entity: campaign_statistics + group: Device_Update + foreign_key_priority: self + group_id: Device_Update + method: get + mode: list + operation_id: Update_Campaign_statistics_list + pagination: true + parameter_map: + summary_status_id: id + path: /v3/update-campaigns/{campaign_id}/statistics + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: campaign_statistics + group: Device_Update + pagination: true + properties: + - _key: after + api_fieldname: after + description: The entity ID to fetch after the given one. + entity_fieldname: after + example: 'null' + type: string + - _key: data + api_fieldname: data + entity_fieldname: data + items: + foreign_key: + entity: campaign_statistics + group: Device_Update + properties: + - _key: campaign_id + description: ID of the associated campaign. + example: 016e652be6710000000000010010013d + type: string + - _key: count + example: 10 + type: integer + - _key: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: id + description: ID of the event type description. + enum: + - fail + - success + - info + - skipped + example: fail + type: string + - _key: object + description: 'Entity name: always ''summary_status''.' + example: summary_status + type: string + - _key: summary_status + description: The event type description. + enum: + - FAIL + - SUCCESS + - INFO + - SKIPPED + example: FAIL + type: string + type: object + type: array + - _key: has_more + api_fieldname: has_more + description: A flag indicating whether there are more results. + entity_fieldname: has_more + example: 'false' + type: boolean + - _key: limit + api_fieldname: limit + description: 'The number of results to return, (range: 2-1000), or equals + to total_count.' + entity_fieldname: limit + example: '50' + type: integer + - _key: object + api_fieldname: object + description: 'The entity name: always ''list''.' + entity_fieldname: object + example: list + type: string + - _key: order + api_fieldname: order + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + example: ASC + type: string + - _key: total_count + api_fieldname: total_count + description: The total number or records, if requested. It may be returned + also for small lists. + entity_fieldname: total_count + example: '1' + type: integer + type: object + - _key: '401' + description: Not Authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not Found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: campaign_statistics + return_type: paginated_response(campaign_statistics) + summary: Get statistics for a campaign x_deprecation: null x_filter: {} - - _key: list - description: 'Get a list of statistics for a campaign, including the number of - devices reporting specific event codes. + - _key: read + description: 'Get the count of successfully updated, skipped, and failed devices.
@@ -14011,10 +15216,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics + curl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -14024,246 +15229,6 @@ entities: - etag - type - filter - - order - - limit - - after - - has_more - - total_count - - data - field_renames: [] - fields: - - _key: campaign_id - api_fieldname: campaign_id - description: The campaign ID. - entity_fieldname: campaign_id - external_param: false - in: path - maxLength: 32 - minLength: 32 - name: campaign_id - parameter_fieldname: campaign_id - required: true - type: string - foreign_key: - entity: campaign_statistics - group: Device_Update - foreign_key_priority: self - group_id: Device_Update - method: get - mode: list - operation_id: Update_Campaign_statistics_list - pagination: true - parameter_map: - summary_status_id: id - path: /v3/update-campaigns/{campaign_id}/statistics - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: campaign_statistics - group: Device_Update - pagination: true - properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch after the given one. - entity_fieldname: after - example: 'null' - type: string - - _key: data - api_fieldname: data - entity_fieldname: data - items: - foreign_key: - entity: campaign_statistics - group: Device_Update - properties: - - _key: campaign_id - description: ID of the associated campaign. - example: '00000000000000000000000000000000' - type: string - - _key: count - example: 10 - type: integer - - _key: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: id - description: ID of the event type description. - enum: - - fail - - success - - info - - skipped - example: fail - type: string - - _key: object - description: 'Entity name: always ''summary_status''.' - type: string - - _key: summary_status - description: The event type description. - enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - example: FAIL - type: string - type: object - type: array - - _key: has_more - api_fieldname: has_more - description: A flag indicating whether there are more results. - entity_fieldname: has_more - example: 'false' - type: boolean - - _key: limit - api_fieldname: limit - description: 'The number of results to return, (range: 2-1000), or equals - to total_count.' - entity_fieldname: limit - example: '50' - type: integer - - _key: object - api_fieldname: object - description: 'The entity name: always ''list''.' - entity_fieldname: object - type: string - - _key: order - api_fieldname: order - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC.' - entity_fieldname: order - enum: - - ASC - - DESC - example: ASC - type: string - - _key: total_count - api_fieldname: total_count - description: The total number or records, if requested. It may be returned - also for small lists. - entity_fieldname: total_count - example: '1' - type: integer - type: object - - _key: '401' - description: Not Authenticated. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '404' - description: Not Found. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - return_info: - custom: false - self: true - type: campaign_statistics - return_type: paginated_response(campaign_statistics) - summary: Get statistics for a campaign - x_deprecation: null - x_filter: {} - - _key: read - description: "Get the count of successfully updated, skipped, and failed devices.\ - \ \n
\n**Usage example:**\n```\ncurl https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012\ - \ \\\n-H 'Authorization: '\n```\n" - drop_fields: - - object - - etag - - type - - filter - summary_status - count - created_at @@ -14273,7 +15238,7 @@ entities: api_fieldname: campaign_id description: ID of the associated campaign. entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + example: 016e652be6710000000000010010013d in: path parameter_fieldname: campaign_id required: true @@ -14315,7 +15280,7 @@ entities: api_fieldname: campaign_id description: ID of the associated campaign. entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + example: 016e652be6710000000000010010013d type: string - _key: count api_fieldname: count @@ -14343,6 +15308,7 @@ entities: api_fieldname: object description: 'Entity name: always ''summary_status''.' entity_fieldname: object + example: summary_status type: string - _key: summary_status api_fieldname: summary_status @@ -14473,7 +15439,7 @@ entities: - _key: campaign_id api_fieldname: campaign_id description: ID of the associated campaign. - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 readOnly: false required: true type: string @@ -14523,8 +15489,8 @@ entities: group_id: Device_Update methods: - _key: read - description: 'Get the count for a specific event type; for example, succeeded, - failed, or skipped. + description: 'Get the count for a specific event type, for example, succeeded, + failed or skipped.
@@ -14532,10 +15498,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -14556,7 +15522,7 @@ entities: api_fieldname: campaign_id description: ID of the associated campaign. entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 in: path parameter_fieldname: campaign_id required: true @@ -14599,7 +15565,7 @@ entities: api_fieldname: campaign_id description: ID of the associated campaign. entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 type: string - _key: count api_fieldname: count @@ -14631,6 +15597,7 @@ entities: api_fieldname: object description: 'Entity name: always ''event-type''.' entity_fieldname: object + example: event-type type: string - _key: summary_status api_fieldname: summary_status @@ -14841,7 +15808,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ``` @@ -14851,7 +15818,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -15237,7 +16204,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -15561,7 +16528,7 @@ entities: x-nullable: true - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. example: 01234567890ABCDEF01234567890ABCDEF readOnly: false required: true @@ -15572,21 +16539,19 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. + When the issuer_type is GLOBAL_SIGN, the value is empty. - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. - - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' example: [] readOnly: false required: false type: object - _key: issuer_type api_fieldname: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ - \ signing service.\n The users must provide their own CFSSL host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued\ + \ by GlobalSign service. You must provide your own GlobalSign account credentials.\n\ + - CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n\ + \ You must provide your own CFSSL host_url and credentials." enum: - GLOBAL_SIGN - CFSSL_AUTH @@ -15606,12 +16571,12 @@ entities: group_id: Security methods: - _key: create - description: "Create a certificate issuer.\nThe maximum number of issuers is limited\ - \ to 20 per account.\nMultiple certificate issuers of the same issuer type can\ - \ be created, provided they have a different name. This allows verification\ - \ of the certificate issuer configuration before activating it.\n
\n**Example\ - \ usage:**\n\n```\ncurl -X POST \\\n-H 'authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers\ + description: "Create a certificate issuer.\n
\nThe maximum number of issuers\ + \ is limited to 20 per account.\n
\nYou can create multiple certificate issuers\ + \ of the same type, provided they have different names. This allows verification\ + \ of the certificate issuer configuration before activation.\n
\n**Example:**\n\ + ```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"issuer_type\": \"GLOBAL_SIGN\",\n \"name\": \"GS Issuer\"\ ,\n \"description\": \"Sample GlobalSign certificate issuer\",\n \"issuer_attributes\"\ : null,\n \"issuer_credentials\": {\n \"api_key\": \"e510e289e6cd8947\"\ @@ -15632,7 +16597,7 @@ entities: nhEAyifKy1/tm3l91Rf/kGpHY7nIQKCXH49tmFwix8gke2nZJmRgX7/zAdMOAKeKH\\nAaIl4nQtv14EbaasMgnn9qgaDYnWzaReEob2QlQ/WYlTor61+KFpGtcf9jAkgudT\\\ n2op+4CF7wT2+aTXdtkVWfmv++iB8GnlqZdxLvyG1cTYjjYHVFbMSWQnxzQqiE2ms\\nQgp+byjWCumpsWTMdTO+d9NkDOo80vDpaRxEgebmhJ0MbX+eFjBgVg==\\\ n-----END RSA PRIVATE KEY-----\",\n \"passphrase\": \"helloworld\"\n }\n\ - }'\n```\n" + }'\n```" drop_fields: - object - etag @@ -15659,11 +16624,9 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' entity_fieldname: issuer_attributes example: [] in: body @@ -15674,13 +16637,11 @@ entities: additionalProperties: type: string api_fieldname: issuer_credentials - description: 'The credentials required for connecting to the certificate issuer. + description: 'The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. - When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. - - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.' entity_fieldname: issuer_credentials example: [] external_param: true @@ -15692,11 +16653,10 @@ entities: type: object - _key: issuer_type api_fieldname: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are issued\ + \ by GlobalSign service. You must provide your own GlobalSign account credentials.\n\ + - CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated signing service.\n\ + \ You must provide your own CFSSL host_url and credentials." entity_fieldname: issuer_type enum: - GLOBAL_SIGN @@ -15758,7 +16718,7 @@ entities: type: string - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. entity_fieldname: id example: 01234567890ABCDEF01234567890ABCDEF type: string @@ -15768,21 +16728,18 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' entity_fieldname: issuer_attributes example: [] type: object - _key: issuer_type api_fieldname: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are\ + \ issued by GlobalSign service. You must provide your own GlobalSign account\ + \ credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ + \ signing service.\n You must provide your own CFSSL host_url and credentials." entity_fieldname: issuer_type enum: - GLOBAL_SIGN @@ -15807,9 +16764,7 @@ entities: type: object - _key: '400' description: 'Validation error: The data used to create the certificate issuer - failed validation. - - ' + failed validation.' schema: properties: - _key: code @@ -15929,9 +16884,7 @@ entities: - type type: object - _key: '409' - description: 'Conflict. A certificate issuer with this name already exists. - - ' + description: Conflict. A certificate issuer with this name already exists. schema: properties: - _key: code @@ -15971,9 +16924,7 @@ entities: - type type: object - _key: '424' - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer configured external service. schema: properties: - _key: code @@ -16025,20 +16976,16 @@ entities:
- **Example usage:** - + **Example:** ``` - curl -X DELETE \ - - -H ''authorization: '' \ - - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + \ - ``` + -H ''Authorization: Bearer '' \ - ' + ```' drop_fields: - object - etag @@ -16048,11 +16995,9 @@ entities: fields: - _key: id api_fieldname: certificate-issuer-id - description: 'Certificate issuer ID.
The ID of the certificate issuer. + description: 'Certificate issuer ID. - An active certificate issuer may not be deleted. - - ' + An active certificate issuer cannot be deleted.' entity_fieldname: id external_param: false in: path @@ -16074,9 +17019,7 @@ entities: - _key: '204' description: Certificate issuer deleted. - _key: '400' - description: 'Validation error: An active certificate issuer cannot be deleted. - - ' + description: 'Validation error: An active certificate issuer cannot be deleted.' schema: properties: - _key: code @@ -16244,10 +17187,8 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Note: This endpoint does not implement pagination and therefore, - list control parameters such as `limit` or `after` will be ignored by the system. - - ' + description: '**Note:** This endpoint does not use pagination, and therefore ignores + list control parameters such as `limit` or `after`.' drop_fields: - object - etag @@ -16260,7 +17201,7 @@ entities: fields: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The ID of the item after which to retrieve the next page. entity_fieldname: after example: '01631667477600000000000100100374' external_param: true @@ -16272,7 +17213,7 @@ entities: - _key: include api_fieldname: include description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`' + `total_count`.' entity_fieldname: include external_param: true in: query @@ -16282,9 +17223,8 @@ entities: type: string - _key: limit api_fieldname: limit - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to the - closest limit. + description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. entity_fieldname: limit example: 50 external_param: true @@ -16297,8 +17237,7 @@ entities: type: integer - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order example: DESC external_param: true @@ -16332,7 +17271,7 @@ entities: properties: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The ID of the item after which to retrieve the next page. entity_fieldname: after example: '01631667477600000000000100100374' external_param: true @@ -16366,7 +17305,7 @@ entities: example: '1' type: string - _key: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. example: 01234567890ABCDEF01234567890ABCDEF type: string - _key: issuer_attributes @@ -16374,19 +17313,17 @@ entities: type: string description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' example: [] type: object - _key: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n\ - \ Certificates are issued by GlobalSign service. The users must provide\ - \ their own GlobalSign account credentials.\n- CFSSL_AUTH:\n Certificates\ - \ are issued by CFSSL authenticated signing service.\n The users\ - \ must provide their own CFSSL host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates\ + \ are issued by GlobalSign service. You must provide your own GlobalSign\ + \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by\ + \ CFSSL authenticated signing service.\n You must provide your own\ + \ CFSSL host_url and credentials." enum: - GLOBAL_SIGN - CFSSL_AUTH @@ -16407,15 +17344,14 @@ entities: type: array - _key: has_more api_fieldname: has_more - description: Are there more results available. + description: More results are available. entity_fieldname: has_more example: false type: boolean - _key: limit api_fieldname: limit - description: How many objects to retrieve in the page. The minimum limit - is 2 and the maximum is 1000. Limit values outside of this range are set - to the closest limit. + description: The number of results to return (2-1000). Values outside of + this range are set to the closest limit. entity_fieldname: limit example: 50 external_param: true @@ -16428,14 +17364,13 @@ entities: type: integer - _key: object api_fieldname: object - description: The type of this API object is a `list`. + description: The type of this API object is `list`. entity_fieldname: object example: list type: string - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order example: DESC external_param: true @@ -16555,7 +17490,7 @@ entities: fields: - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. entity_fieldname: id example: 01234567890ABCDEF01234567890ABCDEF in: path @@ -16603,7 +17538,7 @@ entities: type: string - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. entity_fieldname: id example: 01234567890ABCDEF01234567890ABCDEF type: string @@ -16613,21 +17548,18 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' entity_fieldname: issuer_attributes example: [] type: object - _key: issuer_type api_fieldname: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are\ + \ issued by GlobalSign service. You must provide your own GlobalSign account\ + \ credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ + \ signing service.\n You must provide your own CFSSL host_url and credentials." entity_fieldname: issuer_type enum: - GLOBAL_SIGN @@ -16652,9 +17584,7 @@ entities: type: object - _key: '400' description: 'Validation error: The data used to get the certificate issuer - failed validation. - - ' + failed validation.' schema: properties: - _key: code @@ -16822,11 +17752,11 @@ entities: x_deprecation: null x_filter: {} - _key: update - description: "Update a certificate issuer.\n
\n**Example usage:**\n\n```\n\ - curl -X PUT \\\n-H 'authorization: ' \\\n-H 'content-type:\ - \ application/json;charset=UTF-8' \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000\ + description: "Update a certificate issuer.\n
\n**Example:**\n\n```\ncurl -X\ + \ PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"description\": \"Sample GlobalSign certificate issuer - updated.\"\ - ,\n \"name\": \"GlobalSign Issuer\"\n}'\n```\n" + ,\n \"name\": \"GlobalSign Issuer\"\n}'\n```" drop_fields: - object - etag @@ -16849,7 +17779,7 @@ entities: x-nullable: true - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. entity_fieldname: id example: 01234567890ABCDEF01234567890ABCDEF in: path @@ -16862,11 +17792,9 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' entity_fieldname: issuer_attributes example: [] in: body @@ -16877,13 +17805,11 @@ entities: additionalProperties: type: string api_fieldname: issuer_credentials - description: 'The credentials required for connecting to the certificate issuer. + description: 'The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, see definition of GlobalSignCredentials. - When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials. - - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAuthCredentials.' entity_fieldname: issuer_credentials example: [] external_param: true @@ -16944,7 +17870,7 @@ entities: type: string - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Certificate issuer ID. entity_fieldname: id example: 01234567890ABCDEF01234567890ABCDEF type: string @@ -16954,21 +17880,18 @@ entities: api_fieldname: issuer_attributes description: 'General attributes for connecting the certificate issuer. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. - - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + When the issuer_type is GLOBAL_SIGN, the value is empty. - ' + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.' entity_fieldname: issuer_attributes example: [] type: object - _key: issuer_type api_fieldname: issuer_type - description: "The type of the certificate issuer.\n- GLOBAL_SIGN:\n Certificates\ - \ are issued by GlobalSign service. The users must provide their own GlobalSign\ - \ account credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL\ - \ authenticated signing service.\n The users must provide their own CFSSL\ - \ host_url and credentials.\n" + description: "Certificate issuer type.\n- GLOBAL_SIGN:\n Certificates are\ + \ issued by GlobalSign service. You must provide your own GlobalSign account\ + \ credentials.\n- CFSSL_AUTH:\n Certificates are issued by CFSSL authenticated\ + \ signing service.\n You must provide your own CFSSL host_url and credentials." entity_fieldname: issuer_type enum: - GLOBAL_SIGN @@ -16993,9 +17916,7 @@ entities: type: object - _key: '400' description: 'Validation error: The data used to update the certificate issuer - failed validation. - - ' + failed validation.' schema: properties: - _key: code @@ -17155,9 +18076,7 @@ entities: - type type: object - _key: '409' - description: 'Conflict. A certificate issuer with this name already exists. - - ' + description: Conflict. A certificate issuer with this name already exists. schema: properties: - _key: code @@ -17197,9 +18116,7 @@ entities: - type type: object - _key: '424' - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer-configured external service. schema: properties: - _key: code @@ -17247,11 +18164,8 @@ entities: x_deprecation: null x_filter: {} - _key: verify - description: 'A utility API that can be used to validate the user configuration - before activating a certificate issuer. - - Verifies that the certificate issuer is accessible and can be used to generate - certificates by Device Management. + description: 'Validates the certificate issuer by sending a signing request for + a test certificate. This should be done before the configuration is made active.
@@ -17259,26 +18173,22 @@ entities: The API requests the 3rd party CA to sign a test certificate. - For some 3rd party CAs, this operation may make use of the account quota. + For some 3rd party CAs, this operation may use the account quota.
- **Example usage:** - + **Example:** ``` - curl -X POST \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify - - ``` - - ' + ```' drop_fields: - object - etag @@ -17290,9 +18200,7 @@ entities: fields: - _key: id api_fieldname: certificate-issuer-id - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - ' + description: Certificate issuer ID. entity_fieldname: id external_param: false in: path @@ -17323,17 +18231,13 @@ entities: properties: - _key: message api_fieldname: message - description: 'Provides details in case of failure. - - ' + description: Provides details in case of failure. entity_fieldname: message - example: message describing the verification failure + example: Message describing the verification failure type: string - _key: successful api_fieldname: successful - description: 'Indicates whether the certificate issuer was verified successfully. - - ' + description: Indicates whether the certificate issuer was verified successfully. entity_fieldname: successful example: false type: boolean @@ -17499,9 +18403,7 @@ entities: - type type: object - _key: '424' - description: 'The request failed due to customer configured external service. - - ' + description: The request failed due to customer configured external service. schema: properties: - _key: code @@ -17557,17 +18459,15 @@ entities: - CertificateIssuerUpdateRequest - CertificateIssuerVerifyResponse tags: - - Certificate Issuers + - Security and identity - certificate issuers - _key: certificate_issuer_config field_renames: [] fields: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' example: 01648415a2a30242ac18000500000000 readOnly: false required: true @@ -17583,9 +18483,7 @@ entities: type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. example: 01648415a2a30242ac18000500000000 readOnly: false required: true @@ -17609,12 +18507,11 @@ entities: group_id: Security methods: - _key: create - description: "Configure the certificate issuer to be used when creating the device\ - \ custom certificates.\n
\n**Example usage:**\n\n```\ncurl -X POST \\\n-H\ - \ 'authorization: ' \\\n-H 'content-type: application/json;charset=UTF-8'\ - \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations\ + description: "Configure the certificate issuer to use when creating device custom\ + \ certificates.\n
\n**Example:**\n\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"reference\": \"customer.dlms\",\n \"certificate_issuer_id\"\ - : \"01621a36719d507b9d48a91b00000000\"\n}'\n```\n" + : \"01621a36719d507b9d48a91b00000000\"\n}'\n```" drop_fields: - object - etag @@ -17628,11 +18525,9 @@ entities: fields: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 in: body @@ -17670,11 +18565,9 @@ entities: properties: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 type: string @@ -17694,9 +18587,7 @@ entities: type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 type: string @@ -17847,10 +18738,8 @@ entities: - type type: object - _key: '409' - description: 'A certificate issuer configuration with this reference already + description: A certificate issuer configuration with this reference already exists. - - ' schema: properties: - _key: code @@ -17898,11 +18787,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: 'Delete the configured certificate issuer configuration. - - You can only delete the configurations of custom certificates. + description: 'Delete certificate issuer configuration. - ' + You can only delete custom certificate configurations.' drop_fields: - object - etag @@ -17913,9 +18800,7 @@ entities: fields: - _key: id api_fieldname: certificate-issuer-configuration-id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID configuration. entity_fieldname: id external_param: false in: path @@ -18105,12 +18990,9 @@ entities: x_deprecation: null x_filter: {} - _key: get_default - description: 'Provides the configured certificate issuer to be used when creating - device - - certificates for LwM2M communication.
+ description: 'Provides the configured certificate issuer used when creating device - ' + certificates for LwM2M.' drop_fields: - object - etag @@ -18144,11 +19026,9 @@ entities: properties: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 type: string @@ -18168,9 +19048,7 @@ entities: type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 type: string @@ -18333,38 +19211,34 @@ entities:
- **Example usage:** - + **Example:** ``` - curl \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ - ``` +
+ ``` - curl \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms + \ - -H ''authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json;charset=UTF-8'' \ - https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms - \ - ``` - Note: This endpoint does not implement pagination and therefore, list control - parameters such as `limit` or `after` will be ignored by the system. - - ' + **Note:** This endpoint does not implement pagination, and therefore ignores + list control parameters such as `limit` or `after`.' drop_fields: - object - etag @@ -18379,7 +19253,7 @@ entities: fields: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The ID of the item after which to retrieve the next page. entity_fieldname: after example: '01631667477600000000000100100374' external_param: true @@ -18391,7 +19265,7 @@ entities: - _key: include api_fieldname: include description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`' + `total_count`.' entity_fieldname: include external_param: true in: query @@ -18401,9 +19275,8 @@ entities: type: string - _key: limit api_fieldname: limit - description: How many objects to retrieve in the page. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to the - closest limit. + description: The number of results to return (2-1000). Values outside of this + range are set to the closest limit. entity_fieldname: limit example: 50 external_param: true @@ -18416,8 +19289,7 @@ entities: type: integer - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order example: DESC external_param: true @@ -18465,11 +19337,9 @@ entities: group: Security properties: - _key: certificate_issuer_id - description: 'The ID of the certificate issuer. + description: 'Certificate issuer ID. - Null if Device Management internal HSM is used. - - ' + Null if Device Management internal HSM is used.' example: 01648415a2a30242ac18000500000000 type: string x-nullable: true @@ -18483,9 +19353,7 @@ entities: example: '1' type: string - _key: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. example: 01648415a2a30242ac18000500000000 type: string - _key: is_custom @@ -18509,15 +19377,14 @@ entities: type: array - _key: has_more api_fieldname: has_more - description: Are there more results available. + description: More results are available. entity_fieldname: has_more example: false type: boolean - _key: limit api_fieldname: limit - description: How many objects to retrieve in the page. The minimum limit - is 2 and the maximum is 1000. Limit values outside of this range are set - to the closest limit. + description: The number of results to return (2-1000). Values outside of + this range are set to the closest limit. entity_fieldname: limit example: 50 maximum: 1000 @@ -18525,13 +19392,13 @@ entities: type: integer - _key: object api_fieldname: object - description: The type of this API object is a `list`. + description: The type of this API object is `list`. entity_fieldname: object example: list type: string - _key: order api_fieldname: order - description: The creation time based order of the entries. + description: Record order based on creation time. entity_fieldname: order example: DESC type: string @@ -18673,9 +19540,7 @@ entities: reference: - eq - _key: read - description: 'Provides the configured certificate issuer. - - ' + description: Provides the configured certificate issuer. drop_fields: - object - etag @@ -18690,9 +19555,7 @@ entities: fields: - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 in: path @@ -18719,11 +19582,9 @@ entities: properties: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 type: string @@ -18743,9 +19604,7 @@ entities: type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 type: string @@ -18948,9 +19807,7 @@ entities: - notes: After retrieving the resource using the `lwm2m` method, it can modified using using this SDK method. operation_id: updateCertificateIssuerConfig - description: 'Update the configured certificate issuer configuration. - - ' + description: Update certificate issuer configuration. drop_fields: - object - etag @@ -18964,11 +19821,9 @@ entities: fields: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 in: body @@ -18978,9 +19833,7 @@ entities: x-nullable: true - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 in: path @@ -19007,11 +19860,9 @@ entities: properties: - _key: certificate_issuer_id api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. + description: 'Certificate issuer ID. - ' + Null if Device Management internal HSM is used.' entity_fieldname: certificate_issuer_id example: 01648415a2a30242ac18000500000000 type: string @@ -19031,9 +19882,7 @@ entities: type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: Certificate issuer ID. configuration. entity_fieldname: id example: 01648415a2a30242ac18000500000000 type: string @@ -19238,7 +20087,7 @@ entities: - CertificateIssuerConfigResponse - CreateCertificateIssuerConfig tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations - _key: dark_theme_color field_renames: [] fields: @@ -19271,6 +20120,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: dark_theme_color_reference_enum is_primary_key: true readOnly: false @@ -19289,6 +20146,8 @@ entities: - _key: delete description: 'Resets the branding color to its dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -19297,7 +20156,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -19312,7 +20171,7 @@ entities: api_fieldname: reference description: The name of the branding color. entity_fieldname: reference - enum: &id003 + enum: &id002 - error_color - primary - secondary @@ -19329,6 +20188,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: dark_theme_color_reference_enum in: path is_primary_key: true @@ -19510,7 +20377,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -19555,7 +20422,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -19566,7 +20433,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_color + entity: subtenant_light_theme_color group: Branding properties: - _key: color @@ -19600,6 +20467,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color is_primary_key: true type: string - _key: updated_at @@ -19768,7 +20643,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -19785,7 +20660,7 @@ entities: api_fieldname: reference description: Color name. entity_fieldname: reference - enum: *id003 + enum: *id002 enum_reference: dark_theme_color_reference_enum in: path is_primary_key: true @@ -19845,6 +20720,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color is_primary_key: true type: string - _key: updated_at @@ -20015,6 +20898,8 @@ entities: operation_id: bulkSetDarkColors description: 'Update a dark theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -20023,7 +20908,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -20052,7 +20937,7 @@ entities: api_fieldname: reference description: Color name. entity_fieldname: reference - enum: *id003 + enum: *id002 enum_reference: dark_theme_color_reference_enum in: path is_primary_key: true @@ -20123,6 +21008,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color is_primary_key: true type: string - _key: updated_at @@ -20352,6 +21245,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -20411,6 +21307,8 @@ entities: - _key: delete description: 'Revert an account branding image to dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -20419,7 +21317,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -20434,11 +21332,14 @@ entities: api_fieldname: reference description: Name of the branding images (icon or picture). entity_fieldname: reference - enum: &id004 + enum: &id003 - brand_logo_portrait - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -20649,7 +21550,7 @@ entities: `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -20694,7 +21595,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -20705,7 +21606,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding properties: - _key: object @@ -20722,6 +21623,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -20929,7 +21833,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -20946,7 +21850,7 @@ entities: api_fieldname: reference description: Name of the image. entity_fieldname: reference - enum: *id004 + enum: *id003 enum_reference: dark_theme_image_reference_enum in: path is_primary_key: true @@ -20987,6 +21891,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -21196,8 +22103,10 @@ entities: - notes: The multipart endpoint is used by the SDKs as it offers the same functionality as the standard upload endpoint. operation_id: uploadDarkImage - description: Upload a new account branding image as form data in the dark theme + description: 'Upload a new account branding image as form data in the dark theme in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -21222,7 +22131,7 @@ entities: api_fieldname: reference description: Name of the image. entity_fieldname: reference - enum: *id004 + enum: *id003 enum_reference: dark_theme_image_reference_enum in: path is_primary_key: true @@ -21270,6 +22179,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -21594,7 +22506,7 @@ entities: **Note:** The number of developer certificates allowed per account is limited. - Please see [Using your own certificate authority](../provisioning-process/using-CA.html). + Please see [Setting up a Certificate Authority](https://developer.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). **Example:** @@ -21603,7 +22515,7 @@ entities: curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \ - -H "Authorization: Bearer " \ + -H "Authorization: Bearer " \ -H "content-type: application/json" \ @@ -22166,7 +23078,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -22299,7 +23211,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -22355,7 +23267,7 @@ entities: x_deprecation: null x_filter: {} - _key: get_trusted_certificate_info - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. **Example:** @@ -22365,7 +23277,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -22469,10 +23381,16 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -22669,7 +23587,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -22721,7 +23639,7 @@ entities: self: false type: trusted_certificate return_type: trusted_certificate - summary: Get trusted certificate by ID. + summary: Get a trusted certificate. unaggregated: true x_deprecation: null x_filter: {} @@ -22737,7 +23655,7 @@ entities: curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -23207,8 +24125,8 @@ entities: - DeveloperCertificateResponseData - TrustedCertificateResp tags: - - Device security - developer class certificates - - Device security - certificates + - Security and identity - developer class certificates + - Security and identity - certificates - _key: device field_renames: [] fields: @@ -23250,6 +24168,20 @@ entities: readOnly: false required: false type: string + - _key: component_attributes + additionalProperties: + maxLength: 128 + type: string + api_fieldname: component_attributes + description: Up to ten custom key-value attributes. Note that keys cannot begin + with a number. Both keys and values are limited to 128 characters. Updating + this field replaces existing contents. + example: + key: value + maxProperties: 10 + readOnly: true + required: false + type: object - _key: connector_expiration_date api_fieldname: connector_expiration_date description: The expiration date of the certificate used to connect to LwM2M server. @@ -23301,7 +24233,7 @@ entities: - _key: description api_fieldname: description description: The description of the device. - example: description + example: Temperature measuring device maxLength: 2000 readOnly: false required: false @@ -23342,7 +24274,8 @@ entities: type: string - _key: endpoint_name api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. example: 00000000-0000-0000-0000-000000000000 readOnly: true required: false @@ -23381,7 +24314,8 @@ entities: type: array - _key: host_gateway api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. example: '' readOnly: false required: false @@ -23457,7 +24391,12 @@ entities: type: string - _key: lifecycle_status api_fieldname: lifecycle_status - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' enum: - enabled - blocked @@ -23483,7 +24422,7 @@ entities: type: string - _key: mechanism api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with the device.' enum: - connector - direct @@ -23493,35 +24432,65 @@ entities: type: string - _key: mechanism_url api_fieldname: mechanism_url - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' example: '' readOnly: false required: false type: string - _key: name api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device itself + provides only the endpoint_name. example: 00000000-0000-0000-0000-000000000000 maxLength: 128 readOnly: false required: false type: string + - _key: net_id + api_fieldname: net_id + default: '' + description: Private network identifier. Used to group nodes connected to a specific + border router. + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + readOnly: true + required: false + type: string - _key: operator_suspended api_fieldname: operator_suspended - description: Is the device suspended by the operator? + description: Device has been suspended by operator. readOnly: true required: false type: boolean - _key: serial_number api_fieldname: serial_number - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during manufacturing. example: 00000000-0000-0000-0000-000000000000 readOnly: false required: false type: string - _key: state api_fieldname: state - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped or connected + to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This state + is set only while bootstrapping is in progress. For example, an external CA + gives an error, and the device tries to bootstrap again after few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. [Device + commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' enum: - unenrolled - cloud_enrolling @@ -23540,7 +24509,7 @@ entities: type: boolean - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: The time this data object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -23556,7 +24525,7 @@ entities: group_id: Devices methods: - _key: add_to_group - description: Add one device to a group. + description: Add one device to a group. A device can be in multiple groups. drop_fields: - object - etag @@ -23753,7 +24722,9 @@ entities: x_deprecation: null x_filter: {} - _key: create - description: Create a new device. + description: Create a new device in Device Management. Usually you do not need + to create a device this way, as it is automatically created when it bootstraps + or connects to Device Management. drop_fields: - object - etag @@ -23771,11 +24742,13 @@ entities: - lifecycle_status - account_id - bootstrapped_timestamp + - component_attributes - created_at - deployed_state - id - firmware_checksum - manifest_timestamp + - net_id - updated_at - enrolment_list_timestamp field_renames: [] @@ -23850,7 +24823,7 @@ entities: api_fieldname: description description: The description of the device. entity_fieldname: description - example: description + example: Temperature measuring device in: body maxLength: 2000 parameter_fieldname: description @@ -23899,7 +24872,8 @@ entities: type: string - _key: endpoint_name api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. entity_fieldname: endpoint_name example: 00000000-0000-0000-0000-000000000000 in: body @@ -23919,7 +24893,8 @@ entities: type: string - _key: host_gateway api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. entity_fieldname: host_gateway example: '' in: body @@ -23949,7 +24924,7 @@ entities: type: string - _key: mechanism api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with the device.' entity_fieldname: mechanism enum: - connector @@ -23961,7 +24936,7 @@ entities: type: string - _key: mechanism_url api_fieldname: mechanism_url - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' entity_fieldname: mechanism_url example: '' in: body @@ -23970,7 +24945,8 @@ entities: type: string - _key: name api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device itself + provides only the endpoint_name. entity_fieldname: name example: 00000000-0000-0000-0000-000000000000 in: body @@ -23980,7 +24956,8 @@ entities: type: string - _key: serial_number api_fieldname: serial_number - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during manufacturing. entity_fieldname: serial_number example: 00000000-0000-0000-0000-000000000000 in: body @@ -23989,7 +24966,25 @@ entities: type: string - _key: state api_fieldname: state - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped or + connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This state + is set only while bootstrapping is in progress. For example, an external CA + gives an error, and the device tries to bootstrap again after few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. [Device + commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' entity_fieldname: state enum: - unenrolled @@ -24060,6 +25055,19 @@ entities: example: '00000000000000000000000000000000' maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + api_fieldname: component_attributes + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + entity_fieldname: component_attributes + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: api_fieldname: connector_expiration_date description: The expiration date of the certificate used to connect to LwM2M @@ -24108,7 +25116,7 @@ entities: api_fieldname: description description: The description of the device. entity_fieldname: description - example: description + example: Temperature measuring device maxLength: 2000 type: string device_class: @@ -24145,7 +25153,8 @@ entities: type: string endpoint_name: api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is + from the device certificate and is set by factory tool. entity_fieldname: endpoint_name example: 00000000-0000-0000-0000-000000000000 readOnly: true @@ -24189,7 +25198,8 @@ entities: type: array host_gateway: api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind + Edge has this host_gateway set. entity_fieldname: host_gateway example: '' type: string @@ -24256,7 +25266,12 @@ entities: type: string lifecycle_status: api_fieldname: lifecycle_status - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' entity_fieldname: lifecycle_status enum: - enabled @@ -24278,7 +25293,8 @@ entities: type: string mechanism: api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with the + device.' entity_fieldname: mechanism enum: - connector @@ -24286,17 +25302,27 @@ entities: type: string mechanism_url: api_fieldname: mechanism_url - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' entity_fieldname: mechanism_url example: '' type: string name: api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. entity_fieldname: name example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string + net_id: + api_fieldname: net_id + default: '' + description: Private network identifier. Used to group nodes connected to + a specific border router. + entity_fieldname: net_id + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + type: string object: api_fieldname: object description: The API resource entity. @@ -24305,18 +25331,39 @@ entities: type: string operator_suspended: api_fieldname: operator_suspended - description: Is the device suspended by the operator? + description: Device has been suspended by operator. entity_fieldname: operator_suspended type: boolean serial_number: api_fieldname: serial_number - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. entity_fieldname: serial_number example: 00000000-0000-0000-0000-000000000000 type: string state: api_fieldname: state - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This + state is set only while bootstrapping is in progress. For example, an + external CA gives an error, and the device tries to bootstrap again after + few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' entity_fieldname: state enum: - unenrolled @@ -24332,7 +25379,7 @@ entities: type: boolean updated_at: api_fieldname: updated_at - description: The time the object was updated. + description: The time this data object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -24361,7 +25408,7 @@ entities: x_filter: {} - _key: delete description: Delete device. Only available for devices with a developer certificate. - Attempting to delete a device with a production certicate returns a 400 response. + Attempting to delete a device with a production certificate returns a 400 response. drop_fields: - object - etag @@ -24371,7 +25418,8 @@ entities: fields: - _key: id api_fieldname: id - description: The ID of the device. + description: The [Device ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. entity_fieldname: id external_param: false in: path @@ -24405,7 +25453,14 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'List all devices. + description: 'List all devices enrolled to Device Management for the account. + + The URL length must be fewer than 4096 characters. Requests that exceed this + limit, such as those including too many query parameters in a filter, fail with + a bad request response. + + devices with too long list of query parameters, the request is deemed as bad + request. **Example:** @@ -24547,6 +25602,10 @@ entities: - name__neq - name__in - name__nin + - net_id__eq + - net_id__neq + - net_id__in + - net_id__nin - serial_number__eq - serial_number__neq - serial_number__in @@ -24670,6 +25729,17 @@ entities: example: '00000000000000000000000000000000' maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: description: The expiration date of the certificate used to connect to LwM2M server. @@ -24706,7 +25776,7 @@ entities: type: string description: description: The description of the device. - example: description + example: Temperature measuring device maxLength: 2000 type: string device_class: @@ -24738,7 +25808,8 @@ entities: maxLength: 512 type: string endpoint_name: - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name + is from the device certificate and is set by factory tool. example: 00000000-0000-0000-0000-000000000000 readOnly: true type: string @@ -24770,7 +25841,8 @@ entities: type: string type: array host_gateway: - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind + Edge has this host_gateway set. example: '' type: string id: @@ -24819,7 +25891,12 @@ entities: format: date-time type: string lifecycle_status: - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device + Management. Device can be, for example, ''suspended''.' enum: - enabled - blocked @@ -24835,33 +25912,63 @@ entities: format: date-time type: string mechanism: - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with + the device.' enum: - connector - direct type: string mechanism_url: - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' example: '' type: string name: - description: The name of the device. + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string + net_id: + default: '' + description: Private network identifier. Used to group nodes connected + to a specific border router. + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + type: string object: description: The API resource entity. example: device type: string operator_suspended: - description: Is the device suspended by the operator? + description: Device has been suspended by operator. type: boolean serial_number: - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. example: 00000000-0000-0000-0000-000000000000 type: string state: - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. + This state is set only while bootstrapping is in progress. For example, + an external CA gives an error, and the device tries to bootstrap again + after few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to + connect to Device Management. + + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' enum: - unenrolled - cloud_enrolling @@ -24873,7 +25980,7 @@ entities: description: Is the device suspended by the system? type: boolean updated_at: - description: The time the object was updated. + description: The time this data object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -25074,6 +26181,11 @@ entities: - neq - in - nin + net_id: + - eq + - neq + - in + - nin operator_suspended: - eq - neq @@ -25101,7 +26213,9 @@ entities: - in - nin - _key: read - description: 'Retrieve information about a specific device. + description: 'Retrieve information about a specific device. This API returns [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). + If you want to see the structure of resources in the device or the actual resource + values, use the [Connect API](https://developer.pelion.com/docs/device-management-api/connect/). **Example:** @@ -25138,6 +26252,7 @@ entities: - bootstrap_expiration_date - bootstrapped_timestamp - ca_id + - component_attributes - connector_expiration_date - created_at - custom_attributes @@ -25155,6 +26270,7 @@ entities: - mechanism - mechanism_url - name + - net_id - serial_number - state - updated_at @@ -25221,6 +26337,19 @@ entities: example: '00000000000000000000000000000000' maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + api_fieldname: component_attributes + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + entity_fieldname: component_attributes + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: api_fieldname: connector_expiration_date description: The expiration date of the certificate used to connect to LwM2M @@ -25269,7 +26398,7 @@ entities: api_fieldname: description description: The description of the device. entity_fieldname: description - example: description + example: Temperature measuring device maxLength: 2000 type: string device_class: @@ -25306,7 +26435,8 @@ entities: type: string endpoint_name: api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is + from the device certificate and is set by factory tool. entity_fieldname: endpoint_name example: 00000000-0000-0000-0000-000000000000 readOnly: true @@ -25350,7 +26480,8 @@ entities: type: array host_gateway: api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind + Edge has this host_gateway set. entity_fieldname: host_gateway example: '' type: string @@ -25417,7 +26548,12 @@ entities: type: string lifecycle_status: api_fieldname: lifecycle_status - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' entity_fieldname: lifecycle_status enum: - enabled @@ -25439,7 +26575,8 @@ entities: type: string mechanism: api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with the + device.' entity_fieldname: mechanism enum: - connector @@ -25447,17 +26584,27 @@ entities: type: string mechanism_url: api_fieldname: mechanism_url - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' entity_fieldname: mechanism_url example: '' type: string name: api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. entity_fieldname: name example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string + net_id: + api_fieldname: net_id + default: '' + description: Private network identifier. Used to group nodes connected to + a specific border router. + entity_fieldname: net_id + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + type: string object: api_fieldname: object description: The API resource entity. @@ -25466,18 +26613,39 @@ entities: type: string operator_suspended: api_fieldname: operator_suspended - description: Is the device suspended by the operator? + description: Device has been suspended by operator. entity_fieldname: operator_suspended type: boolean serial_number: api_fieldname: serial_number - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. entity_fieldname: serial_number example: 00000000-0000-0000-0000-000000000000 type: string state: api_fieldname: state - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This + state is set only while bootstrapping is in progress. For example, an + external CA gives an error, and the device tries to bootstrap again after + few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' entity_fieldname: state enum: - unenrolled @@ -25493,7 +26661,7 @@ entities: type: boolean updated_at: api_fieldname: updated_at - description: The time the object was updated. + description: The time this data object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -25727,7 +26895,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-length: 0'' @@ -26158,6 +27326,7 @@ entities: - account_id - bootstrap_expiration_date - bootstrapped_timestamp + - component_attributes - connector_expiration_date - created_at - deployed_state @@ -26168,6 +27337,7 @@ entities: - manifest_timestamp - mechanism - mechanism_url + - net_id - serial_number - state - updated_at @@ -26214,7 +27384,7 @@ entities: api_fieldname: description description: The description of the device. entity_fieldname: description - example: description + example: Temperature measuring device in: body maxLength: 2000 parameter_fieldname: description @@ -26232,7 +27402,8 @@ entities: type: string - _key: endpoint_name api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. entity_fieldname: endpoint_name example: 00000000-0000-0000-0000-000000000000 in: body @@ -26252,7 +27423,8 @@ entities: type: string - _key: host_gateway api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. entity_fieldname: host_gateway example: '' in: body @@ -26271,7 +27443,8 @@ entities: type: string - _key: name api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device itself + provides only the endpoint_name. entity_fieldname: name example: 00000000-0000-0000-0000-000000000000 in: body @@ -26328,6 +27501,19 @@ entities: example: '00000000000000000000000000000000' maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + api_fieldname: component_attributes + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + entity_fieldname: component_attributes + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: api_fieldname: connector_expiration_date description: The expiration date of the certificate used to connect to LwM2M @@ -26376,7 +27562,7 @@ entities: api_fieldname: description description: The description of the device. entity_fieldname: description - example: description + example: Temperature measuring device maxLength: 2000 type: string device_class: @@ -26413,7 +27599,8 @@ entities: type: string endpoint_name: api_fieldname: endpoint_name - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name is + from the device certificate and is set by factory tool. entity_fieldname: endpoint_name example: 00000000-0000-0000-0000-000000000000 readOnly: true @@ -26457,7 +27644,8 @@ entities: type: array host_gateway: api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind + Edge has this host_gateway set. entity_fieldname: host_gateway example: '' type: string @@ -26524,7 +27712,12 @@ entities: type: string lifecycle_status: api_fieldname: lifecycle_status - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' entity_fieldname: lifecycle_status enum: - enabled @@ -26546,7 +27739,8 @@ entities: type: string mechanism: api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with the + device.' entity_fieldname: mechanism enum: - connector @@ -26554,17 +27748,27 @@ entities: type: string mechanism_url: api_fieldname: mechanism_url - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' entity_fieldname: mechanism_url example: '' type: string name: api_fieldname: name - description: The name of the device. + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. entity_fieldname: name example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string + net_id: + api_fieldname: net_id + default: '' + description: Private network identifier. Used to group nodes connected to + a specific border router. + entity_fieldname: net_id + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + type: string object: api_fieldname: object description: The API resource entity. @@ -26573,18 +27777,39 @@ entities: type: string operator_suspended: api_fieldname: operator_suspended - description: Is the device suspended by the operator? + description: Device has been suspended by operator. entity_fieldname: operator_suspended type: boolean serial_number: api_fieldname: serial_number - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. entity_fieldname: serial_number example: 00000000-0000-0000-0000-000000000000 type: string state: api_fieldname: state - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. This + state is set only while bootstrapping is in progress. For example, an + external CA gives an error, and the device tries to bootstrap again after + few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to connect + to Device Management. + + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' entity_fieldname: state enum: - unenrolled @@ -26600,7 +27825,7 @@ entities: type: boolean updated_at: api_fieldname: updated_at - description: The time the object was updated. + description: The time this data object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -26708,7 +27933,7 @@ entities: curl -X POST \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -26807,557 +28032,77 @@ entities: api_fieldname: id description: Enrollment identity. entity_fieldname: id - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - - _key: object - api_fieldname: object - entity_fieldname: object - enum: - - enrollment - example: enrollment - type: string - required: - - object - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id - type: object - - _key: '400' - description: Bad request. The enrollment identity is not valid. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '401' - description: The provided access token is not valid. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '409' - description: Conflict. The requested identity to add already exists on this - or another account. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - return_info: - custom: false - self: true - type: device_enrollment - return_type: device_enrollment - summary: Create a single enrollment. - x_deprecation: null - x_filter: {} - - _key: delete - description: 'To free a device from your account, delete the enrollment claim. - To bypass the device ownership, you need to delete the enrollment and factory - reset the device. For more information, see [Transferring ownership using First-to-Claim](../connecting/device-ownership-first-to-claim-by-enrollment-list.html). - -
- - **Example:** - - ``` - - curl -X DELETE \ - - -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} - - ```' - drop_fields: - - object - - etag - - type - - filter - field_renames: [] - fields: - - _key: id - api_fieldname: id - description: Enrollment identity. - entity_fieldname: id - external_param: false - in: path - name: id - parameter_fieldname: id - required: true - type: string - group_id: Devices - method: delete - mode: delete - operation_id: deleteDeviceEnrollment - pagination: false - path: /v3/device-enrollments/{id} - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: No content. The enrollment claim has been deleted. - - _key: '400' - description: Bad request. Invalid enrollment identity. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '404' - description: Not found. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - return_info: - custom: false - self: true - type: device_enrollment - return_type: device_enrollment - summary: Delete an enrollment by ID. - x_deprecation: null - x_filter: {} - - _key: list - description: 'Provides a list of pending and claimed enrollments. - - - **Example:** - - ``` - - curl -X GET \ - - -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollments - - ``` - - With query parameters: - - ``` - - curl -X GET \ - - -H ''Authorization: Bearer '' \ - - ''https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'' - - ```' - drop_fields: - - object - - etag - - type - - filter - - has_more - - total_count - - data - field_renames: [] - fields: - - _key: after - api_fieldname: after - description: Entity ID to fetch after. - entity_fieldname: after - example: 00005a4e027f0a580a01081c00000000 - external_param: true - in: query - name: after - parameter_fieldname: after - pattern: ^[A-Za-z0-9]{32} - required: false - type: string - - _key: include - api_fieldname: include - description: 'Comma-separated additional data to return. Currently supported: - total_count.' - entity_fieldname: include - external_param: true - in: query - name: include - parameter_fieldname: include - required: false - type: string - - _key: limit - api_fieldname: limit - description: Number of results to return (2-1000). - entity_fieldname: limit - example: 50 - external_param: true - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - default: ASC - description: ASC or DESC - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: device_enrollment_order_enum - example: ASC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string - foreign_key: - entity: device_enrollment - group: Devices - foreign_key_priority: self - group_id: Devices - method: get - mode: list - operation_id: getDeviceEnrollments - pagination: true - path: /v3/device-enrollments - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: device_enrollment - group: Devices - pagination: true - properties: - - _key: after - api_fieldname: after - description: ID - entity_fieldname: after - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - - _key: data - api_fieldname: data - entity_fieldname: data - items: - foreign_key: - entity: device_enrollment - group: Devices - properties: - - _key: account_id - description: ID - example: 00005a4e027f0a580a01081c00000000 - type: string - - _key: claimed_at - description: The time the device was claimed. - format: date-time - type: string - - _key: created_at - description: The time of the enrollment identity creation. - format: date-time - type: string - - _key: enrolled_device_id - description: The ID of the device in the Device Directory once it is - registered. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - - _key: enrollment_identity - description: Enrollment identity. - example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 - pattern: ^A-[A-Za-z0-9:]{95}$ - type: string - - _key: etag - example: 7642xfaxz - pattern: '[A-Za-z0-9]{1,256}' - type: string - - _key: expires_at - description: The enrollment claim expiration time. If the device does - not connect to Device Management before expiration, the claim is removed - without separate notice. - format: date-time - type: string - - _key: id - description: Enrollment identity. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - enrollment + example: enrollment + type: string + required: + - object + - id + - etag + - account_id + - created_at + - expires_at + - claimed_at + - enrollment_identity + - enrolled_device_id + type: object + - _key: '400' + description: Bad request. The enrollment identity is not valid. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. type: string - - _key: object - enum: - - enrollment - example: enrollment + - _key: name + description: Name of the field which caused the error. type: string required: - - object - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id + - name + - message type: object type: array - - _key: has_more - api_fieldname: has_more - entity_fieldname: has_more - example: true - type: boolean - - _key: limit - api_fieldname: limit - description: Range 2-1000, or default. - entity_fieldname: limit - example: 50 - maximum: 1000 - minimum: 2 - type: integer + - _key: message + description: A human readable informative explanation + example: Validation error + type: string - _key: object - api_fieldname: object - entity_fieldname: object + description: Entity name, always `error`. enum: - - list - example: list + - error type: string - - _key: order - api_fieldname: order - default: ASC - entity_fieldname: order - enum: - - ASC - - DESC - example: ASC + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - example: 100 - format: int32 - minimum: 1 - type: integer required: + - code + - message - object - - limit - - after - - order - - has_more - - total_count - - data + - request_id + - type type: object - - _key: '400' - description: Bad request. The access token could not be read. + - _key: '401' + description: The provided access token is not valid. schema: properties: - _key: code @@ -27404,8 +28149,9 @@ entities: - request_id - type type: object - - _key: '401' - description: The provided access token is not valid. + - _key: '409' + description: Conflict. The requested identity to add already exists on this + or another account. schema: properties: - _key: code @@ -27456,22 +28202,24 @@ entities: custom: false self: true type: device_enrollment - return_type: paginated_response(device_enrollment) - summary: Get a list of enrollments per account. + return_type: device_enrollment + summary: Create a single enrollment. x_deprecation: null x_filter: {} - - _key: read - description: 'Check detailed enrollment info, for example, date of claim or expiration - date. + - _key: delete + description: 'To free a device from your account, delete the enrollment claim. + To bypass the device ownership, you need to delete the enrollment and factory + reset the device. For more information, see [Transferring ownership using First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). +
**Example:** ``` - curl -X GET \ + curl -X DELETE \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} @@ -27481,111 +28229,29 @@ entities: - etag - type - filter - - created_at - - claimed_at - - enrollment_identity - - account_id - - expires_at - - enrolled_device_id field_renames: [] fields: - _key: id api_fieldname: id description: Enrollment identity. entity_fieldname: id - example: 00005a4e027f0a580a01081c00000000 + external_param: false in: path + name: id parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} required: true type: string group_id: Devices - method: get - mode: read - operation_id: getDeviceEnrollment + method: delete + mode: delete + operation_id: deleteDeviceEnrollment pagination: false path: /v3/device-enrollments/{id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. Pending enrollment data. - schema: - foreign_key: - entity: device_enrollment - group: Devices - properties: - - _key: account_id - api_fieldname: account_id - description: ID - entity_fieldname: account_id - example: 00005a4e027f0a580a01081c00000000 - type: string - - _key: claimed_at - api_fieldname: claimed_at - description: The time the device was claimed. - entity_fieldname: claimed_at - format: date-time - type: string - - _key: created_at - api_fieldname: created_at - description: The time of the enrollment identity creation. - entity_fieldname: created_at - format: date-time - type: string - - _key: enrolled_device_id - api_fieldname: enrolled_device_id - description: The ID of the device in the Device Directory once it is registered. - entity_fieldname: enrolled_device_id - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - - _key: enrollment_identity - api_fieldname: enrollment_identity - description: Enrollment identity. - entity_fieldname: enrollment_identity - example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 - pattern: ^A-[A-Za-z0-9:]{95}$ - type: string - - _key: etag - api_fieldname: etag - entity_fieldname: etag - example: 7642xfaxz - pattern: '[A-Za-z0-9]{1,256}' - type: string - - _key: expires_at - api_fieldname: expires_at - description: The enrollment claim expiration time. If the device does not - connect to Device Management before expiration, the claim is removed without - separate notice. - entity_fieldname: expires_at - format: date-time - type: string - - _key: id - api_fieldname: id - description: Enrollment identity. - entity_fieldname: id - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - - _key: object - api_fieldname: object - entity_fieldname: object - enum: - - enrollment - example: enrollment - type: string - required: - - object - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id - type: object + - _key: '204' + description: No content. The enrollment claim has been deleted. - _key: '400' description: Bad request. Invalid enrollment identity. schema: @@ -27687,284 +28353,236 @@ entities: self: true type: device_enrollment return_type: device_enrollment - summary: Get details of an single enrollment by ID. + summary: Delete an enrollment by ID. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - EnrollmentId - - EnrollmentIdentities - - EnrollmentIdentity - tags: - - Public API -- _key: device_enrollment_bulk_create - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: ID - example: 00005a4e027f0a580a01081c00000000 - readOnly: true - required: false - type: string - - _key: completed_at - api_fieldname: completed_at - description: 'The time the bulk creation task was completed. + - _key: list + description: 'Provides a list of pending and claimed enrollments. - Null when creating bulk upload or delete.' - format: date-time - readOnly: true - required: false - type: string - - _key: created_at - api_fieldname: created_at - description: The time of receiving the bulk creation task. - format: date-time - readOnly: true - required: false - type: string - - _key: errors_count - api_fieldname: errors_count - description: The number of enrollment identities with failed processing. - example: 0 - readOnly: true - required: false - type: integer - - _key: errors_report_file - api_fieldname: errors_report_file - description: 'Link to error report file. - Null when creating bulk upload or delete.' - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv - readOnly: true - required: false - type: string - - _key: full_report_file - api_fieldname: full_report_file - description: 'Link to full report file. + **Example:** - Null when creating bulk upload or delete.' - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: Bulk ID - pattern: ^[A-Za-z0-9]{32} - readOnly: false - required: true - type: string - - _key: processed_count - api_fieldname: processed_count - description: The number of enrollment identities processed until now. - example: 0 - readOnly: true - required: false - type: integer - - _key: status - api_fieldname: status - default: new - description: The state of the process is 'new' at the time of creation. If creation - is still in progress, the state shows as 'processing'. When the request is fully - processed, the state changes to 'completed'. - enum: - - new - - processing - - completed - enum_reference: device_enrollment_bulk_create_status_enum - example: new - readOnly: true - required: false - type: string - - _key: total_count - api_fieldname: total_count - description: Total number of enrollment identities found in the input CSV. - example: 10 - readOnly: true - required: false - type: integer - group_id: Devices - methods: - - _key: create - description: "With bulk upload, you can upload a `CSV` file containing a number\ - \ of enrollment IDs.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ - \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ - \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads\n\ - \n```\n **To ensure your CSV file is valid:**\n 1. The first line of the file\ - \ (header) is ignored.\n 1. Each line can contain comma-separated values, where\ - \ the first value is the Enrollment ID. Everything after the first comma is\ - \ ignored.\n 1. Valid enrollments begin with A followed by a - and 95 characters\ - \ (examples below).\n 1. One enrollment ID per line. Empty lines are ignored.\n\ - \ 1. Trailing comma at the end of the line is optional.\n 1. Lines are terminated\ - \ with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n 1.\ - \ Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed\ - \ from the identity before validation.\n 1. Empty identities are ignored.\n\ - \ 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace\ - \ inside quotation marks is not trimmed and will cause validation to fail. Empty\ - \ quotation marks are also invalid.\n 1. Use UTF-8 encoding.\n\n\n**A valid\ - \ enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ - ,\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\ - \nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\n\ - A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12,\ - \ This text is ignored.\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\ - \ , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\"\ - \ , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file\ - \ containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ - , First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ - \ Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ - \ Too-short identity.\n\"\", Empty quotation marks are an invalid identity\n\ - \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\ - \ \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n\ - ```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored\"\ - \n\n,,\n, This is also considered a blank line.\n```" + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments + + ``` + + With query parameters: + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + ''https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'' + + ```' drop_fields: - object - etag - type - filter - - id - - account_id - - created_at - - status + - has_more - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file + - data field_renames: [] fields: - - _key: enrollment_identities - api_fieldname: enrollment_identities - description: The `CSV` file containing the enrollment IDs. The maximum file - size is 10 MB. - entity_fieldname: enrollment_identities + - _key: after + api_fieldname: after + description: Entity ID to fetch after. + entity_fieldname: after + example: 00005a4e027f0a580a01081c00000000 external_param: true - in: stream - name: enrollment_identities - parameter_fieldname: enrollment_identities - required: true - type: file - group_id: Devices - method: post - mode: create - operation_id: createBulkDeviceEnrollment - pagination: false - path: /v3/device-enrollments-bulk-uploads - request_body: file - request_content_type: multipart/form-data - responses: - - _key: '201' - description: Bulk upload data received and asynchronous processing started. - schema: - foreign_key: - entity: device_enrollment_bulk_delete - group: Devices - properties: - - _key: account_id - api_fieldname: account_id - description: ID - entity_fieldname: account_id - example: 00005a4e027f0a580a01081c00000000 - type: string - - _key: completed_at - api_fieldname: completed_at - description: 'The time the bulk creation task was completed. - - Null when creating bulk upload or delete.' - entity_fieldname: completed_at - format: date-time - type: string - - _key: created_at - api_fieldname: created_at - description: The time of receiving the bulk creation task. - entity_fieldname: created_at - format: date-time - type: string - - _key: errors_count - api_fieldname: errors_count - description: The number of enrollment identities with failed processing. - entity_fieldname: errors_count - example: 0 - type: integer - - _key: errors_report_file - api_fieldname: errors_report_file - description: 'Link to error report file. - - Null when creating bulk upload or delete.' - entity_fieldname: errors_report_file - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv - type: string - - _key: etag - api_fieldname: etag - description: etag - entity_fieldname: etag - example: '1' - pattern: '[A-Za-z0-9]{0,256}' - type: string - - _key: full_report_file - api_fieldname: full_report_file - description: 'Link to full report file. - - Null when creating bulk upload or delete.' - entity_fieldname: full_report_file - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv - type: string - - _key: id - api_fieldname: id - description: Bulk ID - entity_fieldname: id + in: query + name: after + parameter_fieldname: after + pattern: ^[A-Za-z0-9]{32} + required: false + type: string + - _key: include + api_fieldname: include + description: 'Comma-separated additional data to return. Currently supported: + total_count.' + entity_fieldname: include + external_param: true + in: query + name: include + parameter_fieldname: include + required: false + type: string + - _key: limit + api_fieldname: limit + description: Number of results to return (2-1000). + entity_fieldname: limit + example: 50 + external_param: true + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + default: ASC + description: ASC or DESC + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: device_enrollment_order_enum + example: ASC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: device_enrollment + group: Devices + foreign_key_priority: self + group_id: Devices + method: get + mode: list + operation_id: getDeviceEnrollments + pagination: true + path: /v3/device-enrollments + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: device_enrollment + group: Devices + pagination: true + properties: + - _key: after + api_fieldname: after + description: ID + entity_fieldname: after + example: 00005a4e027f0a580a01081c00000000 pattern: ^[A-Za-z0-9]{32} type: string + - _key: data + api_fieldname: data + entity_fieldname: data + items: + foreign_key: + entity: device_enrollment + group: Devices + properties: + - _key: account_id + description: ID + example: 00005a4e027f0a580a01081c00000000 + type: string + - _key: claimed_at + description: The time the device was claimed. + format: date-time + type: string + - _key: created_at + description: The time of the enrollment identity creation. + format: date-time + type: string + - _key: enrolled_device_id + description: The ID of the device in the Device Directory once it is + registered. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + - _key: enrollment_identity + description: Enrollment identity. + example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 + pattern: ^A-[A-Za-z0-9:]{95}$ + type: string + - _key: etag + example: 7642xfaxz + pattern: '[A-Za-z0-9]{1,256}' + type: string + - _key: expires_at + description: The enrollment claim expiration time. If the device does + not connect to Device Management before expiration, the claim is removed + without separate notice. + format: date-time + type: string + - _key: id + description: Enrollment identity. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + - _key: object + enum: + - enrollment + example: enrollment + type: string + required: + - object + - id + - etag + - account_id + - created_at + - expires_at + - claimed_at + - enrollment_identity + - enrolled_device_id + type: object + type: array + - _key: has_more + api_fieldname: has_more + entity_fieldname: has_more + example: true + type: boolean + - _key: limit + api_fieldname: limit + description: Range 2-1000, or default. + entity_fieldname: limit + example: 50 + maximum: 1000 + minimum: 2 + type: integer - _key: object api_fieldname: object entity_fieldname: object enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + - list + example: list type: string - - _key: processed_count - api_fieldname: processed_count - description: The number of enrollment identities processed until now. - entity_fieldname: processed_count - example: 0 - type: integer - - _key: status - api_fieldname: status - default: new - description: The state of the process is 'new' at the time of creation. - If creation is still in progress, the state shows as 'processing'. When - the request is fully processed, the state changes to 'completed'. - entity_fieldname: status + - _key: order + api_fieldname: order + default: ASC + entity_fieldname: order enum: - - new - - processing - - completed - example: new + - ASC + - DESC + example: ASC type: string - _key: total_count api_fieldname: total_count - description: Total number of enrollment identities found in the input CSV. entity_fieldname: total_count - example: 10 + example: 100 + format: int32 + minimum: 1 type: integer required: - object - - id - - etag - - created_at - - account_id - - status + - limit + - after + - order + - has_more - total_count - - processed_count - - errors_count - - completet_at - - full_report_file - - errors_report_file + - data type: object - _key: '400' - description: Bad request. + description: Bad request. The access token could not be read. schema: properties: - _key: code @@ -28012,7 +28630,7 @@ entities: - type type: object - _key: '401' - description: Invalid access token. + description: The provided access token is not valid. schema: properties: - _key: code @@ -28062,111 +28680,15 @@ entities: return_info: custom: false self: true - type: device_enrollment_bulk_create - return_type: device_enrollment_bulk_create - summary: Bulk upload. - x_deprecation: null - x_filter: {} - - _key: download_errors_report_file - custom_method: download_errors_report_file - description: This method will download the CSV file containing detailed information - on status of the bulk enrollment. - drop_fields: - - object - - etag - - type - - filter - field_renames: [] - fields: [] - group_id: Devices - method: null - mode: download_errors_report_file - path: null - request_body: json - request_content_type: application/json - responses: [] - return_info: - custom: true - self: false - type: file - return_type: file - spec: - description: This method will download the CSV file containing detailed information - on status of the bulk enrollment. - return_type: file - summary: Download the error report file for the created the bulk enrollment. - summary: Download the error report file for the created the bulk enrollment. - x_deprecation: null - x_filter: {} - - _key: download_full_report_file - custom_method: download_full_report_file - description: This method will download the CSV file containing detailed information - on status of the bulk enrollment. - drop_fields: - - object - - etag - - type - - filter - field_renames: [] - fields: [] - group_id: Devices - method: null - mode: download_full_report_file - path: null - request_body: json - request_content_type: application/json - responses: [] - return_info: - custom: true - self: false - type: file - return_type: file - spec: - description: This method will download the CSV file containing detailed information - on status of the bulk enrollment. - return_type: file - summary: Download the full report file for the created of the bulk enrollment. - summary: Download the full report file for the created of the bulk enrollment. + type: device_enrollment + return_type: paginated_response(device_enrollment) + summary: Get a list of enrollments per account. x_deprecation: null x_filter: {} - _key: read - description: 'Provides information on bulk upload for the given ID, for example, - bulk status and number of processed enrollment identities. Provides links to - bulk upload reports as well. - - - **Report file format:** - - The report files have a header line, and the values are separated by commas. - Delimit lines with a line break (CRLF). Make sure the report file is compliant - with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). - - - An example of a full report file: - - ``` - - "entity__id","entity__created_at","error__code","error__type","error__message","error__fields" - - "A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E","2018-09-07T12:10:58.428Z","","","","" - - "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","2018-09-07T12:10:58.428Z","","","","" - - ``` - - An example of an error report file: - - ``` - - "entity__id","error__code","error__type","error__message","error__fields" - - "A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E","409","duplicate","Enrollment - identity is already claimed in the mbed Cloud.","" - - "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","409","duplicate","Enrollment - identity is already claimed in the mbed Cloud.","" + description: 'Check detailed enrollment info, for example, date of claim or expiration + date. - ``` **Example:** @@ -28174,9 +28696,9 @@ entities: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ - https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} + https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ```' drop_fields: @@ -28184,21 +28706,19 @@ entities: - etag - type - filter - - account_id - created_at - - status - - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file + - claimed_at + - enrollment_identity + - account_id + - expires_at + - enrolled_device_id field_renames: [] fields: - _key: id api_fieldname: id - description: Bulk ID + description: Enrollment identity. entity_fieldname: id + example: 00005a4e027f0a580a01081c00000000 in: path parameter_fieldname: id pattern: ^[A-Za-z0-9]{32} @@ -28207,17 +28727,17 @@ entities: group_id: Devices method: get mode: read - operation_id: getBulkDeviceEnrollment + operation_id: getDeviceEnrollment pagination: false - path: /v3/device-enrollments-bulk-uploads/{id} + path: /v3/device-enrollments/{id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Bulk upload entity found. + description: OK. Pending enrollment data. schema: foreign_key: - entity: device_enrollment_bulk_delete + entity: device_enrollment group: Devices properties: - _key: account_id @@ -28226,151 +28746,73 @@ entities: entity_fieldname: account_id example: 00005a4e027f0a580a01081c00000000 type: string - - _key: completed_at - api_fieldname: completed_at - description: 'The time the bulk creation task was completed. - - Null when creating bulk upload or delete.' - entity_fieldname: completed_at + - _key: claimed_at + api_fieldname: claimed_at + description: The time the device was claimed. + entity_fieldname: claimed_at format: date-time type: string - _key: created_at api_fieldname: created_at - description: The time of receiving the bulk creation task. + description: The time of the enrollment identity creation. entity_fieldname: created_at format: date-time type: string - - _key: errors_count - api_fieldname: errors_count - description: The number of enrollment identities with failed processing. - entity_fieldname: errors_count - example: 0 - type: integer - - _key: errors_report_file - api_fieldname: errors_report_file - description: 'Link to error report file. - - Null when creating bulk upload or delete.' - entity_fieldname: errors_report_file - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv + - _key: enrolled_device_id + api_fieldname: enrolled_device_id + description: The ID of the device in the Device Directory once it is registered. + entity_fieldname: enrolled_device_id + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + - _key: enrollment_identity + api_fieldname: enrollment_identity + description: Enrollment identity. + entity_fieldname: enrollment_identity + example: A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5 + pattern: ^A-[A-Za-z0-9:]{95}$ type: string - _key: etag api_fieldname: etag - description: etag entity_fieldname: etag - example: '1' - pattern: '[A-Za-z0-9]{0,256}' + example: 7642xfaxz + pattern: '[A-Za-z0-9]{1,256}' type: string - - _key: full_report_file - api_fieldname: full_report_file - description: 'Link to full report file. - - Null when creating bulk upload or delete.' - entity_fieldname: full_report_file - example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv + - _key: expires_at + api_fieldname: expires_at + description: The enrollment claim expiration time. If the device does not + connect to Device Management before expiration, the claim is removed without + separate notice. + entity_fieldname: expires_at + format: date-time type: string - _key: id api_fieldname: id - description: Bulk ID + description: Enrollment identity. entity_fieldname: id + example: 00005a4e027f0a580a01081c00000000 pattern: ^[A-Za-z0-9]{32} type: string - _key: object api_fieldname: object entity_fieldname: object enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads - type: string - - _key: processed_count - api_fieldname: processed_count - description: The number of enrollment identities processed until now. - entity_fieldname: processed_count - example: 0 - type: integer - - _key: status - api_fieldname: status - default: new - description: The state of the process is 'new' at the time of creation. - If creation is still in progress, the state shows as 'processing'. When - the request is fully processed, the state changes to 'completed'. - entity_fieldname: status - enum: - - new - - processing - - completed - example: new + - enrollment + example: enrollment type: string - - _key: total_count - api_fieldname: total_count - description: Total number of enrollment identities found in the input CSV. - entity_fieldname: total_count - example: 10 - type: integer required: - object - id - etag - - created_at - account_id - - status - - total_count - - processed_count - - errors_count - - completet_at - - full_report_file - - errors_report_file + - created_at + - expires_at + - claimed_at + - enrollment_identity + - enrolled_device_id type: object - _key: '400' - description: Bad request. Invalid bulk identity. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. - items: - properties: - - _key: message - description: Message describing the error condition. - type: string - - _key: name - description: Name of the field which caused the error. - type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 - type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error - type: string - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '401' - description: Invalid access token. + description: Bad request. Invalid enrollment identity. schema: properties: - _key: code @@ -28468,17 +28910,19 @@ entities: return_info: custom: false self: true - type: device_enrollment_bulk_create - return_type: device_enrollment_bulk_create - summary: Get bulk upload entity. + type: device_enrollment + return_type: device_enrollment + summary: Get details of an single enrollment by ID. x_deprecation: null x_filter: {} primary_key_field: id swagger_models: - - BulkResponse + - EnrollmentId + - EnrollmentIdentities + - EnrollmentIdentity tags: - - Public API -- _key: device_enrollment_bulk_delete + - Device ownership - enrollments +- _key: device_enrollment_bulk_create field_renames: [] fields: - _key: account_id @@ -28520,6 +28964,7 @@ entities: readOnly: true required: false type: string + x-nullable: true - _key: full_report_file api_fieldname: full_report_file description: 'Link to full report file. @@ -28529,11 +28974,10 @@ entities: readOnly: true required: false type: string + x-nullable: true - _key: id api_fieldname: id description: Bulk ID - in: path - parameter_fieldname: id pattern: ^[A-Za-z0-9]{32} readOnly: false required: true @@ -28555,7 +28999,7 @@ entities: - new - processing - completed - enum_reference: device_enrollment_bulk_delete_status_enum + enum_reference: device_enrollment_bulk_create_status_enum example: new readOnly: true required: false @@ -28569,38 +29013,38 @@ entities: type: integer group_id: Devices methods: - - _key: delete - description: "With bulk delete, you can upload a `CSV` file containing a number\ - \ of enrollment IDs to delete.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ - \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ - \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes\n\ - \n```\n**To ensure your CSV file is valid:**\n1. The first line of the file\ - \ (header) is ignored.\n1. Each line can contain comma-separated values, where\ + - _key: create + description: "With bulk upload, you can upload a `CSV` file containing a number\ + \ of enrollment IDs.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ + \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ + \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads\n\ + \n```\n **To ensure your CSV file is valid:**\n 1. The first line of the file\ + \ (header) is ignored.\n 1. Each line can contain comma-separated values, where\ \ the first value is the Enrollment ID. Everything after the first comma is\ - \ ignored.\n1. Valid enrollments begin with A followed by a - and 95 characters\ - \ (examples below).\n1. One enrollment ID per line. Empty lines are ignored.\n\ - 1. Trailing comma at the end of the line is optional.\n1. Lines are terminated\ - \ with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n1. Leading\ - \ and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from\ - \ the identity before validation.\n1. Empty identities are ignored.\n1. Valid\ - \ enrollment identities may be enclosed within quotation marks. Whitespace inside\ - \ quotation marks is not trimmed and will cause validation to fail. Empty quotation\ - \ marks are also invalid.\n1. Use UTF-8 encoding.\n\n**A valid enrollment file:**\n\ - ```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ + \ ignored.\n 1. Valid enrollments begin with A followed by a - and 95 characters\ + \ (examples below).\n 1. One enrollment ID per line. Empty lines are ignored.\n\ + \ 1. Trailing comma at the end of the line is optional.\n 1. Lines are terminated\ + \ with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n 1.\ + \ Leading and trailing whitespace characters (Unicode U+0000 - U+0020) are removed\ + \ from the identity before validation.\n 1. Empty identities are ignored.\n\ + \ 1. Valid enrollment identities may be enclosed within quotation marks. Whitespace\ + \ inside quotation marks is not trimmed and will cause validation to fail. Empty\ + \ quotation marks are also invalid.\n 1. Use UTF-8 encoding.\n\n\n**A valid\ + \ enrollment file:**\n```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ ,\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\ \nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\n\ A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12,\ - \ This text is ignored,\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\ + \ This text is ignored.\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\ \ , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\"\ \ , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file\ \ containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ , First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ \ Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ - \ Too-short identity.\n\"\", Empty quotation marks are an invalid identity.\n\ + \ Too-short identity.\n\"\", Empty quotation marks are an invalid identity\n\ \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\ \ \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n\ - ```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored.\"\ - \n\n,,\n, This is also considered to a blank line.\n```" + ```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored\"\ + \n\n,,\n, This is also considered a blank line.\n```" drop_fields: - object - etag @@ -28621,7 +29065,7 @@ entities: - _key: enrollment_identities api_fieldname: enrollment_identities description: The `CSV` file containing the enrollment IDs. The maximum file - size is 10MB. + size is 10 MB. entity_fieldname: enrollment_identities external_param: true in: stream @@ -28631,18 +29075,18 @@ entities: type: file group_id: Devices method: post - mode: delete - operation_id: deleteBulkDeviceEnrollment + mode: create + operation_id: createBulkDeviceEnrollment pagination: false - path: /v3/device-enrollments-bulk-deletes + path: /v3/device-enrollments-bulk-uploads request_body: file request_content_type: multipart/form-data responses: - _key: '201' - description: Bulk delete data received and asynchronous processing started. + description: Bulk upload data received and asynchronous processing started. schema: foreign_key: - entity: device_enrollment_bulk_create + entity: device_enrollment_bulk_delete group: Devices properties: - _key: account_id @@ -28679,6 +29123,7 @@ entities: entity_fieldname: errors_report_file example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv type: string + x-nullable: true - _key: etag api_fieldname: etag description: etag @@ -28694,14 +29139,12 @@ entities: entity_fieldname: full_report_file example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv type: string + x-nullable: true - _key: id api_fieldname: id description: Bulk ID entity_fieldname: id - in: path - parameter_fieldname: id pattern: ^[A-Za-z0-9]{32} - required: true type: string - _key: object api_fieldname: object @@ -28848,9 +29291,9 @@ entities: return_info: custom: false self: true - type: device_enrollment_bulk_delete - return_type: device_enrollment_bulk_delete - summary: Bulk delete. + type: device_enrollment_bulk_create + return_type: device_enrollment_bulk_create + summary: Bulk upload. x_deprecation: null x_filter: {} - _key: download_errors_report_file @@ -28880,8 +29323,8 @@ entities: description: This method will download the CSV file containing detailed information on status of the bulk enrollment. return_type: file - summary: Download the error report file for the bulk enrollment deletion. - summary: Download the error report file for the bulk enrollment deletion. + summary: Download the error report file for the created the bulk enrollment. + summary: Download the error report file for the created the bulk enrollment. x_deprecation: null x_filter: {} - _key: download_full_report_file @@ -28911,20 +29354,20 @@ entities: description: This method will download the CSV file containing detailed information on status of the bulk enrollment. return_type: file - summary: Download the full report file for the bulk enrollment deletion. - summary: Download the full report file for the bulk enrollment deletion. + summary: Download the full report file for the created of the bulk enrollment. + summary: Download the full report file for the created of the bulk enrollment. x_deprecation: null x_filter: {} - _key: read - description: 'Provides information on bulk delete for the given ID, for example, - bulk status and the number of processed enrollment identities. Provides links - to bulk delete reports as well. + description: 'Provides information on bulk upload for the given ID, for example, + bulk status and number of processed enrollment identities. Provides links to + bulk upload reports as well. **Report file format:** - The report files have a header line and the value are separated by commas. The - lines are delimited by a line break (CRLF). Make sure the report file is compliant + The report files have a header line, and the values are separated by commas. + Delimit lines with a line break (CRLF). Make sure the report file is compliant with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). @@ -28932,7 +29375,7 @@ entities: ``` - "entity__id","entity__deleted_at","error__code","error__type","error__message","error__fields" + "entity__id","entity__created_at","error__code","error__type","error__message","error__fields" "A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E","2018-09-07T12:10:58.428Z","","","","" @@ -28960,9 +29403,9 @@ entities: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ - https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} + https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ```' drop_fields: @@ -28993,17 +29436,17 @@ entities: group_id: Devices method: get mode: read - operation_id: getBulkDeviceEnrollmentDelete + operation_id: getBulkDeviceEnrollment pagination: false - path: /v3/device-enrollments-bulk-deletes/{id} + path: /v3/device-enrollments-bulk-uploads/{id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Bulk delete entity found. + description: Bulk upload entity found. schema: foreign_key: - entity: device_enrollment_bulk_create + entity: device_enrollment_bulk_delete group: Devices properties: - _key: account_id @@ -29040,6 +29483,7 @@ entities: entity_fieldname: errors_report_file example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv type: string + x-nullable: true - _key: etag api_fieldname: etag description: etag @@ -29055,14 +29499,12 @@ entities: entity_fieldname: full_report_file example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv type: string + x-nullable: true - _key: id api_fieldname: id description: Bulk ID entity_fieldname: id - in: path - parameter_fieldname: id pattern: ^[A-Za-z0-9]{32} - required: true type: string - _key: object api_fieldname: object @@ -29257,242 +29699,293 @@ entities: return_info: custom: false self: true - type: device_enrollment_bulk_delete - return_type: device_enrollment_bulk_delete - summary: Get bulk delete entity. + type: device_enrollment_bulk_create + return_type: device_enrollment_bulk_create + summary: Get bulk upload entity. x_deprecation: null x_filter: {} primary_key_field: id swagger_models: - BulkResponse tags: - - Public API -- _key: device_enrollment_denial + - Device ownership - enrollments +- _key: device_enrollment_bulk_delete field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: account id + description: ID example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _key: completed_at + api_fieldname: completed_at + description: 'The time the bulk creation task was completed. + + Null when creating bulk upload or delete.' + format: date-time readOnly: true required: false type: string - _key: created_at api_fieldname: created_at - description: date on which the failed bootstrap was attempted on - example: '2000-01-23T04:56:07.000+00:00' + description: The time of receiving the bulk creation task. format: date-time readOnly: true required: false type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: endpoint name - example: Endpoint_1234 + - _key: errors_count + api_fieldname: errors_count + description: The number of enrollment identities with failed processing. + example: 0 + readOnly: true + required: false + type: integer + - _key: errors_report_file + api_fieldname: errors_report_file + description: 'Link to error report file. + + Null when creating bulk upload or delete.' + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv readOnly: true required: false type: string + x-nullable: true + - _key: full_report_file + api_fieldname: full_report_file + description: 'Link to full report file. + + Null when creating bulk upload or delete.' + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv + readOnly: true + required: false + type: string + x-nullable: true - _key: id api_fieldname: id - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' + description: Bulk ID + in: path + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} + readOnly: false + required: true + type: string + - _key: processed_count + api_fieldname: processed_count + description: The number of enrollment identities processed until now. + example: 0 readOnly: true required: false - type: string - - _key: trusted_certificate_id - api_fieldname: trusted_certificate_id - description: Trusted certificate id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + type: integer + - _key: status + api_fieldname: status + default: new + description: The state of the process is 'new' at the time of creation. If creation + is still in progress, the state shows as 'processing'. When the request is fully + processed, the state changes to 'completed'. + enum: + - new + - processing + - completed + enum_reference: device_enrollment_bulk_delete_status_enum + example: new readOnly: true required: false type: string + - _key: total_count + api_fieldname: total_count + description: Total number of enrollment identities found in the input CSV. + example: 10 + readOnly: true + required: false + type: integer group_id: Devices methods: - - _key: list - description: 'This produces a list of failed attempts to bootstrap using a particular - certificate which is blacklisted (trusted_certificate). - - Returned list can be filtered by endpoint name. Trusted certificate ID filter - is required. - - - **Example usage:** - - ``` - - curl -X GET -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials?trusted_certificate_id__eq={cert-id}&endpoint_name__eq={endpoint_name} - - ``` - - ' + - _key: delete + description: "With bulk delete, you can upload a `CSV` file containing a number\ + \ of enrollment IDs to delete.\n\n**Example:**\n```\ncurl -X POST \\\n-H 'Authorization:\ + \ Bearer ' \\\n-F 'enrollment_identities=@/path/to/enrollments/enrollments.csv'\ + \ \\\nhttps://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes\n\ + \n```\n**To ensure your CSV file is valid:**\n1. The first line of the file\ + \ (header) is ignored.\n1. Each line can contain comma-separated values, where\ + \ the first value is the Enrollment ID. Everything after the first comma is\ + \ ignored.\n1. Valid enrollments begin with A followed by a - and 95 characters\ + \ (examples below).\n1. One enrollment ID per line. Empty lines are ignored.\n\ + 1. Trailing comma at the end of the line is optional.\n1. Lines are terminated\ + \ with either a line feed \\n, a carriage return \\r, or both \\r\\n.\n1. Leading\ + \ and trailing whitespace characters (Unicode U+0000 - U+0020) are removed from\ + \ the identity before validation.\n1. Empty identities are ignored.\n1. Valid\ + \ enrollment identities may be enclosed within quotation marks. Whitespace inside\ + \ quotation marks is not trimmed and will cause validation to fail. Empty quotation\ + \ marks are also invalid.\n1. Use UTF-8 encoding.\n\n**A valid enrollment file:**\n\ + ```\n\"Examples of valid identites, notes\"\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ + ,\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\"\ + \nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12\n\ + A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:24:44:71:22:15:43:23:12,\ + \ This text is ignored,\n A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\ + \ , Whitespace is trimmed before validation.\n \"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:60:25:48:44:71:22:15:43:23:12\"\ + \ , Whitespace around quotation marks is also trimmed.\n\n```\n\n**A file\ + \ containing invalid identities:**\n```\n\"A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\"\ + , First line is ignored.\nA_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12,\ + \ Invalid version identifier.\nA-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23,\ + \ Too-short identity.\n\"\", Empty quotation marks are an invalid identity.\n\ + \" A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12\ + \ \", Whitespace inside quotation marks is not trimmed, causing an error.\n\n\ + ```\n\n**An empty file:**\n```\n\"Examples of blank lines that are ignored.\"\ + \n\n,,\n, This is also considered to a blank line.\n```" drop_fields: - object - etag - type - filter - - has_more + - id + - account_id + - created_at + - status - total_count - - data - - trusted_certificate_id__eq - - endpoint_name__eq + - processed_count + - errors_count + - completed_at + - full_report_file + - errors_report_file field_renames: [] fields: - - _key: after - api_fieldname: after - description: Optional parameter for pagination. Denied device ID. - entity_fieldname: after - external_param: true - in: query - name: after - parameter_fieldname: after - required: false - type: string - - _key: limit - api_fieldname: limit - description: Optional parameter for pagination. - entity_fieldname: limit - example: 50 - external_param: true - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - description: Optional parameter for pagination. - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: device_enrollment_denial_order_enum - example: DESC + - _key: enrollment_identities + api_fieldname: enrollment_identities + description: The `CSV` file containing the enrollment IDs. The maximum file + size is 10MB. + entity_fieldname: enrollment_identities external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string - foreign_key: - entity: device_enrollment_denial - group: Devices - foreign_key_priority: self + in: stream + name: enrollment_identities + parameter_fieldname: enrollment_identities + required: true + type: file group_id: Devices - method: get - mode: list - operation_id: listEnrollmentDenialAttempts - pagination: true - path: /v3/device-enrollment-denials - request_body: json - request_content_type: application/json + method: post + mode: delete + operation_id: deleteBulkDeviceEnrollment + pagination: false + path: /v3/device-enrollments-bulk-deletes + request_body: file + request_content_type: multipart/form-data responses: - - _key: '200' - description: Query Success. Responding with List of Devices. + - _key: '201' + description: Bulk delete data received and asynchronous processing started. schema: foreign_key: - entity: device_enrollment_denial + entity: device_enrollment_bulk_create group: Devices - pagination: true properties: - - _key: after - api_fieldname: after - description: An offset token for current page. - entity_fieldname: after + - _key: account_id + api_fieldname: account_id + description: ID + entity_fieldname: account_id + example: 00005a4e027f0a580a01081c00000000 type: string - - _key: data - api_fieldname: data - entity_fieldname: data - items: - foreign_key: - entity: device_enrollment_denial - group: Devices - properties: - - _key: account_id - description: account id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: created_at - description: date on which the failed bootstrap was attempted on - example: '2000-01-23T04:56:07.000+00:00' - format: date-time - type: string - - _key: endpoint_name - description: endpoint name - example: Endpoint_1234 - type: string - - _key: id - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: object - enum: - - denied_device - type: string - - _key: trusted_certificate_id - description: Trusted certificate id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' - type: string - required: - - id - - account_id - - endpoint_name - - trusted_certificate_id - - created_at - - object - type: array - - _key: has_more - api_fieldname: has_more - description: Are there more results available. - entity_fieldname: has_more - example: false - type: boolean - - _key: limit - api_fieldname: limit - description: How many objects to retrieve in the page. The minimum limit - is 2 and the maximum is 1000. Limit values outside of this range are set - to the closest limit. - entity_fieldname: limit - example: 50 - maximum: 1000 - minimum: 2 + - _key: completed_at + api_fieldname: completed_at + description: 'The time the bulk creation task was completed. + + Null when creating bulk upload or delete.' + entity_fieldname: completed_at + format: date-time + type: string + - _key: created_at + api_fieldname: created_at + description: The time of receiving the bulk creation task. + entity_fieldname: created_at + format: date-time + type: string + - _key: errors_count + api_fieldname: errors_count + description: The number of enrollment identities with failed processing. + entity_fieldname: errors_count + example: 0 type: integer + - _key: errors_report_file + api_fieldname: errors_report_file + description: 'Link to error report file. + + Null when creating bulk upload or delete.' + entity_fieldname: errors_report_file + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv + type: string + x-nullable: true + - _key: etag + api_fieldname: etag + description: etag + entity_fieldname: etag + example: '1' + pattern: '[A-Za-z0-9]{0,256}' + type: string + - _key: full_report_file + api_fieldname: full_report_file + description: 'Link to full report file. + + Null when creating bulk upload or delete.' + entity_fieldname: full_report_file + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv + type: string + x-nullable: true + - _key: id + api_fieldname: id + description: Bulk ID + entity_fieldname: id + in: path + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} + required: true + type: string - _key: object api_fieldname: object - description: The type of this API object is a "list". entity_fieldname: object - example: list + enum: + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - - _key: order - api_fieldname: order - description: The creation time based order of the entries. - entity_fieldname: order + - _key: processed_count + api_fieldname: processed_count + description: The number of enrollment identities processed until now. + entity_fieldname: processed_count + example: 0 + type: integer + - _key: status + api_fieldname: status + default: new + description: The state of the process is 'new' at the time of creation. + If creation is still in progress, the state shows as 'processing'. When + the request is fully processed, the state changes to 'completed'. + entity_fieldname: status enum: - - ASC - - DESC - example: DESC + - new + - processing + - completed + example: new type: string - _key: total_count api_fieldname: total_count + description: Total number of enrollment identities found in the input CSV. entity_fieldname: total_count - example: 1 - format: integer + example: 10 type: integer required: - object - - data + - id + - etag + - created_at + - account_id + - status + - total_count + - processed_count + - errors_count + - completet_at + - full_report_file + - errors_report_file type: object - - _key: '401' - description: JWT validation failed. + - _key: '400' + description: Bad request. schema: properties: - _key: code @@ -29539,8 +30032,8 @@ entities: - request_id - type type: object - - _key: '404' - description: ID set in pagination parameter `after` not found. + - _key: '401' + description: Invalid access token. schema: properties: - _key: code @@ -29590,119 +30083,320 @@ entities: return_info: custom: false self: true - type: device_enrollment_denial - return_type: paginated_response(device_enrollment_denial) - summary: Return list of devices which were denied to bootstrap due to being subjected - to blacklisting. + type: device_enrollment_bulk_delete + return_type: device_enrollment_bulk_delete + summary: Bulk delete. x_deprecation: null - x_filter: - endpoint_name: - - eq - trusted_certificate_id: - - eq + x_filter: {} + - _key: download_errors_report_file + custom_method: download_errors_report_file + description: This method will download the CSV file containing detailed information + on status of the bulk enrollment. + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: [] + group_id: Devices + method: null + mode: download_errors_report_file + path: null + request_body: json + request_content_type: application/json + responses: [] + return_info: + custom: true + self: false + type: file + return_type: file + spec: + description: This method will download the CSV file containing detailed information + on status of the bulk enrollment. + return_type: file + summary: Download the error report file for the bulk enrollment deletion. + summary: Download the error report file for the bulk enrollment deletion. + x_deprecation: null + x_filter: {} + - _key: download_full_report_file + custom_method: download_full_report_file + description: This method will download the CSV file containing detailed information + on status of the bulk enrollment. + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: [] + group_id: Devices + method: null + mode: download_full_report_file + path: null + request_body: json + request_content_type: application/json + responses: [] + return_info: + custom: true + self: false + type: file + return_type: file + spec: + description: This method will download the CSV file containing detailed information + on status of the bulk enrollment. + return_type: file + summary: Download the full report file for the bulk enrollment deletion. + summary: Download the full report file for the bulk enrollment deletion. + x_deprecation: null + x_filter: {} - _key: read - description: 'Query for a single attempt to bootstrap with a blacklisted certificate - by ID. + description: 'Provides information on bulk delete for the given ID, for example, + bulk status and the number of processed enrollment identities. Provides links + to bulk delete reports as well. + + + **Report file format:** + The report files have a header line and the value are separated by commas. The + lines are delimited by a line break (CRLF). Make sure the report file is compliant + with IETF Informal CSV common format [RFC 4180](https://tools.ietf.org/html/rfc4180). - **Example usage:** + + An example of a full report file: ``` - curl -X GET -H ''Authorization: Bearer '' \ + "entity__id","entity__deleted_at","error__code","error__type","error__message","error__fields" + + "A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E","2018-09-07T12:10:58.428Z","","","","" + + "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","2018-09-07T12:10:58.428Z","","","","" - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials/{device_enrollment_denial_id} + ``` + + An example of an error report file: ``` - ' + "entity__id","error__code","error__type","error__message","error__fields" + + "A-F9:AA:AA:AA:DE:31:C7:30:72:55:27:AE:8B:E1:1C:6F:42:7D:06:CF:FB:18:6F:59:48:29:B3:98:4B:76:8F:9E","409","duplicate","Enrollment + identity is already claimed in the mbed Cloud.","" + + "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","409","duplicate","Enrollment + identity is already claimed in the mbed Cloud.","" + + ``` + + **Example:** + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} + + ```' drop_fields: - object - etag - type - filter - - id - account_id - - endpoint_name - - trusted_certificate_id - created_at + - status + - total_count + - processed_count + - errors_count + - completed_at + - full_report_file + - errors_report_file field_renames: [] fields: - - _key: device_enrollment_denial_id - api_fieldname: device_enrollment_denial_id - description: id of the recorded failed bootstrap attempt - entity_fieldname: device_enrollment_denial_id - external_param: true + - _key: id + api_fieldname: id + description: Bulk ID + entity_fieldname: id in: path - name: device_enrollment_denial_id - parameter_fieldname: device_enrollment_denial_id + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} required: true type: string group_id: Devices method: get mode: read - operation_id: getEnrollmentDenialAttempt + operation_id: getBulkDeviceEnrollmentDelete pagination: false - path: /v3/device-enrollment-denials/{device_enrollment_denial_id} + path: /v3/device-enrollments-bulk-deletes/{id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Query Success. Responding with blacklisted device. + description: Bulk delete entity found. schema: foreign_key: - entity: device_enrollment_denial + entity: device_enrollment_bulk_create group: Devices properties: - _key: account_id api_fieldname: account_id - description: account id + description: ID entity_fieldname: account_id example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + type: string + - _key: completed_at + api_fieldname: completed_at + description: 'The time the bulk creation task was completed. + + Null when creating bulk upload or delete.' + entity_fieldname: completed_at + format: date-time type: string - _key: created_at api_fieldname: created_at - description: date on which the failed bootstrap was attempted on + description: The time of receiving the bulk creation task. entity_fieldname: created_at - example: '2000-01-23T04:56:07.000+00:00' format: date-time type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: endpoint name - entity_fieldname: endpoint_name - example: Endpoint_1234 + - _key: errors_count + api_fieldname: errors_count + description: The number of enrollment identities with failed processing. + entity_fieldname: errors_count + example: 0 + type: integer + - _key: errors_report_file + api_fieldname: errors_report_file + description: 'Link to error report file. + + Null when creating bulk upload or delete.' + entity_fieldname: errors_report_file + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/errors_report.csv + type: string + x-nullable: true + - _key: etag + api_fieldname: etag + description: etag + entity_fieldname: etag + example: '1' + pattern: '[A-Za-z0-9]{0,256}' + type: string + - _key: full_report_file + api_fieldname: full_report_file + description: 'Link to full report file. + + Null when creating bulk upload or delete.' + entity_fieldname: full_report_file + example: https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/2d238a89038b4ddb84699dd36a901063/full_report.csv type: string + x-nullable: true - _key: id api_fieldname: id - description: id of the recorded failed bootstrap attempt + description: Bulk ID entity_fieldname: id - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' + in: path + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} + required: true type: string - _key: object api_fieldname: object entity_fieldname: object enum: - - denied_device + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - - _key: trusted_certificate_id - api_fieldname: trusted_certificate_id - description: Trusted certificate id - entity_fieldname: trusted_certificate_id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + - _key: processed_count + api_fieldname: processed_count + description: The number of enrollment identities processed until now. + entity_fieldname: processed_count + example: 0 + type: integer + - _key: status + api_fieldname: status + default: new + description: The state of the process is 'new' at the time of creation. + If creation is still in progress, the state shows as 'processing'. When + the request is fully processed, the state changes to 'completed'. + entity_fieldname: status + enum: + - new + - processing + - completed + example: new type: string + - _key: total_count + api_fieldname: total_count + description: Total number of enrollment identities found in the input CSV. + entity_fieldname: total_count + example: 10 + type: integer required: + - object - id - - account_id - - endpoint_name - - trusted_certificate_id + - etag - created_at + - account_id + - status + - total_count + - processed_count + - errors_count + - completet_at + - full_report_file + - errors_report_file + type: object + - _key: '400' + description: Bad request. Invalid bulk identity. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message - object + - request_id + - type + type: object - _key: '401' - description: JWT validation failed. + description: Invalid access token. schema: properties: - _key: code @@ -29750,7 +30444,7 @@ entities: - type type: object - _key: '404' - description: ID not found. + description: Not found. schema: properties: - _key: code @@ -29800,17 +30494,16 @@ entities: return_info: custom: false self: true - type: device_enrollment_denial - return_type: device_enrollment_denial - summary: Query for a single device by ID + type: device_enrollment_bulk_delete + return_type: device_enrollment_bulk_delete + summary: Get bulk delete entity. x_deprecation: null x_filter: {} primary_key_field: id swagger_models: - - BlackListedDeviceData - - DenialAttemptsResponse + - BulkResponse tags: - - EnrollmentDenials + - Device ownership - enrollments - _key: device_events field_renames: [] fields: @@ -29873,7 +30566,7 @@ entities: type: string - _key: event_type_category api_fieldname: event_type_category - description: Category code which groups the event type by a summary category. + description: Category code that groups the event type by a summary category. example: FAIL_MANIFEST_REJECTED readOnly: true required: false @@ -29899,31 +30592,15 @@ entities: group_id: Devices methods: - _key: list - description: 'List all device events for an account. - - - **Example:** - - Following example gets device-events limiting returned results to max 5 events - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \ - - -H ''Authorization: Bearer '' - - ``` - - or to get events for certain device filter based on device_id: - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id= - \ - - -H ''Authorization: Bearer '' - - ```' + description: "List all or a filtered list of device events for the account. Device\ + \ events are events significant to operation or lifetime, such as creation,\ + \ firmware update, and suspension.\n\nTo see statistics for device connectivity\ + \ and usage, use the [Statistics API](https://developer.pelion.com/docs/device-management-api/connect-statistics/).\n\ + \n **Example:**\n Following example gets device-events limiting returned results\ + \ to max 5 events\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5\ + \ \\\n -H 'Authorization: Bearer '\n ```\n or to get events for certain\ + \ device filter based on device_id:\n ```\n curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events?device_id=\ + \ \\\n -H 'Authorization: Bearer '\n ```" drop_fields: - object - etag @@ -30079,8 +30756,7 @@ entities: maxLength: 100 type: string - _key: event_type_category - description: Category code which groups the event type by a summary - category. + description: Category code that groups the event type by a summary category. example: FAIL_MANIFEST_REJECTED type: string - _key: event_type_description @@ -30168,12 +30844,13 @@ entities: - eq - neq - _key: read - description: 'Retrieve a specific device event. + description: '"Retrieve a specific device event. See ''/v3/device-events/'' for + information on device events, and how to get the device_event_id." **Example:** - To fetch a specific event you can use the ''id'' field form the ''/v3/device-events''. + To fetch a specific event you can use the ''id'' field from ''/v3/device-events''. Form of ''016c03d40a4e000000000001001003b4'' ``` @@ -30285,7 +30962,7 @@ entities: type: string - _key: event_type_category api_fieldname: event_type_category - description: Category code which groups the event type by a summary category. + description: Category code that groups the event type by a summary category. entity_fieldname: event_type_category example: FAIL_MANIFEST_REJECTED type: string @@ -30338,7 +31015,7 @@ entities: fields: - _key: created_at api_fieldname: created_at - description: The time the campaign was created. + description: The time the group was created. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -30363,7 +31040,7 @@ entities: api_fieldname: description description: The description of the group. example: Devices on the factory floor. - maxLength: 2000 + maxLength: 1024 readOnly: false required: false type: string @@ -30391,7 +31068,7 @@ entities: type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: The time this object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -30400,7 +31077,7 @@ entities: group_id: Devices methods: - _key: add_device - description: Add one device to a group. + description: Add one device to a group. A device can be in multiple groups. drop_fields: - object - etag @@ -30634,7 +31311,7 @@ entities: entity_fieldname: description example: Devices on the factory floor. in: body - maxLength: 2000 + maxLength: 1024 name: description parameter_fieldname: description required: false @@ -30672,7 +31349,7 @@ entities: properties: - _key: created_at api_fieldname: created_at - description: The time the campaign was created. + description: The time the group was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -30696,7 +31373,7 @@ entities: description: The description of the group. entity_fieldname: description example: Devices on the factory floor. - maxLength: 2000 + maxLength: 1024 type: string - _key: devices_count api_fieldname: devices_count @@ -30731,7 +31408,7 @@ entities: type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: The time this object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -30890,7 +31567,8 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: Delete a group. + description: Delete a group. This deletes the group, but not the devices in the + group. drop_fields: - object - etag @@ -31026,7 +31704,7 @@ entities: x_deprecation: null x_filter: {} - _key: devices - description: Get a page of devices. + description: Get a page of devices in a specified group. drop_fields: - object - etag @@ -31153,6 +31831,10 @@ entities: - name__neq - name__in - name__nin + - net_id__eq + - net_id__neq + - net_id__in + - net_id__nin - serial_number__eq - serial_number__neq - serial_number__in @@ -31291,6 +31973,17 @@ entities: example: '00000000000000000000000000000000' maxLength: 500 type: string + component_attributes: + additionalProperties: + maxLength: 128 + type: string + description: Up to ten custom key-value attributes. Note that keys cannot + begin with a number. Both keys and values are limited to 128 characters. + Updating this field replaces existing contents. + example: + key: value + maxProperties: 10 + type: object connector_expiration_date: description: The expiration date of the certificate used to connect to LwM2M server. @@ -31327,7 +32020,7 @@ entities: type: string description: description: The description of the device. - example: description + example: Temperature measuring device maxLength: 2000 type: string device_class: @@ -31359,7 +32052,8 @@ entities: maxLength: 512 type: string endpoint_name: - description: The endpoint name given to the device. + description: The endpoint name given to the device. The endpoint_name + is from the device certificate and is set by factory tool. example: 00000000-0000-0000-0000-000000000000 readOnly: true type: string @@ -31391,7 +32085,8 @@ entities: type: string type: array host_gateway: - description: The ID of the host gateway, if appropriate. + description: The ID of the host gateway, if appropriate. A device behind + Edge has this host_gateway set. example: '' type: string id: @@ -31440,7 +32135,12 @@ entities: format: date-time type: string lifecycle_status: - description: The lifecycle status of the device. + description: 'The lifecycle status of the device. + + * Enabled: The device is allowed to connect to Pelion Device Management. + + * Blocked: The device is prevented from connecting to Pelion Device + Management. Device can be, for example, ''suspended''.' enum: - enabled - blocked @@ -31456,33 +32156,63 @@ entities: format: date-time type: string mechanism: - description: The ID of the channel used to communicate with the device. + description: 'NOT USED: The ID of the channel used to communicate with + the device.' enum: - connector - direct type: string mechanism_url: - description: The address of the connector to use. + description: 'NOT USED: The address of the connector to use.' example: '' type: string name: - description: The name of the device. + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string + net_id: + default: '' + description: Private network identifier. Used to group nodes connected + to a specific border router. + example: 0000:0000:0000:0000:0000:0000:0000:0000 + maxLength: 40 + type: string object: description: The API resource entity. example: device type: string operator_suspended: - description: Is the device suspended by the operator? + description: Device has been suspended by operator. type: boolean serial_number: - description: The serial number of the device. + description: The [serial number](https://developer.pelion.com/docs/device-management-provision/latest/provisioning-info/lwm2m-device-object.html#serial-number) + of the device. The serial number is injected by the factory tool during + manufacturing. example: 00000000-0000-0000-0000-000000000000 type: string state: - description: The current state of the device. + description: 'The current state of the device. + + * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. + + * Cloud_enrolling: The device is bootstrapping for the first time. + This state is set only while bootstrapping is in progress. For example, + an external CA gives an error, and the device tries to bootstrap again + after few seconds. + + * Bootstrapped: The device has bootstrapped, and has credentials to + connect to Device Management. + + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://developer.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://developer.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' enum: - unenrolled - cloud_enrolling @@ -31494,7 +32224,7 @@ entities: description: Is the device suspended by the system? type: boolean updated_at: - description: The time the object was updated. + description: The time this data object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -31841,6 +32571,11 @@ entities: - neq - in - nin + net_id: + - eq + - neq + - in + - nin operator_suspended: - eq - neq @@ -31986,7 +32721,7 @@ entities: group: Devices properties: - _key: created_at - description: The time the campaign was created. + description: The time the group was created. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -32005,7 +32740,7 @@ entities: - _key: description description: The description of the group. example: Devices on the factory floor. - maxLength: 2000 + maxLength: 1024 type: string - _key: devices_count description: The number of devices in this group. @@ -32029,7 +32764,7 @@ entities: example: device-group type: string - _key: updated_at - description: The time the object was updated. + description: The time this object was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -32201,7 +32936,9 @@ entities: - lte - gte - _key: read - description: Get a group. + description: Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) + info what contains info of the group, for example, name and updated date. To + list the devices in the group, use '/v3/device-groups/{device-group-id}/devices/'. drop_fields: - object - etag @@ -32244,7 +32981,7 @@ entities: properties: - _key: created_at api_fieldname: created_at - description: The time the campaign was created. + description: The time the group was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -32268,7 +33005,7 @@ entities: description: The description of the group. entity_fieldname: description example: Devices on the factory floor. - maxLength: 2000 + maxLength: 1024 type: string - _key: devices_count api_fieldname: devices_count @@ -32303,7 +33040,7 @@ entities: type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: The time this object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -32659,7 +33396,7 @@ entities: x_deprecation: null x_filter: {} - _key: update - description: Modify the attributes of a group. + description: Modify the attributes of a group, such as the description. drop_fields: - object - etag @@ -32695,7 +33432,7 @@ entities: entity_fieldname: description example: Devices on the factory floor. in: body - maxLength: 2000 + maxLength: 1024 name: description parameter_fieldname: description required: false @@ -32742,7 +33479,7 @@ entities: properties: - _key: created_at api_fieldname: created_at - description: The time the campaign was created. + description: The time the group was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -32766,7 +33503,7 @@ entities: description: The description of the group. entity_fieldname: description example: Devices on the factory floor. - maxLength: 2000 + maxLength: 1024 type: string - _key: devices_count api_fieldname: devices_count @@ -32801,7 +33538,7 @@ entities: type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: The time this object was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -32983,7 +33720,7 @@ entities: - _key: datafile_checksum api_fieldname: datafile_checksum description: The checksum (sha256) generated for the datafile. - example: '0000000000000000000000000000000000000000000000000000000000000000' + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e readOnly: true required: false type: string @@ -32996,8 +33733,8 @@ entities: type: integer - _key: datafile_url api_fieldname: datafile - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 + description: The firmware image file URL. + example: http://bucket.com/myimage.elf readOnly: true required: false type: string @@ -33005,6 +33742,7 @@ entities: api_fieldname: description description: The description of the object. example: a description + format: free text maxLength: 2000 readOnly: false required: false @@ -33012,13 +33750,15 @@ entities: - _key: id api_fieldname: id description: The firmware image ID. - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' readOnly: false required: true type: string - _key: name api_fieldname: name description: The firmware image name. + format: free text maxLength: 128 readOnly: false required: false @@ -33036,6 +33776,9 @@ entities: - _key: create description: 'Create a firmware image. +
**Note:** Only use this API for images smaller than 100 MB. For larger + images, [upload in chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). +
**Usage example:** @@ -33044,7 +33787,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''Authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''Content-Type: multipart/form-data'' \ @@ -33077,6 +33820,7 @@ entities: description: The description of the object. entity_fieldname: description example: a description + format: free text in: stream maxLength: 2000 parameter_fieldname: description @@ -33084,10 +33828,12 @@ entities: type: string - _key: firmware_image_file api_fieldname: datafile - description: The firmware image file to upload. + description: The firmware image file to upload. File name must not exceed 166 + characters. entity_fieldname: firmware_image_file external_param: true in: stream + maxLength: 166 name: datafile parameter_fieldname: datafile required: true @@ -33096,6 +33842,7 @@ entities: api_fieldname: name description: The firmware image name. entity_fieldname: name + format: free text in: stream maxLength: 128 parameter_fieldname: name @@ -33132,15 +33879,15 @@ entities: type: string datafile: api_fieldname: datafile - description: The firmware image file URL + description: The firmware image file URL. entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 + example: http://bucket.com/myimage.elf type: string datafile_checksum: api_fieldname: datafile_checksum description: The checksum (sha256) generated for the datafile. entity_fieldname: datafile_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e type: string datafile_size: api_fieldname: datafile_size @@ -33153,6 +33900,7 @@ entities: description: The description of the object. entity_fieldname: description example: a description + format: free text maxLength: 2000 type: string etag: @@ -33165,18 +33913,21 @@ entities: api_fieldname: id description: The firmware image ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name description: The firmware image name. entity_fieldname: name + format: free text maxLength: 128 type: string object: api_fieldname: object description: 'Entity name: always ''firmware-image''.' entity_fieldname: object + example: firmware-image type: string updated_at: api_fieldname: updated_at @@ -33187,12 +33938,196 @@ entities: type: string - _key: '400' description: Cannot validate the data used to create the firmware image. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '403' description: Forbidden. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '413' description: Firmware image too large. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -33211,10 +34146,10 @@ entities: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -33234,10 +34169,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: image_id parameter_fieldname: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -33255,10 +34189,148 @@ entities: description: Firmware image deleted. - _key: '400' description: Bad Request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Firmware image not found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -33278,7 +34350,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -33423,12 +34495,12 @@ entities: format: date-time type: string datafile: - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 + description: The firmware image file URL. + example: http://bucket.com/myimage.elf type: string datafile_checksum: description: The checksum (sha256) generated for the datafile. - example: '0000000000000000000000000000000000000000000000000000000000000000' + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e type: string datafile_size: description: The size of the datafile in bytes. @@ -33437,6 +34509,7 @@ entities: description: description: The description of the object. example: a description + format: free text maxLength: 2000 type: string etag: @@ -33447,14 +34520,17 @@ entities: type: string id: description: The firmware image ID. - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' type: string name: description: The firmware image name. + format: free text maxLength: 128 type: string object: description: 'Entity name: always ''firmware-image''.' + example: firmware-image type: string updated_at: api_fieldname: updated_at @@ -33477,6 +34553,7 @@ entities: api_fieldname: object description: 'Entity name: always ''list''.' entity_fieldname: object + example: list type: string - _key: order api_fieldname: order @@ -33495,10 +34572,148 @@ entities: type: integer - _key: '400' description: Bad Request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Unable to find content. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -33556,10 +34771,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -33584,9 +34799,10 @@ entities: api_fieldname: id description: The firmware image ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 in: path parameter_fieldname: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -33616,15 +34832,15 @@ entities: type: string datafile: api_fieldname: datafile - description: The firmware image file URL + description: The firmware image file URL. entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 + example: http://bucket.com/myimage.elf type: string datafile_checksum: api_fieldname: datafile_checksum description: The checksum (sha256) generated for the datafile. entity_fieldname: datafile_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e type: string datafile_size: api_fieldname: datafile_size @@ -33637,6 +34853,7 @@ entities: description: The description of the object. entity_fieldname: description example: a description + format: free text maxLength: 2000 type: string etag: @@ -33649,18 +34866,21 @@ entities: api_fieldname: id description: The firmware image ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name description: The firmware image name. entity_fieldname: name + format: free text maxLength: 128 type: string object: api_fieldname: object description: 'Entity name: always ''firmware-image''.' entity_fieldname: object + example: firmware-image type: string updated_at: api_fieldname: updated_at @@ -33671,10 +34891,148 @@ entities: type: string - _key: '400' description: Bad Request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Firmware image can't be found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -33706,15 +35064,49 @@ entities: type: string - _key: datafile_size api_fieldname: datafile_size - description: The size of the datafile in bytes + description: The size of the firmware manifest in bytes. format: int64 readOnly: true required: false type: integer - _key: datafile_url api_fieldname: datafile - description: The URL of the firmware manifest binary - example: http://example.com/12345678901234567890123456789012 + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + example: http://bucket.com/mymanifest.manifest + format: uri + readOnly: true + required: false + type: string + - _key: delivered_payload_digest + api_fieldname: delivered_payload_digest + description: Digest (SHA256, hex-encoded) of the payload to deliver to the device. + example: c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc + format: hex + readOnly: true + required: false + type: string + - _key: delivered_payload_size + api_fieldname: delivered_payload_size + description: The size in bytes of the payload to deliver to the device. + format: int64 + readOnly: true + required: false + type: integer + - _key: delivered_payload_type + api_fieldname: delivered_payload_type + description: Type of the payload to deliver to the device (full or delta image). + enum: + - full + - delta + enum_reference: firmware_manifest_delivered_payload_type_enum + readOnly: true + required: false + type: string + - _key: delivered_payload_url + api_fieldname: delivered_payload_url + description: The URL of the payload to deliver to the device. + example: http://bucket.com/myimage.elf + format: uri readOnly: true required: false type: string @@ -33722,14 +35114,24 @@ entities: api_fieldname: description description: The description of the firmware manifest. example: '' + format: free text maxLength: 2000 readOnly: false required: false type: string - _key: device_class api_fieldname: device_class - description: The class of the device. - example: 00000000-0000-0000-0000-000000000000 + description: The device class ID. + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid + readOnly: true + required: false + type: string + - _key: device_vendor + api_fieldname: device_vendor + description: The device vendor ID. + example: 5d645eae-c231-5a89-9764-2e655cd94fa8 + format: uuid readOnly: true required: false type: string @@ -33737,23 +35139,54 @@ entities: api_fieldname: id description: The firmware manifest ID. example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' readOnly: false required: true type: string - _key: key_table_url api_fieldname: key_table description: The key table of pre-shared keys for devices. - example: http://example.com + example: http://example.com/key-table format: uri readOnly: true required: false type: string + - _key: manifest_schema_version + api_fieldname: manifest_schema_version + description: Version of the manifest schema (1 or 3). + enum: + - '1' + - '3' + enum_reference: firmware_manifest_schema_version_enum + readOnly: true + required: false + type: string - _key: name api_fieldname: name - description: The name of the object. - example: default_object_name + description: The name of the manifest. + example: manifest_name + format: free text maxLength: 128 readOnly: false + required: true + type: string + - _key: parsed_raw_manifest + api_fieldname: parsed_raw_manifest + description: 'Raw manifest in JSON format, parsed from ASN.1 DER encoding. + + Fields may change. Backwards compatibility is not guaranteed. + + Recommended for debugging only. + + ' + readOnly: true + required: false + type: object + - _key: precursor_payload_digest + api_fieldname: precursor_payload_digest + description: Digest (SHA256, hex-encoded) of the currently installed payload. + example: 54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f + readOnly: true required: false type: string - _key: timestamp @@ -33764,6 +35197,14 @@ entities: readOnly: true required: false type: string + - _key: update_priority + api_fieldname: update_priority + description: Update priority, passed to the application callback when an update + is performed. Allows the application to make application-specific decisions. + format: int64 + readOnly: true + required: false + type: integer - _key: updated_at api_fieldname: updated_at description: The time the entity was updated. @@ -33786,7 +35227,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ - -H ''Authorization: '' \ + -H ''Authorization: Bearer '' \ -H ''Content-Type: multipart/form-data'' \ @@ -33808,10 +35249,19 @@ entities: - filter - created_at - updated_at + - manifest_schema_version - datafile_size + - delivered_payload_url + - delivered_payload_size + - delivered_payload_digest + - delivered_payload_type + - precursor_payload_digest - device_class + - device_vendor + - update_priority - id - timestamp + - parsed_raw_manifest - datafile_url - key_table_url field_renames: @@ -33825,6 +35275,7 @@ entities: description: The description of the firmware manifest. entity_fieldname: description example: '' + format: free text in: stream maxLength: 2000 parameter_fieldname: description @@ -33833,7 +35284,7 @@ entities: - _key: firmware_manifest_file api_fieldname: datafile description: The manifest file to create. The API gateway enforces the account-specific - file size. + file size. File name must not exceed 100 characters. entity_fieldname: firmware_manifest_file external_param: true in: stream @@ -33844,7 +35295,7 @@ entities: - _key: key_table_file api_fieldname: key_table description: The key table of pre-shared keys for devices. The table is generated - by the manifest tool. + by the manifest tool. File name must not exceed 100 characters. entity_fieldname: key_table_file external_param: true in: stream @@ -33854,13 +35305,14 @@ entities: type: file - _key: name api_fieldname: name - description: The name of the object. + description: The name of the manifest. entity_fieldname: name - example: default_object_name + example: manifest_name + format: free text in: stream maxLength: 128 parameter_fieldname: name - required: false + required: true type: string group_id: Device_Update method: post @@ -33893,28 +35345,68 @@ entities: type: string datafile: api_fieldname: datafile - description: The URL of the firmware manifest binary + description: The URL of the ASN.1 DER-encoded firmware manifest binary. entity_fieldname: datafile_url - example: http://example.com/12345678901234567890123456789012 + example: http://bucket.com/mymanifest.manifest + format: uri type: string datafile_size: api_fieldname: datafile_size - description: The size of the datafile in bytes + description: The size of the firmware manifest in bytes. entity_fieldname: datafile_size format: int64 type: integer + delivered_payload_digest: + api_fieldname: delivered_payload_digest + description: Digest (SHA256, hex-encoded) of the payload to deliver to the + device. + entity_fieldname: delivered_payload_digest + example: c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc + format: hex + type: string + delivered_payload_size: + api_fieldname: delivered_payload_size + description: The size in bytes of the payload to deliver to the device. + entity_fieldname: delivered_payload_size + format: int64 + type: integer + delivered_payload_type: + api_fieldname: delivered_payload_type + description: Type of the payload to deliver to the device (full or delta + image). + entity_fieldname: delivered_payload_type + enum: + - full + - delta + type: string + delivered_payload_url: + api_fieldname: delivered_payload_url + description: The URL of the payload to deliver to the device. + entity_fieldname: delivered_payload_url + example: http://bucket.com/myimage.elf + format: uri + type: string description: api_fieldname: description description: The description of the firmware manifest. entity_fieldname: description example: '' + format: free text maxLength: 2000 type: string device_class: api_fieldname: device_class - description: The class of the device. + description: The device class ID. entity_fieldname: device_class - example: 00000000-0000-0000-0000-000000000000 + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid + type: string + device_vendor: + api_fieldname: device_vendor + description: The device vendor ID. + entity_fieldname: device_vendor + example: 5d645eae-c231-5a89-9764-2e655cd94fa8 + format: uuid type: string etag: api_fieldname: etag @@ -33927,25 +35419,53 @@ entities: description: The firmware manifest ID. entity_fieldname: id example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' type: string key_table: api_fieldname: key_table description: The key table of pre-shared keys for devices. entity_fieldname: key_table_url - example: http://example.com + example: http://example.com/key-table format: uri type: string + manifest_schema_version: + api_fieldname: manifest_schema_version + description: Version of the manifest schema (1 or 3). + entity_fieldname: manifest_schema_version + enum: + - '1' + - '3' + type: string name: api_fieldname: name - description: The name of the object. + description: The name of the manifest. entity_fieldname: name - example: default_object_name + example: manifest_name + format: free text maxLength: 128 type: string object: api_fieldname: object description: 'Entity name: always ''firmware-manifest''.' entity_fieldname: object + example: firmware-manifest + type: string + parsed_raw_manifest: + api_fieldname: parsed_raw_manifest + description: 'Raw manifest in JSON format, parsed from ASN.1 DER encoding. + + Fields may change. Backwards compatibility is not guaranteed. + + Recommended for debugging only. + + ' + entity_fieldname: parsed_raw_manifest + type: object + precursor_payload_digest: + api_fieldname: precursor_payload_digest + description: Digest (SHA256, hex-encoded) of the currently installed payload. + entity_fieldname: precursor_payload_digest + example: 54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f type: string timestamp: api_fieldname: timestamp @@ -33954,6 +35474,14 @@ entities: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + update_priority: + api_fieldname: update_priority + description: Update priority, passed to the application callback when an + update is performed. Allows the application to make application-specific + decisions. + entity_fieldname: update_priority + format: int64 + type: integer updated_at: api_fieldname: updated_at description: The time the entity was updated. @@ -33966,10 +35494,148 @@ entities: did not validate and/or the manifest uploaded exceeded 2 KB in size. ' + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '403' description: Forbidden. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -33988,10 +35654,10 @@ entities: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -34013,10 +35679,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: manifest_id parameter_fieldname: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -34034,10 +35699,148 @@ entities: description: Firmware manifest deleted. - _key: '400' description: Bad Request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Firmware manifest not found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -34057,7 +35860,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -34208,21 +36011,51 @@ entities: format: date-time type: string datafile: - description: The URL of the firmware manifest binary - example: http://example.com/12345678901234567890123456789012 + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + example: http://bucket.com/mymanifest.manifest + format: uri type: string datafile_size: - description: The size of the datafile in bytes + description: The size of the firmware manifest in bytes. format: int64 type: integer + delivered_payload_digest: + description: Digest (SHA256, hex-encoded) of the payload to deliver + to the device. + example: c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc + format: hex + type: string + delivered_payload_size: + description: The size in bytes of the payload to deliver to the device. + format: int64 + type: integer + delivered_payload_type: + description: Type of the payload to deliver to the device (full or delta + image). + enum: + - full + - delta + type: string + delivered_payload_url: + description: The URL of the payload to deliver to the device. + example: http://bucket.com/myimage.elf + format: uri + type: string description: description: The description of the firmware manifest. example: '' + format: free text maxLength: 2000 type: string device_class: - description: The class of the device. - example: 00000000-0000-0000-0000-000000000000 + description: The device class ID. + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid + type: string + device_vendor: + description: The device vendor ID. + example: 5d645eae-c231-5a89-9764-2e655cd94fa8 + format: uuid type: string etag: api_fieldname: etag @@ -34233,25 +36066,54 @@ entities: id: description: The firmware manifest ID. example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' type: string key_table: description: The key table of pre-shared keys for devices. - example: http://example.com + example: http://example.com/key-table format: uri type: string + manifest_schema_version: + description: Version of the manifest schema (1 or 3). + enum: + - '1' + - '3' + type: string name: - description: The name of the object. - example: default_object_name + description: The name of the manifest. + example: manifest_name + format: free text maxLength: 128 type: string object: description: 'Entity name: always ''firmware-manifest''.' + example: firmware-manifest + type: string + parsed_raw_manifest: + description: 'Raw manifest in JSON format, parsed from ASN.1 DER encoding. + + Fields may change. Backwards compatibility is not guaranteed. + + Recommended for debugging only. + + ' + type: object + precursor_payload_digest: + description: Digest (SHA256, hex-encoded) of the currently installed + payload. + example: 54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f type: string timestamp: description: The firmware manifest version as a timestamp. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + update_priority: + description: Update priority, passed to the application callback when + an update is performed. Allows the application to make application-specific + decisions. + format: int64 + type: integer updated_at: api_fieldname: updated_at description: The time the entity was updated. @@ -34273,6 +36135,7 @@ entities: api_fieldname: object description: 'Entity name: always ''list''.' entity_fieldname: object + example: list type: string - _key: order api_fieldname: order @@ -34291,10 +36154,148 @@ entities: type: integer - _key: '400' description: Bad Request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Unable to find content. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -34357,10 +36358,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -34372,11 +36373,20 @@ entities: - filter - created_at - updated_at + - manifest_schema_version - datafile_size + - delivered_payload_url + - delivered_payload_size + - delivered_payload_digest + - delivered_payload_type + - precursor_payload_digest - description - device_class + - device_vendor + - update_priority - name - timestamp + - parsed_raw_manifest - datafile_url - key_table_url field_renames: @@ -34392,6 +36402,7 @@ entities: example: '12345678901234567890123456789012' in: path parameter_fieldname: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -34421,28 +36432,68 @@ entities: type: string datafile: api_fieldname: datafile - description: The URL of the firmware manifest binary + description: The URL of the ASN.1 DER-encoded firmware manifest binary. entity_fieldname: datafile_url - example: http://example.com/12345678901234567890123456789012 + example: http://bucket.com/mymanifest.manifest + format: uri type: string datafile_size: api_fieldname: datafile_size - description: The size of the datafile in bytes + description: The size of the firmware manifest in bytes. entity_fieldname: datafile_size format: int64 type: integer + delivered_payload_digest: + api_fieldname: delivered_payload_digest + description: Digest (SHA256, hex-encoded) of the payload to deliver to the + device. + entity_fieldname: delivered_payload_digest + example: c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc + format: hex + type: string + delivered_payload_size: + api_fieldname: delivered_payload_size + description: The size in bytes of the payload to deliver to the device. + entity_fieldname: delivered_payload_size + format: int64 + type: integer + delivered_payload_type: + api_fieldname: delivered_payload_type + description: Type of the payload to deliver to the device (full or delta + image). + entity_fieldname: delivered_payload_type + enum: + - full + - delta + type: string + delivered_payload_url: + api_fieldname: delivered_payload_url + description: The URL of the payload to deliver to the device. + entity_fieldname: delivered_payload_url + example: http://bucket.com/myimage.elf + format: uri + type: string description: api_fieldname: description description: The description of the firmware manifest. entity_fieldname: description example: '' + format: free text maxLength: 2000 type: string device_class: api_fieldname: device_class - description: The class of the device. + description: The device class ID. entity_fieldname: device_class - example: 00000000-0000-0000-0000-000000000000 + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid + type: string + device_vendor: + api_fieldname: device_vendor + description: The device vendor ID. + entity_fieldname: device_vendor + example: 5d645eae-c231-5a89-9764-2e655cd94fa8 + format: uuid type: string etag: api_fieldname: etag @@ -34455,25 +36506,53 @@ entities: description: The firmware manifest ID. entity_fieldname: id example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' type: string key_table: api_fieldname: key_table description: The key table of pre-shared keys for devices. entity_fieldname: key_table_url - example: http://example.com + example: http://example.com/key-table format: uri type: string + manifest_schema_version: + api_fieldname: manifest_schema_version + description: Version of the manifest schema (1 or 3). + entity_fieldname: manifest_schema_version + enum: + - '1' + - '3' + type: string name: api_fieldname: name - description: The name of the object. + description: The name of the manifest. entity_fieldname: name - example: default_object_name + example: manifest_name + format: free text maxLength: 128 type: string object: api_fieldname: object description: 'Entity name: always ''firmware-manifest''.' entity_fieldname: object + example: firmware-manifest + type: string + parsed_raw_manifest: + api_fieldname: parsed_raw_manifest + description: 'Raw manifest in JSON format, parsed from ASN.1 DER encoding. + + Fields may change. Backwards compatibility is not guaranteed. + + Recommended for debugging only. + + ' + entity_fieldname: parsed_raw_manifest + type: object + precursor_payload_digest: + api_fieldname: precursor_payload_digest + description: Digest (SHA256, hex-encoded) of the currently installed payload. + entity_fieldname: precursor_payload_digest + example: 54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f type: string timestamp: api_fieldname: timestamp @@ -34482,6 +36561,14 @@ entities: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + update_priority: + api_fieldname: update_priority + description: Update priority, passed to the application callback when an + update is performed. Allows the application to make application-specific + decisions. + entity_fieldname: update_priority + format: int64 + type: integer updated_at: api_fieldname: updated_at description: The time the entity was updated. @@ -34491,10 +36578,148 @@ entities: type: string - _key: '400' description: Bad request. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Firmware manifest can't be found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -34570,6 +36795,152 @@ entities: readOnly: false required: true type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity provider's + API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign ID tokens. + PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity provider's + API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication request. + When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results in + the transmission of clear-text credentials, the client must use the POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + readOnly: false + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -34633,7 +37004,9 @@ entities: group_id: Accounts methods: - _key: create - description: Create a new identity provider. + description: 'Create a new identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -34675,7 +37048,7 @@ entities: api_fieldname: type description: Identity provider type. entity_fieldname: identity_provider_type - enum: &id005 + enum: &id004 - NATIVE - MBED - SAML2 @@ -34698,12 +37071,10 @@ entities: api_fieldname: oidc_attributes description: Represents OIDC specific attributes. entity_fieldname: oidc_attributes - external_param: true foreign_key: entity: oidc_request group: Accounts in: body - name: oidc_attributes parameter_fieldname: oidc_attributes properties: - _key: authorization_endpoint @@ -34727,30 +37098,37 @@ entities: x-nullable: true - _key: email_verified description: Custom claim name for 'email_verified'. + example: email_verified type: string x-nullable: true - _key: family_name description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - _key: given_name description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - _key: name description: Custom claim name for 'name'. + example: name type: string x-nullable: true - _key: phone_number description: Custom claim name for 'phone_number'. + example: phone_number type: string x-nullable: true - _key: sub description: Custom claim name for 'sub'. + example: sub type: string x-nullable: true - _key: updated_at description: Custom claim name for 'updated_at'. + example: updated_at type: string x-nullable: true - _key: updated_at_pattern @@ -34823,7 +37201,7 @@ entities: description: One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode. - enum: + enum: &id005 - POST - GET type: string @@ -34837,7 +37215,6 @@ entities: type: string x-nullable: true required: false - schema_param: true type: object - _key: saml2_attributes api_fieldname: saml2_attributes @@ -34973,6 +37350,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -35199,7 +37726,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: Delete an identity provider by ID. + description: 'Delete an identity provider by ID. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -35329,7 +37858,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -35385,7 +37914,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete_service_provider_certificate - description: Delete a service provider certificate. + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -35397,6 +37928,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - account_id - is_default - identity_provider_type @@ -35489,6 +38021,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -35659,7 +38341,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -35715,7 +38397,9 @@ entities: x_deprecation: null x_filter: {} - _key: generate_service_provider_certificate - description: Generate a new service provider certificate. + description: 'Generate a new service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -35727,6 +38411,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - account_id - is_default - identity_provider_type @@ -35855,6 +38540,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -36074,7 +38909,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -36130,7 +38965,9 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: Retrieve identity providers in an array. + description: 'Retrieve an array of identity providers. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -36145,7 +38982,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -36182,7 +39019,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -36220,7 +39057,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -36271,6 +39108,154 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + description: Represents OIDC specific attributes. + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by + the Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access + to identity provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to + sign ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request + results in the transmission of clear-text credentials, the client + must use the POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels + in the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes description: Represents SAML2 specific attributes in responses. properties: @@ -36485,7 +39470,9 @@ entities: x_deprecation: null x_filter: {} - _key: read - description: Retrieve by ID. + description: 'Retrieve an identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -36497,6 +39484,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - account_id - is_default - identity_provider_type @@ -36585,6 +39573,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -36755,7 +39893,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -36807,11 +39945,13 @@ entities: self: true type: identity_provider return_type: identity_provider - summary: Get identity provider by ID. + summary: Get identity provider. x_deprecation: null x_filter: {} - _key: refresh_tokens - description: Refreshes an OIDC IdP's signing keys. + description: 'Refreshes an OIDC IdP''s signing keys. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -36823,6 +39963,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - account_id - is_default - identity_provider_type @@ -36915,6 +40056,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -37133,7 +40424,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -37189,7 +40480,9 @@ entities: x_deprecation: null x_filter: {} - _key: update - description: Update an existing identity provider. + description: 'Update an existing identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -37240,7 +40533,7 @@ entities: api_fieldname: type description: Identity provider type. entity_fieldname: identity_provider_type - enum: *id005 + enum: *id004 enum_reference: identity_provider_type_enum in: body parameter_fieldname: type @@ -37259,12 +40552,10 @@ entities: api_fieldname: oidc_attributes description: Represents OIDC specific attributes. entity_fieldname: oidc_attributes - external_param: true foreign_key: entity: oidc_request group: Accounts in: body - name: oidc_attributes parameter_fieldname: oidc_attributes properties: - _key: authorization_endpoint @@ -37288,30 +40579,37 @@ entities: x-nullable: true - _key: email_verified description: Custom claim name for 'email_verified'. + example: email_verified type: string x-nullable: true - _key: family_name description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - _key: given_name description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - _key: name description: Custom claim name for 'name'. + example: name type: string x-nullable: true - _key: phone_number description: Custom claim name for 'phone_number'. + example: phone_number type: string x-nullable: true - _key: sub description: Custom claim name for 'sub'. + example: sub type: string x-nullable: true - _key: updated_at description: Custom claim name for 'updated_at'. + example: updated_at type: string x-nullable: true - _key: updated_at_pattern @@ -37384,9 +40682,7 @@ entities: description: One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode. - enum: - - POST - - GET + enum: *id005 type: string - _key: token_response_path description: Path to the standard data in the token response. Levels in the @@ -37398,7 +40694,6 @@ entities: type: string x-nullable: true required: false - schema_param: true type: object - _key: saml2_attributes api_fieldname: saml2_attributes @@ -37525,6 +40820,156 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -37743,7 +41188,7 @@ entities: - type type: object - _key: '404' - description: Identity provider not found. + description: An identity provider not found. schema: properties: - _key: code @@ -37862,6 +41307,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: light_theme_color_reference_enum in: path is_primary_key: true @@ -37884,6 +41337,8 @@ entities: - _key: delete description: 'Resets the branding color to its light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -37892,7 +41347,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -37924,6 +41379,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: light_theme_color_reference_enum in: path is_primary_key: true @@ -38105,7 +41568,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -38150,7 +41613,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -38161,7 +41624,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_color + entity: subtenant_light_theme_color group: Branding properties: - _key: color @@ -38195,6 +41658,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color is_primary_key: true type: string - _key: updated_at @@ -38363,7 +41834,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -38449,6 +41920,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: dark_theme_color_reference_enum in: path is_primary_key: true @@ -38626,6 +42105,8 @@ entities: operation_id: bulkSetLightColors description: 'Update light theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -38634,7 +42115,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -38743,6 +42224,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: dark_theme_color_reference_enum in: path is_primary_key: true @@ -38979,6 +42468,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -39040,6 +42532,8 @@ entities: - _key: delete description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -39048,7 +42542,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -39068,6 +42562,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -39280,7 +42777,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -39325,7 +42822,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -39336,7 +42833,7 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_image + entity: subtenant_light_theme_image group: Branding properties: - _key: object @@ -39353,6 +42850,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -39560,7 +43060,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -39618,6 +43118,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -39830,8 +43333,10 @@ entities: additional_operations: - notes: The multipart request is more generic and better supported by SDKs. operation_id: uploadLightImage - description: Upload a new account branding image as form data in the light theme + description: 'Upload a new account branding image as form data in the light theme in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -39904,6 +43409,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -40210,10 +43718,18 @@ entities: - _key: login_profile_type api_fieldname: type fields: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + example: fed/user_007 + readOnly: true + required: false + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. + example: 01619571f3c00242ac12000600000000 readOnly: false required: false type: string @@ -40226,6 +43742,7 @@ entities: - SAML2 - OIDC enum_reference: login_profile_type_enum + example: NATIVE readOnly: true required: false type: string @@ -40233,6 +43750,7 @@ entities: _override: true api_fieldname: name description: Name of the identity provider. + example: Pelion readOnly: false required: false type: string @@ -40273,30 +43791,37 @@ entities: x-nullable: true - _key: email_verified description: Custom claim name for 'email_verified'. + example: email_verified type: string x-nullable: true - _key: family_name description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - _key: given_name description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - _key: name description: Custom claim name for 'name'. + example: name type: string x-nullable: true - _key: phone_number description: Custom claim name for 'phone_number'. + example: phone_number type: string x-nullable: true - _key: sub description: Custom claim name for 'sub'. + example: sub type: string x-nullable: true - _key: updated_at description: Custom claim name for 'updated_at'. + example: updated_at type: string x-nullable: true - _key: updated_at_pattern @@ -40443,6 +43968,7 @@ entities: - _key: email_verified api_fieldname: email_verified description: Custom claim name for 'email_verified'. + example: email_verified readOnly: true required: false type: string @@ -40450,6 +43976,7 @@ entities: - _key: family_name api_fieldname: family_name description: Custom claim name for 'family_name'. + example: family_name readOnly: true required: false type: string @@ -40457,6 +43984,7 @@ entities: - _key: given_name api_fieldname: given_name description: Custom claim name for 'given_name'. + example: given_name readOnly: true required: false type: string @@ -40464,6 +43992,7 @@ entities: - _key: name api_fieldname: name description: Custom claim name for 'name'. + example: name readOnly: true required: false type: string @@ -40471,6 +44000,7 @@ entities: - _key: phone_number api_fieldname: phone_number description: Custom claim name for 'phone_number'. + example: phone_number readOnly: true required: false type: string @@ -40478,6 +44008,7 @@ entities: - _key: sub api_fieldname: sub description: Custom claim name for 'sub'. + example: sub readOnly: true required: false type: string @@ -40485,6 +44016,7 @@ entities: - _key: updated_at api_fieldname: updated_at description: Custom claim name for 'updated_at'. + example: updated_at readOnly: true required: false type: string @@ -40641,6 +44173,19 @@ entities: readOnly: true required: false type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + example: 0 + format: int32 + readOnly: true + required: false + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -40684,7 +44229,7 @@ entities: group_id: Accounts methods: - _key: api_keys - description: 'Manage policy groups. + description: 'Retrieve an array of API keys associated with a policy group. **Example:** @@ -40694,7 +44239,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -40709,7 +44254,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -40756,7 +44301,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -40792,7 +44337,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -40915,8 +44460,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -41091,12 +44636,18 @@ entities: self: false type: api_key return_type: paginated_response(api_key) - summary: Get the API keys of a group. - x_deprecation: null + summary: Get the API keys of a policy group. + x_deprecation: + comment: This endpoint is deprecated, GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: create description: 'Create a new group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -41104,7 +44655,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' -d ''{"name": "MyGroup1"}'' @@ -41119,6 +44670,7 @@ entities: - updated_at - account_id - user_count + - application_count - apikey_count field_renames: [] fields: @@ -41136,6 +44688,16 @@ entities: items: type: string type: array + x-deprecation: + comment: This field is deprecated, use 'applications' + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: applications + description: An array of applicationIDs. + items: + type: string + type: array - _key: users description: An array of user IDs. items: @@ -41187,6 +44749,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -41447,6 +45021,8 @@ entities: - _key: delete description: 'Delete a group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -41455,7 +45031,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -41641,7 +45217,7 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve all group information. + description: 'Retrieve an array of policy groups. **Example:** @@ -41650,7 +45226,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -41666,7 +45242,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -41703,7 +45279,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -41741,7 +45317,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -41771,6 +45347,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -41844,8 +45430,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -41972,13 +45558,13 @@ entities: self: true type: policy_group return_type: paginated_response(policy_group) - summary: Get all group information. + summary: Get policy groups. x_deprecation: null x_filter: name: - eq - _key: read - description: 'Retrieve general information about a group. + description: 'Retrieve a policy group. **Example:** @@ -41988,7 +45574,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -42001,6 +45587,7 @@ entities: - account_id - name - user_count + - application_count - apikey_count field_renames: [] fields: @@ -42047,6 +45634,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -42253,12 +45852,14 @@ entities: self: true type: policy_group return_type: policy_group - summary: Get group information. + summary: Get a policy group. x_deprecation: null x_filter: {} - _key: update description: 'Update a group name. + Note: This endpoint is restricted to administrators. + **Example:** @@ -42267,7 +45868,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -42283,6 +45884,7 @@ entities: - updated_at - account_id - user_count + - application_count - apikey_count field_renames: [] fields: @@ -42339,6 +45941,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -42597,7 +46211,9 @@ entities: x_deprecation: null x_filter: {} - _key: users - description: 'Retrieve users of a group with details. + description: 'Retrieve an array of users associated with a policy group. + + Note: This endpoint is restricted to administrators. **Example:** @@ -42607,7 +46223,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -42625,7 +46241,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -42672,7 +46288,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -42708,7 +46324,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -42922,11 +46538,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -42934,6 +46558,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -42945,6 +46570,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -43045,8 +46671,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -43221,7 +46847,7 @@ entities: self: false type: user return_type: paginated_response(user) - summary: Get users of a group. + summary: Get users of a policy group. x_deprecation: null x_filter: status: @@ -43277,7 +46903,7 @@ entities: \ key cannot be overwritten, but needs\nto be deleted first in the case of re-setting\ \ a PSK for an endpoint.\n\n**Note**: The PSK APIs are available only to accounts\ \ that have this feature enabled.\n\n**Example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys\ - \ \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\"\ + \ \\\n-H \"Authorization: Bearer \" \\\n-H \"content-type: application/json\"\ \ \\\n -d '{ \"endpoint_name\": \"my-endpoint-0001\", \"secret_hex\": \"\ 4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a\" }'\n```" drop_fields: @@ -43371,7 +46997,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -43440,7 +47066,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -43483,11 +47109,15 @@ entities: type: string - _key: limit api_fieldname: limit - description: The number of entries per page. + default: 50 + description: The number of objects to retrieve on a page (2-1000). Values outside + the range are set to the closest limit. entity_fieldname: limit example: 50 external_param: true in: query + maximum: 1000 + minimum: 2 name: limit parameter_fieldname: limit required: false @@ -43617,7 +47247,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -43716,7 +47346,7 @@ entities: - PreSharedKey - PreSharedKeyWithoutSecret tags: - - PreSharedKeys + - Security and identity - pre-shared keys - _key: saml2_request field_renames: [] fields: @@ -43816,7 +47446,7 @@ entities: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -44013,7 +47643,7 @@ entities: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -44200,7 +47830,7 @@ entities: swagger_models: - ServerCredentialsResponseData tags: - - Service security - server credentials + - Security and identity - server credentials - _key: subtenant_api_key field_renames: [] fields: @@ -44310,6 +47940,8 @@ entities: description: 'Create a new API key. There is no default value for the owner ID, and it must be from the same account where the new API key is created. + Note: This endpoint is restricted to administrators. + **Example:** @@ -44318,7 +47950,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -44366,7 +47998,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: owner api_fieldname: owner @@ -44478,7 +48110,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: object api_fieldname: object @@ -44525,7 +48157,7 @@ entities: - object type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data, for example, missing API key name. schema: properties: - _key: code @@ -44722,11 +48354,17 @@ entities: type: subtenant_api_key return_type: subtenant_api_key summary: Create a new API key. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: delete description: 'Delete an API key. + Note: This endpoint is restricted to administrators. + **Example:** @@ -44735,7 +48373,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -44928,10 +48566,16 @@ entities: type: subtenant_api_key return_type: subtenant_api_key summary: Delete the API key. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: policy_groups - description: 'Retrieve groups associated with the API key. + description: 'Retrieve an array of policy groups associated with an API key. + + Note: This endpoint is restricted to administrators. **Example:** @@ -44941,7 +48585,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -44966,7 +48610,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -45013,7 +48657,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -45049,7 +48693,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -45079,6 +48723,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -45152,8 +48806,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -45328,12 +48982,17 @@ entities: self: false type: subtenant_policy_group return_type: paginated_response(subtenant_policy_group) - summary: Get groups associated with the API key. - x_deprecation: null + summary: Get policy groups of an API key. + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: read - description: "Retrieve API key details.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}\ - \ \\\n -H 'Authorization: Bearer '\n```" + description: "Retrieve details of an API key.\nNote: This endpoint is restricted\ + \ to administrators.\n\n**Example:**\n```\ncurl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}\ + \ \\\n -H 'Authorization: Bearer '\n```" drop_fields: - object - etag @@ -45457,7 +49116,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: object api_fieldname: object @@ -45653,11 +49312,17 @@ entities: type: subtenant_api_key return_type: subtenant_api_key summary: Get API key details. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: update description: 'Update API key details. + Note: This endpoint is restricted to administrators. + **Example:** @@ -45666,7 +49331,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -45723,7 +49388,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: owner api_fieldname: owner @@ -45833,7 +49498,7 @@ entities: in: body maxLength: 100 parameter_fieldname: name - required: true + required: false type: string - _key: object api_fieldname: object @@ -45880,7 +49545,7 @@ entities: - object type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data, for example, invalid API key name. schema: properties: - _key: code @@ -46077,7 +49742,11 @@ entities: type: subtenant_api_key return_type: subtenant_api_key summary: Update API key details. - x_deprecation: null + x_deprecation: + comment: This endpoint is deprecated. Use PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} primary_key_field: id swagger_models: @@ -46121,6 +49790,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true @@ -46141,8 +49818,9 @@ entities: group_id: Branding methods: - _key: delete - description: 'Resets the branding color of a tenant account to its dark theme - default. + description: 'Resets the branding color to its dark theme default. + + Note: This endpoint is restricted to administrators. **Example:** @@ -46152,7 +49830,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -46194,6 +49872,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true @@ -46368,6 +50054,8 @@ entities: - _key: read description: 'Retrieve the requested dark theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -46376,7 +50064,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -46472,6 +50160,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: light_theme_color_reference_enum in: path is_primary_key: true @@ -46647,7 +50343,9 @@ entities: - notes: Bulk operation is not appriate for SDK's entity model, this functionality is covered by the update method. operation_id: bulkSetAccountDarkColors - description: 'Update a dark theme branding color of a tenant account. + description: 'Update a dark theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** @@ -46657,7 +50355,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -46776,6 +50474,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: light_theme_color_reference_enum in: path is_primary_key: true @@ -47011,6 +50717,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -47072,6 +50781,8 @@ entities: - _key: delete description: 'Revert an account branding image to dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -47080,7 +50791,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -47110,6 +50821,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -47315,6 +51029,8 @@ entities: - _key: read description: 'Retrieve metadata of one account dark theme branding image. + Note: This endpoint is restricted to administrators. + **Example:** @@ -47323,7 +51039,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -47391,6 +51107,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -47604,8 +51323,10 @@ entities: - notes: The multipart endpoint is used by the SDKs as it offers the same functionality as the standard upload endpoint. operation_id: uploadAccountDarkImage - description: Upload a new account dark theme branding image as form data in PNG + description: 'Upload a new account dark theme branding image as form data in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -47688,6 +51409,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -48002,6 +51726,154 @@ entities: readOnly: false required: true type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity provider's + API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign ID tokens. + PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity provider's + API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication request. + When not configured otherwise, the default scopes are ['openid profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results in + the transmission of clear-text credentials, the client must use the POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + readOnly: false + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -48069,7 +51941,9 @@ entities: group_id: Accounts methods: - _key: create - description: Create a new identity provider. + description: 'Create a new identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -48127,12 +52001,10 @@ entities: api_fieldname: oidc_attributes description: Represents OIDC specific attributes. entity_fieldname: oidc_attributes - external_param: true foreign_key: entity: oidc_request group: Accounts in: body - name: oidc_attributes parameter_fieldname: oidc_attributes properties: - _key: authorization_endpoint @@ -48156,30 +52028,37 @@ entities: x-nullable: true - _key: email_verified description: Custom claim name for 'email_verified'. + example: email_verified type: string x-nullable: true - _key: family_name description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - _key: given_name description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - _key: name description: Custom claim name for 'name'. + example: name type: string x-nullable: true - _key: phone_number description: Custom claim name for 'phone_number'. + example: phone_number type: string x-nullable: true - _key: sub description: Custom claim name for 'sub'. + example: sub type: string x-nullable: true - _key: updated_at description: Custom claim name for 'updated_at'. + example: updated_at type: string x-nullable: true - _key: updated_at_pattern @@ -48252,7 +52131,7 @@ entities: description: One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode. - enum: + enum: &id012 - POST - GET type: string @@ -48266,7 +52145,6 @@ entities: type: string x-nullable: true required: false - schema_param: true type: object - _key: saml2_attributes api_fieldname: saml2_attributes @@ -48316,7 +52194,7 @@ entities: api_fieldname: status description: Status of the identity provider. entity_fieldname: status - enum: &id012 + enum: &id013 - ACTIVE - SUSPENDED enum_reference: subtenant_identity_provider_status_enum @@ -48411,6 +52289,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -48696,7 +52725,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: Delete an identity provider by ID. + description: 'Delete an identity provider by ID. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -48834,7 +52865,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -48890,7 +52921,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete_service_provider_certificate - description: Delete a service provider certificate. + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -48902,6 +52935,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - is_default field_renames: [] fields: @@ -49009,6 +53043,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -49190,7 +53375,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -49246,7 +53431,9 @@ entities: x_deprecation: null x_filter: {} - _key: generate_service_provider_certificate - description: Generate a new service provider certificate. + description: 'Generate a new service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -49258,6 +53445,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - is_default field_renames: [] fields: @@ -49401,6 +53589,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -49631,7 +53970,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -49687,7 +54026,9 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: Retrieve identity providers in an array. + description: 'Retrieve an array of identity providers. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -49710,7 +54051,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -49747,7 +54088,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -49785,7 +54126,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -49841,6 +54182,154 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + description: Represents OIDC specific attributes. + foreign_key: + entity: oidc_request + group: Accounts + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by + the Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access + to identity provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to + sign ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request + results in the transmission of clear-text credentials, the client + must use the POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels + in the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: + - issuer + type: object - _key: saml2_attributes description: Represents SAML2 specific attributes in responses. properties: @@ -49936,8 +54425,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -50116,7 +54605,9 @@ entities: x_deprecation: null x_filter: {} - _key: read - description: Manage identity providers of a tenant account. + description: 'Retrieve an identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -50128,6 +54619,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - is_default field_renames: [] fields: @@ -50231,6 +54723,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -50412,7 +55055,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -50464,11 +55107,13 @@ entities: self: true type: subtenant_identity_provider return_type: subtenant_identity_provider - summary: Retrieve identity provider by ID. + summary: Get an identity provider. x_deprecation: null x_filter: {} - _key: refresh_tokens - description: Refreshes an OIDC IdP's signing keys. + description: 'Refresh an OIDC IdP''s signing keys. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -50480,6 +55125,7 @@ entities: - description - status - saml2_attributes + - oidc_attributes - is_default field_renames: [] fields: @@ -50587,6 +55233,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -50816,7 +55613,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -50868,11 +55665,13 @@ entities: self: true type: subtenant_identity_provider return_type: subtenant_identity_provider - summary: Refreshes the OIDC signing keys. + summary: Refresh the OIDC signing keys. x_deprecation: null x_filter: {} - _key: update - description: Update an existing identity provider. + description: 'Update an existing identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -50939,12 +55738,10 @@ entities: api_fieldname: oidc_attributes description: Represents OIDC specific attributes. entity_fieldname: oidc_attributes - external_param: true foreign_key: entity: oidc_request group: Accounts in: body - name: oidc_attributes parameter_fieldname: oidc_attributes properties: - _key: authorization_endpoint @@ -50968,30 +55765,37 @@ entities: x-nullable: true - _key: email_verified description: Custom claim name for 'email_verified'. + example: email_verified type: string x-nullable: true - _key: family_name description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - _key: given_name description: Custom claim name for 'given_name'. + example: given_name type: string x-nullable: true - _key: name description: Custom claim name for 'name'. + example: name type: string x-nullable: true - _key: phone_number description: Custom claim name for 'phone_number'. + example: phone_number type: string x-nullable: true - _key: sub description: Custom claim name for 'sub'. + example: sub type: string x-nullable: true - _key: updated_at description: Custom claim name for 'updated_at'. + example: updated_at type: string x-nullable: true - _key: updated_at_pattern @@ -51064,9 +55868,7 @@ entities: description: One way to obtain the access token. Since the request results in the transmission of clear-text credentials, the client must use the POST mode. - enum: - - POST - - GET + enum: *id012 type: string - _key: token_response_path description: Path to the standard data in the token response. Levels in the @@ -51078,7 +55880,6 @@ entities: type: string x-nullable: true required: false - schema_param: true type: object - _key: saml2_attributes api_fieldname: saml2_attributes @@ -51128,7 +55929,7 @@ entities: api_fieldname: status description: Status of the identity provider. entity_fieldname: status - enum: *id012 + enum: *id013 enum_reference: subtenant_identity_provider_status_enum in: body parameter_fieldname: status @@ -51214,6 +56015,157 @@ entities: enum: - identity-provider type: string + - _key: oidc_attributes + api_fieldname: oidc_attributes + description: Represents OIDC specific attributes. + entity_fieldname: oidc_attributes + foreign_key: + entity: oidc_request + group: Accounts + in: body + parameter_fieldname: oidc_attributes + properties: + - _key: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: auto_enrollment + description: For future use. + type: boolean + x-nullable: true + - _key: claim_mapping + description: Mapping for non-standard OIDC claim names. + foreign_key: + entity: oidc_request_claim_mapping + group: Accounts + properties: + - _key: email + description: Custom claim name for 'email'. + example: email_address + type: string + x-nullable: true + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + type: string + x-nullable: true + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name + type: string + x-nullable: true + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name + type: string + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name + type: string + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + type: string + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub + type: string + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + type: string + x-nullable: true + - _key: updated_at_pattern + description: Custom pattern for claim 'updated_at' as defined by the + Java SimpleDateFormat class. + example: yyyy-MM-dd'T'HH:mm:ssXXX + type: string + x-nullable: true + type: object + x-nullable: true + - _key: client_id + description: Client ID needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + type: string + x-nullable: true + - _key: end_session_endpoint + description: URL of the provider's end session endpoint. + type: string + x-nullable: true + - _key: issuer + description: Issuer of the identity provider. + type: string + - _key: jwks_uri + description: URL of the provider's JSON web key set document. + type: string + x-nullable: true + - _key: keys + description: Provider's public keys and key IDs used to sign ID tokens. + PEM-encoded. + items: + description: Represents provider's public key and key ID used to sign + ID tokens. PEM-encoded. + foreign_key: + entity: identity_provider_public_key + group: Accounts + properties: + - _key: key + description: The public key. + type: string + - _key: kid + description: The public key ID. + type: string + type: object + type: array + x-nullable: true + - _key: redirect_uri + description: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + type: string + x-nullable: true + - _key: revocation_endpoint + description: URL of the provider's token revocation endpoint. + type: string + x-nullable: true + - _key: scopes + description: Space-separated list of scopes sent in the authentication + request. When not configured otherwise, the default scopes are ['openid + profile email'](https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims). + example: openid email + type: string + - _key: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + type: string + x-nullable: true + - _key: token_request_mode + default: POST + description: One way to obtain the access token. Since the request results + in the transmission of clear-text credentials, the client must use the + POST mode. + enum: + - POST + - GET + type: string + - _key: token_response_path + description: Path to the standard data in the token response. Levels in + the JSON structure must be separated by '.' (dot) characters. + example: oidc.data + type: string + - _key: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + type: string + x-nullable: true + required: false + type: object - _key: saml2_attributes api_fieldname: saml2_attributes description: Represents SAML2 specific attributes in responses. @@ -51443,7 +56395,7 @@ entities: - type type: object - _key: '404' - description: Account or identity provider not found. + description: An account or identity provider not found. schema: properties: - _key: code @@ -51541,6 +56493,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_light_theme_color_reference_enum in: path is_primary_key: true @@ -51561,8 +56521,9 @@ entities: group_id: Branding methods: - _key: delete - description: 'Resets the branding color of a tenant account to its light theme - default. + description: 'Resets the branding color to its light theme default. + + Note: This endpoint is restricted to administrators. **Example:** @@ -51572,7 +56533,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -51597,7 +56558,7 @@ entities: api_fieldname: reference description: The name of the branding color. entity_fieldname: reference - enum: &id013 + enum: &id014 - error_color - primary - secondary @@ -51614,6 +56575,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_light_theme_color_reference_enum in: path is_primary_key: true @@ -51788,6 +56757,8 @@ entities: - _key: read description: 'Retrieve the requested light theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -51795,7 +56766,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -51822,7 +56793,7 @@ entities: api_fieldname: reference description: Color name. entity_fieldname: reference - enum: *id013 + enum: *id014 enum_reference: subtenant_light_theme_color_reference_enum in: path is_primary_key: true @@ -51891,6 +56862,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true @@ -52066,7 +57045,9 @@ entities: - notes: Bulk operation is not appriate for SDK's entity model, this functionality is covered by the update method. operation_id: bulkSetAccountLightColors - description: 'Update a light theme branding color of a tenant account. + description: 'Update a light theme branding color. + + Note: This endpoint is restricted to administrators. **Example:** @@ -52076,7 +57057,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -52115,7 +57096,7 @@ entities: api_fieldname: reference description: Color name. entity_fieldname: reference - enum: *id013 + enum: *id014 enum_reference: subtenant_light_theme_color_reference_enum in: path is_primary_key: true @@ -52195,6 +57176,14 @@ entities: - error_font_color - success_font_color - warning_font_color + - menu_background_color + - menu_text_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true @@ -52430,6 +57419,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -52491,13 +57483,15 @@ entities: - _key: delete description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. + **Example:** ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -52522,11 +57516,14 @@ entities: api_fieldname: reference description: Name of the branding images (icon or picture). entity_fieldname: reference - enum: &id014 + enum: &id015 - brand_logo_portrait - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -52732,6 +57729,8 @@ entities: - _key: read description: 'Retrieve metadata for one account light theme branding image. + Note: This endpoint is restricted to administrators. + **Example:** @@ -52740,7 +57739,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -52767,7 +57766,7 @@ entities: api_fieldname: reference description: Name of the image. entity_fieldname: reference - enum: *id014 + enum: *id015 enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true @@ -52808,6 +57807,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -53020,7 +58022,10 @@ entities: additional_operations: - notes: The multipart request is more generic and better supported by SDKs. operation_id: uploadAccountLightImage - description: Upload a new account branding image as form data in PNG or JPEG format. + description: 'Upload a new account branding image as form data in PNG or JPEG + format. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag @@ -53055,7 +58060,7 @@ entities: api_fieldname: reference description: Name of the image. entity_fieldname: reference - enum: *id014 + enum: *id015 enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true @@ -53103,6 +58108,9 @@ entities: - brand_logo_square - brand_logo_landscape - brand_logo_email + - app_logo_landscape + - app_logo_portrait + - app_logo_square - desktop_background_landscape - desktop_background_square - desktop_background_portrait @@ -53383,6 +58391,19 @@ entities: readOnly: true required: false type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + example: 0 + format: int32 + readOnly: true + required: false + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -53430,7 +58451,9 @@ entities: group_id: Accounts methods: - _key: api_keys - description: 'List the API keys of the group with details. + description: 'Retrieve an array of API keys associated with a policy group. + + Note: This endpoint is restricted to administrators. **Example:** @@ -53440,7 +58463,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -53465,7 +58488,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -53512,7 +58535,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -53548,7 +58571,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -53671,8 +58694,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -53847,12 +58870,18 @@ entities: self: false type: subtenant_api_key return_type: paginated_response(subtenant_api_key) - summary: Get API keys of a group. - x_deprecation: null + summary: Get API keys in a group. + x_deprecation: + comment: This endpoint is deprecated. Use GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] x_filter: {} - _key: create description: 'Create a new group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -53861,7 +58890,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -53877,6 +58906,7 @@ entities: - created_at - updated_at - user_count + - application_count - apikey_count field_renames: [] fields: @@ -53904,6 +58934,16 @@ entities: items: type: string type: array + x-deprecation: + comment: This field is deprecated, use 'applications' + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: applications + description: An array of applicationIDs. + items: + type: string + type: array - _key: users description: An array of user IDs. items: @@ -53955,6 +58995,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -54269,6 +59321,8 @@ entities: - _key: delete description: 'Delete a group. + Note: This endpoint is restricted to administrators. + **Example:** @@ -54277,7 +59331,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -54473,7 +59527,9 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve all group information. + description: 'Retrieve an array of policy groups. + + Note: This endpoint is restricted to administrators. **Example:** @@ -54483,7 +59539,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -54509,7 +59565,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -54546,7 +59602,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -54584,7 +59640,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -54614,6 +59670,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -54687,8 +59753,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -54863,13 +59929,15 @@ entities: self: true type: subtenant_policy_group return_type: paginated_response(subtenant_policy_group) - summary: Get all group information. + summary: Get policy groups. x_deprecation: null x_filter: name: - eq - _key: read - description: 'Retrieve general information about the group. + description: 'Retrieve policy group details. + + Note: This endpoint is restricted to administrators. **Example:** @@ -54879,7 +59947,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -54891,6 +59959,7 @@ entities: - updated_at - name - user_count + - application_count - apikey_count field_renames: [] fields: @@ -54947,6 +60016,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -55159,12 +60240,14 @@ entities: self: true type: subtenant_policy_group return_type: subtenant_policy_group - summary: Get group information. + summary: Get policy group. x_deprecation: null x_filter: {} - _key: update description: 'Update a group name. + Note: This endpoint is restricted to administrators. + **Example:** @@ -55173,7 +60256,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -55188,6 +60271,7 @@ entities: - created_at - updated_at - user_count + - application_count - apikey_count field_renames: [] fields: @@ -55254,6 +60338,18 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + api_fieldname: application_count + description: The number of applications in this group. + entity_fieldname: application_count + example: 0 + format: int32 + type: integer - _key: created_at api_fieldname: created_at description: Creation UTC time RFC3339. @@ -55518,7 +60614,9 @@ entities: x_deprecation: null x_filter: {} - _key: users - description: 'List a group''s users, with details. + description: 'Retrieve an array of users associated with a policy group. + + Note: This endpoint is restricted to administrators. **Example:** @@ -55528,7 +60626,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -55556,7 +60654,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -55603,7 +60701,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -55639,7 +60737,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -55853,11 +60951,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -55865,6 +60971,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -55876,6 +60983,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -55976,8 +61084,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -56152,7 +61260,7 @@ entities: self: false type: subtenant_user return_type: paginated_response(subtenant_user) - summary: Get users of a group. + summary: Get users in a policy group. x_deprecation: null x_filter: status: @@ -56225,13 +61333,19 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' example: false in: body parameter_fieldname: enrollment_mode readOnly: false required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: id api_fieldname: id description: Entity ID. @@ -56336,7 +61450,9 @@ entities: group_id: Security methods: - _key: create - description: 'Upload new trusted certificates. + description: 'Upload new trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** @@ -56346,7 +61462,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -56404,13 +61520,19 @@ entities: x-nullable: true - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: &id016 [] - _key: is_developer_certificate _override: true api_fieldname: is_developer_certificate @@ -56434,7 +61556,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: &id015 + enum: &id017 - lwm2m - bootstrap enum_reference: subtenant_trusted_certificate_service_enum @@ -56446,7 +61568,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: &id016 + enum: &id018 - ACTIVE - INACTIVE enum_reference: subtenant_trusted_certificate_status_enum @@ -56522,13 +61644,19 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -56740,7 +61868,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -56844,7 +61972,9 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: 'Delete the trusted certificate. + description: 'Delete a trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** @@ -56854,7 +61984,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -56956,7 +62086,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -57004,7 +62134,7 @@ entities: - type type: object - _key: '404' - description: Account or certificate with the given ID not found. + description: An account or certificate with the given ID not found. schema: properties: - _key: code @@ -57056,7 +62186,7 @@ entities: self: true type: subtenant_trusted_certificate return_type: subtenant_trusted_certificate - summary: Delete trusted certificate by ID. + summary: Delete a trusted certificate by ID. x_deprecation: null x_filter: {} - _key: get_developer_certificate_info @@ -57071,7 +62201,7 @@ entities: curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -57548,7 +62678,9 @@ entities: x_deprecation: null x_filter: {} - _key: read - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. + + Note: This endpoint is restricted to administrators. **Example:** @@ -57558,7 +62690,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -57681,13 +62813,19 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -57850,7 +62988,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -57898,7 +63036,7 @@ entities: - type type: object - _key: '404' - description: Account or certificate with the given ID not found. + description: An account or certificate with the given ID not found. schema: properties: - _key: code @@ -57950,13 +63088,13 @@ entities: self: true type: subtenant_trusted_certificate return_type: subtenant_trusted_certificate - summary: Get trusted certificate by ID. + summary: Get a trusted certificate. x_deprecation: null x_filter: {} - _key: update - description: "Update existing trusted certificates.\n\n**Example:**\n```\ncurl\ - \ -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id}\ - \ \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ + description: "Update a trusted certificate.\nNote: This endpoint is restricted\ + \ to administrators.\n\n**Example:**\n```\ncurl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id}\ + \ \\\n -H 'Authorization: Bearer ' \\\n -H 'content-type: application/json'\ \ \\\n -d {\"description\": \"very important cert\"}\n ```" drop_fields: - object @@ -58007,13 +63145,19 @@ entities: x-nullable: true - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: *id016 - _key: id api_fieldname: id description: Entity ID. @@ -58047,7 +63191,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: *id015 + enum: *id017 enum_reference: subtenant_trusted_certificate_service_enum in: body parameter_fieldname: service @@ -58057,7 +63201,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: *id016 + enum: *id018 enum_reference: subtenant_trusted_certificate_status_enum example: ACTIVE in: body @@ -58133,13 +63277,19 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -58351,7 +63501,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -58461,8 +63611,8 @@ entities: - TrustedCertificateResp - TrustedCertificateUpdateReq tags: - - Tenant device security - certificates - - Device security - developer class certificates + - Tenant security and identity - certificates + - Security and identity - developer class certificates - _key: subtenant_user field_renames: [] fields: @@ -58719,11 +63869,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -58731,6 +63889,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -58742,6 +63901,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -58836,6 +63996,8 @@ entities: description: 'Create or invite a new user to the account. Only email address is used; other attributes are set in the second step. + Note: This endpoint is restricted to administrators. + **Example:** @@ -58844,7 +64006,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -58965,11 +64127,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -58977,20 +64147,22 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type api_fieldname: type description: Identity provider type. entity_fieldname: login_profile_type - enum: &id017 + enum: &id019 - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string - required: &id018 + required: &id020 - id type: object parameter_fieldname: login_profiles @@ -59303,11 +64475,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -59315,6 +64495,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -59326,6 +64507,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -59676,6 +64858,8 @@ entities: - _key: delete description: 'Delete a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -59684,7 +64868,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -59928,7 +65112,9 @@ entities: x_deprecation: null x_filter: {} - _key: policy_groups - description: 'Retrieve user''s groups. + description: 'Retrieve an array of policy groups associated with a user. + + Note: This endpoint is restricted to administrators. **Example:** @@ -59938,7 +65124,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -59963,7 +65149,7 @@ entities: type: string - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -60010,7 +65196,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -60046,7 +65232,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -60076,6 +65262,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -60149,8 +65345,8 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC @@ -60325,12 +65521,14 @@ entities: self: false type: subtenant_policy_group return_type: paginated_response(subtenant_policy_group) - summary: Get user's groups. + summary: Get policy groups for a user. x_deprecation: null x_filter: {} - _key: read description: 'Retrieve user details. + Note: This endpoint is restricted to administrators. + **Example:** @@ -60339,7 +65537,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -60664,11 +65862,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -60676,6 +65882,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -60687,6 +65894,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -60941,6 +66149,8 @@ entities: - _key: update description: 'Update user details. + Note: This endpoint is restricted to administrators. + **Example:** @@ -60949,7 +66159,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -61070,11 +66280,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -61082,16 +66300,18 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type api_fieldname: type description: Identity provider type. entity_fieldname: login_profile_type - enum: *id017 + enum: *id019 + example: NATIVE readOnly: true type: string - required: *id018 + required: *id020 type: object parameter_fieldname: login_profiles required: false @@ -61392,11 +66612,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -61404,6 +66632,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -61415,6 +66644,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -61765,6 +66995,8 @@ entities: - _key: validate_email description: 'Validate user email. + Note: This endpoint is restricted to administrators. + **Example:** @@ -61773,7 +67005,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -62044,11 +67276,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -62056,6 +67296,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -62067,6 +67308,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -62098,6 +67340,8 @@ entities: - _key: create description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -62106,7 +67350,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -62167,11 +67411,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -62179,6 +67431,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -62190,6 +67443,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -62302,11 +67556,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -62314,6 +67576,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -62325,6 +67588,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -62518,6 +67782,8 @@ entities: - _key: delete description: 'Delete an active user invitation sent to a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -62526,7 +67792,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -62725,6 +67991,8 @@ entities: description: 'Retrieve details of an active user invitation sent for a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -62733,7 +68001,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -62858,11 +68126,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -62870,6 +68146,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -62881,6 +68158,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -63077,6 +68355,28 @@ entities: - UserInvitationResp tags: - Tenant accounts - user invitations +- _key: tier_history + field_renames: [] + fields: + - _key: tier + api_fieldname: tier + readOnly: true + required: false + type: string + - _key: updatedAt + api_fieldname: updatedAt + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - TierHistory + tags: [] - _key: trusted_certificate field_renames: [] fields: @@ -63129,11 +68429,17 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' example: false readOnly: false required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: id api_fieldname: id description: Entity ID. @@ -63232,6 +68538,8 @@ entities: - _key: create description: 'Upload new trusted certificates. + Note: This endpoint is restricted to administrators. + **Example:** @@ -63239,7 +68547,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -63288,13 +68596,19 @@ entities: x-nullable: true - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: &id021 [] - _key: is_developer_certificate _override: true api_fieldname: is_developer_certificate @@ -63318,7 +68632,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: &id019 + enum: &id022 - lwm2m - bootstrap enum_reference: trusted_certificate_service_enum @@ -63330,7 +68644,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: &id020 + enum: &id023 - ACTIVE - INACTIVE enum_reference: trusted_certificate_status_enum @@ -63400,10 +68714,16 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -63600,7 +68920,7 @@ entities: - type type: object - _key: '403' - description: Forbidden, only available for admins of commercial accounts. + description: Forbidden, only available for administrators of commercial accounts. schema: properties: - _key: code @@ -63714,7 +69034,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -63854,7 +69174,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -63921,7 +69241,7 @@ entities: curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' drop_fields: @@ -64398,7 +69718,7 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve trusted certificates in an array. + description: 'Retrieve an array of trusted certificates. **Example:** @@ -64407,7 +69727,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -64429,12 +69749,13 @@ entities: - status__eq - issuer__like - subject__like + - certificate_fingerprint__eq - valid__eq field_renames: [] fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -64480,7 +69801,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -64516,10 +69837,15 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 + external_param: true + in: query + name: after + parameter_fieldname: after pattern: '[a-f0-9]{32}' + required: false type: string - _key: data api_fieldname: data @@ -64528,7 +69854,7 @@ entities: items: description: Represents a trusted certificate in responses. foreign_key: - entity: trusted_certificate + entity: developer_certificate group: Security properties: - _key: account_id @@ -64561,9 +69887,15 @@ entities: format: int32 type: integer - _key: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag description: API resource entity version. example: '1' @@ -64648,10 +69980,16 @@ entities: type: boolean - _key: limit api_fieldname: limit - description: The number of results to return (2-1000), or equal to `total_count`. + default: 50 + description: The number of results to return (2-1000). Default 50. entity_fieldname: limit example: 50 + external_param: true format: int32 + in: query + name: limit + parameter_fieldname: limit + required: false type: integer - _key: object api_fieldname: object @@ -64662,12 +70000,19 @@ entities: type: string - _key: order api_fieldname: order - description: 'The order of the records to return based on creation time. - Available values: ASC, DESC; by default ASC.' + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC - DESC + enum_reference: account_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string - _key: total_count api_fieldname: total_count @@ -64787,6 +70132,8 @@ entities: summary: Get all trusted certificates. x_deprecation: null x_filter: + certificate_fingerprint: + - eq device_execution_mode: - eq - neq @@ -64809,7 +70156,7 @@ entities: valid: - eq - _key: read - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. **Example:** @@ -64819,7 +70166,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -64927,10 +70274,16 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -65127,7 +70480,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -65179,7 +70532,7 @@ entities: self: true type: trusted_certificate return_type: trusted_certificate - summary: Get trusted certificate by ID. + summary: Get a trusted certificate. x_deprecation: null x_filter: {} - _key: update @@ -65193,7 +70546,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -65240,13 +70593,19 @@ entities: x-nullable: true - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default value + is false.' entity_fieldname: enrollment_mode example: false in: body parameter_fieldname: enrollment_mode required: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: *id021 - _key: id api_fieldname: id description: Entity ID. @@ -65280,7 +70639,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: *id019 + enum: *id022 enum_reference: trusted_certificate_service_enum in: body parameter_fieldname: service @@ -65290,7 +70649,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: *id020 + enum: *id023 enum_reference: trusted_certificate_status_enum example: ACTIVE in: body @@ -65360,10 +70719,16 @@ entities: type: integer - _key: enrollment_mode api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. + description: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is false.' entity_fieldname: enrollment_mode example: false type: boolean + x-deprecation: + comment: This field is deprecated, do not use it anymore. + end_of_life_at: '2021-11-01T00:00:00+00:00' + issued_at: '2020-11-01T00:00:00+00:00' + links: [] - _key: etag api_fieldname: etag description: API resource entity version. @@ -65608,7 +70973,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -65719,8 +71084,8 @@ entities: - TrustedCertificateRespList - TrustedCertificateUpdateReq tags: - - Device security - certificates - - Device security - developer class certificates + - Security and identity - certificates + - Security and identity - developer class certificates - _key: update_campaign field_renames: [] fields: @@ -65802,8 +71167,9 @@ entities: type: string - _key: device_filter api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. - example: id__eq=00000000000000000000000000000000 + description: The filter for the devices the campaign targets. Refer to this using + the filter ID. + example: state__eq=registered readOnly: false required: true type: string @@ -65831,7 +71197,8 @@ entities: - _key: id api_fieldname: id description: The campaign ID. - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' readOnly: false required: true type: string @@ -65864,7 +71231,7 @@ entities: api_fieldname: root_manifest_id description: The ID of the manifest that will be sent to the device as part of the campaign. - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 readOnly: false required: false type: string @@ -65872,7 +71239,7 @@ entities: api_fieldname: root_manifest_url description: The URL for the manifest that will be sent to the device as part of the campaign. - example: http://example.com/00000000000000000000000000000000 + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 readOnly: true required: false type: string @@ -65922,7 +71289,7 @@ entities: within 1 minute when then start time has elapsed. example: '2017-05-22T12:37:55.576563Z' format: date-time - readOnly: true + readOnly: false required: false type: string x-nullable: true @@ -65937,10 +71304,10 @@ entities: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -65971,10 +71338,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -65992,12 +71358,196 @@ entities: description: The campaign has been archived. - _key: '400' description: Unable to change the phase of the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Cannot find the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '409' description: Cannot archive the campaign while in the current phase. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -66007,13 +71557,13 @@ entities: x_deprecation: null x_filter: {} - _key: create - description: "Create an update campaign.\n
\n**Usage example:**\n```\ncurl\ - \ -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \\\n-H 'Authorization:\ - \ ' \\\n-H 'content-type: application/json;charset=UTF-8'\ + description: "Create an update campaign.\n\nTo include a filter for targeted devices,\ + \ refer to the filter using `` in the message body.\n
\n**Usage\ + \ example:**\n```\ncurl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns\ + \ \\\n-H 'Authorization: Bearer ' \\\n-H 'content-type: application/json;charset=UTF-8'\ \ \\\n-d '{\n \"campaign_strategy\": \"one-shot\",\n \"description\": \"Campaign\ - \ is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\"\ - ,\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\"\ - ,\n}'\n```\n" + \ is for ...\",\n \"device_filter\": \"\",\n \"name\": \"campaign\"\ + ,\n \"root_manifest_id\": \"56780000000000a5b70000000000bd98\"\n}'\n```\n" drop_fields: - object - etag @@ -66033,7 +71583,6 @@ entities: - stopping_at - stopped_at - phase - - when field_renames: [] fields: - _key: approval_required @@ -66092,9 +71641,10 @@ entities: type: string - _key: device_filter api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. entity_fieldname: device_filter - example: id__eq=00000000000000000000000000000000 + example: state__eq=registered in: body parameter_fieldname: device_filter required: false @@ -66126,11 +71676,23 @@ entities: description: The ID of the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 in: body parameter_fieldname: root_manifest_id required: false type: string + - _key: when + api_fieldname: when + description: The scheduled start time for the campaign. The campaign will start + within 1 minute when then start time has elapsed. + entity_fieldname: when + example: '2017-05-22T12:37:55.576563Z' + format: date-time + in: body + parameter_fieldname: when + required: false + type: string + x-nullable: true group_id: Device_Update method: post mode: create @@ -66218,9 +71780,10 @@ entities: type: string device_filter: api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. entity_fieldname: device_filter - example: id__eq=00000000000000000000000000000000 + example: state__eq=registered type: string etag: api_fieldname: etag @@ -66239,7 +71802,8 @@ entities: api_fieldname: id description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name @@ -66252,6 +71816,7 @@ entities: api_fieldname: object description: 'Entity name: always ''update-campaign''.' entity_fieldname: object + example: update-campaign type: string phase: api_fieldname: phase @@ -66273,14 +71838,14 @@ entities: description: The ID of the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 type: string root_manifest_url: api_fieldname: root_manifest_url description: The URL for the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_url - example: http://example.com/00000000000000000000000000000000 + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 type: string started_at: api_fieldname: started_at @@ -66361,8 +71926,148 @@ entities: validate. ' + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '409' + description: Conflict, a campaign with the same name already exists + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -66380,10 +72085,10 @@ entities: ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -66414,10 +72119,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -66438,10 +72142,148 @@ entities: validate. ' + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Update campaign can't be found. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '409' description: Conflict - Cannot delete the campaign while in the current phase. schema: @@ -66507,10 +72349,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -66555,10 +72397,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: include @@ -66693,6 +72534,7 @@ entities: example: 015c3029f6f7000000000001001000c3 in: path parameter_fieldname: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: mechanism @@ -66717,6 +72559,7 @@ entities: api_fieldname: object description: 'The entity name: always ''update-campaign-device-metadata''.' entity_fieldname: object + example: update-campaign-device-metadata type: string - _key: updated_at api_fieldname: updated_at @@ -66747,6 +72590,7 @@ entities: api_fieldname: object description: 'The entity name: always ''list''.' entity_fieldname: object + example: list type: string - _key: order api_fieldname: order @@ -66787,7 +72631,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -67000,8 +72844,9 @@ entities: maxLength: 2000 type: string device_filter: - description: The filter for the devices the campaign is targeting at. - example: id__eq=00000000000000000000000000000000 + description: The filter for the devices the campaign targets. Refer + to this using the filter ID. + example: state__eq=registered type: string etag: api_fieldname: etag @@ -67016,7 +72861,8 @@ entities: type: string id: description: The campaign ID. - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: description: The campaign name. @@ -67025,6 +72871,7 @@ entities: type: string object: description: 'Entity name: always ''update-campaign''.' + example: update-campaign type: string phase: description: The phase of the campaign. @@ -67042,12 +72889,12 @@ entities: root_manifest_id: description: The ID of the manifest that will be sent to the device as part of the campaign. - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 type: string root_manifest_url: description: The URL for the manifest that will be sent to the device as part of the campaign. - example: http://example.com/00000000000000000000000000000000 + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 type: string started_at: description: The time the campaign was started. @@ -67124,6 +72971,7 @@ entities: api_fieldname: object description: 'Entity name: always ''list''.' entity_fieldname: object + example: list type: string - _key: order api_fieldname: order @@ -67144,10 +72992,148 @@ entities: validate. ' + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Unable to find content. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -67220,10 +73206,10 @@ entities: ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -67273,9 +73259,10 @@ entities: api_fieldname: id description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 in: path parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -67365,9 +73352,10 @@ entities: type: string device_filter: api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. entity_fieldname: device_filter - example: id__eq=00000000000000000000000000000000 + example: state__eq=registered type: string etag: api_fieldname: etag @@ -67386,7 +73374,8 @@ entities: api_fieldname: id description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name @@ -67399,6 +73388,7 @@ entities: api_fieldname: object description: 'Entity name: always ''update-campaign''.' entity_fieldname: object + example: update-campaign type: string phase: api_fieldname: phase @@ -67420,14 +73410,14 @@ entities: description: The ID of the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 type: string root_manifest_url: api_fieldname: root_manifest_url description: The URL for the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_url - example: http://example.com/00000000000000000000000000000000 + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 type: string started_at: api_fieldname: started_at @@ -67508,10 +73498,148 @@ entities: validate. ' + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Unable to find campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -67529,10 +73657,10 @@ entities: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -67563,10 +73691,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -67584,12 +73711,196 @@ entities: description: The campaign is starting. - _key: '400' description: Unable to change the phase of the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Cannot find the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '409' description: Cannot start the campaign while in the current phase. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -67600,7 +73911,7 @@ entities: x_filter: {} - _key: stop description: 'Stop a campaign. Stopping is a process that requires the campaign - go through several [phases](../updating-firmware/running-update-campaigns.html#stopping). + go through several [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html).
@@ -67608,10 +73919,10 @@ entities: ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \ - -H ''Authorization: '' + -H ''Authorization: Bearer '' ``` @@ -67642,10 +73953,9 @@ entities: entity_fieldname: id external_param: false in: path - maxLength: 32 - minLength: 32 name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -67663,12 +73973,196 @@ entities: description: The campaign is stopping. - _key: '400' description: Unable to change the phase of the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '401' description: Not authenticated. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '404' description: Cannot find the campaign. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object - _key: '409' description: Cannot stop the campaign while in the current phase. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. + items: + properties: + - _key: message + description: Message describing the error condition. + type: string + - _key: name + description: Name of the field which caused the error. + type: string + required: + - name + - message + type: object + type: array + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. + enum: + - error + type: string + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + - _key: type + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true @@ -67679,10 +74173,10 @@ entities: x_filter: {} - _key: update description: "Modify an update campaign.\n
\n**Usage example:**\n```\ncurl\ - \ -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012\ - \ \\\n-H 'Authorization: ' \\\nd '{\n \"description\":\ - \ \"Campaign is for ...\",\n \"device_filter\": \"id__eq=123400000000000000000000000ae45\"\ - ,\n \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\"\ + \ -X PUT https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012\ + \ \\\n-H 'Authorization: Bearer ' \\\nd '{\n \"description\": \"Campaign\ + \ is for ...\",\n \"device_filter\": \"123400000000000000000000000ae45\",\n\ + \ \"name\": \"campaign\",\n \"root_manifest_id\": \"5678000000000000000000000000bd98\"\ ,\n}'\n```\n" drop_fields: - object @@ -67703,7 +74197,6 @@ entities: - stopping_at - stopped_at - phase - - when field_renames: [] fields: - _key: approval_required @@ -67747,9 +74240,10 @@ entities: type: string - _key: device_filter api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. entity_fieldname: device_filter - example: id__eq=00000000000000000000000000000000 + example: state__eq=registered in: body parameter_fieldname: device_filter required: false @@ -67770,9 +74264,10 @@ entities: api_fieldname: id description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 in: path parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: name @@ -67790,11 +74285,23 @@ entities: description: The ID of the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 in: body parameter_fieldname: root_manifest_id required: false type: string + - _key: when + api_fieldname: when + description: The scheduled start time for the campaign. The campaign will start + within 1 minute when then start time has elapsed. + entity_fieldname: when + example: '2017-05-22T12:37:55.576563Z' + format: date-time + in: body + parameter_fieldname: when + required: false + type: string + x-nullable: true group_id: Device_Update method: put mode: update @@ -67882,9 +74389,10 @@ entities: type: string device_filter: api_fieldname: device_filter - description: The filter for the devices the campaign is targeting at. + description: The filter for the devices the campaign targets. Refer to this + using the filter ID. entity_fieldname: device_filter - example: id__eq=00000000000000000000000000000000 + example: state__eq=registered type: string etag: api_fieldname: etag @@ -67903,7 +74411,8 @@ entities: api_fieldname: id description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name @@ -67916,6 +74425,7 @@ entities: api_fieldname: object description: 'Entity name: always ''update-campaign''.' entity_fieldname: object + example: update-campaign type: string phase: api_fieldname: phase @@ -67937,14 +74447,14 @@ entities: description: The ID of the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + example: 016e83dce36a00000000000100100102 type: string root_manifest_url: api_fieldname: root_manifest_url description: The URL for the manifest that will be sent to the device as part of the campaign. entity_fieldname: root_manifest_url - example: http://example.com/00000000000000000000000000000000 + example: https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102 type: string started_at: api_fieldname: started_at @@ -68288,11 +74798,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -68300,6 +74818,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -68311,6 +74830,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -68393,8 +74913,10 @@ entities: group_id: Accounts methods: - _key: create - description: 'Create or invite a new user to the account. Only email address is - used; other attributes are set in the second step. + description: 'Create or invite a new user to the account. The invited user has + to accept the invitation by clicking the link in the invitation email. + + Note: This endpoint is restricted to administrators. **Example:** @@ -68403,7 +74925,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -68515,11 +75037,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -68527,20 +75057,22 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type api_fieldname: type description: Identity provider type. entity_fieldname: login_profile_type - enum: &id021 + enum: &id024 - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string - required: &id022 + required: &id025 - id type: object parameter_fieldname: login_profiles @@ -68828,11 +75360,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -68840,6 +75380,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -68851,6 +75392,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -69139,6 +75681,8 @@ entities: - _key: delete description: 'Delete a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -69146,7 +75690,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -69380,7 +75924,9 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve the details of all users. + description: 'Retrieve an array of users. + + Note: This endpoint is restricted to administrators. **Example:** @@ -69389,7 +75935,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -69409,7 +75955,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -69446,7 +75992,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -69484,7 +76030,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -69693,11 +76239,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -69705,6 +76259,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -69716,6 +76271,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -69931,7 +76487,7 @@ entities: self: true type: user return_type: paginated_response(user) - summary: Get the details of all users. + summary: Get users. x_deprecation: null x_filter: email: @@ -69943,7 +76499,9 @@ entities: - in - nin - _key: policy_groups - description: 'Retrieve groups of the user. + description: 'Retrieve an array of policy groups associated with a user. + + Note: This endpoint is restricted to administrators. **Example:** @@ -69952,7 +76510,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -69967,7 +76525,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -70014,7 +76572,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -70050,7 +76608,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -70075,6 +76633,16 @@ entities: example: 0 format: int32 type: integer + x-deprecation: + comment: This property is deprecated. See 'application_count' property. + end_of_life_at: '2021-08-01T00:00:00+00:00' + issued_at: '2020-08-01T00:00:00+00:00' + links: [] + - _key: application_count + description: The number of applications in this group. + example: 0 + format: int32 + type: integer - _key: created_at description: Creation UTC time RFC3339. example: '2018-02-13T09:35:20Z' @@ -70311,12 +76879,14 @@ entities: self: false type: policy_group return_type: paginated_response(policy_group) - summary: Get groups of the user. + summary: Get policy groups for a user. x_deprecation: null x_filter: {} - _key: read description: 'Retrieve the details of a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -70324,7 +76894,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -70615,11 +77185,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -70627,6 +77205,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -70638,6 +77217,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -70876,7 +77456,9 @@ entities: x_deprecation: null x_filter: {} - _key: update - description: 'Update user details + description: 'Update user details. + + Note: This endpoint is restricted to administrators. **Example:** @@ -70885,7 +77467,7 @@ entities: curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -70997,11 +77579,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -71009,16 +77599,18 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type api_fieldname: type description: Identity provider type. entity_fieldname: login_profile_type - enum: *id021 + enum: *id024 + example: NATIVE readOnly: true type: string - required: *id022 + required: *id025 type: object parameter_fieldname: login_profiles required: false @@ -71294,11 +77886,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -71306,6 +77906,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -71317,6 +77918,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -71720,11 +78322,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -71732,6 +78342,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -71743,6 +78354,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -71773,6 +78385,8 @@ entities: - _key: create description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -71780,7 +78394,7 @@ entities: curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -71832,11 +78446,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -71844,6 +78466,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -71855,6 +78478,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -71957,11 +78581,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -71969,6 +78601,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -71980,6 +78613,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -72171,6 +78805,8 @@ entities: - _key: delete description: 'Delete an active user invitation sent to a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -72179,7 +78815,7 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -72365,7 +79001,9 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve details for all the active user invitations. + description: 'Retrieve an array of active user invitations sent by email. + + Note: This endpoint is restricted to administrators. **Example:** @@ -72374,7 +79012,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -72390,7 +79028,7 @@ entities: fields: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 external_param: true @@ -72416,7 +79054,7 @@ entities: - _key: order api_fieldname: order default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. + description: 'Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.' entity_fieldname: order enum: @@ -72454,7 +79092,7 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one. + description: The entity ID to retrieve after the given one. entity_fieldname: after example: 01619571f3c00242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -72512,11 +79150,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -72524,6 +79170,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -72535,6 +79182,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -72710,7 +79358,7 @@ entities: self: true type: user_invitation return_type: paginated_response(user_invitation) - summary: Get the details of all user invitations. + summary: Get user invitations. x_deprecation: null x_filter: login_profiles: @@ -72718,6 +79366,8 @@ entities: - _key: read description: 'Retrieve the details of an active user invitation. + Note: This endpoint is restricted to administrators. + **Example:** @@ -72726,7 +79376,7 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: @@ -72832,11 +79482,19 @@ entities: entity: login_profile group: Accounts properties: + - _key: foreign_id + api_fieldname: foreign_id + description: The ID of the user in the identity provider's service. + entity_fieldname: foreign_id + example: fed/user_007 + readOnly: true + type: string - _key: id _override: true api_fieldname: id description: ID of the identity provider. entity_fieldname: id + example: 01619571f3c00242ac12000600000000 readOnly: false type: string - _key: name @@ -72844,6 +79502,7 @@ entities: api_fieldname: name description: Name of the identity provider. entity_fieldname: name + example: Pelion readOnly: false type: string - _key: type @@ -72855,6 +79514,7 @@ entities: - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -73055,18 +79715,14 @@ entities: fields: - _key: message api_fieldname: message - description: 'Provides details in case of failure. - - ' - example: message describing the verification failure + description: Provides details in case of failure. + example: Message describing the verification failure readOnly: true required: false type: string - _key: successful api_fieldname: successful - description: 'Indicates whether the certificate issuer was verified successfully. - - ' + description: Indicates whether the certificate issuer was verified successfully. example: false readOnly: true required: false @@ -73086,6 +79742,15 @@ enums: values: - active_device_business_model - api_calls_1_business_model +- _key: account_limitation_inherited_type_enum + entity_name: account_limitation + enum_name: account_limitation_inherited_type_enum + field_name: inherited_type + group_id: Accounts + values: + - account + - template + - tier_template - _key: account_mfa_status_enum entity_name: account enum_name: account_mfa_status_enum @@ -73211,6 +79876,14 @@ enums: - error_font_color - info_color - info_font_color + - menu_background_color + - menu_text_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color - primary - primary_font_color - secondary @@ -73227,6 +79900,9 @@ enums: field_name: reference group_id: Branding values: + - app_logo_landscape + - app_logo_portrait + - app_logo_square - brand_logo_email - brand_logo_landscape - brand_logo_portrait @@ -73290,14 +79966,6 @@ enums: - completed - new - processing -- _key: device_enrollment_denial_order_enum - entity_name: device_enrollment_denial - enum_name: device_enrollment_denial_order_enum - field_name: order - group_id: Devices - values: - - ASC - - DESC - _key: device_enrollment_order_enum entity_name: device_enrollment enum_name: device_enrollment_order_enum @@ -73341,6 +80009,14 @@ enums: values: - ASC - DESC +- _key: firmware_manifest_delivered_payload_type_enum + entity_name: firmware_manifest + enum_name: firmware_manifest_delivered_payload_type_enum + field_name: delivered_payload_type + group_id: Device_Update + values: + - delta + - full - _key: firmware_manifest_order_enum entity_name: firmware_manifest enum_name: firmware_manifest_order_enum @@ -73349,6 +80025,14 @@ enums: values: - ASC - DESC +- _key: firmware_manifest_schema_version_enum + entity_name: firmware_manifest + enum_name: firmware_manifest_schema_version_enum + field_name: manifest_schema_version + group_id: Device_Update + values: + - VERSION_1 + - VERSION_3 - _key: identity_provider_algorithm_enum entity_name: identity_provider enum_name: identity_provider_algorithm_enum @@ -73403,6 +80087,14 @@ enums: - error_font_color - info_color - info_font_color + - menu_background_color + - menu_text_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color - primary - primary_font_color - secondary @@ -73419,6 +80111,9 @@ enums: field_name: reference group_id: Branding values: + - app_logo_landscape + - app_logo_portrait + - app_logo_square - brand_logo_email - brand_logo_landscape - brand_logo_portrait @@ -73519,6 +80214,14 @@ enums: - error_font_color - info_color - info_font_color + - menu_background_color + - menu_text_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color - primary - primary_font_color - secondary @@ -73535,6 +80238,9 @@ enums: field_name: reference group_id: Branding values: + - app_logo_landscape + - app_logo_portrait + - app_logo_square - brand_logo_email - brand_logo_landscape - brand_logo_portrait @@ -73616,6 +80322,14 @@ enums: - error_font_color - info_color - info_font_color + - menu_background_color + - menu_text_color + - nav_menu_active_background + - nav_menu_active_background_font_color + - nav_menu_background + - nav_menu_background_font_color + - nav_menu_highlight + - nav_menu_highlight_font_color - primary - primary_font_color - secondary @@ -73632,6 +80346,9 @@ enums: field_name: reference group_id: Branding values: + - app_logo_landscape + - app_logo_portrait + - app_logo_square - brand_logo_email - brand_logo_landscape - brand_logo_portrait @@ -73799,6 +80516,8 @@ groups: entities: - password_policy - login_history + - business_model_history + - account_limitation - parent_account - policy - login_profile @@ -73818,7 +80537,9 @@ groups: - oidc_request - oidc_request_claim_mapping - identity_provider_public_key + - tier_history enums: + - account_limitation_inherited_type_enum - policy_inherited_type_enum - login_profile_type_enum - user_status_enum @@ -73879,6 +80600,8 @@ groups: - campaign_statistics_summary_status_enum - campaign_statistics_id_enum - firmware_image_order_enum + - firmware_manifest_schema_version_enum + - firmware_manifest_delivered_payload_type_enum - firmware_manifest_order_enum - _key: Devices entities: @@ -73888,7 +80611,6 @@ groups: - device_enrollment_bulk_create - device_enrollment_bulk_delete - device_enrollment - - device_enrollment_denial enums: - device_lifecycle_status_enum - device_deployed_state_enum @@ -73897,7 +80619,6 @@ groups: - device_enrollment_bulk_create_status_enum - device_enrollment_bulk_delete_status_enum - device_enrollment_order_enum - - device_enrollment_denial_order_enum - _key: Security entities: - pre_shared_key diff --git a/docs/news/2.feature b/docs/news/2.feature index 52a54d109..5e08b629a 100644 --- a/docs/news/2.feature +++ b/docs/news/2.feature @@ -1 +1,2 @@ -Updated to latest REST API definitions \ No newline at end of file +Updated to latest REST API definitions: https://github.com/ArmMbedCloud/mbed-cloud-api-contract/commit/7e84badd1f6fb4c0392ae05b1bf53d7852334be7 +Add Echo API in Connect module \ No newline at end of file diff --git a/docs/news/3.bugfix b/docs/news/3.bugfix index 942fec800..568a03a1f 100644 --- a/docs/news/3.bugfix +++ b/docs/news/3.bugfix @@ -1 +1 @@ -Fixed some HTTP client deprecations \ No newline at end of file +Auto restart WebSocket in case of connection error. \ No newline at end of file diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Accounts.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Accounts.java index e752736b5..cdcb82306 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Accounts.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Accounts.java @@ -70,16 +70,19 @@ import com.arm.mbed.cloud.sdk.common.listing.ListResponse; import com.arm.mbed.cloud.sdk.common.listing.PageRequester; import com.arm.mbed.cloud.sdk.common.listing.Paginator; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountCreationResp; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfoList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoResp; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.ApiKeyInfoRespList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingColorList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BrandingImageList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.CertificateGenerationReq.AlgorithmEnum; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummary; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.GroupSummaryList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.IdentityProviderInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.IdentityProviderList; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.SubjectList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TrustedCertificateRespList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.UserInfoResp; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.UserInfoRespList; @@ -88,7 +91,6 @@ import com.arm.mbed.cloud.sdk.security.adapters.SubtenantTrustedCertificateAdapter; import com.arm.mbed.cloud.sdk.security.model.SubtenantTrustedCertificate; import com.arm.mbed.cloud.sdk.security.model.SubtenantTrustedCertificateListOptions; - import retrofit2.Call; /** @@ -131,12 +133,6 @@ public class Accounts extends AbstractModule { @Internal private static final String TAG_IDENTITY_PROVIDER = "identityProvider"; - /** - * Parameter name. - */ - @Internal - private static final String TAG_OIDC_ATTRIBUTES = "oidcAttributes"; - /** * Parameter name. */ @@ -231,6 +227,12 @@ public Accounts(SdkContext context) { * Similar to * {@link #apiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @param policyGroup @@ -239,6 +241,7 @@ public Accounts(SdkContext context) { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator allApiKeys(@Nullable ApiKeyListOptions options, @@ -269,6 +272,12 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloud *

* Gets an iterator over all policy groups matching filter options. * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param id * The ID of the group. * @param options @@ -277,6 +286,7 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloud * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator allApiKeys(@NonNull String id, @@ -307,6 +317,12 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloud *

* Gets an iterator over all accounts matching filter options. * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param keyEq @@ -319,6 +335,7 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloud * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator @@ -352,6 +369,12 @@ public ListResponse requestNewPage(ListOptions options) throws *

* Gets an iterator over all subtenant policy groups matching filter options. * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + * * @param accountId * Account ID. * @param id @@ -362,6 +385,7 @@ public ListResponse requestNewPage(ListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator @@ -396,6 +420,12 @@ public ListResponse requestNewPage(ListOptions options) throws * Similar to * {@link #apiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -408,6 +438,7 @@ public ListResponse requestNewPage(ListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator allApiKeys(@Nullable String keyEq, @Nullable String ownerEq, @@ -442,6 +473,12 @@ public ListResponse requestNewPage(ListOptions options) throws * Similar to * {@link #allApiKeys(String, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param options @@ -450,6 +487,7 @@ public ListResponse requestNewPage(ListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator @@ -465,6 +503,12 @@ public ListResponse requestNewPage(ListOptions options) throws * Similar to * {@link #allApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @param account @@ -473,6 +517,7 @@ public ListResponse requestNewPage(ListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator allApiKeys(@Nullable SubtenantApiKeyListOptions options, @@ -488,6 +533,12 @@ public Paginator allApiKeys(@Nullable SubtenantApiKeyListOption * Similar to * {@link #apiKeys(com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + * * @param options * list options. * @param subtenantPolicyGroup @@ -496,6 +547,7 @@ public Paginator allApiKeys(@Nullable SubtenantApiKeyListOption * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator @@ -683,6 +735,89 @@ public ListResponse requestNewPage(ListOptions options) }); } + /** + * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. + * + *

+ * Gets an iterator over all accounts matching filter options. + * + * @param id + * The ID of the account. + * @param options + * list options. + * @return paginator over the list of subtenant identity providers + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public Paginator + allIdentityProviders(@NonNull String id, + @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + checkNotNull(id, TAG_ID); + final String finalId = id; + final SubtenantIdentityProviderListOptions finalOptions = (options == null) ? new SubtenantIdentityProviderListOptions() + : options; + return new Paginator(finalOptions, new PageRequester() { + /** + * Makes one page request. + * + * @param options + * a list options. + * @return Corresponding page requester + * @throws MbedCloudException + * if an error occurs during the process. + */ + @Override + public ListResponse + requestNewPage(ListOptions options) throws MbedCloudException { + return identityProviders(finalId, (SubtenantIdentityProviderListOptions) options); + } + }); + } + + /** + * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. + * + *

+ * Similar to + * {@link #identityProviders(com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant identity providers + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public Paginator + allIdentityProviders(@Nullable SubtenantIdentityProviderListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + final SubtenantIdentityProviderListOptions finalOptions = (options == null) ? new SubtenantIdentityProviderListOptions() + : options; + final Account finalAccount = account; + return new Paginator(finalOptions, new PageRequester() { + /** + * Makes one page request. + * + * @param options + * a list options. + * @return Corresponding page requester + * @throws MbedCloudException + * if an error occurs during the process. + */ + @Override + public ListResponse + requestNewPage(ListOptions options) throws MbedCloudException { + return identityProviders((SubtenantIdentityProviderListOptions) options, finalAccount); + } + }); + } + /** * Creates a {@link Paginator} for the list of subtenant light theme colors matching filter options. * @@ -856,6 +991,12 @@ public ListResponse requestNewPage(ListOptions options) * Similar to * {@link #policyGroups(com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @param apiKey @@ -864,6 +1005,7 @@ public ListResponse requestNewPage(ListOptions options) * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions options, @@ -969,12 +1111,12 @@ public ListResponse requestNewPage(ListOptions options) throws Mbed * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. * *

- * Gets an iterator over all subtenant users matching filter options. + * Gets an iterator over all accounts matching filter options. * - * @param accountId - * Account ID. * @param id - * The ID of the user. + * Account ID. + * @param nameEq + * a string * @param options * list options. * @return paginator over the list of subtenant policy groups @@ -984,14 +1126,81 @@ public ListResponse requestNewPage(ListOptions options) throws Mbed @API @Nullable public Paginator - allPolicyGroups(@NonNull String accountId, @NonNull String id, + allPolicyGroups(@NonNull String id, @Nullable String nameEq, @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(id, TAG_ID); - final String finalAccountId = accountId; final String finalId = id; + final String finalNameEq = nameEq; + final SubtenantPolicyGroupListOptions finalOptions = (options == null) ? new SubtenantPolicyGroupListOptions() + : options; + return new Paginator(finalOptions, new PageRequester() { + /** + * Makes one page request. + * + * @param options + * a list options. + * @return Corresponding page requester + * @throws MbedCloudException + * if an error occurs during the process. + */ + @Override + public ListResponse requestNewPage(ListOptions options) throws MbedCloudException { + return policyGroups(finalId, finalNameEq, (SubtenantPolicyGroupListOptions) options); + } + }); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link #allPolicyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} + * + * @param id + * Account ID. + * @param options + * list options. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public Paginator + allPolicyGroups(@NonNull String id, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + checkNotNull(id, TAG_ID); + return allPolicyGroups(id, (String) null, options); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link #policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param nameEq + * a string + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public Paginator allPolicyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + final String finalNameEq = nameEq; final SubtenantPolicyGroupListOptions finalOptions = (options == null) ? new SubtenantPolicyGroupListOptions() : options; + final Account finalAccount = account; return new Paginator(finalOptions, new PageRequester() { /** * Makes one page request. @@ -1004,11 +1213,34 @@ public ListResponse requestNewPage(ListOptions options) throws Mbed */ @Override public ListResponse requestNewPage(ListOptions options) throws MbedCloudException { - return policyGroups(finalAccountId, finalId, (SubtenantPolicyGroupListOptions) options); + return policyGroups(finalNameEq, (SubtenantPolicyGroupListOptions) options, finalAccount); } }); } + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link #allPolicyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public Paginator allPolicyGroups(@Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + return allPolicyGroups((String) null, options, account); + } + /** * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. * @@ -1016,6 +1248,12 @@ public ListResponse requestNewPage(ListOptions options) th * Similar to * {@link #policyGroups(com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups + * * @param options * list options. * @param subtenantApiKey @@ -1024,6 +1262,7 @@ public ListResponse requestNewPage(ListOptions options) th * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator @@ -1726,12 +1965,18 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloudEx } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * * *

* Similar to {@link #apiKeys(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @param policyGroup @@ -1740,6 +1985,7 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloudEx * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse apiKeys(@Nullable ApiKeyListOptions options, @@ -1750,14 +1996,21 @@ public ListResponse apiKeys(@Nullable ApiKeyListOptions options, } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * * *

- * Manage policy groups. + * Retrieve an array of API keys associated with a policy group. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications * * @param id * The ID of the group. @@ -1767,6 +2020,7 @@ public ListResponse apiKeys(@Nullable ApiKeyListOptions options, * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse apiKeys(@NonNull String id, @@ -1797,10 +2051,18 @@ public Call call() { * * *

- * Retrieve API keys in an array, optionally filtered by the owner. + * Retrieve an array of API keys, optionally filtered by the owner. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \ -H - * 'Authorization: Bearer [api_key]' ``` This lists the api keys of the subtenant account. + * 'Authorization: Bearer [access_key]' ``` This lists the api keys of the subtenant account. + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys * * @param id * Account ID. @@ -1814,6 +2076,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse @@ -1844,15 +2107,23 @@ public Call call() { } /** - * Get API keys of a group. + * Get API keys in a group. * * *

- * List the API keys of the group with details. + * Retrieve an array of API keys associated with a policy group. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications * * @param accountId * Account ID. @@ -1864,6 +2135,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse @@ -1901,6 +2173,12 @@ public Call call() { * Similar to * {@link #apiKeys(String, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -1913,6 +2191,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse apiKeys(@Nullable String keyEq, @Nullable String ownerEq, @@ -1931,6 +2210,12 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link #apiKeys(String, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param options @@ -1939,6 +2224,7 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse @@ -1955,6 +2241,12 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link #apiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @param account @@ -1963,6 +2255,7 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse apiKeys(@Nullable SubtenantApiKeyListOptions options, @@ -1972,12 +2265,18 @@ public ListResponse apiKeys(@Nullable SubtenantApiKeyListOption } /** - * Get API keys of a group. + * Get API keys in a group. * * *

* Similar to {@link #apiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications + * * @param options * list options. * @param subtenantPolicyGroup @@ -1986,6 +2285,7 @@ public ListResponse apiKeys(@Nullable SubtenantApiKeyListOption * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse @@ -2032,12 +2332,13 @@ public Account createAccount(@NonNull Account account) throws MbedCloudException * Adds an account. * *

- * Create a new account. + * Create a new account. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' \ -d '{"display_name": "MyAccount1", "admin_name": - * "accountAdmin1", "email": "example_admin@myaccount.info", "country": "United Kingdom", "end_market": "Smart - * City", "address_line1": "110 Fulbourn Rd", "city": "Cambridge", "contact": "J. Doe", "company": "Arm"}' ``` + * [access_key]' \ -H 'content-type: application/json' \ -d '{"display_name": "MyAccount1", "aliases": [ + * "my-account" ], "admin_name": "accountAdmin1", "email": "example_admin@myaccount.info", "country": "United + * Kingdom", "end_market": "Smart City", "addres s_line1": "110 Fulbourn Rd", "city": "Cambridge", "contact": "J. + * Doe", "company": "Arm"}' ``` * * @param action * Action, either `create` or `enroll`. @@ -2073,14 +2374,14 @@ public Account createAccount(@Nullable @DefaultValue("create") String action, final String finalAction = action; final Account finalAccount = account; return CloudCaller.call(this, "createAccount()", AccountAdapter.getMapper(), - new CloudRequest.CloudCall() { + new CloudRequest.CloudCall() { /** * Makes the low level call to the Cloud. * * @return Corresponding Retrofit2 Call object */ @Override - public Call call() { + public Call call() { return endpoints.getTenantAccountsAccountsApi() .createAccount(AccountAdapter.reverseMapAddRequest(finalAccount), finalAction); @@ -2095,7 +2396,14 @@ public Call call() { * Create a new API key. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys -d '{"name": "MyKey1"}' \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys * * @param apiKey * an api key. @@ -2103,6 +2411,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey createApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { @@ -2128,8 +2437,7 @@ public Call call() { * Adds an identity provider. * *

- * Similar to - * {@link #createIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * Similar to {@link #createIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param identityProvider * an identity provider. @@ -2142,14 +2450,14 @@ public Call call() { public IdentityProvider createIdentityProvider(@NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - return createIdentityProvider(false, (OidcRequest) null, identityProvider); + return createIdentityProvider(false, identityProvider); } /** * Adds an identity provider. * *

- * Create a new identity provider. + * Create a new identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -2158,8 +2466,6 @@ public Call call() { * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param identityProvider * an identity provider. * @return an added identity provider @@ -2169,13 +2475,11 @@ public Call call() { @API @Nullable public IdentityProvider - createIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + createIdentityProvider(@Nullable boolean discovery, @NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(identityProvider, TAG_IDENTITY_PROVIDER); final boolean finalDiscovery = discovery; - final OidcRequest finalOidcAttributes = oidcAttributes; final IdentityProvider finalIdentityProvider = identityProvider; return CloudCaller.call(this, "createIdentityProvider()", IdentityProviderAdapter.getMapper(), new CloudRequest.CloudCall() { @@ -2187,8 +2491,7 @@ public Call call() { @Override public Call call() { return endpoints.getAccountIdentityProvidersApi() - .createIdentityProvider(IdentityProviderAdapter.reverseMapAddRequest(finalIdentityProvider) - .oidcAttributes(null), + .createIdentityProvider(IdentityProviderAdapter.reverseMapAddRequest(finalIdentityProvider), Boolean.valueOf(finalDiscovery)); } }, true); @@ -2198,10 +2501,10 @@ public Call call() { * Adds a policy group. * *

- * Create a new group. + * Create a new group. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' -d '{"name": "MyGroup1"}' ``` + * [access_key]' \ -H 'content-type: application/json' -d '{"name": "MyGroup1"}' ``` * * @param members * Represents arrays of user and API key IDs. @@ -2230,7 +2533,7 @@ public PolicyGroup createPolicyGroup(@Nullable Object members, public Call call() { return endpoints.getAccountPolicyGroupsApi() .createGroup(PolicyGroupAdapter.reverseMapAddRequest(finalPolicyGroup) - .members(null)); + .members((SubjectList) finalMembers)); } }, true); } @@ -2259,10 +2562,17 @@ public PolicyGroup createPolicyGroup(@NonNull PolicyGroup policyGroup) throws Mb * *

* Create a new API key. There is no default value for the owner ID, and it must be from the same account where the - * new API key is created. + * new API key is created. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "MyKey1"}' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "MyKey1"}' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys * * @param accountId * The ID of the account. @@ -2272,6 +2582,7 @@ public PolicyGroup createPolicyGroup(@NonNull PolicyGroup policyGroup) throws Mb * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey createSubtenantApiKey(@NonNull String accountId, @@ -2303,12 +2614,19 @@ public Call call() { *

* Similar to {@link #createSubtenantApiKey(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use POST + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param subtenantApiKey * a subtenant api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantApiKey) throws MbedCloudException { @@ -2322,7 +2640,7 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * *

* Similar to - * {@link #createSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #createSubtenantIdentityProvider(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param accountId * The ID of the account the identity provider belongs to. @@ -2339,7 +2657,7 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA @NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return createSubtenantIdentityProvider(false, (OidcRequest) null, accountId, subtenantIdentityProvider); + return createSubtenantIdentityProvider(false, accountId, subtenantIdentityProvider); } /** @@ -2347,7 +2665,7 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * *

* Similar to - * {@link #createSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #createSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param subtenantIdentityProvider * a subtenant identity provider. @@ -2360,14 +2678,14 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA public SubtenantIdentityProvider createSubtenantIdentityProvider(@NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return createSubtenantIdentityProvider(false, (OidcRequest) null, subtenantIdentityProvider); + return createSubtenantIdentityProvider(false, subtenantIdentityProvider); } /** * Adds a subtenant identity provider. * *

- * Create a new identity provider. + * Create a new identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -2376,8 +2694,6 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param accountId * The ID of the account the identity provider belongs to. * @param subtenantIdentityProvider @@ -2389,15 +2705,12 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA @API @Nullable public SubtenantIdentityProvider - createSubtenantIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, - @NonNull String accountId, + createSubtenantIdentityProvider(@Nullable boolean discovery, @NonNull String accountId, @NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); final boolean finalDiscovery = discovery; - final OidcRequest finalOidcAttributes = oidcAttributes; final String finalAccountId = accountId; final SubtenantIdentityProvider finalSubtenantIdentityProvider = subtenantIdentityProvider; return CloudCaller.call(this, "createSubtenantIdentityProvider()", SubtenantIdentityProviderAdapter.getMapper(), @@ -2411,8 +2724,7 @@ public SubtenantApiKey createSubtenantApiKey(@NonNull SubtenantApiKey subtenantA public Call call() { return endpoints.getTenantAccountsIdentityProvidersApi() .createAccountIdentityProvider(finalAccountId, - SubtenantIdentityProviderAdapter.reverseMapAddRequest(finalSubtenantIdentityProvider) - .oidcAttributes(null), + SubtenantIdentityProviderAdapter.reverseMapAddRequest(finalSubtenantIdentityProvider), Boolean.valueOf(finalDiscovery)); } }, true); @@ -2423,7 +2735,7 @@ public Call call() { * *

* Similar to - * {@link #createSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #createSubtenantIdentityProvider(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -2432,8 +2744,6 @@ public Call call() { * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param subtenantIdentityProvider * a subtenant identity provider. * @return something @@ -2443,23 +2753,51 @@ public Call call() { @API @Nullable public SubtenantIdentityProvider - createSubtenantIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + createSubtenantIdentityProvider(@Nullable boolean discovery, @NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return createSubtenantIdentityProvider(discovery, oidcAttributes, subtenantIdentityProvider.getAccountId(), + return createSubtenantIdentityProvider(discovery, subtenantIdentityProvider.getAccountId(), subtenantIdentityProvider); } + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public SubtenantIdentityProvider + createSubtenantIdentityProvider(boolean discovery, OidcRequest oidcAttributes, String accountId, + SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { + + checkNotNull(accountId, TAG_ACCOUNT_ID); + checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + return createSubtenantIdentityProvider(discovery, accountId, subtenantIdentityProvider); + } + + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public SubtenantIdentityProvider + createSubtenantIdentityProvider(boolean discovery, OidcRequest oidcAttributes, + SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { + + checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + return createSubtenantIdentityProvider(discovery, subtenantIdentityProvider); + } + /** * Adds a subtenant policy group. * *

- * Create a new group. + * Create a new group. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "MyGroup1"}' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "MyGroup1"}' ``` * * @param members * Represents arrays of user and API key IDs. @@ -2494,7 +2832,7 @@ public Call call() { return endpoints.getTenantAccountsPolicyGroupsApi() .createAccountGroup(finalAccountId, SubtenantPolicyGroupAdapter.reverseMapAddRequest(finalSubtenantPolicyGroup) - .members(null)); + .members((SubjectList) finalMembers)); } }, true); } @@ -2575,10 +2913,11 @@ public Call call() { * *

* Create or invite a new user to the account. Only email address is used; other attributes are set in the second - * step. + * step. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} + * ``` * * @param action * Create or invite user. @@ -2709,10 +3048,11 @@ public SubtenantUser createSubtenantUser(@NonNull SubtenantUser subtenantUser) t * Adds a subtenant user invitation. * *

- * Invite a new or existing user. + * Invite a new or existing user. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} + * ``` * * @param validForDays * Specifies how many days the invitation will be valid for. @@ -2782,11 +3122,11 @@ public Call call() { * Adds a user. * *

- * Create or invite a new user to the account. Only email address is used; other attributes are set in the second - * step. + * Create or invite a new user to the account. The invited user has to accept the invitation by clicking the link in + * the invitation email. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/users?action=invite \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` * * @param action * Action, either `create` or `invite`. @@ -2862,10 +3202,10 @@ public UserInvitation createUserInvitation(@NonNull UserInvitation userInvitatio * Adds a user invitation. * *

- * Invite a new or existing user. + * Invite a new or existing user. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/user-invitations \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` + * [access_key]' \ -H 'content-type: application/json' \ -d {"email": "myemail@company.com"} ``` * * @param validForDays * Specifies how many days the invitation will be valid for. @@ -2904,10 +3244,10 @@ public Call call() { * * *

- * Retrieve dark theme branding colors for an account. + * Retrieve dark theme branding colors for an account. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \ - * -H 'Authorization: Bearer [api_key]' ``` This lists the dark theme banding colors of the subtenant account. + * -H 'Authorization: Bearer [access_key]' ``` This lists the dark theme banding colors of the subtenant account. * * @param id * The ID of the account. @@ -2972,10 +3312,11 @@ public Call call() { * * *

- * Retrieve the metadata of all dark theme branding images. + * Retrieve the metadata of all dark theme branding images. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark \ - * -H 'Authorization: Bearer [api_key]' ``` This lists the dark theme banding images of the subtenant account. + * -H 'Authorization: Bearer [access_key]' ``` This lists the dark theme banding images of the subtenant account. * * @param id * The ID of the account. @@ -3041,11 +3382,18 @@ public Call call() { *

* Similar to {@link #deleteApiKey(String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API public void deleteApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { checkNotNull(apiKey, TAG_API_KEY); @@ -3059,13 +3407,21 @@ public void deleteApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { * Delete the API key. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} * * @param id * The ID of the API key to delete. * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API public void deleteApiKey(@NonNull String id) throws MbedCloudException { checkNotNull(id, TAG_ID); @@ -3104,7 +3460,7 @@ public void deleteIdentityProvider(@NonNull IdentityProvider identityProvider) t * Deletes an identity provider. * *

- * Delete an identity provider by ID. + * Delete an identity provider by ID. [b]Note:[/b] This endpoint is restricted to administrators. * * @param id * The ID of the identity provider to delete. @@ -3149,10 +3505,10 @@ public void deletePolicyGroup(@NonNull PolicyGroup policyGroup) throws MbedCloud * Deletes a policy group. * *

- * Delete a group. + * Delete a group. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the group to delete. @@ -3202,7 +3558,7 @@ public Call call() { * * *

- * Delete a service provider certificate. + * Delete a service provider certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * @param id * Entity ID. @@ -3234,7 +3590,7 @@ public Call call() { * * *

- * Delete a service provider certificate. + * Delete a service provider certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * @param accountId * The ID of the account the identity provider belongs to. @@ -3294,10 +3650,17 @@ public Call call() { * Deletes a subtenant api key. * *

- * Delete an API key. + * Delete an API key. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} - * \ -H 'Authorization: Bearer [api_key]' ``` + * \ -H 'Authorization: Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} * * @param accountId * Account ID. @@ -3306,6 +3669,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API public void deleteSubtenantApiKey(@NonNull String accountId, @NonNull String id) throws MbedCloudException { checkNotNull(accountId, TAG_ACCOUNT_ID); @@ -3331,11 +3695,18 @@ public Call call() { *

* Similar to {@link #deleteSubtenantApiKey(String, String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * * @param subtenantApiKey * a subtenant api key. * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API public void deleteSubtenantApiKey(@NonNull SubtenantApiKey subtenantApiKey) throws MbedCloudException { checkNotNull(subtenantApiKey, TAG_SUBTENANT_API_KEY); @@ -3346,7 +3717,7 @@ public void deleteSubtenantApiKey(@NonNull SubtenantApiKey subtenantApiKey) thro * Deletes a subtenant identity provider. * *

- * Delete an identity provider by ID. + * Delete an identity provider by ID. [b]Note:[/b] This endpoint is restricted to administrators. * * @param accountId * Account ID. @@ -3398,11 +3769,11 @@ public Call call() { * Deletes a subtenant policy group. * *

- * Delete a group. + * Delete a group. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param accountId * Account ID. @@ -3452,10 +3823,10 @@ public Call call() { * Deletes a subtenant user. * *

- * Delete a user. + * Delete a user. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -3504,11 +3875,12 @@ public void deleteSubtenantUser(@NonNull SubtenantUser subtenantUser) throws Mbe * Deletes a subtenant user invitation. * *

- * Delete an active user invitation sent to a new or existing user. + * Delete an active user invitation sent to a new or existing user. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -3558,10 +3930,10 @@ public Call call() { * Deletes a user. * *

- * Delete a user. + * Delete a user. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param id * The ID of the user to delete. @@ -3606,10 +3978,11 @@ public void deleteUser(@NonNull User user) throws MbedCloudException { * Deletes a user invitation. * *

- * Delete an active user invitation sent to a new or existing user. + * Delete an active user invitation sent to a new or existing user. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the invitation to delete. @@ -3704,7 +4077,7 @@ public void deleteUserInvitation(@NonNull UserInvitation userInvitation) throws * * *

- * Generate a new service provider certificate. + * Generate a new service provider certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * @param algorithm * The algorithm and its key size used for generating the certificate. Defaults to RSA2048. @@ -3743,7 +4116,7 @@ public Call call() { return endpoints.getAccountIdentityProvidersApi() .generateSpCertificate(finalId, IdentityProviderAdapter.mapToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelCertificateGenerationReq(finalIdentityProvider) - .algorithm(null) + .algorithm(AlgorithmEnum.fromValue(finalAlgorithm.getString())) .validity(Integer.valueOf(finalValidity))); } }, true); @@ -3833,7 +4206,7 @@ public Call call() { * * *

- * Generate a new service provider certificate. + * Generate a new service provider certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * @param algorithm * The algorithm and its key size used for generating the certificate. Defaults to RSA2048. @@ -3877,7 +4250,7 @@ public Call call() { return endpoints.getTenantAccountsIdentityProvidersApi() .generateAccountSpCertificate(finalAccountId, finalId, SubtenantIdentityProviderAdapter.mapToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelCertificateGenerationReq(finalSubtenantIdentityProvider) - .algorithm(null) + .algorithm(AlgorithmEnum.fromValue(finalAlgorithm.getString())) .validity(Integer.valueOf(finalValidity))); } }, true); @@ -3933,15 +4306,86 @@ public String getModuleName() { return "Accounts"; } + /** + * Get all identity providers. + * + * + *

+ * Retrieve an array of identity providers. [b]Note:[/b] This endpoint is restricted to administrators. This lists + * the identity providers of the subtenant account. + * + * @param id + * The ID of the account. + * @param options + * list options. + * @return the list of subtenant identity providers corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public ListResponse + identityProviders(@NonNull String id, + @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + checkNotNull(id, TAG_ID); + final String finalId = id; + final SubtenantIdentityProviderListOptions finalOptions = (options == null) ? new SubtenantIdentityProviderListOptions() + : options; + return CloudCaller.call(this, "identityProviders()", SubtenantIdentityProviderAdapter.getListMapper(), + new CloudRequest.CloudCall() { + /** + * Makes the low level call to the Cloud. + * + * @return Corresponding Retrofit2 Call object + */ + @Override + public Call call() { + return endpoints.getTenantAccountsIdentityProvidersApi() + .getAllAccountIdentityProviders(finalId, + finalOptions.getPageSize(), + finalOptions.getAfter(), + finalOptions.getOrder() + .toString(), + ListOptionsEncoder.encodeInclude(finalOptions)); + } + }); + } + + /** + * Get all identity providers. + * + * + *

+ * Similar to + * {@link #identityProviders(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions)} + * + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant identity providers corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public ListResponse + identityProviders(@Nullable SubtenantIdentityProviderListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + checkModelValidity(account, TAG_ACCOUNT); + return identityProviders(account.getId(), options); + } + /** * Get light theme branding colors. * * *

- * Retrieve light theme branding colors for an account. + * Retrieve light theme branding colors for an account. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \ - * -H 'Authorization: Bearer [api_key]' ``` This lists the light theme banding colors of the subtenant account. + * -H 'Authorization: Bearer [access_key]' ``` This lists the light theme banding colors of the subtenant account. * * @param id * The ID of the account. @@ -4006,10 +4450,11 @@ public Call call() { * * *

- * Retrieve the metadata of all light theme branding images. + * Retrieve the metadata of all light theme branding images. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \ - * -H 'Authorization: Bearer [api_key]' ``` This lists the light theme banding images of the subtenant account. + * -H 'Authorization: Bearer [access_key]' ``` This lists the light theme banding images of the subtenant account. * * @param id * The ID of the account. @@ -4093,10 +4538,11 @@ public ListResponse listAccounts(@Nullable AccountListOptions options) * Lists accounts matching filter options. * *

- * Returns an array of account objects, optionally filtered by status and tier level. + * Retrieve an array of tenant accounts, optionally filtered by status and tier level. [b]Note:[/b] This endpoint is + * restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param format * Format information for the query response. Supported: format=breakdown. @@ -4223,12 +4669,19 @@ public ListResponse requestNewPage(ListOptions options) throws MbedClou *

* Similar to {@link #listAllApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * * @param options * list options. * @return paginator over the list of api keys * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator listAllApiKeys(@Nullable ApiKeyListOptions options) throws MbedCloudException { @@ -4241,6 +4694,12 @@ public Paginator listAllApiKeys(@Nullable ApiKeyListOptions options) thr *

* Gets an iterator over all api keys matching filter options. * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -4251,6 +4710,7 @@ public Paginator listAllApiKeys(@Nullable ApiKeyListOptions options) thr * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public Paginator listAllApiKeys(@Nullable String keyEq, @Nullable String ownerEq, @@ -4367,115 +4827,6 @@ public ListResponse requestNewPage(ListOptions options) throws Mbed }); } - /** - * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. - * - *

- * Gets an iterator over all subtenant identity providers matching filter options. - * - * @param accountId - * The ID of the account. - * @param options - * list options. - * @return paginator over the list of subtenant identity providers - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public Paginator - listAllSubtenantIdentityProviders(@NonNull String accountId, - @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - final String finalAccountId = accountId; - final SubtenantIdentityProviderListOptions finalOptions = (options == null) ? new SubtenantIdentityProviderListOptions() - : options; - return new Paginator(finalOptions, new PageRequester() { - /** - * Makes one page request. - * - * @param options - * a list options. - * @return Corresponding page requester - * @throws MbedCloudException - * if an error occurs during the process. - */ - @Override - public ListResponse - requestNewPage(ListOptions options) throws MbedCloudException { - return listSubtenantIdentityProviders(finalAccountId, (SubtenantIdentityProviderListOptions) options); - } - }); - } - - /** - * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. - * - *

- * Gets an iterator over all subtenant policy groups matching filter options. - * - * @param accountId - * Account ID. - * @param nameEq - * a string - * @param options - * list options. - * @return paginator over the list of subtenant policy groups - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public Paginator - listAllSubtenantPolicyGroups(@NonNull String accountId, @Nullable String nameEq, - @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - final String finalAccountId = accountId; - final String finalNameEq = nameEq; - final SubtenantPolicyGroupListOptions finalOptions = (options == null) ? new SubtenantPolicyGroupListOptions() - : options; - return new Paginator(finalOptions, new PageRequester() { - /** - * Makes one page request. - * - * @param options - * a list options. - * @return Corresponding page requester - * @throws MbedCloudException - * if an error occurs during the process. - */ - @Override - public ListResponse requestNewPage(ListOptions options) throws MbedCloudException { - return listSubtenantPolicyGroups(finalAccountId, finalNameEq, - (SubtenantPolicyGroupListOptions) options); - } - }); - } - - /** - * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. - * - *

- * Similar to - * {@link #listAllSubtenantPolicyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} - * - * @param accountId - * Account ID. - * @param options - * list options. - * @return paginator over the list of subtenant policy groups - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public Paginator - listAllSubtenantPolicyGroups(@NonNull String accountId, - @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - return listAllSubtenantPolicyGroups(accountId, (String) null, options); - } - /** * Creates a {@link Paginator} for the list of user invitations matching filter options. * @@ -4547,7 +4898,13 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloudEx * Lists api keys matching filter options. * *

- * Similar to {@link #listApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} + * Similar to {@link #listApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys * * @param options * list options. @@ -4555,6 +4912,7 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloudEx * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse listApiKeys(@Nullable ApiKeyListOptions options) throws MbedCloudException { @@ -4565,10 +4923,17 @@ public ListResponse listApiKeys(@Nullable ApiKeyListOptions options) thr * Lists api keys matching filter options. * *

- * Retrieve API keys in an array, optionally filtered by the owner. + * Retrieve an array of API keys, optionally filtered by the owner. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys * * @param keyEq * a string @@ -4580,6 +4945,7 @@ public ListResponse listApiKeys(@Nullable ApiKeyListOptions options) thr * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse listApiKeys(@Nullable String keyEq, @Nullable String ownerEq, @@ -4610,7 +4976,7 @@ public Call call() { * Lists identity providers matching filter options. * *

- * Retrieve identity providers in an array. + * Retrieve an array of identity providers. [b]Note:[/b] This endpoint is restricted to administrators. * * @param options * list options. @@ -4665,10 +5031,10 @@ public Call call() { * Lists policy groups matching filter options. * *

- * Retrieve all group information. + * Retrieve an array of policy groups. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param nameEq * a string @@ -4704,130 +5070,15 @@ public Call call() { }); } - /** - * Lists subtenant identity providers matching filter options. - * - *

- * Retrieve identity providers in an array. - * - * @param accountId - * The ID of the account. - * @param options - * list options. - * @return the list of subtenant identity providers corresponding to filter options (One page). - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public ListResponse - listSubtenantIdentityProviders(@NonNull String accountId, - @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - final String finalAccountId = accountId; - final SubtenantIdentityProviderListOptions finalOptions = (options == null) ? new SubtenantIdentityProviderListOptions() - : options; - return CloudCaller.call(this, "listSubtenantIdentityProviders()", - SubtenantIdentityProviderAdapter.getListMapper(), - new CloudRequest.CloudCall() { - /** - * Makes the low level call to the Cloud. - * - * @return Corresponding Retrofit2 Call object - */ - @Override - public Call call() { - return endpoints.getTenantAccountsIdentityProvidersApi() - .getAllAccountIdentityProviders(finalAccountId, - finalOptions.getPageSize(), - finalOptions.getAfter(), - finalOptions.getOrder() - .toString(), - ListOptionsEncoder.encodeInclude(finalOptions)); - } - }); - } - - /** - * Lists subtenant policy groups matching filter options. - * - *

- * Retrieve all group information. - * - * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ -H - * 'Authorization: Bearer [api_key]' ``` - * - * @param accountId - * Account ID. - * @param nameEq - * a string - * @param options - * list options. - * @return the list of subtenant policy groups corresponding to filter options (One page). - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public ListResponse - listSubtenantPolicyGroups(@NonNull String accountId, @Nullable String nameEq, - @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - final String finalAccountId = accountId; - final String finalNameEq = nameEq; - final SubtenantPolicyGroupListOptions finalOptions = (options == null) ? new SubtenantPolicyGroupListOptions() - : options; - return CloudCaller.call(this, "listSubtenantPolicyGroups()", SubtenantPolicyGroupAdapter.getListMapper(), - new CloudRequest.CloudCall() { - /** - * Makes the low level call to the Cloud. - * - * @return Corresponding Retrofit2 Call object - */ - @Override - public Call call() { - return endpoints.getTenantAccountsPolicyGroupsApi() - .getAllAccountGroups(finalAccountId, finalOptions.getPageSize(), - finalOptions.getAfter(), - finalOptions.getOrder().toString(), - ListOptionsEncoder.encodeInclude(finalOptions), - finalNameEq); - } - }); - } - - /** - * Lists subtenant policy groups matching filter options. - * - *

- * Similar to - * {@link #listSubtenantPolicyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} - * - * @param accountId - * Account ID. - * @param options - * list options. - * @return the list of subtenant policy groups corresponding to filter options (One page). - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public ListResponse - listSubtenantPolicyGroups(@NonNull String accountId, - @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); - return listSubtenantPolicyGroups(accountId, (String) null, options); - } - /** * Lists user invitations matching filter options. * *

- * Retrieve details for all the active user invitations. + * Retrieve an array of active user invitations sent by email. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param options * list options. @@ -4863,10 +5114,10 @@ public Call call() { * Lists users matching filter options. * *

- * Retrieve the details of all users. + * Retrieve an array of users. [b]Note:[/b] This endpoint is restricted to administrators. * - * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \ -H 'Authorization: Bearer [api_key]' - * ``` + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \ -H 'Authorization: Bearer + * [access_key]' ``` * * @param options * list options. @@ -4926,10 +5177,10 @@ public Account myAccount() throws MbedCloudException { * Gets my account. * *

- * Retrieve detailed information about the account. + * Retrieve information about the account. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \ -H - * 'Authorization: Bearer [api_key]' ``` This is provided by the SDK to avoid listing to retrieve the user's own + * 'Authorization: Bearer [access_key]' ``` This is provided by the SDK to avoid listing to retrieve the user's own * Account. * * @param include @@ -4945,7 +5196,7 @@ public Account myAccount() throws MbedCloudException { public Account myAccount(@Nullable String include, @Nullable String properties) throws MbedCloudException { final String finalInclude = include; final String finalProperties = properties; - return CloudCaller.call(this, "myAccount()", AccountAdapter.getMapper(), + return CloudCaller.call(this, "myAccount()", AccountAdapter.getAccountInfoMapper(), new CloudRequest.CloudCall() { /** * Makes the low level call to the Cloud. @@ -4964,15 +5215,22 @@ public Call call() { * Gets my api key. * *

- * Retrieve API key details. + * Retrieve details of current API key. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ -H 'Authorization: Bearer - * [api_key]' ``` This is provided by the SDK to avoid listing to retrieve the user's own API Key. + * [access_key]' ``` This is provided by the SDK to avoid listing to retrieve the user's own API Key. + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. * * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey myApiKey() throws MbedCloudException { @@ -4991,12 +5249,18 @@ public Call call() { } /** - * Get groups of the API key. + * Get policy groups of an API key. * * *

* Similar to {@link #policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @param apiKey @@ -5005,6 +5269,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse policyGroups(@Nullable PolicyGroupListOptions options, @@ -5015,7 +5280,7 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o } /** - * Get groups of the user. + * Get policy groups for a user. * * *

@@ -5039,14 +5304,15 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o } /** - * Get groups of the user. + * Get policy groups for a user. * * *

- * Retrieve groups of the user. + * Retrieve an array of policy groups associated with a user. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param id * The ID of the user. @@ -5082,19 +5348,19 @@ public Call call() { } /** - * Get user's groups. + * Get policy groups. * * *

- * Retrieve user's groups. + * Retrieve an array of policy groups. [b]Note:[/b] This endpoint is restricted to administrators. * - * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups - * \ -H 'Authorization: Bearer [api_key]' ``` + * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ -H + * 'Authorization: Bearer [access_key]' ``` This lists the policy groups of the subtenant account. * - * @param accountId - * Account ID. * @param id - * The ID of the user. + * Account ID. + * @param nameEq + * a string * @param options * list options. * @return the list of subtenant policy groups corresponding to filter options (One page). @@ -5104,12 +5370,11 @@ public Call call() { @API @Nullable public ListResponse - policyGroups(@NonNull String accountId, @NonNull String id, + policyGroups(@NonNull String id, @Nullable String nameEq, @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { - checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(id, TAG_ID); - final String finalAccountId = accountId; final String finalId = id; + final String finalNameEq = nameEq; final SubtenantPolicyGroupListOptions finalOptions = (options == null) ? new SubtenantPolicyGroupListOptions() : options; return CloudCaller.call(this, "policyGroups()", SubtenantPolicyGroupAdapter.getListMapper(), @@ -5121,24 +5386,107 @@ public Call call() { */ @Override public Call call() { - return endpoints.getTenantAccountsUsersApi() - .getGroupsOfAccountUser(finalAccountId, finalId, - finalOptions.getPageSize(), - finalOptions.getAfter(), - finalOptions.getOrder().toString(), - ListOptionsEncoder.encodeInclude(finalOptions)); + return endpoints.getTenantAccountsPolicyGroupsApi() + .getAllAccountGroups(finalId, finalOptions.getPageSize(), + finalOptions.getAfter(), + finalOptions.getOrder().toString(), + ListOptionsEncoder.encodeInclude(finalOptions), + finalNameEq); } }); } /** - * Get groups associated with the API key. + * Get policy groups. + * + * + *

+ * Similar to + * {@link #policyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} + * + * @param id + * Account ID. + * @param options + * list options. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public ListResponse + policyGroups(@NonNull String id, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + checkNotNull(id, TAG_ID); + return policyGroups(id, (String) null, options); + } + + /** + * Get policy groups. + * + * + *

+ * Similar to + * {@link #policyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} + * + * @param nameEq + * a string + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public ListResponse policyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + checkModelValidity(account, TAG_ACCOUNT); + return policyGroups(account.getId(), nameEq, options); + } + + /** + * Get policy groups. + * + * + *

+ * Similar to + * {@link #policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public ListResponse policyGroups(@Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + checkNotNull(account, TAG_ACCOUNT); + return policyGroups((String) null, options, account); + } + + /** + * Get policy groups of an API key. * * *

* Similar to * {@link #policyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups + * * @param options * list options. * @param subtenantApiKey @@ -5147,6 +5495,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ListResponse @@ -5158,7 +5507,7 @@ public Call call() { } /** - * Get user's groups. + * Get policy groups for a user. * * *

@@ -5250,12 +5599,12 @@ public Account readAccount(@Nullable String include, @Nullable String properties * Gets an account. * *

- * Retrieve detailed information about an account. + * Retrieve detailed information about an account. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** * * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param include * Comma-separated additional data to return. Currently supported: limits, policies, sub_accounts, @@ -5276,7 +5625,7 @@ public Account readAccount(@Nullable String include, @Nullable String properties final String finalInclude = include; final String finalProperties = properties; final String finalId = id; - return CloudCaller.call(this, "readAccount()", AccountAdapter.getMapper(), + return CloudCaller.call(this, "readAccount()", AccountAdapter.getAccountInfoMapper(), new CloudRequest.CloudCall() { /** * Makes the low level call to the Cloud. @@ -5297,12 +5646,19 @@ public Call call() { *

* Similar to {@link #readApiKey(String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey readApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { @@ -5314,10 +5670,17 @@ public ApiKey readApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { * Gets an api key. * *

- * Retrieve API key details. + * Retrieve details of an API key. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} * * @param id * The ID of the API key. @@ -5325,6 +5688,7 @@ public ApiKey readApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey readApiKey(@NonNull String id) throws MbedCloudException { @@ -5367,7 +5731,7 @@ public IdentityProvider readIdentityProvider(@NonNull IdentityProvider identityP * Gets an identity provider. * *

- * Retrieve by ID. + * Retrieve an identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param id * Entity ID. @@ -5417,10 +5781,10 @@ public PolicyGroup readPolicyGroup(@NonNull PolicyGroup policyGroup) throws Mbed * Gets a policy group. * *

- * Retrieve general information about a group. + * Retrieve a policy group. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param id * The ID of the group. @@ -5451,10 +5815,17 @@ public Call call() { * Gets a subtenant api key. * *

- * Retrieve API key details. + * Retrieve details of an API key. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - * -H 'Authorization: Bearer [api_key]' ``` + * -H 'Authorization: Bearer [access_key]' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} * * @param accountId * The ID of the account. @@ -5464,6 +5835,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey readSubtenantApiKey(@NonNull String accountId, @@ -5493,12 +5865,19 @@ public Call call() { *

* Similar to {@link #readSubtenantApiKey(String, String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * * @param subtenantApiKey * a subtenant api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey readSubtenantApiKey(@NonNull SubtenantApiKey subtenantApiKey) throws MbedCloudException { @@ -5510,7 +5889,7 @@ public SubtenantApiKey readSubtenantApiKey(@NonNull SubtenantApiKey subtenantApi * Gets a subtenant identity provider. * *

- * Manage identity providers of a tenant account. + * Retrieve an identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param accountId * The ID of the account the identity provider belongs to. @@ -5568,11 +5947,11 @@ public Call call() { * Gets a subtenant policy group. * *

- * Retrieve general information about the group. + * Retrieve policy group details. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param accountId * The ID of the account this group belongs to. @@ -5629,10 +6008,10 @@ public Call call() { * Gets a subtenant user. * *

- * Retrieve user details. + * Retrieve user details. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -5687,11 +6066,12 @@ public SubtenantUser readSubtenantUser(@NonNull SubtenantUser subtenantUser) thr * Gets a subtenant user invitation. * *

- * Retrieve details of an active user invitation sent for a new or existing user. + * Retrieve details of an active user invitation sent for a new or existing user. [b]Note:[/b] This endpoint is + * restricted to administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account the user is invited to. @@ -5748,10 +6128,10 @@ public Call call() { * Gets a user. * *

- * Retrieve the details of a user. + * Retrieve the details of a user. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param id * The ID of the user. @@ -5801,10 +6181,10 @@ public User readUser(@NonNull User user) throws MbedCloudException { * Gets a user invitation. * *

- * Retrieve the details of an active user invitation. + * Retrieve the details of an active user invitation. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the invitation. @@ -5875,7 +6255,7 @@ public IdentityProvider refreshTokens(@NonNull IdentityProvider identityProvider * * *

- * Refreshes an OIDC IdP's signing keys. + * Refreshes an OIDC IdP's signing keys. [b]Note:[/b] This endpoint is restricted to administrators. * * @param id * Entity ID. @@ -5903,11 +6283,11 @@ public Call call() { } /** - * Refreshes the OIDC signing keys. + * Refresh the OIDC signing keys. * * *

- * Refreshes an OIDC IdP's signing keys. + * Refresh an OIDC IdP's signing keys. [b]Note:[/b] This endpoint is restricted to administrators. * * @param accountId * The ID of the account the identity provider belongs to. @@ -5941,7 +6321,7 @@ public Call call() { } /** - * Refreshes the OIDC signing keys. + * Refresh the OIDC signing keys. * * *

@@ -5962,7 +6342,7 @@ public Call call() { } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -5994,14 +6374,14 @@ public Call call() { } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

- * Retrieve trusted certificates in an array. + * Retrieve an array of trusted certificates. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - * -H 'Authorization: Bearer [api_key]' ``` This lists the trusted certificates of the subtenant account. + * -H 'Authorization: Bearer [access_key]' ``` This lists the trusted certificates of the subtenant account. * * @param id * Account ID. @@ -6036,7 +6416,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getTenantDeviceSecurityCertificatesApi() + return endpoints.getTenantSecurityAndIdentityCertificatesApi() .getAllAccountCertificates(finalId, finalOptions.getPageSize(), finalOptions.getAfter(), finalOptions.getOrder().toString(), @@ -6062,6 +6442,8 @@ public Call call() { finalOptions), ListOptionsEncoder.encodeSingleLikeFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, finalOptions), + ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + finalOptions), ListOptionsEncoder.encodeSingleEqualFilter(SubtenantTrustedCertificateListOptions.TAG_FILTER_BY_VALID, Boolean.class, finalOptions)); @@ -6070,7 +6452,7 @@ public Call call() { } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -6096,7 +6478,7 @@ public Call call() { } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -6145,12 +6527,12 @@ public Account updateAccount(@NonNull Account account) throws MbedCloudException * Modifies an account. * *

- * Update an account. + * Update an account. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** * * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' \ -d '{"phone_number": "12345678"}' ``` + * [access_key]' \ -H 'content-type: application/json' \ -d '{"phone_number": "12345678"}' ``` * * @param id * Account ID. @@ -6168,7 +6550,7 @@ public Account updateAccount(@NonNull String id, @NonNull Account account) throw checkModelValidity(account, TAG_ACCOUNT); final String finalId = id; final Account finalAccount = account; - return CloudCaller.call(this, "updateAccount()", AccountAdapter.getMapper(), + return CloudCaller.call(this, "updateAccount()", AccountAdapter.getAccountInfoMapper(), new CloudRequest.CloudCall() { /** * Makes the low level call to the Cloud. @@ -6190,12 +6572,19 @@ public Call call() { *

* Similar to {@link #updateApiKey(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey updateApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { @@ -6211,7 +6600,14 @@ public ApiKey updateApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { * Update API key details. * * **Example:** `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestApiKey25"}' ``` + * [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestApiKey25"}' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} * * @param id * The ID of the API key. @@ -6221,6 +6617,7 @@ public ApiKey updateApiKey(@NonNull ApiKey apiKey) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public ApiKey updateApiKey(@NonNull String id, @NonNull ApiKey apiKey) throws MbedCloudException { @@ -6249,8 +6646,7 @@ public Call call() { * Modifies an identity provider. * *

- * Similar to - * {@link #updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * Similar to {@link #updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param identityProvider * an identity provider. @@ -6263,7 +6659,7 @@ public Call call() { public IdentityProvider updateIdentityProvider(@NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - return updateIdentityProvider(false, (OidcRequest) null, identityProvider); + return updateIdentityProvider(false, identityProvider); } /** @@ -6271,7 +6667,7 @@ public Call call() { * *

* Similar to - * {@link #updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link #updateIdentityProvider(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param id * Entity ID. @@ -6288,7 +6684,7 @@ public Call call() { @NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(id, TAG_ID); checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - return updateIdentityProvider(false, (OidcRequest) null, id, identityProvider); + return updateIdentityProvider(false, id, identityProvider); } /** @@ -6296,7 +6692,7 @@ public Call call() { * *

* Similar to - * {@link #updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link #updateIdentityProvider(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -6305,8 +6701,6 @@ public Call call() { * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param identityProvider * an identity provider. * @return something @@ -6316,19 +6710,18 @@ public Call call() { @API @Nullable public IdentityProvider - updateIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + updateIdentityProvider(@Nullable boolean discovery, @NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(identityProvider, TAG_IDENTITY_PROVIDER); - return updateIdentityProvider(discovery, oidcAttributes, identityProvider.getId(), identityProvider); + return updateIdentityProvider(discovery, identityProvider.getId(), identityProvider); } /** * Modifies an identity provider. * *

- * Update an existing identity provider. + * Update an existing identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -6337,8 +6730,6 @@ public Call call() { * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param id * Entity ID. * @param identityProvider @@ -6350,14 +6741,12 @@ public Call call() { @API @Nullable public IdentityProvider - updateIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, @NonNull String id, + updateIdentityProvider(@Nullable boolean discovery, @NonNull String id, @NonNull IdentityProvider identityProvider) throws MbedCloudException { checkNotNull(id, TAG_ID); checkNotNull(identityProvider, TAG_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(identityProvider, TAG_IDENTITY_PROVIDER); final boolean finalDiscovery = discovery; - final OidcRequest finalOidcAttributes = oidcAttributes; final String finalId = id; final IdentityProvider finalIdentityProvider = identityProvider; return CloudCaller.call(this, "updateIdentityProvider()", IdentityProviderAdapter.getMapper(), @@ -6371,8 +6760,7 @@ public Call call() { public Call call() { return endpoints.getAccountIdentityProvidersApi() .updateIdentityProvider(finalId, - IdentityProviderAdapter.reverseMapUpdateRequest(finalIdentityProvider) - .oidcAttributes(null), + IdentityProviderAdapter.reverseMapUpdateRequest(finalIdentityProvider), Boolean.valueOf(finalDiscovery)); } }, true); @@ -6402,10 +6790,10 @@ public PolicyGroup updatePolicyGroup(@NonNull PolicyGroup policyGroup) throws Mb * Modifies a policy group. * *

- * Update a group name. + * Update a group name. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestGroup2"}' ``` + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestGroup2"}' ``` * * @param id * The ID of the group. @@ -6444,10 +6832,17 @@ public Call call() { * Modifies a subtenant api key. * *

- * Update API key details. + * Update API key details. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id} \ - * -H 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestApiKey25"}' ``` + * -H 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestApiKey25"}' ``` + * + * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} * * @param accountId * The ID of the account. @@ -6459,6 +6854,7 @@ public Call call() { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey updateSubtenantApiKey(@NonNull String accountId, @NonNull String id, @@ -6492,12 +6888,19 @@ public Call call() { *

* Similar to {@link #updateSubtenantApiKey(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id} + * * @param subtenantApiKey * a subtenant api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @API @Nullable public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantApiKey) throws MbedCloudException { @@ -6511,7 +6914,7 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * *

* Similar to - * {@link #updateSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #updateSubtenantIdentityProvider(boolean, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param accountId * The ID of the account the identity provider belongs to. @@ -6531,7 +6934,7 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(id, TAG_ID); checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return updateSubtenantIdentityProvider(false, (OidcRequest) null, accountId, id, subtenantIdentityProvider); + return updateSubtenantIdentityProvider(false, accountId, id, subtenantIdentityProvider); } /** @@ -6539,7 +6942,7 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * *

* Similar to - * {@link #updateSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #updateSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param subtenantIdentityProvider * a subtenant identity provider. @@ -6552,14 +6955,14 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA public SubtenantIdentityProvider updateSubtenantIdentityProvider(@NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return updateSubtenantIdentityProvider(false, (OidcRequest) null, subtenantIdentityProvider); + return updateSubtenantIdentityProvider(false, subtenantIdentityProvider); } /** * Modifies a subtenant identity provider. * *

- * Update an existing identity provider. + * Update an existing identity provider. [b]Note:[/b] This endpoint is restricted to administrators. * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -6568,8 +6971,6 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param accountId * The ID of the account the identity provider belongs to. * @param id @@ -6583,16 +6984,13 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA @API @Nullable public SubtenantIdentityProvider - updateSubtenantIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, - @NonNull String accountId, @NonNull String id, + updateSubtenantIdentityProvider(@Nullable boolean discovery, @NonNull String accountId, @NonNull String id, @NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(accountId, TAG_ACCOUNT_ID); checkNotNull(id, TAG_ID); checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); final boolean finalDiscovery = discovery; - final OidcRequest finalOidcAttributes = oidcAttributes; final String finalAccountId = accountId; final String finalId = id; final SubtenantIdentityProvider finalSubtenantIdentityProvider = subtenantIdentityProvider; @@ -6607,8 +7005,7 @@ public SubtenantApiKey updateSubtenantApiKey(@NonNull SubtenantApiKey subtenantA public Call call() { return endpoints.getTenantAccountsIdentityProvidersApi() .updateAccountIdentityProvider(finalAccountId, finalId, - SubtenantIdentityProviderAdapter.reverseMapUpdateRequest(finalSubtenantIdentityProvider) - .oidcAttributes(null), + SubtenantIdentityProviderAdapter.reverseMapUpdateRequest(finalSubtenantIdentityProvider), Boolean.valueOf(finalDiscovery)); } }, true); @@ -6619,7 +7016,7 @@ public Call call() { * *

* Similar to - * {@link #updateSubtenantIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} + * {@link #updateSubtenantIdentityProvider(boolean, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -6628,8 +7025,6 @@ public Call call() { * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param subtenantIdentityProvider * a subtenant identity provider. * @return something @@ -6639,12 +7034,44 @@ public Call call() { @API @Nullable public SubtenantIdentityProvider - updateSubtenantIdentityProvider(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + updateSubtenantIdentityProvider(@Nullable boolean discovery, @NonNull SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - checkModelValidity(oidcAttributes, TAG_OIDC_ATTRIBUTES); checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); - return updateSubtenantIdentityProvider(discovery, oidcAttributes, subtenantIdentityProvider.getAccountId(), + return updateSubtenantIdentityProvider(discovery, subtenantIdentityProvider.getAccountId(), + subtenantIdentityProvider.getId(), subtenantIdentityProvider); + } + + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public SubtenantIdentityProvider + updateSubtenantIdentityProvider(boolean discovery, OidcRequest oidcAttributes, String accountId, String id, + SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { + + checkNotNull(accountId, TAG_ACCOUNT_ID); + checkNotNull(id, TAG_ID); + checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + + return updateSubtenantIdentityProvider(discovery, accountId, id, subtenantIdentityProvider); + } + + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public SubtenantIdentityProvider + updateSubtenantIdentityProvider(boolean discovery, OidcRequest oidcAttributes, + SubtenantIdentityProvider subtenantIdentityProvider) throws MbedCloudException { + checkNotNull(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + checkModelValidity(subtenantIdentityProvider, TAG_SUBTENANT_IDENTITY_PROVIDER); + return updateSubtenantIdentityProvider(discovery, subtenantIdentityProvider.getAccountId(), subtenantIdentityProvider.getId(), subtenantIdentityProvider); } @@ -6652,11 +7079,11 @@ public Call call() { * Modifies a subtenant policy group. * *

- * Update a group name. + * Update a group name. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/ \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestGroup2"}' ``` + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"name": "TestGroup2"}' ``` * * @param accountId * The ID of the account this group belongs to. @@ -6723,10 +7150,10 @@ public Call call() { * Modifies a subtenant user. * *

- * Update user details. + * Update user details. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{"username": "myusername"}' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{"username": "myusername"}' ``` * * @param accountId * The ID of the account. @@ -6789,10 +7216,10 @@ public SubtenantUser updateSubtenantUser(@NonNull SubtenantUser subtenantUser) t * Modifies a user. * *

- * Update user details + * Update user details. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ -H 'Authorization: Bearer - * [api_key]' \ -H 'content-type: application/json' \ -d '{"username": "myusername"}' ``` + * [access_key]' \ -H 'content-type: application/json' \ -d '{"username": "myusername"}' ``` * * @param id * The ID of the user. @@ -6847,14 +7274,14 @@ public User updateUser(@NonNull User user) throws MbedCloudException { } /** - * Get the details of all user invitations. + * Get user invitations. * * *

- * Retrieve details of all active user invitations sent for new or existing users. + * Retrieve an array of active user invitations. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations \ -H - * 'Authorization: Bearer [api_key]' ``` This lists the user invitations of the subtenant account. + * 'Authorization: Bearer [access_key]' ``` This lists the user invitations of the subtenant account. * * @param id * Account ID. @@ -6893,7 +7320,7 @@ public Call call() { } /** - * Get the details of all user invitations. + * Get user invitations. * * *

@@ -6918,15 +7345,16 @@ public ListResponse userInvitations(@Nullable Subtenant } /** - * Get users of a group. + * Get users in a policy group. * * *

- * List a group's users, with details. + * Retrieve an array of users associated with a policy group. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -6979,14 +7407,14 @@ public Call call() { } /** - * Get the details of all users. + * Get users. * * *

- * Retrieve details of all users. + * Retrieve an array of users. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ -H - * 'Authorization: Bearer [api_key]' ``` This lists the users of the subtenant account. + * 'Authorization: Bearer [access_key]' ``` This lists the users of the subtenant account. * * @param id * Account ID. @@ -7037,7 +7465,7 @@ public Call call() { } /** - * Get users of a group. + * Get users in a policy group. * * *

@@ -7071,15 +7499,16 @@ public Call call() { } /** - * Get users of a group. + * Get users in a policy group. * * *

- * List a group's users, with details. + * Retrieve an array of users associated with a policy group. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -7126,7 +7555,7 @@ public Call call() { } /** - * Get the details of all users. + * Get users. * * *

@@ -7155,7 +7584,7 @@ public ListResponse users(@Nullable String emailEq, @Nullable Str } /** - * Get the details of all users. + * Get users. * * *

@@ -7178,14 +7607,15 @@ public ListResponse users(@NonNull String id, } /** - * Get users of a group. + * Get users of a policy group. * * *

- * Retrieve users of a group with details. + * Retrieve an array of users associated with a policy group. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the group. @@ -7226,7 +7656,7 @@ public Call call() { } /** - * Get the details of all users. + * Get users. * * *

@@ -7250,7 +7680,7 @@ public ListResponse users(@Nullable SubtenantUserListOptions opti } /** - * Get users of a group. + * Get users in a policy group. * * *

@@ -7275,7 +7705,7 @@ public ListResponse users(@Nullable SubtenantUserListOptions opti } /** - * Get users of a group. + * Get users of a policy group. * * *

@@ -7303,11 +7733,11 @@ public ListResponse users(@Nullable UserListOptions options, * * *

- * Validate user email. + * Validate user email. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/validate-email \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -7352,4 +7782,5 @@ public void validateEmail(@NonNull SubtenantUser subtenantUser) throws MbedCloud checkNotNull(subtenantUser, TAG_SUBTENANT_USER); validateEmail(subtenantUser.getAccountId(), subtenantUser.getId()); } + } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Branding.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Branding.java index 03d23d7d4..9761302f5 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Branding.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Branding.java @@ -205,10 +205,10 @@ public void deleteDarkThemeColor(@NonNull DarkThemeColor darkThemeColor) throws * Deletes a dark theme color. * *

- * Resets the branding color to its dark theme default. + * Resets the branding color to its dark theme default. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * The name of the branding color. @@ -254,10 +254,11 @@ public void deleteDarkThemeImage(@NonNull DarkThemeImage darkThemeImage) throws * Deletes a dark theme image. * *

- * Revert an account branding image to dark theme default. + * Revert an account branding image to dark theme default. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Name of the branding images (icon or picture). @@ -303,10 +304,10 @@ public void deleteLightThemeColor(@NonNull LightThemeColor lightThemeColor) thro * Deletes a light theme color. * *

- * Resets the branding color to its light theme default. + * Resets the branding color to its light theme default. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * The name of the branding color. @@ -352,10 +353,11 @@ public void deleteLightThemeImage(@NonNull LightThemeImage lightThemeImage) thro * Deletes a light theme image. * *

- * Revert an account branding image to light theme default. + * Revert an account branding image to light theme default. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Name of the branding images (icon or picture). @@ -407,11 +409,11 @@ public Call call() { * Deletes a subtenant dark theme color. * *

- * Resets the branding color of a tenant account to its dark theme default. + * Resets the branding color to its dark theme default. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -470,11 +472,12 @@ public Call call() { * Deletes a subtenant dark theme image. * *

- * Revert an account branding image to dark theme default. + * Revert an account branding image to dark theme default. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -533,11 +536,11 @@ public Call call() { * Deletes a subtenant light theme color. * *

- * Resets the branding color of a tenant account to its light theme default. + * Resets the branding color to its light theme default. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -596,11 +599,12 @@ public Call call() { * Deletes a subtenant light theme image. * *

- * Revert an account branding image to light theme default. + * Revert an account branding image to light theme default. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ```curl -X POST * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -796,7 +800,7 @@ public ListResponse requestNewPage(ListOptions options) throws * Retrieve the dark theme branding colors. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param options * list options. @@ -830,7 +834,7 @@ public Call call() { * Retrieve metadata for all dark theme branding images. * * **Example:** `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * @param options * list options. @@ -864,7 +868,7 @@ public Call call() { * Retrieve the light theme branding colors. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param options * list options. @@ -898,7 +902,7 @@ public Call call() { * Retrieve the metadata of all light theme branding images. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param options * list options. @@ -952,7 +956,7 @@ public DarkThemeColor readDarkThemeColor(@NonNull DarkThemeColor darkThemeColor) * Retrieve the requested dark theme branding color. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Color name. @@ -1007,7 +1011,7 @@ public DarkThemeImage readDarkThemeImage(@NonNull DarkThemeImage darkThemeImage) * Retrieve metadata for one account dark theme branding image. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Name of the image. @@ -1062,7 +1066,7 @@ public LightThemeColor readLightThemeColor(@NonNull LightThemeColor lightThemeCo * Retrieve the requested light theme branding color. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Color name. @@ -1117,7 +1121,7 @@ public LightThemeImage readLightThemeImage(@NonNull LightThemeImage lightThemeIm * Retrieve metadata for one account light theme branding image. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param reference * Name of the image. @@ -1175,11 +1179,11 @@ public Call call() { * Gets a subtenant dark theme color. * *

- * Retrieve the requested dark theme branding color. + * Retrieve the requested dark theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -1244,11 +1248,12 @@ public Call call() { * Gets a subtenant dark theme image. * *

- * Retrieve metadata of one account dark theme branding image. + * Retrieve metadata of one account dark theme branding image. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -1313,11 +1318,11 @@ public Call call() { * Gets a subtenant light theme color. * *

- * Retrieve the requested light theme branding color. + * Retrieve the requested light theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -1382,11 +1387,12 @@ public Call call() { * Gets a subtenant light theme image. * *

- * Retrieve metadata for one account light theme branding image. + * Retrieve metadata for one account light theme branding image. [b]Note:[/b] This endpoint is restricted to + * administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -1447,10 +1453,10 @@ public DarkThemeColor updateDarkThemeColor(@NonNull DarkThemeColor darkThemeColo * Modifies a dark theme color. * *

- * Update a dark theme branding color. + * Update a dark theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{ "color": "#f3f93e" }' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{ "color": "#f3f93e" }' ``` * * @param reference * Color name. @@ -1516,7 +1522,8 @@ public DarkThemeImage updateDarkThemeImage(@NonNull DataFile image, * Modifies a dark theme image. * *

- * Upload a new account branding image as form data in the dark theme in PNG or JPEG format. + * Upload a new account branding image as form data in the dark theme in PNG or JPEG format. [b]Note:[/b] This + * endpoint is restricted to administrators. * * @param image * The image in PNG or JPEG format as multipart form data. @@ -1578,10 +1585,10 @@ public LightThemeColor updateLightThemeColor(@NonNull LightThemeColor lightTheme * Modifies a light theme color. * *

- * Update light theme branding color. + * Update light theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{ "color": "purple" }' ``` + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{ "color": "purple" }' ``` * * @param reference * Color name. @@ -1647,7 +1654,8 @@ public LightThemeImage updateLightThemeImage(@NonNull DataFile image, * Modifies a light theme image. * *

- * Upload a new account branding image as form data in the light theme in PNG or JPEG format. + * Upload a new account branding image as form data in the light theme in PNG or JPEG format. [b]Note:[/b] This + * endpoint is restricted to administrators. * * @param image * The image in PNG or JPEG format as multipart form data. @@ -1716,11 +1724,11 @@ public Call call() { * Modifies a subtenant dark theme color. * *

- * Update a dark theme branding color of a tenant account. + * Update a dark theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/dark/primary \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{ "color": "#f3f93e" }' ``` + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{ "color": "#f3f93e" }' ``` * * @param accountId * The ID of the account. @@ -1796,7 +1804,8 @@ public Call call() { * Modifies a subtenant dark theme image. * *

- * Upload a new account dark theme branding image as form data in PNG or JPEG format. + * Upload a new account dark theme branding image as form data in PNG or JPEG format. [b]Note:[/b] This endpoint is + * restricted to administrators. * * @param accountId * The ID of the account. @@ -1870,11 +1879,11 @@ public Call call() { * Modifies a subtenant light theme color. * *

- * Update a light theme branding color of a tenant account. + * Update a light theme branding color. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d '{ "color": "purple" }' ``` + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d '{ "color": "purple" }' ``` * * @param accountId * The ID of the account. @@ -1951,7 +1960,8 @@ public Call call() { * Modifies a subtenant light theme image. * *

- * Upload a new account branding image as form data in PNG or JPEG format. + * Upload a new account branding image as form data in PNG or JPEG format. [b]Note:[/b] This endpoint is restricted + * to administrators. * * @param accountId * The ID of the account. diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/DeviceUpdate.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/DeviceUpdate.java index 0b31aff14..44c836616 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/DeviceUpdate.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/DeviceUpdate.java @@ -129,6 +129,12 @@ public class DeviceUpdate extends AbstractModule { @Internal private static final String TAG_KEY_TABLE_FILE = "keyTableFile"; + /** + * Parameter name. + */ + @Internal + private static final String TAG_NAME = "name"; + /** * Parameter name. */ @@ -322,12 +328,12 @@ public ListResponse requestNewPage(ListOptions options) @API @Nullable public Paginator - allEvents(@NonNull String campaignId, @NonNull String id, + allEvents(@NonNull String campaignId, @NonNull CampaignStatisticsId id, @Nullable CampaignStatisticsEventsListOptions options) throws MbedCloudException { checkNotNull(campaignId, TAG_CAMPAIGN_ID); checkNotNull(id, TAG_ID); final String finalCampaignId = campaignId; - final String finalId = id; + final CampaignStatisticsId finalId = id; final CampaignStatisticsEventsListOptions finalOptions = (options == null) ? new CampaignStatisticsEventsListOptions() : options; return new Paginator(finalOptions, new PageRequester() { @@ -348,14 +354,29 @@ public ListResponse requestNewPage(ListOptions options) }); } + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public Paginator + allEvents(@NonNull String campaignId, @NonNull String id, + @Nullable CampaignStatisticsEventsListOptions options) throws MbedCloudException { + checkNotNull(campaignId, TAG_CAMPAIGN_ID); + checkNotNull(id, TAG_ID); + + return allEvents(campaignId, CampaignStatisticsId.valueOf(id), options); + } + /** * Archive a campaign. * * *

* Archive a campaign. [br] **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/archive \ -H - * 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive \ -H + * 'Authorization: Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -417,7 +438,7 @@ public DeviceUpdate clone() { * Similar to {@link #createFirmwareImage(com.arm.mbed.cloud.sdk.common.model.DataFile, String, String)} * * @param firmwareImageFile - * The firmware image file to upload. + * The firmware image file to upload. File name must not exceed 166 characters. * @return an added firmware image * @throws MbedCloudException * if an error occurs during the process. @@ -436,7 +457,7 @@ public FirmwareImage createFirmwareImage(@NonNull DataFile firmwareImageFile) th * Similar to {@link #createFirmwareImage(com.arm.mbed.cloud.sdk.common.model.DataFile, String, String)} * * @param firmwareImageFile - * The firmware image file to upload. + * The firmware image file to upload. File name must not exceed 166 characters. * @param firmwareImage * a firmware image. * @return something @@ -458,16 +479,19 @@ public FirmwareImage createFirmwareImage(@NonNull DataFile firmwareImageFile, * Adds a firmware image. * *

- * Create a firmware image. [br] **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \ -H 'Authorization: [valid access token]' \ -H - * 'Content-Type: multipart/form-data' \ -F 'datafile=@myimage.bin;type=application/octet-stream' -F - * 'description=bla bla' \ -F 'name=My Linux Image' ``` + * Create a firmware image. [BR/] **Note:** Only use this API for images smaller than 100 MB. For larger images, + * [upload in + * chunks](https://developer.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large- + * firmware-image.html). [br] **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \ -H 'Authorization: Bearer [api_key]' \ -H 'Content-Type: + * multipart/form-data' \ -F 'datafile=@myimage.bin;type=application/octet-stream' -F 'description=bla bla' \ -F + * 'name=My Linux Image' ``` * * This is not a standard create method as it uploads a file which creates an entity which contains URIs to the * uploaded file. * * @param firmwareImageFile - * The firmware image file to upload. + * The firmware image file to upload. File name must not exceed 166 characters. * @param description * The description of the object. * @param name @@ -511,29 +535,11 @@ public FirmwareImage createFirmwareImage(@NonNull DataFile firmwareImageFile, @N * {@link #createFirmwareManifest(com.arm.mbed.cloud.sdk.common.model.DataFile, com.arm.mbed.cloud.sdk.common.model.DataFile, String, String)} * * @param firmwareManifestFile - * The manifest file to create. The API gateway enforces the account-specific file size. - * @return an added firmware manifest - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifestFile) throws MbedCloudException { - checkNotNull(firmwareManifestFile, TAG_FIRMWARE_MANIFEST_FILE); - return createFirmwareManifest(firmwareManifestFile, (DataFile) null, (String) null, (String) null); - } - - /** - * Adds a firmware manifest. - * - *

- * Similar to - * {@link #createFirmwareManifest(com.arm.mbed.cloud.sdk.common.model.DataFile, com.arm.mbed.cloud.sdk.common.model.DataFile, String, String)} - * - * @param firmwareManifestFile - * The manifest file to create. The API gateway enforces the account-specific file size. + * The manifest file to create. The API gateway enforces the account-specific file size. File name must + * not exceed 100 characters. * @param keyTableFile - * The key table of pre-shared keys for devices. The table is generated by the manifest tool. + * The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name + * must not exceed 100 characters. * @param firmwareManifest * a firmware manifest. * @return something @@ -550,8 +556,8 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes checkModelValidity(firmwareManifestFile, TAG_FIRMWARE_MANIFEST_FILE); checkModelValidity(keyTableFile, TAG_KEY_TABLE_FILE); checkModelValidity(firmwareManifest, TAG_FIRMWARE_MANIFEST); - return createFirmwareManifest(firmwareManifestFile, keyTableFile, firmwareManifest.getDescription(), - firmwareManifest.getName()); + return createFirmwareManifest(firmwareManifestFile, keyTableFile, firmwareManifest.getName(), + firmwareManifest.getDescription()); } /** @@ -559,7 +565,7 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes * *

* Upload a firmware manifest. The API enforces a maximum manifest size of 2KB. [br] **Usage example:** ``` curl -X - * POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ -H 'Authorization: [valid access token]' \ -H + * POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ -H 'Authorization: Bearer [api_key]' \ -H * 'Content-Type: multipart/form-data' \ -F 'datafile=@myimage.bin;type=application/octet-stream' \ -F * 'description=bla bla' \ -F 'key_table=@myKeyTable.proto;type=' \ -F 'name=My Manifest' ``` * @@ -567,13 +573,15 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes * to the uploaded file(s). * * @param firmwareManifestFile - * The manifest file to create. The API gateway enforces the account-specific file size. + * The manifest file to create. The API gateway enforces the account-specific file size. File name must + * not exceed 100 characters. * @param keyTableFile - * The key table of pre-shared keys for devices. The table is generated by the manifest tool. + * The key table of pre-shared keys for devices. The table is generated by the manifest tool. File name + * must not exceed 100 characters. + * @param name + * The name of the manifest. * @param description * The description of the firmware manifest. - * @param name - * The name of the object. * @return an added firmware manifest * @throws MbedCloudException * if an error occurs during the process. @@ -581,15 +589,16 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes @API @Nullable public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifestFile, - @Nullable DataFile keyTableFile, @Nullable String description, - @Nullable String name) throws MbedCloudException { + @Nullable DataFile keyTableFile, @NonNull String name, + @Nullable String description) throws MbedCloudException { checkNotNull(firmwareManifestFile, TAG_FIRMWARE_MANIFEST_FILE); + checkNotNull(name, TAG_NAME); checkModelValidity(firmwareManifestFile, TAG_FIRMWARE_MANIFEST_FILE); checkModelValidity(keyTableFile, TAG_KEY_TABLE_FILE); final DataFile finalFirmwareManifestFile = firmwareManifestFile; final DataFile finalKeyTableFile = keyTableFile; - final String finalDescription = description; final String finalName = name; + final String finalDescription = description; return CloudCaller.call(this, "createFirmwareManifest()", FirmwareManifestAdapter.getMapper(), new CloudRequest.CloudCall() { /** @@ -603,10 +612,9 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes return endpoints.getDeviceUpdateFirmwareManifestsApi() .firmwareManifestCreate(DataFileAdapter.reverseMap("datafile", finalFirmwareManifestFile), - finalDescription, + finalName, finalDescription, DataFileAdapter.reverseMap("key_table", - finalKeyTableFile), - finalName); + finalKeyTableFile)); } }, true); } @@ -619,7 +627,8 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes * {@link #createFirmwareManifest(com.arm.mbed.cloud.sdk.common.model.DataFile, com.arm.mbed.cloud.sdk.common.model.DataFile, com.arm.mbed.cloud.sdk.deviceupdate.model.FirmwareManifest)} * * @param firmwareManifestFile - * The manifest file to create. The API gateway enforces the account-specific file size. + * The manifest file to create. The API gateway enforces the account-specific file size. File name must + * not exceed 100 characters. * @param firmwareManifest * a firmware manifest. * @return something @@ -636,15 +645,42 @@ public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifes return createFirmwareManifest(firmwareManifestFile, (DataFile) null, firmwareManifest); } + /** + * Adds a firmware manifest. + * + *

+ * Similar to + * {@link #createFirmwareManifest(com.arm.mbed.cloud.sdk.common.model.DataFile, com.arm.mbed.cloud.sdk.common.model.DataFile, String, String)} + * + * @param firmwareManifestFile + * The manifest file to create. The API gateway enforces the account-specific file size. File name must + * not exceed 100 characters. + * @param name + * The name of the manifest. + * @return an added firmware manifest + * @throws MbedCloudException + * if an error occurs during the process. + */ + @API + @Nullable + public FirmwareManifest createFirmwareManifest(@NonNull DataFile firmwareManifestFile, + @NonNull String name) throws MbedCloudException { + checkNotNull(firmwareManifestFile, TAG_FIRMWARE_MANIFEST_FILE); + checkNotNull(name, TAG_NAME); + return createFirmwareManifest(firmwareManifestFile, (DataFile) null, name, (String) null); + } + /** * Adds an update campaign. * *

- * Create an update campaign. [br] **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ -H 'Authorization: [valid access token]' \ -H - * 'content-type: application/json;charset=UTF-8' \ -d '{ "campaign_strategy": "one-shot", "description": "Campaign - * is for ...", "device_filter": "id__eq=123400000000000000000000000ae45", "name": "campaign", "root_manifest_id": - * "5678000000000000000000000000bd98", }' ``` + * Create an update campaign. + * + * To include a filter for targeted devices, refer to the filter using `[filter_id]` in the message body. [br] + * **Usage example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ -H 'Authorization: + * Bearer [api_key]' \ -H 'content-type: application/json;charset=UTF-8' \ -d '{ "campaign_strategy": "one-shot", + * "description": "Campaign is for ...", "device_filter": "[filter_id]", "name": "campaign", "root_manifest_id": + * "56780000000000a5b70000000000bd98" }' ``` * * @param campaign * an update campaign. @@ -696,8 +732,8 @@ public void deleteFirmwareImage(@NonNull FirmwareImage firmwareImage) throws Mbe * *

* Delete a firmware image. [br] **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The firmware image ID. @@ -743,8 +779,8 @@ public void deleteFirmwareManifest(@NonNull FirmwareManifest firmwareManifest) t * *

* Delete a firmware manifest. [br] **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The firmware manifest ID. @@ -773,8 +809,8 @@ public Call call() { * *

* Delete an update campaign. [br] **Usage example:** ``` curl -X DELETE - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -845,8 +881,8 @@ public void deleteUpdateCampaign(@NonNull UpdateCampaign updateCampaign) throws * *

* Get metadata for all devices in a campaign. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata - * \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata + * \ -H 'Authorization: Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -888,7 +924,7 @@ public Call call() { * *

* Similar to - * {@link #events(String, String, com.arm.mbed.cloud.sdk.deviceupdate.model.CampaignStatisticsEventsListOptions)} + * {@link #events(String, com.arm.mbed.cloud.sdk.deviceupdate.model.CampaignStatisticsId, com.arm.mbed.cloud.sdk.deviceupdate.model.CampaignStatisticsEventsListOptions)} * * @param options * list options. @@ -905,7 +941,8 @@ public Call call() { @NonNull CampaignStatistics campaignStatistics) throws MbedCloudException { checkNotNull(campaignStatistics, TAG_CAMPAIGN_STATISTICS); checkModelValidity(campaignStatistics, TAG_CAMPAIGN_STATISTICS); - return events(campaignStatistics.getCampaignId(), campaignStatistics.getId(), options); + return events(campaignStatistics.getCampaignId(), CampaignStatisticsId.getValue(campaignStatistics.getId()), + options); } /** @@ -913,8 +950,8 @@ public Call call() { * *

* Get a list of events grouped by summary. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types - * \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types + * \ -H 'Authorization: Bearer [api_key]' ``` * * @param campaignId * The campaign ID. @@ -929,12 +966,12 @@ public Call call() { @API @Nullable public ListResponse - events(@NonNull String campaignId, @NonNull String id, + events(@NonNull String campaignId, @NonNull CampaignStatisticsId id, @Nullable CampaignStatisticsEventsListOptions options) throws MbedCloudException { checkNotNull(campaignId, TAG_CAMPAIGN_ID); checkNotNull(id, TAG_ID); final String finalCampaignId = campaignId; - final String finalId = id; + final CampaignStatisticsId finalId = id; final CampaignStatisticsEventsListOptions finalOptions = (options == null) ? new CampaignStatisticsEventsListOptions() : options; return CloudCaller.call(this, "events()", CampaignStatisticsEventsAdapter.getListMapper(), @@ -947,11 +984,28 @@ public Call call() { @Override public Call call() { return endpoints.getDeviceUpdateCampaignsApi() - .updateCampaignEventTypesList(finalCampaignId, finalId); + .updateCampaignEventTypesList(finalCampaignId, + finalId == null ? null + : finalId.getString()); } }); } + /** + * Adds a subtenant identity provider. Add manually to fix compile error + * + */ + @API + @Nullable + public ListResponse + events(@NonNull String campaignId, @NonNull String id, + @Nullable CampaignStatisticsEventsListOptions options) throws MbedCloudException { + checkNotNull(campaignId, TAG_CAMPAIGN_ID); + checkNotNull(id, TAG_ID); + + return events(campaignId, CampaignStatisticsId.valueOf(id), options); + } + /** * Gets module endpoints. * @@ -1161,8 +1215,8 @@ public ListResponse requestNewPage(ListOptions options) throws M *

* Get a list of statistics for a campaign, including the number of devices reporting specific event codes. [br] * **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics \ -H - * 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56780120000789012/statistics \ -H + * 'Authorization: Bearer [api_key]' ``` * * @param campaignId * The campaign ID. @@ -1201,7 +1255,7 @@ public Call call() { * *

* List all firmware images. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images \ -H 'Authorization: Bearer [api_key]' ``` * * @param options * list options. @@ -1309,7 +1363,7 @@ public Call call() { * *

* List all firmware manifests. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ -H 'Authorization: Bearer [api_key]' ``` * * @param options * list options. @@ -1428,7 +1482,7 @@ public Call call() { * *

* Get update campaigns for devices specified by a filter. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ -H 'Authorization: Bearer [api_key]' ``` * * @param stateEq * a string @@ -1613,8 +1667,8 @@ public Call call() { * *

* Get update campaign metadata for a specific device. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/campaign-device-metadata/12345678901234567890123456789012 - * \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 + * \ -H 'Authorization: Bearer [api_key]' ``` * * @param campaignId * The device's campaign ID. @@ -1675,8 +1729,8 @@ public CampaignDeviceMetadata readCampaignDeviceMetadata(@NonNull String campaig * *

* Get the count of successfully updated, skipped, and failed devices. [br] **Usage example:** ``` curl - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012 - * \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/fail \ -H + * 'Authorization: Bearer [api_key]' ``` * * @param campaignId * ID of the associated campaign. @@ -1737,10 +1791,10 @@ public Call call() { * Gets a campaign statistics events. * *

- * Get the count for a specific event type; for example, succeeded, failed, or skipped. [br] **Usage example:** ``` + * Get the count for a specific event type, for example, succeeded, failed or skipped. [br] **Usage example:** ``` * curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/12345678901234567890123456789012/event_types/12345678901234567890123456789012 - * \ -H 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/success/event_types/sys_112 + * \ -H 'Authorization: Bearer [api_key]' ``` * * @param campaignId * ID of the associated campaign. @@ -1804,8 +1858,8 @@ public FirmwareImage readFirmwareImage(@NonNull FirmwareImage firmwareImage) thr * *

* Retrieve a firmware image. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-images/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The firmware image ID. @@ -1858,8 +1912,8 @@ public FirmwareManifest readFirmwareManifest(@NonNull FirmwareManifest firmwareM * *

* Retrieve a firmware manifest. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The firmware manifest ID. @@ -1893,8 +1947,8 @@ public FirmwareManifest readFirmwareManifest(@NonNull String id) throws MbedClou * *

* Get an update campaign. [br] **Usage example:** ``` curl -X GET - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 \ -H 'Authorization: + * Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -1947,8 +2001,8 @@ public UpdateCampaign readUpdateCampaign(@NonNull UpdateCampaign updateCampaign) * *

* Start a campaign. [br] **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/start \ -H - * 'Authorization: [valid access token]' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start \ -H + * 'Authorization: Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -1996,9 +2050,10 @@ public void start(@NonNull UpdateCampaign updateCampaign) throws MbedCloudExcept * *

* Stop a campaign. Stopping is a process that requires the campaign go through several - * [phases](../updating-firmware/running-update-campaigns.html#stopping). [br] **Usage example:** ``` curl -X POST - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/stop \ -H - * 'Authorization: [valid access token]' ``` + * [phases](https://developer.pelion.com/docs/device-management/current/updating-firmware/device-management-update-usi + * ng-the-apis.html). [br] **Usage example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop \ -H + * 'Authorization: Bearer [api_key]' ``` * * @param id * The campaign ID. @@ -2045,10 +2100,10 @@ public void stop(@NonNull UpdateCampaign updateCampaign) throws MbedCloudExcepti * *

* Modify an update campaign. [br] **Usage example:** ``` curl -X PUT - * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012 \ -H 'Authorization: - * [valid access token]' \ d '{ "description": "Campaign is for ...", "device_filter": - * "id__eq=123400000000000000000000000ae45", "name": "campaign", "root_manifest_id": - * "5678000000000000000000000000bd98", }' ``` + * https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123007f9012ab567890120000789012 \ -H 'Authorization: + * Bearer [api_key]' \ d '{ "description": "Campaign is for ...", "device_filter": + * "123400000000000000000000000ae45", "name": "campaign", "root_manifest_id": "5678000000000000000000000000bd98", }' + * ``` * * @param id * The campaign ID. @@ -2103,4 +2158,5 @@ public UpdateCampaign updateUpdateCampaign(@NonNull UpdateCampaign updateCampaig checkModelValidity(updateCampaign, TAG_UPDATE_CAMPAIGN); return updateUpdateCampaign(updateCampaign.getId(), updateCampaign); } + } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Devices.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Devices.java index a5dad1983..ae2f4877d 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Devices.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Devices.java @@ -6,6 +6,7 @@ import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Module; import com.arm.mbed.cloud.sdk.annotations.NonNull; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Nullable; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.AbstractModule; @@ -26,7 +27,6 @@ import com.arm.mbed.cloud.sdk.devices.adapters.DeviceEnrollmentAdapter; import com.arm.mbed.cloud.sdk.devices.adapters.DeviceEnrollmentBulkCreateAdapter; import com.arm.mbed.cloud.sdk.devices.adapters.DeviceEnrollmentBulkDeleteAdapter; -import com.arm.mbed.cloud.sdk.devices.adapters.DeviceEnrollmentDenialAdapter; import com.arm.mbed.cloud.sdk.devices.adapters.DeviceEventsAdapter; import com.arm.mbed.cloud.sdk.devices.adapters.DeviceGroupAdapter; import com.arm.mbed.cloud.sdk.devices.model.Device; @@ -42,9 +42,7 @@ import com.arm.mbed.cloud.sdk.devices.model.DeviceGroupListOptions; import com.arm.mbed.cloud.sdk.devices.model.DeviceListOptions; import com.arm.mbed.cloud.sdk.devices.model.DevicesEndpoints; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BlackListedDeviceData; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BulkResponse; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DenialAttemptsResponse; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceData; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceEventData; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.DeviceEventPage; @@ -98,12 +96,6 @@ public class Devices extends AbstractModule { @Internal private static final String TAG_DEVICE_ENROLLMENT_BULK_DELETE = "deviceEnrollmentBulkDelete"; - /** - * Parameter name. - */ - @Internal - private static final String TAG_DEVICE_ENROLLMENT_DENIAL_ID = "deviceEnrollmentDenialId"; - /** * Parameter name. */ @@ -228,7 +220,7 @@ public void addDevice(@Nullable String deviceId, @NonNull DeviceGroup deviceGrou * * *

- * Add one device to a group. + * Add one device to a group. A device can be in multiple groups. * * @param deviceId * a string @@ -269,7 +261,7 @@ public Call call() { * * *

- * Add one device to a group. + * Add one device to a group. A device can be in multiple groups. * * @param deviceGroupId * The ID of the group. @@ -396,7 +388,8 @@ public Devices clone() { * Adds a device. * *

- * Create a new device. + * Create a new device in Device Management. Usually you do not need to create a device this way, as it is + * automatically created when it bootstraps or connects to Device Management. * * @param device * a device. @@ -430,8 +423,8 @@ public Call call() { * *

* When the device connects to the bootstrap server and provides the enrollment ID, it is assigned to your account. - * [br] **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ - * https://api.us-east-1.mbedcloud.com/v3/device-enrollments \ -d '{"enrollment_identity": + * [br] **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [access_key]' \ -H 'content-type: + * application/json' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments \ -d '{"enrollment_identity": * "A-35:e7:72:8a:07:50:3b:3d:75:96:57:52:72:41:0d:78:cc:c6:e5:53:48:c6:65:58:5b:fa:af:4d:2d:73:95:c5"}' ``` * * @param enrollmentIdentity @@ -456,7 +449,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getPublicApiApi() + return endpoints.getDeviceOwnershipEnrollmentsApi() .createDeviceEnrollment(DeviceEnrollmentAdapter.reverseMapAddRequest(finalEnrollmentIdentity)); } }, true); @@ -468,7 +461,7 @@ public Call call() { *

* With bulk upload, you can upload a `CSV` file containing a number of enrollment IDs. * - * **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [api_key]' \ -F + * **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [access_key]' \ -F * 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \ * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads * @@ -532,7 +525,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getPublicApiApi() + return endpoints.getDeviceOwnershipEnrollmentsApi() .createBulkDeviceEnrollment(DataFileAdapter.reverseMap("enrollment_identities", finalEnrollmentIdentities)); } @@ -595,10 +588,12 @@ public void deleteDevice(@NonNull Device device) throws MbedCloudException { * *

* Delete device. Only available for devices with a developer certificate. Attempting to delete a device with a - * production certicate returns a 400 response. + * production certificate returns a 400 response. * * @param id - * The ID of the device. + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. * @throws MbedCloudException * if an error occurs during the process. */ @@ -642,8 +637,8 @@ public void deleteDeviceEnrollment(@NonNull DeviceEnrollment deviceEnrollment) t *

* To free a device from your account, delete the enrollment claim. To bypass the device ownership, you need to * delete the enrollment and factory reset the device. For more information, see [Transferring ownership using - * First-to-Claim](../connecting/device-ownership-first-to-claim-by-enrollment-list.html). [br] **Example:** ``` - * curl -X DELETE \ -H 'Authorization: Bearer [api_key]' \ + * First-to-Claim](https://developer.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). + * [br] **Example:** ``` curl -X DELETE \ -H 'Authorization: Bearer [access_key]' \ * https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` * * @param id @@ -663,7 +658,7 @@ public void deleteDeviceEnrollment(@NonNull String id) throws MbedCloudException */ @Override public Call call() { - return endpoints.getPublicApiApi().deleteDeviceEnrollment(finalId); + return endpoints.getDeviceOwnershipEnrollmentsApi().deleteDeviceEnrollment(finalId); } }); } @@ -674,7 +669,7 @@ public Call call() { *

* With bulk delete, you can upload a `CSV` file containing a number of enrollment IDs to delete. * - * **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [api_key]' \ -F + * **Example:** ``` curl -X POST \ -H 'Authorization: Bearer [access_key]' \ -F * 'enrollment_identities=@/path/to/enrollments/enrollments.csv' \ * https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes * @@ -703,7 +698,7 @@ public Call call() { * "A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12", First line * is ignored. A_4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, * Invalid version identifier. - * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23:12, Too-short + * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:25:48:44:71:22:15:43:23, Too-short * identity. "", Empty quotation marks are an invalid identity. " * A-4E:63:2D:AE:14:BC:D1:09:77:21:95:44:ED:34:06:57:1E:03:B1:EF:0E:F2:59:44:71:93:23:22:15:43:23:12 ", Whitespace * inside quotation marks is not trimmed, causing an error. @@ -737,7 +732,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getPublicApiApi() + return endpoints.getDeviceOwnershipEnrollmentsApi() .deleteBulkDeviceEnrollment(DataFileAdapter.reverseMap("enrollment_identities", finalEnrollmentIdentities)); } @@ -765,7 +760,7 @@ public void deleteDeviceGroup(@NonNull DeviceGroup deviceGroup) throws MbedCloud * Deletes a device group. * *

- * Delete a group. + * Delete a group. This deletes the group, but not the devices in the group. * * @param id * The ID of the group. @@ -819,7 +814,7 @@ public ListResponse devices(@Nullable DeviceListOptions options, * * *

- * Get a page of devices. + * Get a page of devices in a specified group. * * @param id * a string @@ -1111,6 +1106,14 @@ public Call call() { finalOptions), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, finalOptions), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, finalOptions), ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, @@ -1170,41 +1173,6 @@ public String getModuleName() { return "Devices"; } - /** - * Creates a {@link Paginator} for the list of device enrollment denials matching filter options. - * - *

- * Gets an iterator over all device enrollment denials matching filter options. - * - * @param options - * list options. - * @return paginator over the list of device enrollment denials - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public Paginator - listAllDeviceEnrollmentDenials(@Nullable DeviceEnrollmentDenialListOptions options) throws MbedCloudException { - final DeviceEnrollmentDenialListOptions finalOptions = (options == null) ? new DeviceEnrollmentDenialListOptions() - : options; - return new Paginator(finalOptions, new PageRequester() { - /** - * Makes one page request. - * - * @param options - * a list options. - * @return Corresponding page requester - * @throws MbedCloudException - * if an error occurs during the process. - */ - @Override - public ListResponse requestNewPage(ListOptions options) throws MbedCloudException { - return listDeviceEnrollmentDenials((DeviceEnrollmentDenialListOptions) options); - } - }); - } - /** * Creates a {@link Paginator} for the list of device enrollments matching filter options. * @@ -1344,60 +1312,15 @@ public ListResponse requestNewPage(ListOptions options) throws MbedCloud }); } - /** - * Lists device enrollment denials matching filter options. - * - *

- * This produces a list of failed attempts to bootstrap using a particular certificate which is blacklisted - * (trusted_certificate). Returned list can be filtered by endpoint name. Trusted certificate ID filter is required. - * - * **Example usage:** ``` curl -X GET -H 'Authorization: Bearer [valid access token]' \ - * https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials?trusted_certificate_id__eq={cert-id}&endpoint_name__eq={endpoint_name} - * ``` - * - * @param options - * list options. - * @return the list of device enrollment denials corresponding to filter options (One page). - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public ListResponse - listDeviceEnrollmentDenials(@Nullable DeviceEnrollmentDenialListOptions options) throws MbedCloudException { - final DeviceEnrollmentDenialListOptions finalOptions = (options == null) ? new DeviceEnrollmentDenialListOptions() - : options; - return CloudCaller.call(this, "listDeviceEnrollmentDenials()", DeviceEnrollmentDenialAdapter.getListMapper(), - new CloudRequest.CloudCall() { - /** - * Makes the low level call to the Cloud. - * - * @return Corresponding Retrofit2 Call object - */ - @Override - public Call call() { - return endpoints.getEnrollmentDenialsApi() - .listEnrollmentDenialAttempts(ListOptionsEncoder.encodeSingleEqualFilter(DeviceEnrollmentDenialListOptions.TAG_FILTER_BY_TRUSTED_CERTIFICATE_ID, - finalOptions), - ListOptionsEncoder.encodeSingleEqualFilter(DeviceEnrollmentDenialListOptions.TAG_FILTER_BY_ENDPOINT_NAME, - finalOptions), - finalOptions.getAfter(), - finalOptions.getOrder() - .toString(), - finalOptions.getPageSize()); - } - }); - } - /** * Lists device enrollments matching filter options. * *

* Provides a list of pending and claimed enrollments. * - * **Example:** ``` curl -X GET \ -H 'Authorization: Bearer [api_key]' \ + * **Example:** ``` curl -X GET \ -H 'Authorization: Bearer [access_key]' \ * https://api.us-east-1.mbedcloud.com/v3/device-enrollments ``` With query parameters: ``` curl -X GET \ -H - * 'Authorization: Bearer [api_key]' \ 'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10' ``` + * 'Authorization: Bearer [access_key]' \ 'https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10' ``` * * @param options * list options. @@ -1420,7 +1343,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getPublicApiApi() + return endpoints.getDeviceOwnershipEnrollmentsApi() .getDeviceEnrollments(finalOptions.getPageSize(), finalOptions.getAfter(), finalOptions.getOrder().toString(), @@ -1433,7 +1356,11 @@ public Call call() { * Lists device events matching filter options. * *

- * List all device events for an account. + * List all or a filtered list of device events for the account. Device events are events significant to operation + * or lifetime, such as creation, firmware update, and suspension. + * + * To see statistics for device connectivity and usage, use the [Statistics + * API](https://developer.pelion.com/docs/device-management-api/connect-statistics/). * * **Example:** Following example gets device-events limiting returned results to max 5 events ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/device-events?limit=5 \ -H 'Authorization: Bearer [API key]' ``` or to get @@ -1612,7 +1539,10 @@ public Call call() { * Lists devices matching filter options. * *

- * List all devices. + * List all devices enrolled to Device Management for the account. The URL length must be fewer than 4096 + * characters. Requests that exceed this limit, such as those including too many query parameters in a filter, fail + * with a bad request response. devices with too long list of query parameters, the request is deemed as bad + * request. * * **Example:** Following example filters devices according to state field and returns only devices in 'registered' * state: ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered \ -H @@ -1641,7 +1571,7 @@ public Call call() { return endpoints.getDeviceDirectoryDevicesApi() .deviceList(finalOptions.getPageSize(), finalOptions.getOrder().toString(), - finalOptions.getAfter(), + finalOptions.getAfter(), null, ListOptionsEncoder.encodeInclude(finalOptions), ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_LIFECYCLE_STATUS, finalOptions), @@ -1903,6 +1833,14 @@ public Call call() { finalOptions), ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NAME, finalOptions), + ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), + ListOptionsEncoder.encodeSingleNotInFilter(DeviceListOptions.TAG_FILTER_BY_NET_ID, + finalOptions), ListOptionsEncoder.encodeSingleEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, finalOptions), ListOptionsEncoder.encodeSingleNotEqualFilter(DeviceListOptions.TAG_FILTER_BY_SERIAL_NUMBER, @@ -1964,7 +1902,10 @@ public Device readDevice(@NonNull Device device) throws MbedCloudException { * Gets a device. * *

- * Retrieve information about a specific device. + * Retrieve information about a specific device. This API returns + * [DeviceData](https://developer.pelion.com/docs/device-management-api/device-directory/). If you want to see the + * structure of resources in the device or the actual resource values, use the [Connect + * API](https://developer.pelion.com/docs/device-management-api/connect/). * * **Example:** Following example must be updated with the device's ID to the URL. The id is from of * "01667c6e992c00000000000100100370" ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices/[device_ID] \ @@ -2020,7 +1961,7 @@ public DeviceEnrollment readDeviceEnrollment(@NonNull DeviceEnrollment deviceEnr *

* Check detailed enrollment info, for example, date of claim or expiration date. * - * **Example:** ``` curl -X GET \ -H 'Authorization: Bearer [api_key]' \ + * **Example:** ``` curl -X GET \ -H 'Authorization: Bearer [access_key]' \ * https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ``` * * @param id @@ -2043,7 +1984,8 @@ public DeviceEnrollment readDeviceEnrollment(@NonNull String id) throws MbedClou */ @Override public Call call() { - return endpoints.getPublicApiApi().getDeviceEnrollment(finalId); + return endpoints.getDeviceOwnershipEnrollmentsApi() + .getDeviceEnrollment(finalId); } }); } @@ -2089,7 +2031,7 @@ public Call call() { * identity is already claimed in the mbed Cloud.","" * "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","409","duplicate","Enrollment * identity is already claimed in the mbed Cloud.","" ``` **Example:** ``` curl -X GET \ -H 'Authorization: Bearer - * [api_key]' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ``` + * [access_key]' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} ``` * * @param id * Bulk ID. Bulk ID @@ -2111,7 +2053,8 @@ public DeviceEnrollmentBulkCreate readDeviceEnrollmentBulkCreate(@NonNull String */ @Override public Call call() { - return endpoints.getPublicApiApi().getBulkDeviceEnrollment(finalId); + return endpoints.getDeviceOwnershipEnrollmentsApi() + .getBulkDeviceEnrollment(finalId); } }); } @@ -2157,7 +2100,7 @@ public Call call() { * identity is already claimed in the mbed Cloud.","" * "A-FF:AA:AA:AA:3B:43:EB:D7:C7:30:03:5F:C8:D0:15:91:70:C2:5D:4F:EB:24:E9:3A:BB:D8:3C:FE:20:EA:B1:72","409","duplicate","Enrollment * identity is already claimed in the mbed Cloud.","" ``` **Example:** ``` curl -X GET \ -H 'Authorization: Bearer - * [api_key]' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} ``` + * [access_key]' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} ``` * * @param id * Bulk ID. Bulk ID @@ -2179,43 +2122,8 @@ public DeviceEnrollmentBulkDelete readDeviceEnrollmentBulkDelete(@NonNull String */ @Override public Call call() { - return endpoints.getPublicApiApi().getBulkDeviceEnrollmentDelete(finalId); - } - }); - } - - /** - * Gets a device enrollment denial. - * - *

- * Query for a single attempt to bootstrap with a blacklisted certificate by ID. - * - * **Example usage:** ``` curl -X GET -H 'Authorization: Bearer [valid access token]' \ - * https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials/{device_enrollment_denial_id} ``` - * - * @param deviceEnrollmentDenialId - * id of the recorded failed bootstrap attempt. id of the recorded failed bootstrap attempt - * @return something - * @throws MbedCloudException - * if an error occurs during the process. - */ - @API - @Nullable - public DeviceEnrollmentDenial - readDeviceEnrollmentDenial(@NonNull String deviceEnrollmentDenialId) throws MbedCloudException { - checkNotNull(deviceEnrollmentDenialId, TAG_DEVICE_ENROLLMENT_DENIAL_ID); - final String finalDeviceEnrollmentDenialId = deviceEnrollmentDenialId; - return CloudCaller.call(this, "readDeviceEnrollmentDenial()", DeviceEnrollmentDenialAdapter.getMapper(), - new CloudRequest.CloudCall() { - /** - * Makes the low level call to the Cloud. - * - * @return Corresponding Retrofit2 Call object - */ - @Override - public Call call() { - return endpoints.getEnrollmentDenialsApi() - .getEnrollmentDenialAttempt(finalDeviceEnrollmentDenialId); + return endpoints.getDeviceOwnershipEnrollmentsApi() + .getBulkDeviceEnrollmentDelete(finalId); } }); } @@ -2243,9 +2151,10 @@ public DeviceEvents readDeviceEvents(@NonNull DeviceEvents deviceEvents) throws * Gets a device events. * *

- * Retrieve a specific device event. + * "Retrieve a specific device event. See '/v3/device-events/' for information on device events, and how to get the + * device_event_id." * - * **Example:** To fetch a specific event you can use the 'id' field form the '/v3/device-events'. Form of + * **Example:** To fetch a specific event you can use the 'id' field from '/v3/device-events'. Form of * '016c03d40a4e000000000001001003b4' ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/device-events/[device_event_id] \ -H 'Authorization: Bearer [API key]' ``` * @@ -2297,7 +2206,9 @@ public DeviceGroup readDeviceGroup(@NonNull DeviceGroup deviceGroup) throws Mbed * Gets a device group. * *

- * Get a group. + * Returns [DeviceGroup](https://developer.pelion.com/docs/device-management-api/device-directory/) info what + * contains info of the group, for example, name and updated date. To list the devices in the gr oup, use + * '/v3/device-groups/{device-group-id}/devices/'. * * @param id * The group ID. @@ -2475,7 +2386,7 @@ public CertificateEnrollment renewCertificate(@NonNull String certificateName, * * ``` curl -X POST * https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew - * \ -H 'Authorization: Bearer [api_key]' \ -H 'content-length: 0' ``` + * \ -H 'Authorization: Bearer [access_key]' \ -H 'content-length: 0' ``` * * @param certificateName * The certificate name. @@ -2595,7 +2506,7 @@ public DeviceGroup updateDeviceGroup(@NonNull DeviceGroup deviceGroup) throws Mb * Modifies a device group. * *

- * Modify the attributes of a group. + * Modify the attributes of a group, such as the description. * * @param id * The group ID. @@ -2629,4 +2540,20 @@ public DeviceGroup updateDeviceGroup(@NonNull String id, @NonNull DeviceGroup gr } }, true); } + + @API + @Nullable + @NotImplemented + public DeviceEnrollmentDenial readDeviceEnrollmentDenial(String deviceEnrollmentDenialId) { + // TODO Auto-generated method stub + return null; + } + + @API + @Nullable + @NotImplemented + public ListResponse listDeviceEnrollmentDenials(DeviceEnrollmentDenialListOptions options) { + // TODO Auto-generated method stub + return null; + } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Security.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Security.java index 2392eb8d7..531c29b14 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Security.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/Security.java @@ -216,15 +216,14 @@ public Security clone() { * Adds a certificate issuer. * *

- * Create a certificate issuer. The maximum number of issuers is limited to 20 per account. Multiple certificate - * issuers of the same issuer type can be created, provided they have a different name. This allows verification of - * the certificate issuer configuration before activating it. [br] **Example usage:** - * - * ``` curl -X POST \ -H 'authorization: Bearer [valid access token]' \ -H 'content-type: - * application/json;charset=UTF-8' \ https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \ -d '{ - * "issuer_type": "GLOBAL_SIGN", "name": "GS Issuer", "description": "Sample GlobalSign certificate issuer", - * "issuer_attributes": null, "issuer_credentials": { "api_key": "e510e289e6cd8947", "api_secret": - * "a477a8393d17a55ecb2ba6a61f58feb84770b621", "client_certificate": "-----BEGIN + * Create a certificate issuer. [br] The maximum number of issuers is limited to 20 per account. [br] You can create + * multiple certificate issuers of the same type, provided they have different names. This allows verification of + * the certificate issuer configuration before activation. [br] **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers \ -H 'Authorization: Bearer [access_key]' \ -H + * 'content-type: application/json;charset=UTF-8' \ -d '{ "issuer_type": "GLOBAL_SIGN", "name": "GS Issuer", + * "description": "Sample GlobalSign certificate issuer", "issuer_attributes": null, "issuer_credentials": { + * "api_key": "e510e289e6cd8947", "api_secret": "a477a8393d17a55ecb2ba6a61f58feb84770b621", "client_certificate": + * "-----BEGIN * CERTIFICATE-----MIIC7zCCAdegAwIBAgIJANTlU4x5S74VMA0GCSqGSIb3DQEBCwUAMA4xDDAKBgNVBAoMA0FybTAeFw0xODAzMTExMzE5MTFaFw0xOTAzMTExMzE5MTFaMA4xDDAKBgNVBAoMA0FybTCCASIwDQYJKo * ZIhvcNAQEBBQADggEPADCCAQoCggEBAJWLStsVMJULZtxdieK9qocM4ymDXMaAusmd9TZLzBgznKQe/CW2yxyA8C8K5e6MmvMYGeKDd4Lkw/ezOj2OsUj2xzNIltUxpGi/GhsNYiN/khNJa/Y1SllLoihJAPm/xbMywOBRu/dM88PiJsNZccOk0I8DYvvyAs9wCTkbKL * nfHygl98DCRqXw7nBCplU6F03qpUd/4BUtMtugyqt7yboGH+4YewnUh4Yh4QNOJIvE93Ob++eKjO3pIOYEhQmUxzOLaLNuWXlv2l1WuN281hUP4XBcV8mCzRQfTBBDYTWt+5BEWoLOUkXjW0Um6EAaN3usph1IKDEH6Ia5VHP4Pj0CAwEAAaNQME4wHQYDVR0OBBYEFL @@ -244,10 +243,9 @@ public Security clone() { * RSA PRIVATE KEY-----", "passphrase": "helloworld" } }' ``` * * @param issuerCredentials - * The credentials required for connecting to the certificate issuer. When the issuer_type is - * GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see - * definition of CfsslAuthCredentials. - * + * The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, + * see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of + * CfsslAuthCredentials. * @param certificateIssuerRequest * a certificate issuer. * @return an added certificate issuer @@ -273,7 +271,7 @@ public Security clone() { */ @Override public Call call() { - return endpoints.getCertificateIssuersApi() + return endpoints.getSecurityAndIdentityCertificateIssuersApi() .createCertificateIssuer(CertificateIssuerAdapter.reverseMapAddRequest(finalCertificateIssuerRequest) .issuerCredentials(finalIssuerCredentials)); } @@ -284,10 +282,10 @@ public Call call() { * Adds a certificate issuer config. * *

- * Configure the certificate issuer to be used when creating the device custom certificates. [br] **Example usage:** + * Configure the certificate issuer to use when creating device custom certificates. [br] **Example:** * - * ``` curl -X POST \ -H 'authorization: [valid access token]' \ -H 'content-type: application/json;charset=UTF-8' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ -d '{ "reference": "customer.dlms", + * ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ -H 'Authorization: + * Bearer [access_key]' \ -H 'content-type: application/json;charset=UTF-8' \ -d '{ "reference": "customer.dlms", * "certificate_issuer_id": "01621a36719d507b9d48a91b00000000" }' ``` * * @param createCertificateIssuerConfig @@ -312,7 +310,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi() + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() .createCertificateIssuerConfig(CertificateIssuerConfigAdapter.reverseMapAddRequest(finalCreateCertificateIssuerConfig)); } }, true); @@ -325,11 +323,12 @@ public Call call() { * Create a developer certificate (a certificate that can be flashed to multiple devices to connect to the bootstrap * server). * - * **Note:** The number of developer certificates allowed per account is limited. Please see [Using your own - * certificate authority](../provisioning-process/using-CA.html). + * **Note:** The number of developer certificates allowed per account is limited. Please see [Setting up a + * Certificate Authority](https://developer.pelion.com/docs/device-management/current/provisioning- + * process/integrating-with-a-third-party-ca.html). * * **Example:** ``` curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \ -H "Authorization: - * Bearer [api_key]" \ -H "content-type: application/json" \ -d { "name": "[certificate_name]", "description": + * Bearer [access_key]" \ -H "content-type: application/json" \ -d { "name": "[certificate_name]", "description": * "[certificate_description]" } ``` * * @param developerCertificate @@ -354,7 +353,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getDeviceSecurityDeveloperClassCertificatesApi() + return endpoints.getSecurityAndIdentityDeveloperClassCertificatesApi() .createDeveloperCertificate(DeveloperCertificateAdapter.reverseMapAddRequest(finalDeveloperCertificate)); } }, true); @@ -370,7 +369,7 @@ public Call call() { * **Note**: The PSK APIs are available only to accounts that have this feature enabled. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ -H "Authorization: - * Bearer [api_key]" \ -H "content-type: application/json" \ -d '{ "endpoint_name": "my-endpoint-0001", + * Bearer [access_key]" \ -H "content-type: application/json" \ -d '{ "endpoint_name": "my-endpoint-0001", * "secret_hex": "4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a" }' ``` * * @param secretHex @@ -398,7 +397,7 @@ public void createPreSharedKey(@NonNull String secretHex, */ @Override public Call call() { - return endpoints.getPreSharedKeysApi() + return endpoints.getSecurityAndIdentityPreSharedKeysApi() .uploadPreSharedKey(PreSharedKeyAdapter.reverseMapAddRequest(finalPreSharedKey) .secretHex(finalSecretHex)); } @@ -409,10 +408,10 @@ public Call call() { * Adds a subtenant trusted certificate. * *

- * Upload new trusted certificates. + * Upload new trusted certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates \ - * -H 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"name": "myCert1", + * -H 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"name": "myCert1", * "description": "very important cert", "certificate": "certificate_data", "service": "lwm2m"} ``` Signature is not * used by the SDK as it is a deprecated field. * @@ -444,7 +443,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getTenantDeviceSecurityCertificatesApi() + return endpoints.getTenantSecurityAndIdentityCertificatesApi() .addAccountCertificate(finalAccountId, SubtenantTrustedCertificateAdapter.reverseMapAddRequest(finalSubtenantTrustedCertificate)); } @@ -478,12 +477,12 @@ public Call call() { * Adds a trusted certificate. * *

- * Upload new trusted certificates. + * Upload new trusted certificates. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X POST https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"name": "myCert1", "description": "very important - * cert", "certificate": "certificate_data", "service": "lwm2m"} ``` Signature is not used by the SDK as it is a - * deprecated field. + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"name": "myCert1", "description": "very + * important cert", "certificate": "certificate_data", "service": "lwm2m"} ``` Signature is not used by the SDK as + * it is a deprecated field. * * @param trustedCertificate * a trusted certificate. @@ -507,7 +506,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi() + return endpoints.getSecurityAndIdentityCertificatesApi() .addCertificate(TrustedCertificateAdapter.reverseMapAddRequest(finalTrustedCertificate)); } }, true); @@ -534,15 +533,12 @@ public void deleteCertificateIssuer(@NonNull CertificateIssuer certificateIssuer * Deletes a certificate issuer. * *

- * Delete a certificate issuer by ID. [br] **Example usage:** - * - * ``` curl -X DELETE \ -H 'authorization: [valid access token]' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 ``` + * Delete a certificate issuer by ID. [br] **Example:** ``` curl -X DELETE + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 \ -H 'Authorization: + * Bearer [access_key]' \ ``` * * @param id - * Certificate issuer ID.
- * The ID of the certificate issuer. An active certificate issuer may not be deleted. - * + * Certificate issuer ID. An active certificate issuer cannot be deleted. * @throws MbedCloudException * if an error occurs during the process. */ @@ -558,7 +554,7 @@ public void deleteCertificateIssuer(@NonNull String id) throws MbedCloudExceptio */ @Override public Call call() { - return endpoints.getCertificateIssuersApi().deleteCertificateIssuer(finalId); + return endpoints.getSecurityAndIdentityCertificateIssuersApi().deleteCertificateIssuer(finalId); } }); } @@ -585,12 +581,10 @@ public Call call() { * Deletes a certificate issuer config. * *

- * Delete the configured certificate issuer configuration. You can only delete the configurations of custom - * certificates. + * Delete certificate issuer configuration. You can only delete custom certificate configurations. * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID configuration. * @throws MbedCloudException * if an error occurs during the process. */ @@ -606,7 +600,8 @@ public void deleteCertificateIssuerConfig(@NonNull String id) throws MbedCloudEx */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi().deleteCertificateIssuerConfigByID(finalId); + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() + .deleteCertificateIssuerConfigByID(finalId); } }); } @@ -636,7 +631,7 @@ public Call call() { * Delete a trusted certificate. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the trusted certificate to delete. @@ -655,7 +650,7 @@ public void deleteDeveloperCertificate(@NonNull String id) throws MbedCloudExcep */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi().deleteCertificate(finalId); + return endpoints.getSecurityAndIdentityCertificatesApi().deleteCertificate(finalId); } }); } @@ -700,7 +695,7 @@ public void deletePreSharedKey(@NonNull PreSharedKey preSharedKey) throws MbedCl * **Example:** * * ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \ -H - * "Authorization: Bearer [api_key]" ``` + * "Authorization: Bearer [access_key]" ``` * * @param endpointName * a string @@ -718,7 +713,7 @@ public void deletePreSharedKey(@Nullable String endpointName) throws MbedCloudEx */ @Override public Call call() { - return endpoints.getPreSharedKeysApi().deletePreSharedKey(finalEndpointName); + return endpoints.getSecurityAndIdentityPreSharedKeysApi().deletePreSharedKey(finalEndpointName); } }); } @@ -727,11 +722,11 @@ public Call call() { * Deletes a subtenant trusted certificate. * *

- * Delete the trusted certificate. + * Delete a trusted certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X DELETE * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * Account ID. @@ -755,8 +750,8 @@ public void deleteSubtenantTrustedCertificate(@NonNull String accountId, */ @Override public Call call() { - return endpoints.getTenantDeviceSecurityCertificatesApi().deleteAccountCertificate(finalAccountId, - finalId); + return endpoints.getTenantSecurityAndIdentityCertificatesApi().deleteAccountCertificate(finalAccountId, + finalId); } }); } @@ -787,7 +782,7 @@ public Call call() { * Delete a trusted certificate. * * **Example:** ``` curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * The ID of the trusted certificate to delete. @@ -806,7 +801,7 @@ public void deleteTrustedCertificate(@NonNull String id) throws MbedCloudExcepti */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi().deleteCertificate(finalId); + return endpoints.getSecurityAndIdentityCertificatesApi().deleteCertificate(finalId); } }); } @@ -836,7 +831,7 @@ public void deleteTrustedCertificate(@NonNull TrustedCertificate trustedCertific * Return bootstrap server credentials for client to connect to bootstrap server. * * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \ -H - * "Authorization: Bearer [api_key]" ``` + * "Authorization: Bearer [access_key]" ``` * * @return something * @throws MbedCloudException @@ -854,7 +849,7 @@ public ServerCredentials getBootstrap() throws MbedCloudException { */ @Override public Call call() { - return endpoints.getServiceSecurityServerCredentialsApi() + return endpoints.getSecurityAndIdentityServerCredentialsApi() .getBootstrapServerCredentials(); } }, true); @@ -865,8 +860,7 @@ public Call call() { * * *

- * Provides the configured certificate issuer to be used when creating device certificates for LwM2M - * communication.[br] + * Provides the configured certificate issuer used when creating device certificates for LwM2M. * * @return something * @throws MbedCloudException @@ -884,7 +878,7 @@ public CertificateIssuerConfig getDefault() throws MbedCloudException { */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi() + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() .getCertificateIssuerConfig(); } }, true); @@ -899,7 +893,7 @@ public Call call() { * bootstrap server). * * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ -H - * "Authorization: Bearer [api_key]" ``` + * "Authorization: Bearer [access_key]" ``` * * @param id * ID that uniquely identifies the developer certificate. @@ -921,7 +915,7 @@ public DeveloperCertificate getDeveloperCertificateInfo(@NonNull String id) thro */ @Override public Call call() { - return endpoints.getDeviceSecurityDeveloperClassCertificatesApi() + return endpoints.getSecurityAndIdentityDeveloperClassCertificatesApi() .getDeveloperCertificate(finalId); } }, true); @@ -987,7 +981,7 @@ public SecurityEndpoints getEndpoints() { * Return LwM2M server credentials for client to connect to LwM2M server. * * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \ -H "Authorization: - * Bearer [api_key]" ``` + * Bearer [access_key]" ``` * * @return something * @throws MbedCloudException @@ -1005,7 +999,7 @@ public ServerCredentials getLwm2m() throws MbedCloudException { */ @Override public Call call() { - return endpoints.getServiceSecurityServerCredentialsApi() + return endpoints.getSecurityAndIdentityServerCredentialsApi() .getL2M2MServerCredentials(); } }, true); @@ -1023,7 +1017,7 @@ public String getModuleName() { } /** - * Get trusted certificate by ID. + * Get a trusted certificate. * * *

@@ -1044,14 +1038,14 @@ public String getModuleName() { } /** - * Get trusted certificate by ID. + * Get a trusted certificate. * * *

- * Retrieve a trusted certificate by ID. + * Retrieve a trusted certificate. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * Entity ID. @@ -1073,7 +1067,8 @@ public TrustedCertificate getTrustedCertificateInfo(@NonNull String id) throws M */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi().getCertificate(finalId); + return endpoints.getSecurityAndIdentityCertificatesApi() + .getCertificate(finalId); } }, true); } @@ -1291,11 +1286,11 @@ public ListResponse requestNewPage(ListOptions options) thro * **Examples:** * * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ -H 'Authorization: Bearer - * [api_key]' ``` + * [access_key]' ``` * * ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 \ - * -H 'Authorization: Bearer [api_key]' ``` + * -H 'Authorization: Bearer [access_key]' ``` * * @param options * list options. @@ -1356,14 +1351,12 @@ public Call call() { * Lists certificate issuer configs matching filter options. * *

- * Get certificate issuer configurations, optionally filtered by reference. [br] **Example usage:** - * - * ``` curl \ -H 'authorization: [valid access token]' \ -H 'content-type: application/json;charset=UTF-8' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ ``` ``` curl \ -H 'authorization: - * [valid access token]' \ -H 'content-type: application/json;charset=UTF-8' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \ ``` Note: This - * endpoint does not implement pagination and therefore, list control parameters such as `limit` or `after` will be - * ignored by the system. + * Get certificate issuer configurations, optionally filtered by reference. [br] **Example:** ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ -H 'Authorization: Bearer + * [access_key]' \ -H 'content-type: application/json;charset=UTF-8' \ ``` [br] ``` curl -X GET + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms \ -H 'Authorization: + * Bearer [access_key]' \ -H 'content-type: application/json;charset=UTF-8' \ ``` **Note:** This endpoint does not + * implement pagination, and therefore ignores list control parameters such as `limit` or `after`. * * @param options * list options. @@ -1386,7 +1379,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi() + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() .getCertificateIssuerConfigs(finalOptions.getPageSize(), finalOptions.getOrder().toString(), finalOptions.getAfter(), @@ -1401,8 +1394,8 @@ public Call call() { * Lists certificate issuers matching filter options. * *

- * Note: This endpoint does not implement pagination and therefore, list control parameters such as `limit` or - * `after` will be ignored by the system. + * **Note:** This endpoint does not use pagination, and therefore ignores list control parameters such as `limit` or + * `after`. * * @param options * list options. @@ -1425,7 +1418,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getCertificateIssuersApi() + return endpoints.getSecurityAndIdentityCertificateIssuersApi() .getCertificateIssuers(finalOptions.getPageSize(), finalOptions.getOrder().toString(), finalOptions.getAfter(), @@ -1442,8 +1435,8 @@ public Call call() { * * **Example:** * - * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ -H "Authorization: Bearer [api_key]" - * ``` + * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ -H "Authorization: Bearer + * [access_key]" ``` * * @param options * list options. @@ -1465,7 +1458,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getPreSharedKeysApi() + return endpoints.getSecurityAndIdentityPreSharedKeysApi() .listPreSharedKeys(finalOptions.getPageSize(), finalOptions.getAfter()); } @@ -1476,10 +1469,10 @@ public Call call() { * Lists trusted certificates matching filter options. * *

- * Retrieve trusted certificates in an array. + * Retrieve an array of trusted certificates. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param expireEq * an integer @@ -1510,7 +1503,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi() + return endpoints.getSecurityAndIdentityCertificatesApi() .getAllCertificates(finalOptions.getPageSize(), finalOptions.getAfter(), finalOptions.getOrder().toString(), @@ -1536,6 +1529,8 @@ public Call call() { finalOptions), ListOptionsEncoder.encodeSingleLikeFilter(TrustedCertificateListOptions.TAG_FILTER_BY_SUBJECT, finalOptions), + ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_CERTIFICATE_FINGERPRINT, + finalOptions), ListOptionsEncoder.encodeSingleEqualFilter(TrustedCertificateListOptions.TAG_FILTER_BY_VALID, Boolean.class, finalOptions)); @@ -1593,7 +1588,7 @@ public Call call() { * **Example:** * * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \ - * -H 'Authorization: Bearer [api_key]' ``` + * -H 'Authorization: Bearer [access_key]' ``` * * @param id * The certificate enrollment ID. @@ -1649,7 +1644,7 @@ public CertificateEnrollment readCertificateEnrollment(@NonNull String id) throw * (No description provided) * * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. * @return something * @throws MbedCloudException * if an error occurs during the process. @@ -1668,7 +1663,8 @@ public CertificateIssuer readCertificateIssuer(@NonNull String id) throws MbedCl */ @Override public Call call() { - return endpoints.getCertificateIssuersApi().getCertificateIssuer(finalId); + return endpoints.getSecurityAndIdentityCertificateIssuersApi() + .getCertificateIssuer(finalId); } }); } @@ -1700,8 +1696,7 @@ public Call call() { * Provides the configured certificate issuer. * * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @return something * @throws MbedCloudException * if an error occurs during the process. @@ -1720,7 +1715,7 @@ public CertificateIssuerConfig readCertificateIssuerConfig(@NonNull String id) t */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi() + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() .getCertificateIssuerConfigByID(finalId); } }); @@ -1754,7 +1749,7 @@ public Call call() { * bootstrap server). * * **Example:** ``` curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID \ -H - * "Authorization: Bearer [api_key]" ``` + * "Authorization: Bearer [access_key]" ``` * * @param id * ID that uniquely identifies the developer certificate. @@ -1776,7 +1771,7 @@ public DeveloperCertificate readDeveloperCertificate(@NonNull String id) throws */ @Override public Call call() { - return endpoints.getDeviceSecurityDeveloperClassCertificatesApi() + return endpoints.getSecurityAndIdentityDeveloperClassCertificatesApi() .getDeveloperCertificate(finalId); } }); @@ -1826,7 +1821,7 @@ public PreSharedKey readPreSharedKey(@NonNull PreSharedKey preSharedKey) throws * **Example:** * * ``` curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys/my-endpoint-0001 \ -H "Authorization: - * Bearer [api_key]" ``` + * Bearer [access_key]" ``` * * @param endpointName * The unique endpoint identifier that this PSK applies to. 16-64 @@ -1848,7 +1843,8 @@ public PreSharedKey readPreSharedKey(@Nullable String endpointName) throws MbedC */ @Override public Call call() { - return endpoints.getPreSharedKeysApi().getPreSharedKey(finalEndpointName); + return endpoints.getSecurityAndIdentityPreSharedKeysApi() + .getPreSharedKey(finalEndpointName); } }); } @@ -1857,11 +1853,11 @@ public Call call() { * Gets a subtenant trusted certificate. * *

- * Retrieve a trusted certificate by ID. + * Retrieve a trusted certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X GET * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ -H 'Authorization: - * Bearer [api_key]' ``` + * Bearer [access_key]' ``` * * @param accountId * The ID of the account. @@ -1889,7 +1885,7 @@ public SubtenantTrustedCertificate readSubtenantTrustedCertificate(@NonNull Stri */ @Override public Call call() { - return endpoints.getTenantDeviceSecurityCertificatesApi() + return endpoints.getTenantSecurityAndIdentityCertificatesApi() .getAccountCertificate(finalAccountId, finalId); } }); @@ -1920,10 +1916,10 @@ public Call call() { * Gets a trusted certificate. * *

- * Retrieve a trusted certificate by ID. + * Retrieve a trusted certificate. * * **Example:** ``` curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ -H - * 'Authorization: Bearer [api_key]' ``` + * 'Authorization: Bearer [access_key]' ``` * * @param id * Entity ID. @@ -1945,7 +1941,8 @@ public TrustedCertificate readTrustedCertificate(@NonNull String id) throws Mbed */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi().getCertificate(finalId); + return endpoints.getSecurityAndIdentityCertificatesApi() + .getCertificate(finalId); } }); } @@ -1999,10 +1996,9 @@ public Call call() { * {@link #updateCertificateIssuer(java.util.Map, String, com.arm.mbed.cloud.sdk.security.model.CertificateIssuer)} * * @param issuerCredentials - * The credentials required for connecting to the certificate issuer. When the issuer_type is - * GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see - * definition of CfsslAuthCredentials. - * + * The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, + * see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of + * CfsslAuthCredentials. * @param certificateIssuer * a certificate issuer. * @return something @@ -2023,19 +2019,18 @@ public Call call() { * Modifies a certificate issuer. * *

- * Update a certificate issuer. [br] **Example usage:** + * Update a certificate issuer. [br] **Example:** * - * ``` curl -X PUT \ -H 'authorization: [valid access token]' \ -H 'content-type: application/json;charset=UTF-8' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \ -d '{ - * "description": "Sample GlobalSign certificate issuer - updated.", "name": "GlobalSign Issuer" }' ``` + * ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621560be51507b9d48a91b00000000 \ -H + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json;charset=UTF-8' \ -d '{ "description": + * "Sample GlobalSign certificate issuer - updated.", "name": "GlobalSign Issuer" }' ``` * * @param issuerCredentials - * The credentials required for connecting to the certificate issuer. When the issuer_type is - * GLOBAL_SIGN, see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see - * definition of CfsslAuthCredentials. - * + * The credentials required to connect to the certificate issuer. When the issuer_type is GLOBAL_SIGN, + * see definition of GlobalSignCredentials. When the issuer_type is CFSSL_AUTH, see definition of + * CfsslAuthCredentials. * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. * @param certificateIssuerUpdateRequest * a certificate issuer. * @return an updated certificate issuer @@ -2062,7 +2057,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getCertificateIssuersApi() + return endpoints.getSecurityAndIdentityCertificateIssuersApi() .updateCertificateIssuer(finalId, CertificateIssuerAdapter.reverseMapUpdateRequest(finalCertificateIssuerUpdateRequest) .issuerCredentials(finalIssuerCredentials)); @@ -2078,7 +2073,7 @@ public Call call() { * {@link #updateCertificateIssuer(java.util.Map, String, com.arm.mbed.cloud.sdk.security.model.CertificateIssuer)} * * @param id - * The ID of the certificate issuer. + * Certificate issuer ID. * @param certificateIssuerUpdateRequest * a certificate issuer. * @return an updated certificate issuer @@ -2121,13 +2116,12 @@ public Call call() { * Modifies a certificate issuer config. * *

- * Update the configured certificate issuer configuration. + * Update certificate issuer configuration. * * @param certificateIssuerConfigRequest * a certificate issuer config. * @param id - * The ID of the certificate issuer configuration. - * + * Certificate issuer ID. configuration. * @return an updated certificate issuer config * @throws MbedCloudException * if an error occurs during the process. @@ -2151,7 +2145,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getCertificateIssuersActivationApi() + return endpoints.getSecurityAndIdentityCertificateIssuerConfigurationsApi() .updateCertificateIssuerConfigByID(CertificateIssuerConfigAdapter.reverseMapUpdateRequest(finalCertificateIssuerConfigRequest), finalId); } @@ -2162,12 +2156,12 @@ public Call call() { * Modifies a subtenant trusted certificate. * *

- * Update existing trusted certificates. + * Update a trusted certificate. [b]Note:[/b] This endpoint is restricted to administrators. * * **Example:** ``` curl -X PUT * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} \ -H 'Authorization: - * Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"description": "very important cert"} ``` Signature - * is not used by the SDK as it is a deprecated field. + * Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"description": "very important cert"} ``` + * Signature is not used by the SDK as it is a deprecated field. * * @param accountId * The ID of the account. @@ -2201,7 +2195,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getTenantDeviceSecurityCertificatesApi() + return endpoints.getTenantSecurityAndIdentityCertificatesApi() .updateAccountCertificate(finalAccountId, finalId, SubtenantTrustedCertificateAdapter.reverseMapUpdateRequest(finalSubtenantTrustedCertificate)); } @@ -2238,7 +2232,7 @@ public Call call() { * Update existing trusted certificates. * * **Example:** ``` curl -X PUT https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ -H - * 'Authorization: Bearer [api_key]' \ -H 'content-type: application/json' \ -d {"description": "very important + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json' \ -d {"description": "very important * cert"} ``` Signature is not used by the SDK as it is a deprecated field. * * @param id @@ -2268,7 +2262,7 @@ public Call call() { */ @Override public Call call() { - return endpoints.getDeviceSecurityCertificatesApi() + return endpoints.getSecurityAndIdentityCertificatesApi() .updateCertificate(finalId, TrustedCertificateAdapter.reverseMapUpdateRequest(finalTrustedCertificate)); } @@ -2321,18 +2315,14 @@ public VerificationResponse verify(@NonNull CertificateIssuer certificateIssuer) * * *

- * A utility API that can be used to validate the user configuration before activating a certificate issuer. - * Verifies that the certificate issuer is accessible and can be used to generate certificates by Device Management. - * [br] **Note:** The API requests the 3rd party CA to sign a test certificate. For some 3rd party CAs, this - * operation may make use of the account quota. [br] **Example usage:** - * - * ``` curl -X POST \ -H 'authorization: [valid access token]' \ -H 'content-type: application/json;charset=UTF-8' \ - * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify ``` + * Validates the certificate issuer by sending a signing request for a test certificate. This should be done before + * the configuration is made active. [br] **Note:** The API requests the 3rd party CA to sign a test certificate. + * For some 3rd party CAs, this operation may use the account quota. [br] **Example:** ``` curl -X POST + * https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify \ -H + * 'Authorization: Bearer [access_key]' \ -H 'content-type: application/json;charset=UTF-8' \ ``` * * @param id - * Certificate issuer ID.
- * The ID of the certificate issuer. - * + * Certificate issuer ID. * @return something * @throws MbedCloudException * if an error occurs during the process. @@ -2351,7 +2341,8 @@ public VerificationResponse verify(@NonNull String id) throws MbedCloudException */ @Override public Call call() { - return endpoints.getCertificateIssuersApi().verifyCertificateIssuer(finalId); + return endpoints.getSecurityAndIdentityCertificateIssuersApi() + .verifyCertificateIssuer(finalId); } }, true); } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountAdapter.java index 8d0352e9b..e37816994 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountAdapter.java @@ -2,8 +2,6 @@ // This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. package com.arm.mbed.cloud.sdk.accounts.adapters; -import java.util.List; - import com.arm.mbed.cloud.sdk.accounts.model.Account; import com.arm.mbed.cloud.sdk.accounts.model.AccountBusinessModel; import com.arm.mbed.cloud.sdk.accounts.model.AccountMfaStatus; @@ -14,10 +12,12 @@ import com.arm.mbed.cloud.sdk.common.TranslationUtils; import com.arm.mbed.cloud.sdk.common.listing.ListResponse; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountCreationReq; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountCreationResp; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfo; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountInfoList; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountUpdateRootReq; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BusinessModel; +import java.util.List; /** * Adapter for accounts. @@ -71,20 +71,22 @@ public static AccountCreationReq reverseMapAddRequest(Account toBeMapped) { } /** - * Maps an account info into an account. + * Maps an account creation resp into an account. * * @param toBeMapped - * an account info. + * an account creation resp. * @return mapped an account */ @Internal - public static Account map(AccountInfo toBeMapped) { + public static Account map(AccountCreationResp toBeMapped) { if (toBeMapped == null) { return null; } - final Account account = new Account(toBeMapped.getAdminId(), toBeMapped.getAdminKey(), null, + final Account account = new Account(toBeMapped.getAdminId(), toBeMapped.getAdminKey(), + BusinessModelHistoryAdapter.mapSimpleList(toBeMapped.getBusinessModelHistory()), TranslationUtils.toDate(toBeMapped.getCreatedAt()), - TranslationUtils.toDate(toBeMapped.getExpiration()), null, + TranslationUtils.toDate(toBeMapped.getExpiration()), + AccountLimitationAdapter.mapSimpleList(toBeMapped.getLimitations()), toBeMapped.getLimits(), ParentAccountAdapter.map(toBeMapped.getParentAccount()), toBeMapped.getParentId(), @@ -92,6 +94,7 @@ public static Account map(AccountInfo toBeMapped) { toBeMapped.getReason(), toBeMapped.getReferenceNote(), translateToAccountStatus(toBeMapped.getStatus()), toBeMapped.getTemplateId(), toBeMapped.getTier(), + TierHistoryAdapter.mapSimpleList(toBeMapped.getTierHistory()), TranslationUtils.toDate(toBeMapped.getUpdatedAt()), TranslationUtils.toDate(toBeMapped.getUpgradedAt())); account.setAddressLine1(toBeMapped.getAddressLine1()); @@ -126,13 +129,94 @@ public static Account map(AccountInfo toBeMapped) { return account; } + /** + * Maps an account creation resp into an account. + * + * @param toBeMapped + * an account creation resp. + * @return mapped an account + */ + @Internal + public static Account map(AccountInfo toBeMapped) { + if (toBeMapped == null) { + return null; + } + final Account account = new Account(null, null, + BusinessModelHistoryAdapter.mapSimpleList(toBeMapped.getBusinessModelHistory()), + TranslationUtils.toDate(toBeMapped.getCreatedAt()), + TranslationUtils.toDate(toBeMapped.getExpiration()), + AccountLimitationAdapter.mapSimpleList(toBeMapped.getLimitations()), + toBeMapped.getLimits(), + ParentAccountAdapter.map(toBeMapped.getParentAccount()), + toBeMapped.getParentId(), + PolicyAdapter.mapSimpleList(toBeMapped.getPolicies()), + toBeMapped.getReason(), toBeMapped.getReferenceNote(), + translateInfoStatusToAccountStatus(toBeMapped.getStatus()), + toBeMapped.getTemplateId(), toBeMapped.getTier(), + TierHistoryAdapter.mapSimpleList(toBeMapped.getTierHistory()), + TranslationUtils.toDate(toBeMapped.getUpdatedAt()), + TranslationUtils.toDate(toBeMapped.getUpgradedAt())); + account.setAddressLine1(toBeMapped.getAddressLine1()); + account.setAddressLine2(toBeMapped.getAddressLine2()); + // account.setAdminEmail(toBeMapped.getAdminEmail()); + // account.setAdminFullName(toBeMapped.getAdminFullName()); + // account.setAdminName(toBeMapped.getAdminName()); + // account.setAdminPassword(toBeMapped.getAdminPassword()); + account.setAliases(toBeMapped.getAliases()); + account.setBusinessModel(translateToAccountBusinessModel(toBeMapped.getBusinessModel())); + account.setCity(toBeMapped.getCity()); + account.setCompany(toBeMapped.getCompany()); + account.setContact(toBeMapped.getContact()); + account.setContractNumber(toBeMapped.getContractNumber()); + account.setCountry(toBeMapped.getCountry()); + account.setCustomFields(toBeMapped.getCustomFields()); + account.setCustomerNumber(toBeMapped.getCustomerNumber()); + account.setDisplayName(toBeMapped.getDisplayName()); + account.setEmail(toBeMapped.getEmail()); + account.setEndMarket(toBeMapped.getEndMarket()); + account.setExpirationWarningThreshold(TranslationUtils.toInt(toBeMapped.getExpirationWarningThreshold(), 1)); + account.setId(toBeMapped.getId()); + account.setIdleTimeout(TranslationUtils.toInt(toBeMapped.getIdleTimeout(), 1)); + // account.setMfaStatus(translateToAccountMfaStatus(toBeMapped.getMfaStatus())); + account.setNotificationEmails(toBeMapped.getNotificationEmails()); + account.setPasswordPolicy(PasswordPolicyAdapter.map(toBeMapped.getPasswordPolicy())); + account.setPasswordRecoveryExpiration(TranslationUtils.toInt(toBeMapped.getPasswordRecoveryExpiration(), 1)); + account.setPhoneNumber(toBeMapped.getPhoneNumber()); + account.setPostalCode(toBeMapped.getPostalCode()); + account.setSalesContact(toBeMapped.getSalesContact()); + account.setState(toBeMapped.getState()); + return account; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public Account map(AccountCreationResp toBeMapped) { + return AccountAdapter.map(toBeMapped); + } + }; + } + /** * Gets a mapper. * * @return a mapper */ @Internal - public static GenericAdapter.Mapper getMapper() { + public static GenericAdapter.Mapper getAccountInfoMapper() { return new GenericAdapter.Mapper() { /** * Maps. @@ -229,7 +313,7 @@ public Integer getTotalCount() { return (finalList == null) ? null : finalList.getTotalCount(); } }; - return GenericAdapter.mapList(respList, AccountAdapter.getMapper()); + return GenericAdapter.mapList(respList, AccountAdapter.getAccountInfoMapper()); } /** @@ -347,7 +431,7 @@ protected static AccountBusinessModel translateToAccountBusinessModel(BusinessMo * @return mapped enum value */ @Internal - protected static AccountMfaStatus translateToAccountMfaStatus(AccountInfo.MfaStatusEnum toBeMapped) { + protected static AccountMfaStatus translateToAccountMfaStatus(AccountCreationResp.MfaStatusEnum toBeMapped) { if (toBeMapped == null) { return AccountMfaStatus.getUnknownEnum(); } @@ -369,7 +453,33 @@ protected static AccountMfaStatus translateToAccountMfaStatus(AccountInfo.MfaSta * @return mapped enum value */ @Internal - protected static AccountStatus translateToAccountStatus(AccountInfo.StatusEnum toBeMapped) { + protected static AccountStatus translateToAccountStatus(AccountCreationResp.StatusEnum toBeMapped) { + if (toBeMapped == null) { + return AccountStatus.getUnknownEnum(); + } + switch (toBeMapped) { + case ENROLLING: + return AccountStatus.ENROLLING; + case ACTIVE: + return AccountStatus.ACTIVE; + case RESTRICTED: + return AccountStatus.RESTRICTED; + case SUSPENDED: + return AccountStatus.SUSPENDED; + default: + return AccountStatus.getUnknownEnum(); + } + } + + /** + * Maps the enum value. + * + * @param toBeMapped + * a status enum. + * @return mapped enum value + */ + @Internal + protected static AccountStatus translateInfoStatusToAccountStatus(AccountInfo.StatusEnum toBeMapped) { if (toBeMapped == null) { return AccountStatus.getUnknownEnum(); } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountLimitationAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountLimitationAdapter.java new file mode 100644 index 000000000..c7859a1ff --- /dev/null +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/AccountLimitationAdapter.java @@ -0,0 +1,148 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.adapters; + +import com.arm.mbed.cloud.sdk.accounts.model.AccountLimitation; +import com.arm.mbed.cloud.sdk.accounts.model.AccountLimitationInheritedType; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import java.util.List; + +/** + * Adapter for account limitations. + */ +@Preamble(description = "Adapter for account limitations.") +@Internal +@SuppressWarnings("checkstyle:LineLength") +public final class AccountLimitationAdapter { + /** + * Constructor. + */ + private AccountLimitationAdapter() { + super(); + // Nothing to do; + } + + /** + * Maps an account limitation into an account limitation. + * + * @param toBeMapped + * an account limitation. + * @return mapped an account limitation + */ + @Internal + public static AccountLimitation + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitation toBeMapped) { + if (toBeMapped == null) { + return null; + } + final AccountLimitation accountLimitation = new AccountLimitation(TranslationUtils.toInt(toBeMapped.getBillingPeriod(), + 1), + TranslationUtils.toDate(toBeMapped.getCreatedAt()), + toBeMapped.getDescription(), + TranslationUtils.toBool(toBeMapped.isInherited()), + toBeMapped.getInheritedFrom(), + translateToAccountLimitationInheritedType(toBeMapped.getInheritedType()), + toBeMapped.getInheritedValue(), + TranslationUtils.toLong(toBeMapped.getLimit()), + toBeMapped.getName(), + TranslationUtils.toLong(toBeMapped.getQuota()), + TranslationUtils.toDate(toBeMapped.getUpdatedAt())); + accountLimitation.setId(toBeMapped.getId()); + return accountLimitation; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static + GenericAdapter.Mapper + getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public AccountLimitation + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitation toBeMapped) { + return AccountLimitationAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps the enum value. + * + * @param toBeMapped + * an inherited type enum. + * @return mapped enum value + */ + @Internal + protected static AccountLimitationInheritedType + translateToAccountLimitationInheritedType(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.AccountLimitation.InheritedTypeEnum toBeMapped) { + if (toBeMapped == null) { + return AccountLimitationInheritedType.getUnknownEnum(); + } + switch (toBeMapped) { + case ACCOUNT: + return AccountLimitationInheritedType.ACCOUNT; + case TEMPLATE: + return AccountLimitationInheritedType.TEMPLATE; + case TIER_TEMPLATE: + return AccountLimitationInheritedType.TIER_TEMPLATE; + default: + return AccountLimitationInheritedType.getUnknownEnum(); + } + } + + /** + * Maps a list of account limitation into a list of account limitation. + * + * @param toBeMapped + * a list of account limitation. + * @return mapped simple list + */ + @Internal + public static List + mapSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, AccountLimitationAdapter.getMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static + GenericAdapter.Mapper, + List> + getSimpleListMapper() { + return new GenericAdapter.Mapper, + List>() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public List + map(List toBeMapped) { + return AccountLimitationAdapter.mapSimpleList(toBeMapped); + } + }; + } +} diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/BusinessModelHistoryAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/BusinessModelHistoryAdapter.java new file mode 100644 index 000000000..fe4fd4ed2 --- /dev/null +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/BusinessModelHistoryAdapter.java @@ -0,0 +1,111 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.adapters; + +import com.arm.mbed.cloud.sdk.accounts.model.BusinessModelHistory; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import java.util.List; + +/** + * Adapter for business model histories. + */ +@Preamble(description = "Adapter for business model histories.") +@Internal +@SuppressWarnings("checkstyle:LineLength") +public final class BusinessModelHistoryAdapter { + /** + * Constructor. + */ + private BusinessModelHistoryAdapter() { + super(); + // Nothing to do; + } + + /** + * Maps a business model history into a business model history. + * + * @param toBeMapped + * a business model history. + * @return mapped a business model history + */ + @Internal + public static BusinessModelHistory + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BusinessModelHistory toBeMapped) { + if (toBeMapped == null) { + return null; + } + final BusinessModelHistory businessModelHistory = new BusinessModelHistory(TranslationUtils.toString(toBeMapped.getBusinessModel()), + TranslationUtils.toDate(toBeMapped.getUpdatedAt())); + return businessModelHistory; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static + GenericAdapter.Mapper + getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public BusinessModelHistory + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.BusinessModelHistory toBeMapped) { + return BusinessModelHistoryAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps a list of business model history into a list of business model history. + * + * @param toBeMapped + * a list of business model history. + * @return mapped simple list + */ + @Internal + public static List + mapSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, BusinessModelHistoryAdapter.getMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static + GenericAdapter.Mapper, + List> + getSimpleListMapper() { + return new GenericAdapter.Mapper, + List>() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public List + map(List toBeMapped) { + return BusinessModelHistoryAdapter.mapSimpleList(toBeMapped); + } + }; + } +} diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderAdapter.java index 372937ded..8c417111c 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderAdapter.java @@ -47,7 +47,7 @@ public static IdentityProviderCreationReq reverseMapAddRequest(IdentityProvider final IdentityProviderCreationReq identityProviderCreationReq = new IdentityProviderCreationReq(); identityProviderCreationReq.setDescription(toBeMapped.getDescription()); identityProviderCreationReq.setName(toBeMapped.getName()); - // No field equivalent to oidcAttributes in IdentityProviderCreationReq was found in IdentityProvider + identityProviderCreationReq.setOidcAttributes(OidcRequestAdapter.reverseMapAddRequest(toBeMapped.getOidcAttributes())); // No adapter method was found in order to perform a translation from Object to SAML2Req for field: // saml2Attributes identityProviderCreationReq.setStatus(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelIdentityprovidercreationreqStatusenum(toBeMapped.getStatus())); @@ -75,6 +75,7 @@ public static IdentityProvider map(IdentityProviderInfo toBeMapped) { identityProvider.setId(toBeMapped.getId()); identityProvider.setIdentityProviderType(translateToIdentityProviderType(toBeMapped.getType())); identityProvider.setName(toBeMapped.getName()); + identityProvider.setOidcAttributes(OidcRequestAdapter.map(toBeMapped.getOidcAttributes())); identityProvider.setSaml2Attributes(toBeMapped.getSaml2Attributes()); identityProvider.setStatus(translateToIdentityProviderStatus(toBeMapped.getStatus())); return identityProvider; @@ -242,7 +243,7 @@ public static IdentityProviderUpdateReq reverseMapUpdateRequest(IdentityProvider final IdentityProviderUpdateReq identityProviderUpdateReq = new IdentityProviderUpdateReq(); identityProviderUpdateReq.setDescription(toBeMapped.getDescription()); identityProviderUpdateReq.setName(toBeMapped.getName()); - // No field equivalent to oidcAttributes in IdentityProviderUpdateReq was found in IdentityProvider + identityProviderUpdateReq.setOidcAttributes(OidcRequestAdapter.reverseMapUpdateRequest(toBeMapped.getOidcAttributes())); // No adapter method was found in order to perform a translation from Object to SAML2Req for field: // saml2Attributes identityProviderUpdateReq.setStatus(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelIdentityproviderupdatereqStatusenum(toBeMapped.getStatus())); @@ -289,6 +290,8 @@ public static IdentityProviderUpdateReq reverseMapUpdateRequest(IdentityProvider switch (toBeMapped) { case SAML2: return IdentityProviderCreationReq.TypeEnum.SAML2; + case OIDC: + return IdentityProviderCreationReq.TypeEnum.OIDC; default: return null; } @@ -382,6 +385,8 @@ protected static IdentityProviderType translateToIdentityProviderType(IdentityPr switch (toBeMapped) { case SAML2: return IdentityProviderUpdateReq.TypeEnum.SAML2; + case OIDC: + return IdentityProviderUpdateReq.TypeEnum.OIDC; default: return null; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderPublicKeyAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderPublicKeyAdapter.java index 794d8365a..c4555b602 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderPublicKeyAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/IdentityProviderPublicKeyAdapter.java @@ -2,8 +2,12 @@ // This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. package com.arm.mbed.cloud.sdk.accounts.adapters; +import com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderPublicKey; import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.IdpPublicKey; +import java.util.List; /** * Adapter for identity provider public keys. @@ -19,4 +23,181 @@ private IdentityProviderPublicKeyAdapter() { super(); // Nothing to do; } + + /** + * Maps an identity provider public key into an idp public key. + * + * @param toBeMapped + * an identity provider public key. + * @return mapped an idp public key + */ + @Internal + public static IdpPublicKey reverseMapAddRequest(IdentityProviderPublicKey toBeMapped) { + if (toBeMapped == null) { + return null; + } + final IdpPublicKey idpPublicKey = new IdpPublicKey(); + idpPublicKey.setKey(toBeMapped.getKey()); + idpPublicKey.setKid(toBeMapped.getKid()); + return idpPublicKey; + } + + /** + * Maps a list of identity provider public key into a list of idp public key. + * + * @param toBeMapped + * a list of identity provider public key. + * @return mapped simple list + */ + @Internal + public static List reverseMapAddSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, IdentityProviderPublicKeyAdapter.getAddMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getAddMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public IdpPublicKey map(IdentityProviderPublicKey toBeMapped) { + return IdentityProviderPublicKeyAdapter.reverseMapAddRequest(toBeMapped); + } + }; + } + + /** + * Maps an idp public key into an identity provider public key. + * + * @param toBeMapped + * an idp public key. + * @return mapped an identity provider public key + */ + @Internal + public static IdentityProviderPublicKey map(IdpPublicKey toBeMapped) { + if (toBeMapped == null) { + return null; + } + final IdentityProviderPublicKey identityProviderPublicKey = new IdentityProviderPublicKey(toBeMapped.getKey(), + toBeMapped.getKid()); + return identityProviderPublicKey; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public IdentityProviderPublicKey map(IdpPublicKey toBeMapped) { + return IdentityProviderPublicKeyAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps a list of idp public key into a list of identity provider public key. + * + * @param toBeMapped + * a list of idp public key. + * @return mapped simple list + */ + @Internal + public static List mapSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, IdentityProviderPublicKeyAdapter.getMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper, List> getSimpleListMapper() { + return new GenericAdapter.Mapper, List>() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public List map(List toBeMapped) { + return IdentityProviderPublicKeyAdapter.mapSimpleList(toBeMapped); + } + }; + } + + /** + * Maps an identity provider public key into an idp public key. + * + * @param toBeMapped + * an identity provider public key. + * @return mapped an idp public key + */ + @Internal + public static IdpPublicKey reverseMapUpdateRequest(IdentityProviderPublicKey toBeMapped) { + if (toBeMapped == null) { + return null; + } + final IdpPublicKey idpPublicKey = new IdpPublicKey(); + idpPublicKey.setKey(toBeMapped.getKey()); + idpPublicKey.setKid(toBeMapped.getKid()); + return idpPublicKey; + } + + /** + * Maps a list of identity provider public key into a list of idp public key. + * + * @param toBeMapped + * a list of identity provider public key. + * @return mapped simple list + */ + @Internal + public static List reverseMapUpdateSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, IdentityProviderPublicKeyAdapter.getUpdateMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getUpdateMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public IdpPublicKey map(IdentityProviderPublicKey toBeMapped) { + return IdentityProviderPublicKeyAdapter.reverseMapUpdateRequest(toBeMapped); + } + }; + } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/LoginProfileAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/LoginProfileAdapter.java index 57b809592..aaa3e1273 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/LoginProfileAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/LoginProfileAdapter.java @@ -89,7 +89,8 @@ public static com.arm.mbed.cloud.sdk.accounts.model.LoginProfile map(LoginProfil if (toBeMapped == null) { return null; } - final com.arm.mbed.cloud.sdk.accounts.model.LoginProfile loginProfile = new com.arm.mbed.cloud.sdk.accounts.model.LoginProfile(translateToLoginProfileType(toBeMapped.getType())); + final com.arm.mbed.cloud.sdk.accounts.model.LoginProfile loginProfile = new com.arm.mbed.cloud.sdk.accounts.model.LoginProfile(toBeMapped.getForeignId(), + translateToLoginProfileType(toBeMapped.getType())); loginProfile.setId(toBeMapped.getId()); loginProfile.setName(toBeMapped.getName()); return loginProfile; diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestAdapter.java index 4ac15f7f0..13435e71c 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestAdapter.java @@ -2,8 +2,13 @@ // This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. package com.arm.mbed.cloud.sdk.accounts.adapters; +import com.arm.mbed.cloud.sdk.accounts.model.OidcRequest; +import com.arm.mbed.cloud.sdk.accounts.model.OidcRequestTokenMode; import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.OIDCInfo; /** * Adapter for oidc requests. @@ -19,4 +24,162 @@ private OidcRequestAdapter() { super(); // Nothing to do; } + + /** + * Maps an oidc request into an o i d c info. + * + * @param toBeMapped + * an oidc request. + * @return mapped an o i d c info + */ + @Internal + public static OIDCInfo reverseMapAddRequest(OidcRequest toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OIDCInfo oidcInfo = new OIDCInfo(); + oidcInfo.setAuthorizationEndpoint(toBeMapped.getAuthorizationEndpoint()); + oidcInfo.setAutoEnrollment(Boolean.valueOf(toBeMapped.isAutoEnrollment())); + oidcInfo.setClaimMapping(OidcRequestClaimMappingAdapter.reverseMapAddRequest(toBeMapped.getClaimMapping())); + oidcInfo.setClientId(toBeMapped.getClientId()); + oidcInfo.setClientSecret(toBeMapped.getClientSecret()); + oidcInfo.setEndSessionEndpoint(toBeMapped.getEndSessionEndpoint()); + oidcInfo.setIssuer(toBeMapped.getIssuer()); + oidcInfo.setJwksUri(toBeMapped.getJwksUri()); + oidcInfo.setKeys(IdentityProviderPublicKeyAdapter.reverseMapAddSimpleList(toBeMapped.getKeys())); + oidcInfo.setRedirectUri(toBeMapped.getRedirectUri()); + oidcInfo.setRevocationEndpoint(toBeMapped.getRevocationEndpoint()); + oidcInfo.setScopes(toBeMapped.getScopes()); + oidcInfo.setTokenEndpoint(toBeMapped.getTokenEndpoint()); + oidcInfo.setTokenRequestMode(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelOidcinfoTokenrequestmodeenum(toBeMapped.getTokenRequestMode())); + oidcInfo.setTokenResponsePath(toBeMapped.getTokenResponsePath()); + oidcInfo.setUserinfoEndpoint(toBeMapped.getUserinfoEndpoint()); + return oidcInfo; + } + + /** + * Maps an o i d c info into an oidc request. + * + * @param toBeMapped + * an o i d c info. + * @return mapped an oidc request + */ + @Internal + public static OidcRequest map(OIDCInfo toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OidcRequest oidcRequest = new OidcRequest(toBeMapped.getAuthorizationEndpoint(), + TranslationUtils.toBool(toBeMapped.isAutoEnrollment()), + OidcRequestClaimMappingAdapter.map(toBeMapped.getClaimMapping()), + toBeMapped.getClientId(), toBeMapped.getClientSecret(), + toBeMapped.getEndSessionEndpoint(), toBeMapped.getIssuer(), + toBeMapped.getJwksUri(), + IdentityProviderPublicKeyAdapter.mapSimpleList(toBeMapped.getKeys()), + toBeMapped.getRedirectUri(), toBeMapped.getRevocationEndpoint(), + toBeMapped.getScopes(), toBeMapped.getTokenEndpoint(), + translateToOidcRequestTokenMode(toBeMapped.getTokenRequestMode()), + toBeMapped.getTokenResponsePath(), + toBeMapped.getUserinfoEndpoint()); + return oidcRequest; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public OidcRequest map(OIDCInfo toBeMapped) { + return OidcRequestAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps an oidc request into an o i d c info. + * + * @param toBeMapped + * an oidc request. + * @return mapped an o i d c info + */ + @Internal + public static OIDCInfo reverseMapUpdateRequest(OidcRequest toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OIDCInfo oidcInfo = new OIDCInfo(); + oidcInfo.setAuthorizationEndpoint(toBeMapped.getAuthorizationEndpoint()); + oidcInfo.setAutoEnrollment(Boolean.valueOf(toBeMapped.isAutoEnrollment())); + oidcInfo.setClaimMapping(OidcRequestClaimMappingAdapter.reverseMapUpdateRequest(toBeMapped.getClaimMapping())); + oidcInfo.setClientId(toBeMapped.getClientId()); + oidcInfo.setClientSecret(toBeMapped.getClientSecret()); + oidcInfo.setEndSessionEndpoint(toBeMapped.getEndSessionEndpoint()); + oidcInfo.setIssuer(toBeMapped.getIssuer()); + oidcInfo.setJwksUri(toBeMapped.getJwksUri()); + oidcInfo.setKeys(IdentityProviderPublicKeyAdapter.reverseMapUpdateSimpleList(toBeMapped.getKeys())); + oidcInfo.setRedirectUri(toBeMapped.getRedirectUri()); + oidcInfo.setRevocationEndpoint(toBeMapped.getRevocationEndpoint()); + oidcInfo.setScopes(toBeMapped.getScopes()); + oidcInfo.setTokenEndpoint(toBeMapped.getTokenEndpoint()); + oidcInfo.setTokenRequestMode(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelOidcinfoTokenrequestmodeenum(toBeMapped.getTokenRequestMode())); + oidcInfo.setTokenResponsePath(toBeMapped.getTokenResponsePath()); + oidcInfo.setUserinfoEndpoint(toBeMapped.getUserinfoEndpoint()); + return oidcInfo; + } + + /** + * Maps the enum value. + * + * @param toBeMapped + * an oidc request token mode. + * @return mapped enum value + */ + @Internal + protected static OIDCInfo.TokenRequestModeEnum + translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelOidcinfoTokenrequestmodeenum(OidcRequestTokenMode toBeMapped) { + if (toBeMapped == null) { + return null; + } + switch (toBeMapped) { + case POST: + return OIDCInfo.TokenRequestModeEnum.POST; + case GET: + return OIDCInfo.TokenRequestModeEnum.GET; + default: + return null; + } + } + + /** + * Maps the enum value. + * + * @param toBeMapped + * a token request mode enum. + * @return mapped enum value + */ + @Internal + protected static OidcRequestTokenMode translateToOidcRequestTokenMode(OIDCInfo.TokenRequestModeEnum toBeMapped) { + if (toBeMapped == null) { + return OidcRequestTokenMode.getUnknownEnum(); + } + switch (toBeMapped) { + case POST: + return OidcRequestTokenMode.POST; + case GET: + return OidcRequestTokenMode.GET; + default: + return OidcRequestTokenMode.getUnknownEnum(); + } + } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestClaimMappingAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestClaimMappingAdapter.java index 4e96ae641..ded15b647 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestClaimMappingAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/OidcRequestClaimMappingAdapter.java @@ -2,8 +2,11 @@ // This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. package com.arm.mbed.cloud.sdk.accounts.adapters; +import com.arm.mbed.cloud.sdk.accounts.model.OidcRequestClaimMapping; import com.arm.mbed.cloud.sdk.annotations.Internal; import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.OIDCClaimMapping; /** * Adapter for oidc request claim mappings. @@ -19,4 +22,100 @@ private OidcRequestClaimMappingAdapter() { super(); // Nothing to do; } + + /** + * Maps an oidc request claim mapping into an o i d c claim mapping. + * + * @param toBeMapped + * an oidc request claim mapping. + * @return mapped an o i d c claim mapping + */ + @Internal + public static OIDCClaimMapping reverseMapAddRequest(OidcRequestClaimMapping toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OIDCClaimMapping oidcClaimMapping = new OIDCClaimMapping(); + oidcClaimMapping.setEmail(toBeMapped.getEmail()); + oidcClaimMapping.setEmailVerified(toBeMapped.getEmailVerified()); + oidcClaimMapping.setFamilyName(toBeMapped.getFamilyName()); + oidcClaimMapping.setGivenName(toBeMapped.getGivenName()); + oidcClaimMapping.setName(toBeMapped.getName()); + oidcClaimMapping.setPhoneNumber(toBeMapped.getPhoneNumber()); + oidcClaimMapping.setSub(toBeMapped.getSub()); + oidcClaimMapping.setUpdatedAt(toBeMapped.getUpdatedAt()); + oidcClaimMapping.setUpdatedAtPattern(toBeMapped.getUpdatedAtPattern()); + return oidcClaimMapping; + } + + /** + * Maps an o i d c claim mapping into an oidc request claim mapping. + * + * @param toBeMapped + * an o i d c claim mapping. + * @return mapped an oidc request claim mapping + */ + @Internal + public static OidcRequestClaimMapping map(OIDCClaimMapping toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OidcRequestClaimMapping oidcRequestClaimMapping = new OidcRequestClaimMapping(toBeMapped.getEmail(), + toBeMapped.getEmailVerified(), + toBeMapped.getFamilyName(), + toBeMapped.getGivenName(), + toBeMapped.getName(), + toBeMapped.getPhoneNumber(), + toBeMapped.getSub(), + toBeMapped.getUpdatedAt(), + toBeMapped.getUpdatedAtPattern()); + return oidcRequestClaimMapping; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public OidcRequestClaimMapping map(OIDCClaimMapping toBeMapped) { + return OidcRequestClaimMappingAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps an oidc request claim mapping into an o i d c claim mapping. + * + * @param toBeMapped + * an oidc request claim mapping. + * @return mapped an o i d c claim mapping + */ + @Internal + public static OIDCClaimMapping reverseMapUpdateRequest(OidcRequestClaimMapping toBeMapped) { + if (toBeMapped == null) { + return null; + } + final OIDCClaimMapping oidcClaimMapping = new OIDCClaimMapping(); + oidcClaimMapping.setEmail(toBeMapped.getEmail()); + oidcClaimMapping.setEmailVerified(toBeMapped.getEmailVerified()); + oidcClaimMapping.setFamilyName(toBeMapped.getFamilyName()); + oidcClaimMapping.setGivenName(toBeMapped.getGivenName()); + oidcClaimMapping.setName(toBeMapped.getName()); + oidcClaimMapping.setPhoneNumber(toBeMapped.getPhoneNumber()); + oidcClaimMapping.setSub(toBeMapped.getSub()); + oidcClaimMapping.setUpdatedAt(toBeMapped.getUpdatedAt()); + oidcClaimMapping.setUpdatedAtPattern(toBeMapped.getUpdatedAtPattern()); + return oidcClaimMapping; + } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/PolicyGroupAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/PolicyGroupAdapter.java index c81a599b3..3d47a01fd 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/PolicyGroupAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/PolicyGroupAdapter.java @@ -61,6 +61,7 @@ public static PolicyGroup map(GroupSummary toBeMapped) { } final PolicyGroup policyGroup = new PolicyGroup(toBeMapped.getAccountId(), TranslationUtils.toInt(toBeMapped.getApikeyCount()), + TranslationUtils.toInt(toBeMapped.getApplicationCount()), TranslationUtils.toDate(toBeMapped.getCreatedAt()), TranslationUtils.toDate(toBeMapped.getUpdatedAt()), TranslationUtils.toInt(toBeMapped.getUserCount())); diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/Saml2RequestAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/Saml2RequestAdapter.java index 6971d21c2..3744527fd 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/Saml2RequestAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/Saml2RequestAdapter.java @@ -15,7 +15,7 @@ public final class Saml2RequestAdapter { /** * Constructor. */ - private Saml2RequestAdapter() { + public Saml2RequestAdapter() { super(); // Nothing to do; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantIdentityProviderAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantIdentityProviderAdapter.java index 9ea690912..7237a4a28 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantIdentityProviderAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantIdentityProviderAdapter.java @@ -46,7 +46,7 @@ public static IdentityProviderCreationReq reverseMapAddRequest(SubtenantIdentity final IdentityProviderCreationReq identityProviderCreationReq = new IdentityProviderCreationReq(); identityProviderCreationReq.setDescription(toBeMapped.getDescription()); identityProviderCreationReq.setName(toBeMapped.getName()); - // No field equivalent to oidcAttributes in IdentityProviderCreationReq was found in SubtenantIdentityProvider + identityProviderCreationReq.setOidcAttributes(OidcRequestAdapter.reverseMapAddRequest(toBeMapped.getOidcAttributes())); // No adapter method was found in order to perform a translation from Object to SAML2Req for field: // saml2Attributes identityProviderCreationReq.setStatus(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelIdentityprovidercreationreqStatusenum(toBeMapped.getStatus())); @@ -73,6 +73,7 @@ public static SubtenantIdentityProvider map(IdentityProviderInfo toBeMapped) { subtenantIdentityProvider.setDescription(toBeMapped.getDescription()); subtenantIdentityProvider.setId(toBeMapped.getId()); subtenantIdentityProvider.setName(toBeMapped.getName()); + subtenantIdentityProvider.setOidcAttributes(OidcRequestAdapter.map(toBeMapped.getOidcAttributes())); subtenantIdentityProvider.setSaml2Attributes(toBeMapped.getSaml2Attributes()); subtenantIdentityProvider.setStatus(translateToSubtenantIdentityProviderStatus(toBeMapped.getStatus())); return subtenantIdentityProvider; @@ -240,7 +241,7 @@ public static IdentityProviderUpdateReq reverseMapUpdateRequest(SubtenantIdentit final IdentityProviderUpdateReq identityProviderUpdateReq = new IdentityProviderUpdateReq(); identityProviderUpdateReq.setDescription(toBeMapped.getDescription()); identityProviderUpdateReq.setName(toBeMapped.getName()); - // No field equivalent to oidcAttributes in IdentityProviderUpdateReq was found in SubtenantIdentityProvider + identityProviderUpdateReq.setOidcAttributes(OidcRequestAdapter.reverseMapUpdateRequest(toBeMapped.getOidcAttributes())); // No adapter method was found in order to perform a translation from Object to SAML2Req for field: // saml2Attributes identityProviderUpdateReq.setStatus(translateToComArmMbedCloudSdkLowlevelPelionclouddevicemanagementModelIdentityproviderupdatereqStatusenum(toBeMapped.getStatus())); diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantPolicyGroupAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantPolicyGroupAdapter.java index 8c33aa1c2..781a6de41 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantPolicyGroupAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/SubtenantPolicyGroupAdapter.java @@ -60,6 +60,7 @@ public static SubtenantPolicyGroup map(GroupSummary toBeMapped) { return null; } final SubtenantPolicyGroup subtenantPolicyGroup = new SubtenantPolicyGroup(TranslationUtils.toInt(toBeMapped.getApikeyCount()), + TranslationUtils.toInt(toBeMapped.getApplicationCount()), TranslationUtils.toDate(toBeMapped.getCreatedAt()), TranslationUtils.toDate(toBeMapped.getUpdatedAt()), TranslationUtils.toInt(toBeMapped.getUserCount())); diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/TierHistoryAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/TierHistoryAdapter.java new file mode 100644 index 000000000..d65e3f7f3 --- /dev/null +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/adapters/TierHistoryAdapter.java @@ -0,0 +1,110 @@ +// This file was generated by the Pelion SDK foundation code generator. +// This is an autogenerated class. Do not modify its content as modifications will be lost at next code generation. +package com.arm.mbed.cloud.sdk.accounts.adapters; + +import com.arm.mbed.cloud.sdk.accounts.model.TierHistory; +import com.arm.mbed.cloud.sdk.annotations.Internal; +import com.arm.mbed.cloud.sdk.annotations.Preamble; +import com.arm.mbed.cloud.sdk.common.GenericAdapter; +import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import java.util.List; + +/** + * Adapter for tier histories. + */ +@Preamble(description = "Adapter for tier histories.") +@Internal +@SuppressWarnings("checkstyle:LineLength") +public final class TierHistoryAdapter { + /** + * Constructor. + */ + private TierHistoryAdapter() { + super(); + // Nothing to do; + } + + /** + * Maps a tier history into a tier history. + * + * @param toBeMapped + * a tier history. + * @return mapped a tier history + */ + @Internal + public static TierHistory + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TierHistory toBeMapped) { + if (toBeMapped == null) { + return null; + } + final TierHistory tierHistory = new TierHistory(toBeMapped.getTier(), + TranslationUtils.toDate(toBeMapped.getUpdatedAt())); + return tierHistory; + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static GenericAdapter.Mapper + getMapper() { + return new GenericAdapter.Mapper() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public TierHistory + map(com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.model.TierHistory toBeMapped) { + return TierHistoryAdapter.map(toBeMapped); + } + }; + } + + /** + * Maps a list of tier history into a list of tier history. + * + * @param toBeMapped + * a list of tier history. + * @return mapped simple list + */ + @Internal + public static List + mapSimpleList(List toBeMapped) { + return GenericAdapter.mapList(toBeMapped, TierHistoryAdapter.getMapper()); + } + + /** + * Gets a mapper. + * + * @return a mapper + */ + @Internal + public static + GenericAdapter.Mapper, + List> + getSimpleListMapper() { + return new GenericAdapter.Mapper, + List>() { + /** + * Maps. + * + * @param toBeMapped + * model to be mapped. + * @return a mapped object + */ + @Override + public List + map(List toBeMapped) { + return TierHistoryAdapter.mapSimpleList(toBeMapped); + } + }; + } +} diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountDao.java index 1d83fb576..e6430b49f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountDao.java @@ -92,6 +92,12 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(String, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param keyEq @@ -104,6 +110,7 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@NonNull String id, @Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { @@ -119,6 +126,12 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#allApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -129,6 +142,7 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { @@ -142,6 +156,12 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -154,6 +174,7 @@ public AccountDao(SdkContext sdkContext) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options, @NonNull Account account) throws MbedCloudException { @@ -167,6 +188,12 @@ public Paginator allApiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param options @@ -175,6 +202,7 @@ public Paginator allApiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@NonNull String id, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allApiKeys(id, options); @@ -189,12 +217,19 @@ public Paginator allApiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#allApiKeys(com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @return paginator over the list of subtenant api keys * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { return allApiKeys(options, getModel()); @@ -207,6 +242,12 @@ public Paginator allApiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @param account @@ -215,6 +256,7 @@ public Paginator allApiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable SubtenantApiKeyListOptions options, @NonNull Account account) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allApiKeys(options, account); @@ -344,6 +386,68 @@ public Paginator allApiKeys(@Nullable SubtenantApiKeyListOption return ((Accounts) getModuleOrThrow()).allDarkThemeBrandingImages(options, account); } + /** + * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#allIdentityProviders(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions)} + * + * @param id + * The ID of the account. + * @param options + * list options. + * @return paginator over the list of subtenant identity providers + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allIdentityProviders(@NonNull String id, + @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).allIdentityProviders(id, options); + } + + /** + * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#allIdentityProviders(com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @return paginator over the list of subtenant identity providers + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allIdentityProviders(@Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + return allIdentityProviders(options, getModel()); + } + + /** + * Creates a {@link Paginator} for the list of subtenant identity providers matching filter options. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#allIdentityProviders(com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant identity providers + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allIdentityProviders(@Nullable SubtenantIdentityProviderListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).allIdentityProviders(options, account); + } + /** * Creates a {@link Paginator} for the list of subtenant light theme colors matching filter options. * @@ -468,6 +572,115 @@ public Paginator allApiKeys(@Nullable SubtenantApiKeyListOption return ((Accounts) getModuleOrThrow()).allLightThemeBrandingImages(options, account); } + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#allPolicyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} + * + * @param id + * Account ID. + * @param nameEq + * a string + * @param options + * list options. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allPolicyGroups(@NonNull String id, @Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).allPolicyGroups(id, nameEq, options); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#allPolicyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param nameEq + * a string + * @param options + * list options. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allPolicyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return allPolicyGroups(nameEq, options, getModel()); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#allPolicyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param nameEq + * a string + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator allPolicyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).allPolicyGroups(nameEq, options, account); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#allPolicyGroups(com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator + allPolicyGroups(@Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return allPolicyGroups(options, getModel()); + } + + /** + * Creates a {@link Paginator} for the list of subtenant policy groups matching filter options. + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#allPolicyGroups(com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return paginator over the list of subtenant policy groups + * @throws MbedCloudException + * if an error occurs during the process. + */ + public Paginator allPolicyGroups(@Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).allPolicyGroups(options, account); + } + /** * Creates a {@link Paginator} for the list of subtenant trusted certificates matching filter options. * @@ -808,6 +1021,12 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(String, String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param keyEq @@ -820,6 +1039,7 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@NonNull String id, @Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { @@ -836,6 +1056,12 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#apiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -846,6 +1072,7 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { @@ -860,6 +1087,12 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param keyEq * a string * @param ownerEq @@ -872,6 +1105,7 @@ public Paginator allUsers(@Nullable SubtenantUserListOptions opti * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable String keyEq, @Nullable String ownerEq, @Nullable SubtenantApiKeyListOptions options, @NonNull Account account) throws MbedCloudException { @@ -886,6 +1120,12 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param id * Account ID. * @param options @@ -894,6 +1134,7 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@NonNull String id, @Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).apiKeys(id, options); @@ -909,12 +1150,19 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#apiKeys(com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @return the list of subtenant api keys corresponding to filter options (One page). * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable SubtenantApiKeyListOptions options) throws MbedCloudException { return apiKeys(options, getModel()); @@ -928,6 +1176,12 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(com.arm.mbed.cloud.sdk.accounts.model.SubtenantApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/access-keys + * * @param options * list options. * @param account @@ -936,6 +1190,7 @@ public ListResponse apiKeys(@Nullable String keyEq, @Nullable S * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable SubtenantApiKeyListOptions options, @NonNull Account account) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).apiKeys(options, account); @@ -1197,6 +1452,71 @@ public Account create(@Nullable @DefaultValue("create") String action, return ((Accounts) getModuleOrThrow()).darkThemeBrandingImages(options, account); } + /** + * Get all identity providers. + * + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#identityProviders(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions)} + * + * @param id + * The ID of the account. + * @param options + * list options. + * @return the list of subtenant identity providers corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + identityProviders(@NonNull String id, + @Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).identityProviders(id, options); + } + + /** + * Get all identity providers. + * + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#identityProviders(com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @return the list of subtenant identity providers corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + identityProviders(@Nullable SubtenantIdentityProviderListOptions options) throws MbedCloudException { + return identityProviders(options, getModel()); + } + + /** + * Get all identity providers. + * + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#identityProviders(com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant identity providers corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + identityProviders(@Nullable SubtenantIdentityProviderListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).identityProviders(options, account); + } + /** * Instantiates model. * @@ -1411,6 +1731,120 @@ public Account me(@Nullable String include, @Nullable String properties) throws return setAndGetModel(((Accounts) getModuleOrThrow()).myAccount(include, properties)); } + /** + * Get policy groups. + * + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#policyGroups(String, String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} + * + * @param id + * Account ID. + * @param nameEq + * a string + * @param options + * list options. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + policyGroups(@NonNull String id, @Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).policyGroups(id, nameEq, options); + } + + /** + * Get policy groups. + * + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param nameEq + * a string + * @param options + * list options. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + policyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return policyGroups(nameEq, options, getModel()); + } + + /** + * Get policy groups. + * + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param nameEq + * a string + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse policyGroups(@Nullable String nameEq, + @Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).policyGroups(nameEq, options, account); + } + + /** + * Get policy groups. + * + * + *

+ * Note: uses internal data model + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.accounts.model.AccountDao#policyGroups(com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse + policyGroups(@Nullable SubtenantPolicyGroupListOptions options) throws MbedCloudException { + return policyGroups(options, getModel()); + } + + /** + * Get policy groups. + * + * + *

+ * Similar to + * {@link com.arm.mbed.cloud.sdk.Accounts#policyGroups(com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.Account)} + * + * @param options + * list options. + * @param account + * an account. + * @return the list of subtenant policy groups corresponding to filter options (One page). + * @throws MbedCloudException + * if an error occurs during the process. + */ + public ListResponse policyGroups(@Nullable SubtenantPolicyGroupListOptions options, + @NonNull Account account) throws MbedCloudException { + return ((Accounts) getModuleOrThrow()).policyGroups(options, account); + } + /** * Gets an account. * @@ -1530,7 +1964,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1556,7 +1990,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1583,7 +2017,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1609,7 +2043,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1631,7 +2065,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1652,7 +2086,7 @@ public Account read(@Nullable String include, @Nullable String properties, } /** - * Get all trusted certificates. + * Get trusted certificates. * * *

@@ -1747,7 +2181,7 @@ public Account update(@NonNull String id, @NonNull Account account) throws MbedC } /** - * Get the details of all user invitations. + * Get user invitations. * * *

@@ -1769,7 +2203,7 @@ public Account update(@NonNull String id, @NonNull Account account) throws MbedC } /** - * Get the details of all user invitations. + * Get user invitations. * * *

@@ -1790,7 +2224,7 @@ public Account update(@NonNull String id, @NonNull Account account) throws MbedC } /** - * Get the details of all user invitations. + * Get user invitations. * * *

@@ -1811,7 +2245,7 @@ public ListResponse userInvitations(@Nullable Subtenant } /** - * Get the details of all users. + * Get users. * * *

@@ -1837,7 +2271,7 @@ public ListResponse users(@NonNull String id, @Nullable String em } /** - * Get the details of all users. + * Get users. * * *

@@ -1862,7 +2296,7 @@ public ListResponse users(@Nullable String emailEq, @Nullable Str } /** - * Get the details of all users. + * Get users. * * *

@@ -1888,7 +2322,7 @@ public ListResponse users(@Nullable String emailEq, @Nullable Str } /** - * Get the details of all users. + * Get users. * * *

@@ -1909,7 +2343,7 @@ public ListResponse users(@NonNull String id, } /** - * Get the details of all users. + * Get users. * * *

@@ -1929,7 +2363,7 @@ public ListResponse users(@Nullable SubtenantUserListOptions opti } /** - * Get the details of all users. + * Get users. * * *

diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountsEndpoints.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountsEndpoints.java index 6b2ffe9a8..5f53be9e2 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountsEndpoints.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/AccountsEndpoints.java @@ -18,7 +18,7 @@ import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsPolicyGroupsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsUserInvitationsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantAccountsUsersApi; -import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantDeviceSecurityCertificatesApi; +import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantSecurityAndIdentityCertificatesApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantUserInterfaceConfigurationColorsApi; import com.arm.mbed.cloud.sdk.lowlevel.pelionclouddevicemanagement.api.TenantUserInterfaceConfigurationImagesApi; @@ -53,6 +53,12 @@ public class AccountsEndpoints extends AbstractEndpoints { @Internal private final TenantUserInterfaceConfigurationImagesApi tenantUserInterfaceConfigurationImagesApi; + /** + * Low level endpoints for tenant accounts identity providers apis. + */ + @Internal + private final TenantAccountsIdentityProvidersApi tenantAccountsIdentityProvidersApi; + /** * Low level endpoints for account profile apis. */ @@ -60,10 +66,16 @@ public class AccountsEndpoints extends AbstractEndpoints { private final AccountProfileApi accountProfileApi; /** - * Low level endpoints for tenant device security certificates apis. + * Low level endpoints for tenant accounts policy groups apis. + */ + @Internal + private final TenantAccountsPolicyGroupsApi tenantAccountsPolicyGroupsApi; + + /** + * Low level endpoints for tenant security and identity certificates apis. */ @Internal - private final TenantDeviceSecurityCertificatesApi tenantDeviceSecurityCertificatesApi; + private final TenantSecurityAndIdentityCertificatesApi tenantSecurityAndIdentityCertificatesApi; /** * Low level endpoints for tenant accounts user invitations apis. @@ -95,18 +107,6 @@ public class AccountsEndpoints extends AbstractEndpoints { @Internal private final AccountPolicyGroupsApi accountPolicyGroupsApi; - /** - * Low level endpoints for tenant accounts identity providers apis. - */ - @Internal - private final TenantAccountsIdentityProvidersApi tenantAccountsIdentityProvidersApi; - - /** - * Low level endpoints for tenant accounts policy groups apis. - */ - @Internal - private final TenantAccountsPolicyGroupsApi tenantAccountsPolicyGroupsApi; - /** * Low level endpoints for account users apis. */ @@ -131,15 +131,15 @@ public AccountsEndpoints(ServiceRegistry services) { this.tenantAccountsAccountsApi = initialiseService(TenantAccountsAccountsApi.class); this.tenantUserInterfaceConfigurationColorsApi = initialiseService(TenantUserInterfaceConfigurationColorsApi.class); this.tenantUserInterfaceConfigurationImagesApi = initialiseService(TenantUserInterfaceConfigurationImagesApi.class); + this.tenantAccountsIdentityProvidersApi = initialiseService(TenantAccountsIdentityProvidersApi.class); this.accountProfileApi = initialiseService(AccountProfileApi.class); - this.tenantDeviceSecurityCertificatesApi = initialiseService(TenantDeviceSecurityCertificatesApi.class); + this.tenantAccountsPolicyGroupsApi = initialiseService(TenantAccountsPolicyGroupsApi.class); + this.tenantSecurityAndIdentityCertificatesApi = initialiseService(TenantSecurityAndIdentityCertificatesApi.class); this.tenantAccountsUserInvitationsApi = initialiseService(TenantAccountsUserInvitationsApi.class); this.tenantAccountsUsersApi = initialiseService(TenantAccountsUsersApi.class); this.accountApiKeysApi = initialiseService(AccountApiKeysApi.class); this.accountIdentityProvidersApi = initialiseService(AccountIdentityProvidersApi.class); this.accountPolicyGroupsApi = initialiseService(AccountPolicyGroupsApi.class); - this.tenantAccountsIdentityProvidersApi = initialiseService(TenantAccountsIdentityProvidersApi.class); - this.tenantAccountsPolicyGroupsApi = initialiseService(TenantAccountsPolicyGroupsApi.class); this.accountUsersApi = initialiseService(AccountUsersApi.class); this.accountUserInvitationsApi = initialiseService(AccountUserInvitationsApi.class); } @@ -285,13 +285,13 @@ public AccountProfileApi getAccountProfileApi() { } /** - * Gets low level endpoints for tenant device security certificates apis. + * Gets low level endpoints for tenant security and identity certificates apis. * - * @return tenantDeviceSecurityCertificatesApi + * @return tenantSecurityAndIdentityCertificatesApi */ @Internal - public TenantDeviceSecurityCertificatesApi getTenantDeviceSecurityCertificatesApi() { - return tenantDeviceSecurityCertificatesApi; + public TenantSecurityAndIdentityCertificatesApi getTenantSecurityAndIdentityCertificatesApi() { + return tenantSecurityAndIdentityCertificatesApi; } /** diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyDao.java index 816e2a0a2..73dda10f7 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyDao.java @@ -80,12 +80,19 @@ public ApiKeyDao(SdkContext sdkContext) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#allPolicyGroups(com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @return paginator over the list of policy groups * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions options) throws MbedCloudException { return allPolicyGroups(options, getModel()); } @@ -97,6 +104,12 @@ public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions o * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allPolicyGroups(com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @param apiKey @@ -105,6 +118,7 @@ public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions o * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions options, @NonNull ApiKey apiKey) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allPolicyGroups(options, apiKey); @@ -117,6 +131,12 @@ public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions o * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allPolicyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param id * The ID of the API key. * @param options @@ -125,6 +145,7 @@ public Paginator allPolicyGroups(@Nullable PolicyGroupListOptions o * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allPolicyGroups(@NonNull String id, @Nullable PolicyGroupListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allPolicyGroups(id, options); @@ -157,11 +178,18 @@ public ApiKeyDao clone() { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#create(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * * @return an added api key * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public ApiKey create() throws MbedCloudException { return create(getModel()); } @@ -172,6 +200,12 @@ public ApiKey create() throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#createApiKey(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use POST + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * * @param apiKey * an api key. * @return an added api key @@ -179,6 +213,7 @@ public ApiKey create() throws MbedCloudException { * if an error occurs during the process. */ @Override + @Deprecated public ApiKey create(@NonNull ApiKey apiKey) throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).createApiKey(apiKey)); } @@ -192,10 +227,17 @@ public ApiKey create(@NonNull ApiKey apiKey) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#delete(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public void delete() throws MbedCloudException { delete(getModel()); } @@ -206,12 +248,19 @@ public void delete() throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#deleteApiKey(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public void delete(@NonNull ApiKey apiKey) throws MbedCloudException { ((Accounts) getModuleOrThrow()).deleteApiKey(apiKey); } @@ -222,12 +271,19 @@ public void delete(@NonNull ApiKey apiKey) throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#deleteApiKey(String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use DELETE + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param id * The ID of the API key to delete. * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public void delete(@NonNull String id) throws MbedCloudException { ((Accounts) getModuleOrThrow()).deleteApiKey(id); } @@ -288,17 +344,23 @@ protected SdkContext instantiateModule(SdkContext context) { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#myApiKey()} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. + * * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated @SuppressWarnings("PMD.ShortMethodName") public ApiKey me() throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).myApiKey()); } /** - * Get groups of the API key. + * Get policy groups of an API key. * * *

@@ -307,24 +369,37 @@ public ApiKey me() throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#policyGroups(com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @return the list of policy groups corresponding to filter options (One page). * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse policyGroups(@Nullable PolicyGroupListOptions options) throws MbedCloudException { return policyGroups(options, getModel()); } /** - * Get groups of the API key. + * Get policy groups of an API key. * * *

* Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#policyGroups(com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param options * list options. * @param apiKey @@ -333,19 +408,26 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse policyGroups(@Nullable PolicyGroupListOptions options, @NonNull ApiKey apiKey) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).policyGroups(options, apiKey); } /** - * Get groups of the API key. + * Get policy groups of an API key. * * *

* Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#policyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups + * * @param id * The ID of the API key. * @param options @@ -354,6 +436,7 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse policyGroups(@NonNull String id, @Nullable PolicyGroupListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).policyGroups(id, options); @@ -368,11 +451,18 @@ public ListResponse policyGroups(@NonNull String id, * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#read(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public ApiKey read() throws MbedCloudException { return read(getModel()); } @@ -383,12 +473,19 @@ public ApiKey read() throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#readApiKey(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @return something * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ApiKey read(@NonNull ApiKey apiKey) throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).readApiKey(apiKey)); } @@ -399,6 +496,12 @@ public ApiKey read(@NonNull ApiKey apiKey) throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#readApiKey(String)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param id * The ID of the API key. * @return something @@ -406,6 +509,7 @@ public ApiKey read(@NonNull ApiKey apiKey) throws MbedCloudException { * if an error occurs during the process. */ @Override + @Deprecated public ApiKey read(@NonNull String id) throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).readApiKey(id)); } @@ -419,11 +523,18 @@ public ApiKey read(@NonNull String id) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#update(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override + @Deprecated public ApiKey update() throws MbedCloudException { return update(getModel()); } @@ -434,6 +545,12 @@ public ApiKey update() throws MbedCloudException { *

* Similar to {@link com.arm.mbed.cloud.sdk.Accounts#updateApiKey(com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param apiKey * an api key. * @return something @@ -441,6 +558,7 @@ public ApiKey update() throws MbedCloudException { * if an error occurs during the process. */ @Override + @Deprecated public ApiKey update(@NonNull ApiKey apiKey) throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).updateApiKey(apiKey)); } @@ -454,12 +572,19 @@ public ApiKey update(@NonNull ApiKey apiKey) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.ApiKeyDao#update(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param id * The ID of the API key. * @return an updated api key * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ApiKey update(@NonNull String id) throws MbedCloudException { return update(id, getModel()); } @@ -471,6 +596,12 @@ public ApiKey update(@NonNull String id) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#updateApiKey(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKey)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use PUT + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + * * @param id * The ID of the API key. * @param apiKey @@ -479,6 +610,7 @@ public ApiKey update(@NonNull String id) throws MbedCloudException { * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ApiKey update(@NonNull String id, @NonNull ApiKey apiKey) throws MbedCloudException { return setAndGetModel(((Accounts) getModuleOrThrow()).updateApiKey(id, apiKey)); } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyListDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyListDao.java index 161b29a30..ae813911b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyListDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/ApiKeyListDao.java @@ -170,6 +170,12 @@ protected SdkContext instantiateModule(SdkContext context) { * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#listApiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated. Use GET + * https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + * * @param options * list options. * @return one page of api keys @@ -177,6 +183,7 @@ protected SdkContext instantiateModule(SdkContext context) { * if an error occurs during the process. */ @Override + @Deprecated protected ListResponse requestOnePage(ApiKeyListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).listApiKeys(options); } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProviderDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProviderDao.java index 7306c2167..2fce6885f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProviderDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/IdentityProviderDao.java @@ -131,7 +131,7 @@ public IdentityProvider create(@NonNull IdentityProvider identityProvider) throw * Note: uses internal data model *

* Similar to - * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#create(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#create(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -140,15 +140,12 @@ public IdentityProvider create(@NonNull IdentityProvider identityProvider) throw * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @return an added identity provider * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider create(@Nullable boolean discovery, - @Nullable OidcRequest oidcAttributes) throws MbedCloudException { - return create(discovery, oidcAttributes, getModel()); + public IdentityProvider create(@Nullable boolean discovery) throws MbedCloudException { + return create(discovery, getModel()); } /** @@ -156,7 +153,7 @@ public IdentityProvider create(@Nullable boolean discovery, * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.Accounts#createIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.Accounts#createIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -165,18 +162,15 @@ public IdentityProvider create(@Nullable boolean discovery, * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param identityProvider * an identity provider. * @return an added identity provider * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider create(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + public IdentityProvider create(@Nullable boolean discovery, @NonNull IdentityProvider identityProvider) throws MbedCloudException { - return setAndGetModel(((Accounts) getModuleOrThrow()).createIdentityProvider(discovery, oidcAttributes, - identityProvider)); + return setAndGetModel(((Accounts) getModuleOrThrow()).createIdentityProvider(discovery, identityProvider)); } /** @@ -701,7 +695,7 @@ public IdentityProvider update(@NonNull String id, * Note: uses internal data model *

* Similar to - * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#update(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#update(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -710,15 +704,12 @@ public IdentityProvider update(@NonNull String id, * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @return something * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider update(@Nullable boolean discovery, - @Nullable OidcRequest oidcAttributes) throws MbedCloudException { - return update(discovery, oidcAttributes, getModel()); + public IdentityProvider update(@Nullable boolean discovery) throws MbedCloudException { + return update(discovery, getModel()); } /** @@ -726,7 +717,7 @@ public IdentityProvider update(@Nullable boolean discovery, * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.Accounts#updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.Accounts#updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -735,18 +726,15 @@ public IdentityProvider update(@Nullable boolean discovery, * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param identityProvider * an identity provider. * @return something * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, + public IdentityProvider update(@Nullable boolean discovery, @NonNull IdentityProvider identityProvider) throws MbedCloudException { - return setAndGetModel(((Accounts) getModuleOrThrow()).updateIdentityProvider(discovery, oidcAttributes, - identityProvider)); + return setAndGetModel(((Accounts) getModuleOrThrow()).updateIdentityProvider(discovery, identityProvider)); } /** @@ -756,7 +744,7 @@ public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcReques * Note: uses internal data model *

* Similar to - * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#update(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.accounts.model.IdentityProviderDao#update(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -765,17 +753,14 @@ public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcReques * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param id * Entity ID. * @return an updated identity provider * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, - @NonNull String id) throws MbedCloudException { - return update(discovery, oidcAttributes, id, getModel()); + public IdentityProvider update(@Nullable boolean discovery, @NonNull String id) throws MbedCloudException { + return update(discovery, id, getModel()); } /** @@ -783,7 +768,7 @@ public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcReques * *

* Similar to - * {@link com.arm.mbed.cloud.sdk.Accounts#updateIdentityProvider(boolean, com.arm.mbed.cloud.sdk.accounts.model.OidcRequest, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} + * {@link com.arm.mbed.cloud.sdk.Accounts#updateIdentityProvider(boolean, String, com.arm.mbed.cloud.sdk.accounts.model.IdentityProvider)} * * @param discovery * Indicates that the OpenID Connect endpoints and keys should be set using the OpenID Connect Discovery @@ -792,8 +777,6 @@ public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcReques * and keys should be set using the OpenID Connect Discovery mechanism. The following parameters are set * automatically: * authorization_endpoint * token_endpoint * userinfo_endpoint * revocation_endpoint * * jwks_uri * keys - * @param oidcAttributes - * Represents OIDC specific attributes. * @param id * Entity ID. * @param identityProvider @@ -802,10 +785,8 @@ public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcReques * @throws MbedCloudException * if an error occurs during the process. */ - public IdentityProvider update(@Nullable boolean discovery, @Nullable OidcRequest oidcAttributes, - @NonNull String id, + public IdentityProvider update(@Nullable boolean discovery, @NonNull String id, @NonNull IdentityProvider identityProvider) throws MbedCloudException { - return setAndGetModel(((Accounts) getModuleOrThrow()).updateIdentityProvider(discovery, oidcAttributes, id, - identityProvider)); + return setAndGetModel(((Accounts) getModuleOrThrow()).updateIdentityProvider(discovery, id, identityProvider)); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroupDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroupDao.java index c05dd189e..469c2bd9f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroupDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/PolicyGroupDao.java @@ -80,12 +80,19 @@ public PolicyGroupDao(SdkContext sdkContext) throws MbedCloudException { * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupDao#allApiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @return paginator over the list of api keys * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable ApiKeyListOptions options) throws MbedCloudException { return allApiKeys(options, getModel()); } @@ -97,6 +104,12 @@ public Paginator allApiKeys(@Nullable ApiKeyListOptions options) throws * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @param policyGroup @@ -105,6 +118,7 @@ public Paginator allApiKeys(@Nullable ApiKeyListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@Nullable ApiKeyListOptions options, @NonNull PolicyGroup policyGroup) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allApiKeys(options, policyGroup); @@ -117,6 +131,12 @@ public Paginator allApiKeys(@Nullable ApiKeyListOptions options, * Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#allApiKeys(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param id * The ID of the group. * @param options @@ -125,6 +145,7 @@ public Paginator allApiKeys(@Nullable ApiKeyListOptions options, * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public Paginator allApiKeys(@NonNull String id, @Nullable ApiKeyListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).allApiKeys(id, options); @@ -189,7 +210,7 @@ public Paginator allUsers(@Nullable UserListOptions options, } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * * *

@@ -198,24 +219,37 @@ public Paginator allUsers(@Nullable UserListOptions options, * Similar to * {@link com.arm.mbed.cloud.sdk.accounts.model.PolicyGroupDao#apiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @return the list of api keys corresponding to filter options (One page). * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable ApiKeyListOptions options) throws MbedCloudException { return apiKeys(options, getModel()); } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * * *

* Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions, com.arm.mbed.cloud.sdk.accounts.model.PolicyGroup)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param options * list options. * @param policyGroup @@ -224,19 +258,26 @@ public ListResponse apiKeys(@Nullable ApiKeyListOptions options) throws * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@Nullable ApiKeyListOptions options, @NonNull PolicyGroup policyGroup) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).apiKeys(options, policyGroup); } /** - * Get the API keys of a group. + * Get the API keys of a policy group. * * *

* Similar to * {@link com.arm.mbed.cloud.sdk.Accounts#apiKeys(String, com.arm.mbed.cloud.sdk.accounts.model.ApiKeyListOptions)} * + *

+ * + * @deprecated This method has been deprecated since Sat Aug 01 08:00:00 CST 2020 and will be removed by Sun Aug 01 + * 08:00:00 CST 2021. This endpoint is deprecated, GET + * https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications + * * @param id * The ID of the group. * @param options @@ -245,6 +286,7 @@ public ListResponse apiKeys(@Nullable ApiKeyListOptions options, * @throws MbedCloudException * if an error occurs during the process. */ + @Deprecated public ListResponse apiKeys(@NonNull String id, @Nullable ApiKeyListOptions options) throws MbedCloudException { return ((Accounts) getModuleOrThrow()).apiKeys(id, options); @@ -569,7 +611,7 @@ public PolicyGroup update(@NonNull String id, @NonNull PolicyGroup policyGroup) } /** - * Get users of a group. + * Get users of a policy group. * * *

@@ -589,7 +631,7 @@ public ListResponse users(@NonNull String id, @Nullable UserListOptions op } /** - * Get users of a group. + * Get users of a policy group. * * *

@@ -609,7 +651,7 @@ public ListResponse users(@Nullable UserListOptions options) throws MbedCl } /** - * Get users of a group. + * Get users of a policy group. * * *

diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantApiKeyDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantApiKeyDao.java index 69f76da16..b45c3fecd 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantApiKeyDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantApiKeyDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue May 14 13:12:52 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantApiKeyDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderDao.java index a35fdc260..6444cb7d0 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Mon Nov 25 17:57:51 GMT 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderListDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderListDao.java index 3d68f9666..f6cc04970 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderListDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantIdentityProviderListDao.java @@ -89,8 +89,6 @@ public SubtenantIdentityProviderListDao clone() { * Lists subtenant identity providers matching filter options. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.Accounts#listSubtenantIdentityProviders(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantIdentityProviderListOptions)} * * @param options * list options. diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupDao.java index a747eac06..c497a7a54 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Wed Aug 14 10:36:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantPolicyGroupDao(SdkContext sdkContext) throws MbedCloudException /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -85,11 +85,10 @@ public SubtenantPolicyGroupDao clone() { } /** - * Executes read. + * Executes delete. * * @param id * a string. - * @return something * @throws MbedCloudException * if an error occurs during the process. * @throws java.lang.UnsupportedOperationException @@ -97,26 +96,27 @@ public SubtenantPolicyGroupDao clone() { */ @Override @NotImplemented - public SubtenantPolicyGroup read(String id) throws MbedCloudException, UnsupportedOperationException, - NotImplementedException { + public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Deletes a subtenant policy group. - * + * Executes read. + * * @param id * a string. + * @return something * @throws MbedCloudException * if an error occurs during the process. * @throws java.lang.UnsupportedOperationException * if an error occurs during the process. */ @Override - public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { - // TODO Auto-generated method stub + @NotImplemented + public SubtenantPolicyGroup read(String id) throws MbedCloudException, UnsupportedOperationException, + NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } - } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupListDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupListDao.java index 705d641a9..89d42998f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupListDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantPolicyGroupListDao.java @@ -2,7 +2,6 @@ // This model class was autogenerated on Wed Aug 14 10:36:38 UTC 2019. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; -import com.arm.mbed.cloud.sdk.Accounts; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; @@ -90,8 +89,6 @@ public SubtenantPolicyGroupListDao clone() { * Lists subtenant policy groups matching filter options. * *

- * Similar to - * {@link com.arm.mbed.cloud.sdk.Accounts#listSubtenantPolicyGroups(String, com.arm.mbed.cloud.sdk.accounts.model.SubtenantPolicyGroupListOptions)} * * @param options * list options. @@ -110,7 +107,8 @@ public SubtenantPolicyGroupListDao clone() { // meant // // to do. - return ((Accounts) getModuleOrThrow()).listSubtenantPolicyGroups((String) null, options); + // return ((Accounts) getModuleOrThrow()).listSubtenantPolicyGroups((String) null, options); + return null; } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserDao.java index 63fd6045d..988d976cf 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Apr 05 10:55:58 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserInvitationDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserInvitationDao.java index 6d5609c32..cc80bf9ea 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserInvitationDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/SubtenantUserInvitationDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Apr 05 10:55:58 BST 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.accounts.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/UserDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/UserDao.java index c3bc2e27c..8f36ce196 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/UserDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/accounts/model/UserDao.java @@ -321,7 +321,7 @@ protected SdkContext instantiateModule(SdkContext context) { } /** - * Get groups of the user. + * Get policy groups for a user. * * *

@@ -341,7 +341,7 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o } /** - * Get groups of the user. + * Get policy groups for a user. * * *

@@ -362,7 +362,7 @@ public ListResponse policyGroups(@Nullable PolicyGroupListOptions o } /** - * Get groups of the user. + * Get policy groups for a user. * * *

diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeColorAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeColorAdapter.java index 02891c493..fc3971757 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeColorAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeColorAdapter.java @@ -239,6 +239,22 @@ public static BrandingColor reverseMapUpdateRequest(DarkThemeColor toBeMapped) { return DarkThemeColorReference.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return DarkThemeColorReference.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return DarkThemeColorReference.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return DarkThemeColorReference.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return DarkThemeColorReference.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return DarkThemeColorReference.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return DarkThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return DarkThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return DarkThemeColorReference.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return DarkThemeColorReference.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return DarkThemeColorReference.getUnknownEnum(); } @@ -291,6 +307,22 @@ public static BrandingColor reverseMapUpdateRequest(DarkThemeColor toBeMapped) { return BrandingColor.ReferenceEnum.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return BrandingColor.ReferenceEnum.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return BrandingColor.ReferenceEnum.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return BrandingColor.ReferenceEnum.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return null; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeImageAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeImageAdapter.java index f4d286ff9..11c9671d5 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeImageAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/DarkThemeImageAdapter.java @@ -197,6 +197,12 @@ public DarkThemeImage map(BrandingImage toBeMapped) { return DarkThemeImageReference.BRAND_LOGO_LANDSCAPE; case BRAND_LOGO_EMAIL: return DarkThemeImageReference.BRAND_LOGO_EMAIL; + case APP_LOGO_LANDSCAPE: + return DarkThemeImageReference.APP_LOGO_LANDSCAPE; + case APP_LOGO_PORTRAIT: + return DarkThemeImageReference.APP_LOGO_PORTRAIT; + case APP_LOGO_SQUARE: + return DarkThemeImageReference.APP_LOGO_SQUARE; case DESKTOP_BACKGROUND_LANDSCAPE: return DarkThemeImageReference.DESKTOP_BACKGROUND_LANDSCAPE; case DESKTOP_BACKGROUND_SQUARE: diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeColorAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeColorAdapter.java index 246e371ba..7a0662fa2 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeColorAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeColorAdapter.java @@ -239,6 +239,22 @@ public static BrandingColor reverseMapUpdateRequest(LightThemeColor toBeMapped) return LightThemeColorReference.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return LightThemeColorReference.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return LightThemeColorReference.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return LightThemeColorReference.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return LightThemeColorReference.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return LightThemeColorReference.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return LightThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return LightThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return LightThemeColorReference.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return LightThemeColorReference.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return LightThemeColorReference.getUnknownEnum(); } @@ -291,6 +307,22 @@ public static BrandingColor reverseMapUpdateRequest(LightThemeColor toBeMapped) return BrandingColor.ReferenceEnum.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return BrandingColor.ReferenceEnum.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return BrandingColor.ReferenceEnum.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return BrandingColor.ReferenceEnum.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return null; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeImageAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeImageAdapter.java index a298d157a..8e305c553 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeImageAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/LightThemeImageAdapter.java @@ -197,6 +197,12 @@ public LightThemeImage map(BrandingImage toBeMapped) { return LightThemeImageReference.BRAND_LOGO_LANDSCAPE; case BRAND_LOGO_EMAIL: return LightThemeImageReference.BRAND_LOGO_EMAIL; + case APP_LOGO_LANDSCAPE: + return LightThemeImageReference.APP_LOGO_LANDSCAPE; + case APP_LOGO_PORTRAIT: + return LightThemeImageReference.APP_LOGO_PORTRAIT; + case APP_LOGO_SQUARE: + return LightThemeImageReference.APP_LOGO_SQUARE; case DESKTOP_BACKGROUND_LANDSCAPE: return LightThemeImageReference.DESKTOP_BACKGROUND_LANDSCAPE; case DESKTOP_BACKGROUND_SQUARE: diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeColorAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeColorAdapter.java index 1b8bdcdc0..1fec3292e 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeColorAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeColorAdapter.java @@ -133,6 +133,22 @@ public static BrandingColor reverseMapUpdateRequest(SubtenantDarkThemeColor toBe return SubtenantDarkThemeColorReference.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return SubtenantDarkThemeColorReference.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return SubtenantDarkThemeColorReference.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return SubtenantDarkThemeColorReference.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return SubtenantDarkThemeColorReference.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return SubtenantDarkThemeColorReference.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return SubtenantDarkThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return SubtenantDarkThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return SubtenantDarkThemeColorReference.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return SubtenantDarkThemeColorReference.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return SubtenantDarkThemeColorReference.getUnknownEnum(); } @@ -291,6 +307,22 @@ public ListResponse map(BrandingColorList toBeMapped) { return BrandingColor.ReferenceEnum.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return BrandingColor.ReferenceEnum.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return BrandingColor.ReferenceEnum.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return BrandingColor.ReferenceEnum.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return null; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeImageAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeImageAdapter.java index 4cb23b06a..f6c1d889d 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeImageAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantDarkThemeImageAdapter.java @@ -91,6 +91,12 @@ public SubtenantDarkThemeImage map(BrandingImage toBeMapped) { return SubtenantDarkThemeImageReference.BRAND_LOGO_LANDSCAPE; case BRAND_LOGO_EMAIL: return SubtenantDarkThemeImageReference.BRAND_LOGO_EMAIL; + case APP_LOGO_LANDSCAPE: + return SubtenantDarkThemeImageReference.APP_LOGO_LANDSCAPE; + case APP_LOGO_PORTRAIT: + return SubtenantDarkThemeImageReference.APP_LOGO_PORTRAIT; + case APP_LOGO_SQUARE: + return SubtenantDarkThemeImageReference.APP_LOGO_SQUARE; case DESKTOP_BACKGROUND_LANDSCAPE: return SubtenantDarkThemeImageReference.DESKTOP_BACKGROUND_LANDSCAPE; case DESKTOP_BACKGROUND_SQUARE: diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeColorAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeColorAdapter.java index ecba59379..6be8ce47b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeColorAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeColorAdapter.java @@ -133,6 +133,22 @@ public static BrandingColor reverseMapUpdateRequest(SubtenantLightThemeColor toB return SubtenantLightThemeColorReference.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return SubtenantLightThemeColorReference.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return SubtenantLightThemeColorReference.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return SubtenantLightThemeColorReference.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return SubtenantLightThemeColorReference.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return SubtenantLightThemeColorReference.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return SubtenantLightThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return SubtenantLightThemeColorReference.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return SubtenantLightThemeColorReference.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return SubtenantLightThemeColorReference.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return SubtenantLightThemeColorReference.getUnknownEnum(); } @@ -291,6 +307,22 @@ public ListResponse map(BrandingColorList toBeMapped) return BrandingColor.ReferenceEnum.SUCCESS_FONT_COLOR; case WARNING_FONT_COLOR: return BrandingColor.ReferenceEnum.WARNING_FONT_COLOR; + case MENU_BACKGROUND_COLOR: + return BrandingColor.ReferenceEnum.MENU_BACKGROUND_COLOR; + case MENU_TEXT_COLOR: + return BrandingColor.ReferenceEnum.MENU_TEXT_COLOR; + case NAV_MENU_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND; + case NAV_MENU_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_BACKGROUND_FONT_COLOR; + case NAV_MENU_ACTIVE_BACKGROUND: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND; + case NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_ACTIVE_BACKGROUND_FONT_COLOR; + case NAV_MENU_HIGHLIGHT: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT; + case NAV_MENU_HIGHLIGHT_FONT_COLOR: + return BrandingColor.ReferenceEnum.NAV_MENU_HIGHLIGHT_FONT_COLOR; default: return null; } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeImageAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeImageAdapter.java index 1fc35f1f4..6701a652f 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeImageAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/adapters/SubtenantLightThemeImageAdapter.java @@ -91,6 +91,12 @@ public SubtenantLightThemeImage map(BrandingImage toBeMapped) { return SubtenantLightThemeImageReference.BRAND_LOGO_LANDSCAPE; case BRAND_LOGO_EMAIL: return SubtenantLightThemeImageReference.BRAND_LOGO_EMAIL; + case APP_LOGO_LANDSCAPE: + return SubtenantLightThemeImageReference.APP_LOGO_LANDSCAPE; + case APP_LOGO_PORTRAIT: + return SubtenantLightThemeImageReference.APP_LOGO_PORTRAIT; + case APP_LOGO_SQUARE: + return SubtenantLightThemeImageReference.APP_LOGO_SQUARE; case DESKTOP_BACKGROUND_LANDSCAPE: return SubtenantLightThemeImageReference.DESKTOP_BACKGROUND_LANDSCAPE; case DESKTOP_BACKGROUND_SQUARE: diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorDao.java index 58dc8f478..78287e16e 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeColorDao.java @@ -1,11 +1,13 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Mon Jun 03 11:17:45 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.MbedCloudException; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; import com.arm.mbed.cloud.sdk.common.SdkContext; /** @@ -65,7 +67,7 @@ public DarkThemeColorDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -86,26 +88,35 @@ public DarkThemeColorDao clone() { * Executes delete. * * @param id - * the color Id. + * a string. * @throws MbedCloudException * if an error occurs during the process. + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override - public void delete(String id) throws MbedCloudException { - delete(DarkThemeColorReference.getValue(id)); + @NotImplemented + public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes read. * * @param id - * the color Id. - * @return the corresponding colour. + * a string. + * @return something * @throws MbedCloudException * if an error occurs during the process. + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override - public DarkThemeColor read(String id) throws MbedCloudException { - return read(DarkThemeColorReference.getValue(id)); + @NotImplemented + public DarkThemeColor read(String id) throws MbedCloudException, UnsupportedOperationException, + NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageDao.java index 9719b2a48..45830bb4e 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/DarkThemeImageDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public DarkThemeImageDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -85,65 +85,68 @@ public DarkThemeImageDao clone() { } /** - * Executes update. - *

- * UNSUPPORTED - * - * @return something + * Executes delete. + * + * @param id + * a string. * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override @NotImplemented - public DarkThemeImage update() throws MbedCloudException, NotImplementedException { + public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes update. - *

- * UNSUPPORTED - * - * @param modelToUpdate - * an sdk model. + * Executes read. + * + * @param id + * a string. * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override @NotImplemented - public DarkThemeImage update(DarkThemeImage modelToUpdate) throws MbedCloudException, NotImplementedException { + public DarkThemeImage read(String id) throws MbedCloudException, UnsupportedOperationException, + NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - * - * @param id - * the image Id. + * Executes update. + * + * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override - public void delete(String id) throws MbedCloudException { - delete(DarkThemeImageReference.getValue(id)); + @NotImplemented + public DarkThemeImage update() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** - * Executes read. - * - * @param id - * the image Id. - * @return the corresponding image. + * Executes update. + * + * @param modelToUpdate + * an sdk model. + * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override - public DarkThemeImage read(String id) throws MbedCloudException { - return read(DarkThemeImageReference.getValue(id)); + @NotImplemented + public DarkThemeImage update(DarkThemeImage modelToUpdate) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorDao.java index 134b77534..56d525afc 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeColorDao.java @@ -1,11 +1,13 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Mon Jun 03 11:17:45 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.MbedCloudException; +import com.arm.mbed.cloud.sdk.common.NotImplementedException; import com.arm.mbed.cloud.sdk.common.SdkContext; /** @@ -65,7 +67,7 @@ public LightThemeColorDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -86,26 +88,35 @@ public LightThemeColorDao clone() { * Executes delete. * * @param id - * the colour Id. + * a string. * @throws MbedCloudException * if an error occurs during the process. + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override - public void delete(String id) throws MbedCloudException { - delete(LightThemeColorReference.getValue(id)); + @NotImplemented + public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes read. * * @param id - * the colour Id. - * @return the corresponding colour. + * a string. + * @return something * @throws MbedCloudException * if an error occurs during the process. + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override - public LightThemeColor read(String id) throws MbedCloudException { - return read(LightThemeColorReference.getValue(id)); + @NotImplemented + public LightThemeColor read(String id) throws MbedCloudException, UnsupportedOperationException, + NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageDao.java index e7772c4b7..d43df3d3b 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/LightThemeImageDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public LightThemeImageDao(SdkContext sdkContext) throws MbedCloudException { /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -85,68 +85,68 @@ public LightThemeImageDao clone() { } /** - * Executes update. - *

- * UNSUPPORTED - * - * @return something + * Executes delete. + * + * @param id + * a string. * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override @NotImplemented - public LightThemeImage update() throws MbedCloudException, NotImplementedException { + public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes update. - *

- * UNSUPPORTED - * - * @param modelToUpdate - * an sdk model. - * + * Executes read. + * + * @param id + * a string. * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ @Override @NotImplemented - public LightThemeImage update(LightThemeImage modelToUpdate) throws MbedCloudException, NotImplementedException { + public LightThemeImage read(String id) throws MbedCloudException, UnsupportedOperationException, + NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - * - * @param id - * the image Id. + * Executes update. + * + * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override - public void delete(String id) throws MbedCloudException { - delete(LightThemeImageReference.getValue(id)); + @NotImplemented + public LightThemeImage update() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** - * Executes read. - * - * @param id - * the image Id. - * @return the corresponding image. + * Executes update. + * + * @param modelToUpdate + * an sdk model. + * @return something * @throws MbedCloudException * if an error occurs during the process. */ @Override - public LightThemeImage read(String id) throws MbedCloudException { - return read(LightThemeImageReference.getValue(id)); + @NotImplemented + public LightThemeImage update(LightThemeImage modelToUpdate) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorDao.java index 4c32f9ad9..7cbe7cf4e 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeColorDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantDarkThemeColorDao(SdkContext sdkContext) throws MbedCloudExcepti /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageDao.java index 684edceeb..41d851c66 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantDarkThemeImageDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantDarkThemeImageDao(SdkContext sdkContext) throws MbedCloudExcepti /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -85,90 +85,75 @@ public SubtenantDarkThemeImageDao clone() { } /** - * Executes update. - *

- * UNSUPPORTED + * Executes delete. * - * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantDarkThemeImage update() throws MbedCloudException, NotImplementedException { + public void delete() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes update. - *

- * UNSUPPORTED + * Executes delete. * - * @param modelToUpdate + * @param modelToDelete * an sdk model. - * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantDarkThemeImage update(SubtenantDarkThemeImage modelToUpdate) throws MbedCloudException, - NotImplementedException { + public void delete(SubtenantDarkThemeImage modelToDelete) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - *

- * UNSUPPORTED + * Executes read. * + * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public void delete() throws MbedCloudException, NotImplementedException { + public SubtenantDarkThemeImage read() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - *

- * UNSUPPORTED + * Executes update. * - * @param modelToDelete - * an sdk model. + * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public void delete(SubtenantDarkThemeImage modelToDelete) throws MbedCloudException, NotImplementedException { + public SubtenantDarkThemeImage update() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes read. - *

- * UNSUPPORTED + * Executes update. * + * @param modelToUpdate + * an sdk model. * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantDarkThemeImage read() throws MbedCloudException, NotImplementedException { + public SubtenantDarkThemeImage update(SubtenantDarkThemeImage modelToUpdate) throws MbedCloudException, + NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorDao.java index d1ee7ef8c..cd5c3e108 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeColorDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantLightThemeColorDao(SdkContext sdkContext) throws MbedCloudExcept /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageDao.java index 8e0ff67c6..acd11a638 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/branding/model/SubtenantLightThemeImageDao.java @@ -1,5 +1,5 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Tue Jun 04 15:39:38 UTC 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:39 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.branding.model; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; @@ -67,7 +67,7 @@ public SubtenantLightThemeImageDao(SdkContext sdkContext) throws MbedCloudExcept /** * Clones this instance. - * + * *

* * @see java.lang.Object#clone() @@ -85,90 +85,75 @@ public SubtenantLightThemeImageDao clone() { } /** - * Executes update. - *

- * UNSUPPORTED + * Executes delete. * - * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantLightThemeImage update() throws MbedCloudException, NotImplementedException { + public void delete() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes update. - *

- * UNSUPPORTED + * Executes delete. * - * @param modelToUpdate + * @param modelToDelete * an sdk model. - * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantLightThemeImage update(SubtenantLightThemeImage modelToUpdate) throws MbedCloudException, - NotImplementedException { + public void delete(SubtenantLightThemeImage modelToDelete) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - *

- * UNSUPPORTED + * Executes read. * + * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public void delete() throws MbedCloudException, NotImplementedException { + public SubtenantLightThemeImage read() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. - *

- * UNSUPPORTED + * Executes update. * - * @param modelToDelete - * an sdk model. + * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public void delete(SubtenantLightThemeImage modelToDelete) throws MbedCloudException, NotImplementedException { + public SubtenantLightThemeImage update() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes read. - *

- * UNSUPPORTED + * Executes update. * + * @param modelToUpdate + * an sdk model. * @return something * @throws MbedCloudException * if an error occurs during the process. - * @throws NotImplementedException - * unsupported method */ @Override @NotImplemented - public SubtenantLightThemeImage read() throws MbedCloudException, NotImplementedException { + public SubtenantLightThemeImage update(SubtenantLightThemeImage modelToUpdate) throws MbedCloudException, + NotImplementedException { + // TODO Auto-generated method stub.; throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/adapters/DeviceAdapter.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/adapters/DeviceAdapter.java index 3a3b208d0..0067a7d2e 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/adapters/DeviceAdapter.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/adapters/DeviceAdapter.java @@ -103,6 +103,7 @@ public static Device map(DeviceData toBeMapped) { } final Device device = new Device(toBeMapped.getAccountId(), TranslationUtils.toDate(toBeMapped.getBootstrappedTimestamp()), + toBeMapped.getComponentAttributes(), TranslationUtils.toDate(toBeMapped.getCreatedAt()), translateToDeviceDeployedState(toBeMapped.getDeployedState()), toBeMapped.getEndpointName(), @@ -116,6 +117,7 @@ public static Device map(DeviceData toBeMapped) { TranslationUtils.toDate(toBeMapped.getLastSystemSuspendedUpdatedAt()), translateToDeviceLifecycleStatus(toBeMapped.getLifecycleStatus()), TranslationUtils.toDate(toBeMapped.getManifestTimestamp()), + toBeMapped.getNetId(), TranslationUtils.toBool(toBeMapped.isOperatorSuspended()), TranslationUtils.toBool(toBeMapped.isSystemSuspended()), TranslationUtils.toDate(toBeMapped.getUpdatedAt())); diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceDao.java index 41f0e97e5..d637d7808 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceDao.java @@ -199,7 +199,9 @@ public void delete(@NonNull Device device) throws MbedCloudException { * Similar to {@link com.arm.mbed.cloud.sdk.Devices#deleteDevice(String)} * * @param id - * The ID of the device. + * The [Device + * ID](https://developer.pelion.com/docs/device-management/current/connecting/device-identity.html) + * created by Device Management. * @throws MbedCloudException * if an error occurs during the process. */ diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkCreateDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkCreateDao.java index 179928150..e6f569d99 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkCreateDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkCreateDao.java @@ -1,19 +1,14 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Jan 11 01:52:39 GMT 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.devices.model; -import java.io.File; -import java.net.URL; - -import com.arm.mbed.cloud.sdk.annotations.NonNull; -import com.arm.mbed.cloud.sdk.annotations.Nullable; +import com.arm.mbed.cloud.sdk.annotations.NotImplemented; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.ApiUtils; -import com.arm.mbed.cloud.sdk.common.FileDownload; +import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; +import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.MbedCloudException; import com.arm.mbed.cloud.sdk.common.NotImplementedException; -import com.arm.mbed.cloud.sdk.common.SdkLogger; -import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import com.arm.mbed.cloud.sdk.common.SdkContext; /** * Data Access Object (DAO) for device enrollment bulk creates. @@ -24,208 +19,83 @@ */ @Preamble(description = "Data Access Object (DAO) for device enrollment bulk creates.") public class DeviceEnrollmentBulkCreateDao extends AbstractDeviceEnrollmentBulkCreateDao { - private static final String TAG_MODEL = "model"; - private static final String TAG_REPORT_URL = "report URL"; - /** * Constructor. * * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ public DeviceEnrollmentBulkCreateDao() throws MbedCloudException { super(); } - private void checkModelCorrectness(DeviceEnrollmentBulkCreate model, - boolean errorReport) throws MbedCloudException { - ApiUtils.checkNotNull(SdkLogger.getLogger(), model, TAG_MODEL); - ApiUtils.checkModelValidity(SdkLogger.getLogger(), model, TAG_MODEL); - ApiUtils.checkNotNull(SdkLogger.getLogger(), - errorReport ? model.getErrorsReportFile() : model.getFullReportFile(), TAG_REPORT_URL); - } - - /** - * Download the error report file for the created the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - * - * @param model - * model to consider - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkCreate model, - @Nullable File destination) throws MbedCloudException { - checkModelCorrectness(model, true); - final URL source = TranslationUtils.toUrl(model.getErrorsReportFile()); - return Utils.downloadFile(destination, source, getModuleOrThrow().getClient()); - } - /** - * Download the error report file for the created the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - * - * @param model - * model to consider - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkCreate model, - @Nullable String filePath) throws MbedCloudException { - checkModelCorrectness(model, true); - final URL source = TranslationUtils.toUrl(model.getErrorsReportFile()); - return Utils.downloadFile(filePath == null ? null : new File(filePath), source, getModuleOrThrow().getClient()); - } - - /** - * Downloads the error report file for the created the bulk enrollment. - *

- * a temporary file containing the report will be created. - * - * @param model - * model to consider - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkCreate model) throws MbedCloudException { - return downloadErrorsReportFile(model, (String) null); - } - - /** - * Download the error report file for the created the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. - * - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@Nullable File destination) throws MbedCloudException { - return downloadErrorsReportFile(getModel(), destination); - } - - /** - * Download the error report file for the created the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Constructor. * - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report + * @param client + * an api client wrapper. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - @NonNull - public FileDownload downloadErrorsReportFile(@Nullable String filePath) throws MbedCloudException { - return downloadErrorsReportFile(getModel(), filePath); + public DeviceEnrollmentBulkCreateDao(ApiClientWrapper client) throws MbedCloudException { + super(client); } /** - * Downloads the full report file for the created of the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. + * Constructor. * - * @param model - * model to consider - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report + * @param options + * a connection options. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkCreate model, - File destination) throws MbedCloudException { - checkModelCorrectness(model, false); - final URL source = TranslationUtils.toUrl(model.getFullReportFile()); - return Utils.downloadFile(destination, source, getModuleOrThrow().getClient()); + public DeviceEnrollmentBulkCreateDao(ConnectionOptions options) throws MbedCloudException { + super(options); } /** - * Download the full report file for the created of the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. + * Constructor. * - * @param model - * model to consider - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report + * @param sdkContext + * an sdk context. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkCreate model, - String filePath) throws MbedCloudException { - checkModelCorrectness(model, false); - final URL source = TranslationUtils.toUrl(model.getFullReportFile()); - return Utils.downloadFile(filePath == null ? null : new File(filePath), source, getModuleOrThrow().getClient()); + public DeviceEnrollmentBulkCreateDao(SdkContext sdkContext) throws MbedCloudException { + super(sdkContext); } /** - * Download the full report file for the created of the bulk enrollment. - *

- * a temporary file containing the report will be created. + * Clones this instance. * - * @param model - * model to consider - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkCreate model) throws MbedCloudException { - return downloadFullReportFile(model, (String) null); - } - - /** - * Download the full report file for the created of the bulk enrollment. *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. * - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process + * @see java.lang.Object#clone() + * @return a cloned instance */ - public FileDownload downloadFullReportFile(File destination) throws MbedCloudException { - return downloadFullReportFile(getModel(), destination); + @Override + @SuppressWarnings({ "resource", "unused" }) + public DeviceEnrollmentBulkCreateDao clone() { + try { + return new DeviceEnrollmentBulkCreateDao().configureAndGet(getModuleOrThrow() == null ? null + : getModuleOrThrow().clone()); + } catch (MbedCloudException exception) { + return null; + } } /** - * Download the full report file for the created of the bulk enrollment. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Executes create. * - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report + * @return something * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(String filePath) throws MbedCloudException { - return downloadFullReportFile(getModel(), filePath); + @Override + @NotImplemented + public DeviceEnrollmentBulkCreate create() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** @@ -233,8 +103,12 @@ public FileDownload downloadFullReportFile(String filePath) throws MbedCloudExce * * @param modelToCreate * an sdk model. + * @return something + * @throws MbedCloudException + * if an error occurs during the process. */ @Override + @NotImplemented public DeviceEnrollmentBulkCreate create(DeviceEnrollmentBulkCreate modelToCreate) throws MbedCloudException, NotImplementedException { // TODO Auto-generated method stub.; @@ -242,29 +116,26 @@ public DeviceEnrollmentBulkCreate create(DeviceEnrollmentBulkCreate modelToCreat } /** - * Executes create. + * Download the error report file for the created the bulk enrollment. + * + *

+ * This method will download the CSV file containing detailed information on status of the bulk enrollment. */ - @Override - public DeviceEnrollmentBulkCreate create() throws MbedCloudException, NotImplementedException { + @NotImplemented + public void downloadErrorsReportFile() throws NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Clones this instance. - *

+ * Download the full report file for the created of the bulk enrollment. * - * @see java.lang.Object#clone() - * @return a cloned instance + *

+ * This method will download the CSV file containing detailed information on status of the bulk enrollment. */ - @SuppressWarnings("resource") - @Override - public DeviceEnrollmentBulkCreateDao clone() { - try { - return new DeviceEnrollmentBulkCreateDao().configureAndGet(getModuleOrThrow() == null ? null - : getModuleOrThrow().clone()); - } catch (@SuppressWarnings("unused") MbedCloudException exception) { - return null; - } + @NotImplemented + public void downloadFullReportFile() throws NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkDeleteDao.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkDeleteDao.java index 6884bbae9..d47c29d5a 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkDeleteDao.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceEnrollmentBulkDeleteDao.java @@ -1,20 +1,14 @@ // This file was generated by the Pelion SDK foundation code generator. -// This model class was autogenerated on Fri Jan 11 01:52:39 GMT 2019. Feel free to change its contents as you wish. +// This model class was autogenerated on Wed Jan 06 17:07:38 CST 2021. Feel free to change its contents as you wish. package com.arm.mbed.cloud.sdk.devices.model; -import java.io.File; -import java.net.URL; - -import com.arm.mbed.cloud.sdk.annotations.NonNull; import com.arm.mbed.cloud.sdk.annotations.NotImplemented; -import com.arm.mbed.cloud.sdk.annotations.Nullable; import com.arm.mbed.cloud.sdk.annotations.Preamble; -import com.arm.mbed.cloud.sdk.common.ApiUtils; -import com.arm.mbed.cloud.sdk.common.FileDownload; +import com.arm.mbed.cloud.sdk.common.ApiClientWrapper; +import com.arm.mbed.cloud.sdk.common.ConnectionOptions; import com.arm.mbed.cloud.sdk.common.MbedCloudException; import com.arm.mbed.cloud.sdk.common.NotImplementedException; -import com.arm.mbed.cloud.sdk.common.SdkLogger; -import com.arm.mbed.cloud.sdk.common.TranslationUtils; +import com.arm.mbed.cloud.sdk.common.SdkContext; /** * Data Access Object (DAO) for device enrollment bulk deletes. @@ -25,262 +19,137 @@ */ @Preamble(description = "Data Access Object (DAO) for device enrollment bulk deletes.") public class DeviceEnrollmentBulkDeleteDao extends AbstractDeviceEnrollmentBulkDeleteDao { - private static final String TAG_REPORT_URL = "report URL"; - private static final String TAG_MODEL = "model"; - /** * Constructor. * * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ public DeviceEnrollmentBulkDeleteDao() throws MbedCloudException { super(); } - private void checkModelCorrectness(DeviceEnrollmentBulkDelete model, - boolean errorReport) throws MbedCloudException { - ApiUtils.checkNotNull(SdkLogger.getLogger(), model, TAG_MODEL); - ApiUtils.checkModelValidity(SdkLogger.getLogger(), model, TAG_MODEL); - ApiUtils.checkNotNull(SdkLogger.getLogger(), - errorReport ? model.getErrorsReportFile() : model.getFullReportFile(), TAG_REPORT_URL); - } - - /** - * Download the error report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - * - * @param model - * model to consider - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkDelete model, - @Nullable File destination) throws MbedCloudException { - checkModelCorrectness(model, true); - final URL source = TranslationUtils.toUrl(model.getErrorsReportFile()); - return Utils.downloadFile(destination, source, getModuleOrThrow().getClient()); - } - - /** - * Download the error report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - * - * @param model - * model to consider - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkDelete model, - @Nullable String filePath) throws MbedCloudException { - checkModelCorrectness(model, true); - final URL source = TranslationUtils.toUrl(model.getErrorsReportFile()); - return Utils.downloadFile(filePath == null ? null : new File(filePath), source, getModuleOrThrow().getClient()); - } - - /** - * Downloads the error report file for the bulk enrollment deletion. - *

- * a temporary file containing the report will be created. - * - * - * @param model - * model to consider - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - @NonNull - public FileDownload downloadErrorsReportFile(@NonNull DeviceEnrollmentBulkDelete model) throws MbedCloudException { - return downloadErrorsReportFile(model, (String) null); - } - /** - * Download the error report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Constructor. * - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report + * @param client + * an api client wrapper. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - @NonNull - public FileDownload downloadErrorsReportFile(@Nullable File destination) throws MbedCloudException { - return downloadErrorsReportFile(getModel(), destination); + public DeviceEnrollmentBulkDeleteDao(ApiClientWrapper client) throws MbedCloudException { + super(client); } /** - * Download the error report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Constructor. * - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report + * @param options + * a connection options. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - @NonNull - public FileDownload downloadErrorsReportFile(@Nullable String filePath) throws MbedCloudException { - return downloadErrorsReportFile(getModel(), filePath); + public DeviceEnrollmentBulkDeleteDao(ConnectionOptions options) throws MbedCloudException { + super(options); } /** - * Download the full report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. + * Constructor. * - * @param model - * model to consider - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report + * @param sdkContext + * an sdk context. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkDelete model, - File destination) throws MbedCloudException { - checkModelCorrectness(model, false); - final URL source = TranslationUtils.toUrl(model.getFullReportFile()); - return Utils.downloadFile(destination, source, getModuleOrThrow().getClient()); + public DeviceEnrollmentBulkDeleteDao(SdkContext sdkContext) throws MbedCloudException { + super(sdkContext); } /** - * Download the full report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. + * Clones this instance. * - * @param model - * model to consider - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process - */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkDelete model, - String filePath) throws MbedCloudException { - checkModelCorrectness(model, false); - final URL source = TranslationUtils.toUrl(model.getFullReportFile()); - return Utils.downloadFile(filePath == null ? null : new File(filePath), source, getModuleOrThrow().getClient()); - } - - /** - * Download the full report file for the bulk enrollment deletion. *

- * a temporary file containing the report will be created. * - * @param model - * model to consider - * @return downloaded report - * @throws MbedCloudException - * if an error happens during the process + * @see java.lang.Object#clone() + * @return a cloned instance */ - public FileDownload downloadFullReportFile(@NonNull DeviceEnrollmentBulkDelete model) throws MbedCloudException { - return downloadFullReportFile(model, (String) null); + @Override + @SuppressWarnings({ "resource", "unused" }) + public DeviceEnrollmentBulkDeleteDao clone() { + try { + return new DeviceEnrollmentBulkDeleteDao().configureAndGet(getModuleOrThrow() == null ? null + : getModuleOrThrow().clone()); + } catch (MbedCloudException exception) { + return null; + } } /** - * Download the full report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Executes delete. * - * @param destination - * Destination file. If null, a temporary file will be created. - * @return downloaded report * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(File destination) throws MbedCloudException { - return downloadFullReportFile(getModel(), destination); + @Override + @NotImplemented + public void delete() throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** - * Download the full report file for the bulk enrollment deletion. - *

- * This method will download the CSV file containing detailed information on status of the bulk enrollment. - *

- * Note: uses internal data model. + * Executes delete. * - * @param filePath - * path of the destination directory or full path to the file. If null, a temporary file will be created. - * @return downloaded report + * @param modelToDelete + * an sdk model. * @throws MbedCloudException - * if an error happens during the process + * if an error occurs during the process. */ - public FileDownload downloadFullReportFile(String filePath) throws MbedCloudException { - return downloadFullReportFile(getModel(), filePath); + @Override + @NotImplemented + public void delete(DeviceEnrollmentBulkDelete modelToDelete) throws MbedCloudException, NotImplementedException { + // TODO Auto-generated method stub.; + throw new NotImplementedException(); } /** * Executes delete. - * + * * @param id * a string. + * @throws MbedCloudException + * if an error occurs during the process. + * @throws java.lang.UnsupportedOperationException + * if an error occurs during the process. */ - @NotImplemented @Override + @NotImplemented public void delete(String id) throws MbedCloudException, UnsupportedOperationException, NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. + * Download the error report file for the bulk enrollment deletion. * - * @param modelToDelete - * an SDK model. + *

+ * This method will download the CSV file containing detailed information on status of the bulk enrollment. */ @NotImplemented - @Override - public void delete(DeviceEnrollmentBulkDelete modelToDelete) throws MbedCloudException, NotImplementedException { + public void downloadErrorsReportFile() throws NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } /** - * Executes delete. + * Download the full report file for the bulk enrollment deletion. + * + *

+ * This method will download the CSV file containing detailed information on status of the bulk enrollment. */ @NotImplemented - @Override - public void delete() throws MbedCloudException, NotImplementedException { + public void downloadFullReportFile() throws NotImplementedException { // TODO Auto-generated method stub.; throw new NotImplementedException(); } - - /** - * Clones this instance. - *

- * - * @see java.lang.Object#clone() - * @return a cloned instance - */ - @SuppressWarnings("resource") - @Override - public DeviceEnrollmentBulkDeleteDao clone() { - try { - return new DeviceEnrollmentBulkDeleteDao().configureAndGet(getModuleOrThrow() == null ? null - : getModuleOrThrow().clone()); - } catch (@SuppressWarnings("unused") MbedCloudException exception) { - return null; - } - } } diff --git a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceListOptions.java b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceListOptions.java index 56e1c0451..637fb4146 100644 --- a/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceListOptions.java +++ b/foundation-access/src/main/java/com/arm/mbed/cloud/sdk/devices/model/DeviceListOptions.java @@ -40,9 +40,9 @@ *

not in
deviceClassmechanismTAG_FILTER_BY_DEVICE_CLASS
mechanismUrlnetIdTAG_FILTER_BY_MECHANISM_URL
bootstrappedTimestampendpointNameTAG_FILTER_BY_BOOTSTRAPPED_TIMESTAMP
bootstrapExpirationDatecreatedAtTAG_FILTER_BY_BOOTSTRAP_EXPIRATION_DATE
deviceExecutionModelastOperatorSuspendedCategoryTAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY
caIdoperatorSuspendedTAG_FILTER_BY_CA_ID
deviceKeydeployedStateTAG_FILTER_BY_DEVICE_KEY
manifestTimestampnameTAG_FILTER_BY_MANIFEST_TIMESTAMP
endpointNamedescriptionTAG_FILTER_BY_ENDPOINT_NAME
enrolmentListTimestampbootstrappedTimestampTAG_FILTER_BY_ENROLMENT_LIST_TIMESTAMP
systemSuspendedenrolmentListTimestampTAG_FILTER_BY_SYSTEM_SUSPENDED
statevendorIdTAG_FILTER_BY_STATE
serialNumberaccountIdTAG_FILTER_BY_SERIAL_NUMBER
deviceExecutionModeautoUpdateTAG_FILTER_BY_DEVICE_EXECUTION_MODE
firmwareChecksumdeviceKeyTAG_FILTER_BY_FIRMWARE_CHECKSUM
endpointTypeTAG_FILTER_BY_ENDPOINT_TYPETAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_CATEGORY
caIdlastOperatorSuspendedUpdatedAtTAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT
createdAtdeviceClassTAG_FILTER_BY_CREATED_AT
autoUpdateupdatedAtTAG_FILTER_BY_AUTO_UPDATE
connectorExpirationDatelastSystemSuspendedUpdatedAtTAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_UPDATED_AT
updatedAtendpointTypeTAG_FILTER_BY_UPDATED_AT
descriptionhostGatewayTAG_FILTER_BY_DESCRIPTION
lifecycleStatusTAG_FILTER_BY_LIFECYCLE_STATUSTAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY
accountIdfirmwareChecksumTAG_FILTER_BY_ACCOUNT_ID
deployedStatemanifestTimestampTAG_FILTER_BY_DEPLOYED_STATE
deploymentbootstrapExpirationDateTAG_FILTER_BY_DEPLOYMENT
hostGatewayserialNumberTAG_FILTER_BY_HOST_GATEWAY
mechanismmechanismUrlTAG_FILTER_BY_MECHANISM
operatorSuspendedTAG_FILTER_BY_OPERATOR_SUSPENDEDTAG_FILTER_BY_LAST_OPERATOR_SUSPENDED_UPDATED_AT
vendorIdlifecycleStatusTAG_FILTER_BY_VENDOR_ID
lastSystemSuspendedCategoryTAG_FILTER_BY_LAST_SYSTEM_SUSPENDED_CATEGORY
namedeploymentTAG_FILTER_BY_NAME
connectorExpirationDatesystemSuspendedTAG_FILTER_BY_CONNECTOR_EXPIRATION_DATE
stateTAG_FILTER_BY_STATE
not in
servicevalidTAG_FILTER_BY_SERVICE
statusnameTAG_FILTER_BY_STATUS
namecertificateFingerprintTAG_FILTER_BY_NAME
subjectenrollmentModeTAG_FILTER_BY_SUBJECT
issuerstatusTAG_FILTER_BY_ISSUER
validdeviceExecutionModeTAG_FILTER_BY_VALID
deviceExecutionModeissuerTAG_FILTER_BY_DEVICE_EXECUTION_MODE
serviceTAG_FILTER_BY_SERVICE
enrollmentModesubjectTAG_FILTER_BY_ENROLLMENT_MODE
not in
servicevalidTAG_FILTER_BY_SERVICE
statusnameTAG_FILTER_BY_STATUS
namecertificateFingerprintTAG_FILTER_BY_NAME
subjectenrollmentModeTAG_FILTER_BY_SUBJECT
issuerstatusTAG_FILTER_BY_ISSUER
validdeviceExecutionModeTAG_FILTER_BY_VALID
deviceExecutionModeissuerTAG_FILTER_BY_DEVICE_EXECUTION_MODE
serviceTAG_FILTER_BY_SERVICE
enrollmentModesubjectTAG_FILTER_BY_ENROLLMENT_MODE